Use this file to discover all available pages before exploring further.
The Knowledge API gives you full control over the documents that power your agents’ Retrieval-Augmented Generation (RAG) capabilities. You can upload files for embedding, run semantic searches against the vector store, delete documents and their associated embeddings, and trigger URL-based ingestion for an agent’s configured web sources.Uploaded documents are processed asynchronously — the API returns immediately with a PROCESSING status, and the document transitions to COMPLETED or FAILED as the embedding pipeline runs.All requests require a valid bearer token in the Authorization header.
Uploads a file for ingestion into the vector store. The file is processed asynchronously — the response returns immediately with status: "PROCESSING".Supported file types: PDF (.pdf), plain text (.txt).
Raw file bytes are not persisted after ingestion — only the extracted text and vector embeddings are stored. If ingestion fails, you must re-upload the original file; retrying a failed file upload via the retry endpoint is not supported.
Runs a semantic similarity search across all ingested documents using pgvector. Returns the most relevant document chunks ranked by embedding similarity.
[ { "id": "chunk_abc_001", "content": "Employees may work remotely up to three days per week with manager approval...", "metadata": { "source": "company-policy-2025.pdf", "page": 12 } }]
Deletes a document and all of its associated vector embeddings from the system. This is a hard delete — all embedding chunks stored in pgvector are removed in cascade.
Triggers an asynchronous job to scrape and ingest the web URLs configured for the specified agent. Use this to refresh an agent’s knowledge base after its source URLs are updated. Returns a jobId immediately.
Document status transitions (PROCESSING → COMPLETED or FAILED) can be monitored by polling GET /api/knowledge and checking the status field of the document.