Skip to main content
Files are the core resource in AgentDrive. Any file your agent produces — PDFs, code, images, datasets, spreadsheets — can be stored and retrieved.

File properties

PropertyDescription
idUnique file identifier
drive_idDrive this file belongs to
pathFull path within the drive (e.g., reports/q1/summary.pdf)
filenameFile name (e.g., summary.pdf)
mime_typeAuto-detected MIME type
sizeFile size in bytes
content_hashSHA-256 hash computed on upload
content_previewFirst ~500 characters for text-based files
tagsArray of string labels for filtering
metadataCustom key-value pairs
expires_atOptional 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 via content_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. Pass tags as a query parameter to filter file listings.
{ "tags": ["quarterly", "finance", "automated"] }

TTL / expiring files

Set expires_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.