Skip to main content
Files are unstructured resources — documents, PDFs, transcripts, playbooks. When attached to an agent or tool, their content is chunked and embedded so it can be retrieved by meaning (semantic search), not just keywords. You upload one from a local path with defineFile.

Define a file

files/playbook.ts
The content is uploaded on deploy; the file handle can then be referenced as an agent resource.

Supported types

Using files in agents

Attach files (or folders of files) as agent resources. The agent searches them with vector similarity — a query for “pricing concerns” surfaces content about “cost objections” even without the exact words. Add a prompt to steer how the agent prioritizes the content.

From the CLI

For structured, queryable data (CRM objects, tables) use models instead — files are for unstructured knowledge.