Knowledge Base
Upload documents, build a semantic search index, and give your agents access to your organization's knowledge through retrieval-augmented generation (RAG).
Overview
The knowledge base lets you upload documents and make their content searchable by your agents. When an agent uses the knowledge_search tool, it performs a semantic search across your uploaded content and returns the most relevant passages. This is commonly known as retrieval-augmented generation (RAG).
Access the knowledge base from the Knowledge tab in your project. The knowledge base is scoped to the active environment, so production and staging can have different content.
Adding Knowledge
Click Add Knowledge to upload content. You can add content in two ways:
Text
Paste text content directly. Useful for FAQs, documentation excerpts, product descriptions, or any structured text.
File Upload
Upload PDF documents, images, or text files. PDFs are parsed and chunked automatically. Images are processed using vision models.
| Content Type | Supported Formats | Processing |
|---|---|---|
Text | Plain text, .txt | Text is chunked and embedded for semantic search |
PDF | Pages are extracted, chunked, and embedded. Page numbers are preserved in results. | |
Image | .png, .jpg, .jpeg, .webp | Images are analyzed using vision models and the extracted content is embedded |
Upload Options
| Field | Description |
|---|---|
| Entry ID | Optional custom identifier. If omitted, one is generated automatically. Useful for updating existing entries. |
| Namespace | Optional grouping label to organize entries. Agents can search within a specific namespace to narrow results. |
Namespaces
Namespaces let you organize knowledge entries into logical groups. For example, you might use namespaces like product-docs, faq, and policies to separate different types of content.
- Filter entries in the dashboard by namespace using the dropdown filter
- The stats bar shows the total number of namespaces alongside document and chunk counts
- When querying, agents can scope their search to a specific namespace for more targeted results
Querying the Knowledge Base
There are two ways to query the knowledge base:
From the Dashboard
Click the Search button on the Knowledge page to open the query dialog. Enter a natural language query and optionally filter by namespace. Results show the matching passages ranked by relevance score, with links to the source entry. This is useful for testing that your knowledge base returns the right content for expected queries.
From Your Agents
Give your agents access to the knowledge base using the built-in knowledge_search predefined tool. The agent will automatically search for relevant content when it determines it needs additional context to answer a question.
# agents/support-agent.yaml
version: "1.0"
name: support-agent
type: llm
model: gemini/gemini-2.5-pro
description: "Answers customer questions using the knowledge base"
system_prompt: |
You are a customer support agent.
Use the knowledge_search tool to find relevant information
before answering questions.
tools:
- knowledge_searchSee the Knowledge Tools docs for full configuration options including namespace filtering, result limits, and score thresholds.
Managing Entries
The knowledge base table shows all entries and active upload jobs. Each entry displays its type, entry ID, chunk count, namespace, and creation date.
- View details: Click an entry to see its full content, all chunks with token counts, and metadata. For PDFs, page numbers are included per chunk.
- Filter: Narrow the list by searching entry IDs, filtering by namespace, or filtering by content type
- Delete: Remove entries you no longer need. This removes the entry and all its chunks from the search index.
- Upload status: Active upload jobs appear at the top of the table with a status indicator (pending, processing)
Managing Knowledge from Agents
Beyond the dashboard, agents can programmatically add and remove knowledge entries using predefined tools:
| Tool | Description |
|---|---|
| store_knowledge | Store new text content in the knowledge base. Supports custom entry IDs, namespaces, and metadata. |
| delete_knowledge | Remove a specific entry from the knowledge base by entry ID, optionally scoped to a namespace. |
This lets agents build and maintain their own knowledge over time. For example, an agent could store summaries of processed documents or delete outdated entries automatically. See the Predefined Tools docs for usage details and the Knowledge Tools docs for full configuration options.
Knowledge Entry Limits
The number of knowledge entries is limited by your subscription tier. Usage is tracked across all environments in the project. Check your current usage in Project Settings → Billing.