What Are Documents?
Documents are files you upload to your Parallel AI workspace to build a knowledge base for your agents. When an agent hasknowledgeBaseEnabled: true, it can search through your documents in real time and use the retrieved content to answer user questions with accuracy and context.
Use your knowledge base to give agents access to:
- Product documentation and FAQs
- Internal policies and procedures
- Support runbooks and troubleshooting guides
- Sales materials and pricing sheets
- Any other reference content your agents should know about
Documents are processed and indexed automatically after upload. Once indexed, your agents can search and retrieve relevant passages in real time during conversations.
How Agents Use Documents
When a conversation requires a factual answer, an agent withknowledgeBaseEnabled: true performs a semantic search against your document index and injects the most relevant passages into its context before responding.
You can control which documents an agent can access using knowledgeBaseScope:
This lets you run multiple specialized agents that each have access to only the documents relevant to their role.
Core Operations
Uploading a Document
1
Prepare your file
Supported formats typically include PDF, plain text, Markdown, and DOCX. Check that your document is well-structured for best retrieval results.
2
Upload via API
Send a
POST /api/v0/documents request with your file and optional metadata such as folder path.3
Wait for indexing
The document is processed and indexed automatically. Once complete, agents with the matching
knowledgeBaseScope can search it immediately.Listing Documents with Pagination
Retrieve all documents in your workspace with optional pagination:Retrieving a Specific Document
Deleting a Document
Deleting a document removes it from the index. Agents will no longer be able to retrieve content from it. This action is irreversible.
Enabling Knowledge Base on an Agent
Once your documents are uploaded, enable knowledge base access on any agent:Best Practices
Use descriptive file names
Clear file names help with organization and make it easier to manage your knowledge base as it grows.
Keep documents focused
Shorter, topic-focused documents tend to yield more precise retrieval results than large, multi-topic files.
Use folder scoping
Segment documents into folders and use
knowledgeBaseScope on agents to keep each agent focused on its relevant content.Update regularly
Delete outdated documents and upload updated versions to ensure agents always answer with current information.
Next Steps
Documents API Reference
Full reference for upload, list, retrieve, and delete endpoints.
AI Agents
Enable knowledge base access on your agents and set scope per agent.
