A knowledge base is a collection of documents ingested into vector storage that your agents search at runtime. When an agent needs domain-specific information, it calls the built-inDocumentation Index
Fetch the complete documentation index at: https://operativusai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
search_knowledge_base tool, retrieves the most relevant passages from your documents, and uses that context to generate accurate answers. This approach—where the agent decides when to look something up—is called Active RAG.
How agents use knowledge
When you attach a knowledge base to an agent, the agent is given access to thesearch_knowledge_base(query) tool. The agent autonomously decides when retrieval is necessary: it issues a query, receives semantically matched document chunks, and incorporates the results into its response. You do not need to configure any injection logic—retrieval happens automatically as part of the agent’s reasoning loop.
Active RAG gives agents the judgment to look up information only when relevant, rather than blindly prepending document context to every prompt.
Uploading documents
UsePOST /api/knowledge/upload with a multipart/form-data body. The file parameter is required. Supported formats are PDF and TXT.
The endpoint returns immediately with a PROCESSING status and a documentId. Ingestion—text extraction, chunking, and vector embedding—runs asynchronously in the background.
The document to upload. Must be a non-empty PDF or TXT file.
UUID of the knowledge base to associate this document with. Omit to add to the default knowledge base.
Optional human-readable description stored alongside the document metadata.
Loading URLs
To ingest a web page for a specific agent, trigger the knowledge load endpoint. Agent Manager scrapes the configured URLs for that agent and processes the content through the same ingestion pipeline as file uploads.Listing documents
GET /api/knowledge returns a paginated list of all ingested documents. Use the status field to track ingestion progress.
Document status values
PROCESSING
The document has been received and is being extracted, chunked, and embedded. It is not yet searchable.
COMPLETED
Ingestion succeeded. The document is fully indexed and available for semantic search.
FAILED
Ingestion encountered an error. Check
statusMessage for details. URL-sourced documents can be retried; file uploads must be re-uploaded.Testing semantic search
Before connecting a knowledge base to an agent, you can test retrieval directly withGET /api/knowledge/search.
Document objects ranked by semantic similarity to your query. Use this to verify that your documents are indexed correctly and that relevant content surfaces for representative queries.
Deleting a document
DELETE /api/knowledge/{id} removes a document and all associated vector rows from storage. The operation is a cascading delete: both the document metadata and its vector chunks are permanently removed.
204 No Content on success.
End-to-end example
Upload your document
Submit a PDF or TXT file via
POST /api/knowledge/upload and save the returned documentId.Wait for ingestion to complete
Poll
GET /api/knowledge and check the document’s status field. It will transition from PROCESSING to COMPLETED (or FAILED) as ingestion runs.Test retrieval
Run a test query with
GET /api/knowledge/search?query=... to confirm relevant content is returned.