Skip to main content

Managed Files

Castari provides zero-configuration file storage for your agents. Upload files, attach them to agents, and they automatically appear in the sandbox.

Why Managed Files?

Your agents often need access to:
  • Data files (CSV, JSON, etc.)
  • Configuration files
  • Documents for processing
  • Reference materials
Managed files let you provide these simply without:
  • Setting up cloud storage buckets
  • Managing credentials
  • Configuring mount paths manually

How It Works

  1. Upload — Files go to Castari’s managed storage
  2. Attach — Link files to specific agents
  3. Mount — Files automatically appear at /files/agent/ in the sandbox

File Scopes

Files can be scoped for different uses:

Uploading Files

Via CLI

Via Dashboard

  1. Navigate to Files in the sidebar
  2. Click Upload File
  3. Select file and add optional description/tags

Via SDK

Attaching Files to Agents

Once uploaded, attach files to agents:

Via CLI

Via Dashboard

  1. Go to Agents → your agent
  2. Find the Attached Files section
  3. Click Attach File and select from your files

Via SDK

Using Files in Agents

Attached files are available at /files/agent/:
Files are read-only by default. Use --writable flag or set readOnly: false to allow writes.

Storage Limits

Check your usage:

Managed vs. BYO Storage

Castari supports both managed files and bring-your-own storage buckets:
Use managed files for simplicity. Use Storage Buckets for large datasets or when you need files in your own cloud.

File Metadata

Each file tracks:
  • Filename — Original name
  • Size — File size in bytes
  • Content Type — MIME type
  • SHA256 Hash — Integrity verification
  • Description — Optional description
  • Tags — Optional tags for organization

Best Practices

Organization

  • Use descriptions — Document what each file is for
  • Tag consistently — Use tags like dataset, config, reference
  • Clean up — Delete files you no longer need

Security

  • Don’t upload secrets — Use Secrets for credentials
  • Verify hashes — Check SHA256 for critical files
  • Review attachments — Only attach files agents actually need

Performance

  • Keep files small — For large datasets, use BYO storage
  • Use appropriate formats — CSV/JSON for structured data
  • Consider caching — Files are cached in the sandbox

See Also

cast files

CLI reference

Storage Buckets

BYO storage setup