Custom documents
Custom documents allow you to analyze your own data using Alfa agents. This guide explains how to upload documents, list them, and reference them in your agent prompts.
Uploading custom documents
You can upload your own documents (PDFs, Word files, Excel spreadsheets, etc.) to be processed and made available to your agents.
Example: Uploading quarterly reports
For large documents, the upload process may take some time as the system processes and indexes the content for searching.
Listing custom documents
To view all custom documents that you’ve uploaded:
Creating agents with custom documents
You can reference custom documents in your agent prompts using a special syntax. The agent will then be able to read and analyze these documents.
The {doc} placeholder in your prompt will be replaced with the actual document content when the agent processes it.
Understanding the document reference format
The payload for creating an agent with a document reference follows this structure:
- prompt: Your instruction with the
{doc}placeholder - args: A dictionary mapping placeholders to their values
- doc: The placeholder name that matches what you used in the prompt
- id: The unique ID of the document (obtained when uploading or listing documents)
- type: Must be “custom_document” to indicate you’re referencing a document
