File properties
| Property | Description |
|---|---|
id | Unique file identifier |
drive_id | Drive this file belongs to |
path | Full path within the drive (e.g., reports/q1/summary.pdf) |
filename | File name (e.g., summary.pdf) |
mime_type | Auto-detected MIME type |
size | File size in bytes |
content_hash | SHA-256 hash computed on upload |
content_preview | First ~500 characters for text-based files |
tags | Array of string labels for filtering |
metadata | Custom key-value pairs |
expires_at | Optional TTL — file auto-deletes after this timestamp |
Content upload
Files are uploaded as base64-encoded content in the request body. MIME type is auto-detected from the file extension, or you can set it explicitly viacontent_type.
Content hash
A SHA-256 hash is computed on every upload. Use this to verify file integrity or detect duplicates.Content preview
For text-based files (text/*, application/json, text/csv), AgentDrive stores the first ~500 characters as content_preview. This lets agents and humans quickly see what a file contains without downloading it.
Tags
Tags are string labels you attach to files for organization and filtering. Passtags as a query parameter to filter file listings.
TTL / expiring files
Setexpires_at to an ISO 8601 timestamp and the file will be automatically deleted after that time. Useful for temporary agent outputs that don’t need long-term storage.