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, pdftotext |
| 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). pdftotext and pdftoppm are in
every runtime.
3. Cite the page
Tell the agent to extract one page at a time, so every quote has a page number:
For PDFs, read page by page with `pdftotext -f N -l N file.pdf -`. 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). |
| Scanned PDFs as text | pdftoppm -png, then read the 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. |