Collections and documents
A collection is a named, workspace-scoped set of documents with its own indexing settings (chunk size, re-index schedule). Create and manage collections on the dashboard Documents page. Each document in a collection is one of:- File — an uploaded PDF, DOCX, CSV, or text/markdown file. Files are static snapshots: the stored file is the document.
- URL — a live web page. The URL is the source of truth; the indexed text is only a retrieval index, and agents re-fetch the current page when they need up-to-date content.
- Integration — documents from connected providers (Google Docs, Notion). Not yet supported — the kind exists but ingestion returns a clear error until the adapters ship.
hourly / daily / weekly; manual only re-indexes on demand).
Live documents are references, not snapshots
For anything that lives online, agntdata deliberately does not treat the indexed copy as the document. Search results from URL (and later integration) documents are flaggedlive: true with a last_synced_at timestamp, and the agent is instructed to fetch the current content when details matter — so your agents never act on a stale copy of a page that changed yesterday.
Agent tools
Bind one or more collections to an agent (Agents → configure → Documents card, ordocument_collection_ids in the agent config). A non-empty binding grants two tools automatically:
agnt_documents_search— semantic search over one bound collection. Returns the top-matching chunks with a similarity score and each match’s parent document (id,name,kind,ref).agnt_documents_read— reads a document’s current content by id: a live fetch for URL documents, the extracted file for snapshots. Reads are progressive so agents don’t burn tokens on full documents: a bare call returns a peek (size, line/page/row counts, first ~40 lines),querygreps the full text server-side and returns only matching lines with context, andoffset/limitreads a bounded line window with pagination.
Saving email attachments to a collection
Email triage rules support a Save attachments action. When a rule with this action matches a message, the message’s document-type attachments (PDF, DOCX, CSV, text) are saved as files into the rule’s target collection and indexed automatically — invoices, contracts, and reports file themselves as they arrive. This is set up for you at mailbox connect. Onboarding screening provisions a workspace Email Attachments collection and always includes at least one rule that saves document attachments (either composed onto a stream rule like Receipts, or a standing document-capture rule). Your Inbox Manager and superagnt are bound to that collection automatically, so they can search everything triage files. You can retarget or remove the rule like any other. Two things to know:- Only attachments are saved. The email body is never stored in the document system.
- The action composes with the others — a rule can label the message, save its attachments, archive it, and escalate the thread, in that order.
save_to_documents action with a document_collection_id.
Reading attachments directly
Independent of saving, email-capable agents can read attachments in place:connection_gmail_list_attachments / connection_outlook_list_attachments lists a message’s file attachments, and read_attachment reads one’s extracted text (PDF, DOCX, CSV, and text files) with the same progressive contract as agnt_documents_read — peek by default, query to grep, offset/limit to window. Use these when a thread hinges on an attached document the agent hasn’t filed yet.
Related
Workspace database
Structured durable state for your agents.
Tools
The full deployed-agent tool registry.