Skip to main content

From the CLI

Processing takes a few seconds; 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.
A prompt that says “only state what the documentation returns” with no documents attached does not refuse. It invents. Attach the documents before relying on that instruction.

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:
  1. Searches the knowledge base for relevant content
  2. Retrieves the most relevant chunks
  3. Includes that context in its prompt
  4. Generates an informed response
This approach is called RAG (Retrieval Augmented Generation).

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 .md files
  • 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

  1. Chunking: Documents are split into smaller pieces (~500-1000 tokens each)
  2. Embedding: Each chunk is converted to a vector using an embedding model
  3. Indexing: Vectors are stored for fast similarity search
  4. Retrieval: When a question arrives, we find the most similar chunks
  5. 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.
File extraction is text only. Images and charts are not read, and a table is flattened into the surrounding text.

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:
Poor document structure:
Write documents as if you’re answering specific customer questions. This makes retrieval more accurate.

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