Answer from your documents
The agent answers from documents it opens with its tools. Pick where they live:
| Documents | Put them | The agent finds them with |
|---|---|---|
| A small fixed set (policies, a price list) | The recipe’s files/ folder | grep and read |
| Different per task, up to 100 files | Uploads attached to the task | read, and the documents tool for PDF and Word |
| Spreadsheets or presentations | Uploads attached to the task, with document tools in the recipe | A view_file tool you add |
| More than 100, or changing (a wiki, a data room) | Your search or storage MCP server | That server’s tools |
You need: a recipe you can change (Build).
1. Ship a small set with the recipe
Put text or Markdown (not PDF: grep can’t search it) in a subfolder of
files/, and give the agent the file tools.
tools: [read, grep, find, ls, bash]Answer only from the documents in /workspace/files/policies/. Search them with grep,
read the matching file, and cite its name. If nothing matches, say so.files/policies/refunds.md arrives read-only at /workspace/files/policies/refunds.md.
2. Attach documents per task
introspection tasks create --runtime support-agent -e production \
--file @./contract.pdf --prompt "Does this contract allow early termination?"A task takes up to 100 attachments, each up to 25 MB
(Send files in and out). Read PDF and Word attachments with
the documents tool: declare the formats and add it to the agent’s tools
(Read Word and PDF files).
{ "pi": { "documents": [{ "format": "pdf" }, { "format": "docx" }] } }tools: [read, grep, find, ls, documents]3. Cite the page
The documents tool’s read returns a PDF page by page, so every quote has a
page number:
Read PDFs and Word files with the documents tool. Cite every figure and quote as
(file name, p. N). Never cite a page you did not read.To require citations rather than hope for them, make sources a required
field of a submit tool.
4. Review a large set
Past 100 files, or for a findings grid across a data room:
- Search: bind a search or storage server holding the set (MCP).
- Fan out: start one task per document, in waves (batch), each writing one small JSON output, then merge them in your code.
- Split in one task: the main agent hands documents to helpers, up to 64 running at once (Split work across agents).
Verify
introspection local -p "What is our refund window? Cite the file."
introspection conversations get <task-id> -o json \
--query "items[?attributes.gen_ai.operation.name=='execute_tool'].attributes.gen_ai.tool.name"Run introspection local from the recipe directory. Expect an answer naming a
file, and grep, read, bash, or search calls in the cloud task.
Or ask your agent: “Make support-agent answer only from files/policies and cite file and page.”
Limits
| Not supported | Do this instead |
|---|---|
| A built-in vector index | Your search server (step 4). |
| More than 100 attachments per task | Search, or fan out (step 4). |
Reading Word files with read or grep | The documents tool. |
Reading Excel or PowerPoint files with read or grep | Add document tools to the recipe. |
| Scanned PDFs as text | The documents tool’s render, then read the page images with a vision model. |
| One shared search key for every end user | Authorize an application on the endpoint and filter on the JWT sub. |