From the CLI
isProcessed flips to true and chunkCount
fills in. Verify retrieval actually fires with npx zavudev agents test — it reports
how many chunks the answer used.
Knowledge Base
A Knowledge Base lets your AI agent answer questions using your own documents. Upload FAQs, product docs, policies, or any text content, and the agent will search for relevant information when responding to customers.What is a Knowledge Base?
A Knowledge Base is a collection of documents that your agent can reference. When a customer asks a question, the agent:- Searches the knowledge base for relevant content
- Retrieves the most relevant chunks
- Includes that context in its prompt
- Generates an informed response
Use Cases
Via Dashboard
1
Navigate to Knowledge Bases
Go to Senders > select your sender > Agent tab > Knowledge Bases section.
2
Create Knowledge Base
Click Create Knowledge Base and enter:
- Name: A descriptive name (e.g., “Product FAQs”)
- Description: What this knowledge base contains
3
Add Documents
Click Add Document and choose how to add content:
- Text: Paste text content directly
- Markdown: Upload
.mdfiles - PDF: Upload PDF documents
- URL: Import content from a webpage
4
Wait for Processing
Documents are automatically chunked and embedded. This takes a few seconds for small documents, longer for large PDFs.
You’ll see a processing indicator while chunks are being created. The agent can only use fully processed documents.
5
Verify
Check the document list to see:
- Chunk Count: Number of searchable chunks created
- Processing Status: Whether the document is ready
Via API
Create Knowledge Base
Add Document
List Knowledge Bases
List Documents
Delete Document
How RAG Works
Processing Steps
- Chunking: Documents are split into smaller pieces (~500-1000 tokens each)
- Embedding: Each chunk is converted to a vector using an embedding model
- Indexing: Vectors are stored for fast similarity search
- Retrieval: When a question arrives, we find the most similar chunks
- Generation: Retrieved chunks are included in the LLM prompt as context
What you can put in, and where
Which formats are accepted depends on the surface, and the API is the narrowest of the three. It takes text and nothing else.
The API’s
POST /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents
takes title and content, both strings. There is no upload endpoint for
knowledge-base files and no URL parameter: to load a PDF or a page from your own
code, extract the text yourself and send it as content.
A document knows where it came from — sourceType and sourceUrl are stored and
returned, so one imported from the web can be told apart from one that was
pasted. They are not yet declared in the OpenAPI schema, so a generated SDK will
not type them; read them from the raw response until it is.
Importing a web page
In the dashboard, open the agent, go to Knowledge, choose a knowledge base, then Add document → URL. It reads that one page — not the site — and files it under a knowledge base named after the host, so several pages of the same site group together. Add the pages that answer questions one at a time: shipping, returns, pricing. The onboarding assistant can do the same thing if you paste a link into the chat. This adds to what the agent knows. It does not change the agent’s prompt, its model or its channels.Document Limits
The last three are the website importer’s caps. Documents you create through
the API or the dashboard are bounded by
content length, and by nothing else
today: there is no enforced ceiling on documents per knowledge base or on
knowledge bases per agent, so plan capacity from content size rather than from
a document count.
Best Practices
Structure Content
Use headers, bullet points, and clear sections. Well-structured content creates better chunks.
Be Specific
Include specific answers to common questions. The more explicit, the better the retrieval.
Keep Current
Update documents when information changes. Outdated content leads to incorrect answers.
Separate Topics
Create separate documents for different topics. This improves retrieval accuracy.
Content Writing Tips
Good document structure:Example Documents
FAQ Document
Product Document
Next Steps
Setup Guide
Configure your AI agent settings
Add Tools
Let your agent execute actions
Create Flows
Build structured conversation paths
AI Agents Concept
Learn how agents work under the hood
