Skip to content
VaakyoDocs
Navigation
Open console →

Agents

Knowledge base

A knowledge base holds your own reference material (PDFs, text files, web pages, and plain text) so an agent can look up facts about your business during a call—such as prices, hours, and policies—and answer accurately instead of guessing.

How it works

  1. Create and populate: You create a knowledge base and add sources to it. Each source is automatically processed: text is extracted, split into passages with boundary overlap so context is preserved, and indexed for semantic search.
  2. Attach to agents: Attach the knowledge base to one or more agents in the agent’s LLM tab or via knowledge_base_ids.
  3. During a call: The agent uses the built-in search_knowledge_base tool. When callers ask factual questions, the agent queries the knowledge base and retrieves the most relevant passages (up to five) along with source titles.
  4. Answer grounded in fact: The agent formulates its answer using those passages. If no matching information exists, the tool indicates this so the agent can politely inform the caller rather than inventing facts.

Searches are semantic: phrasing such as “kya aap Sunday ko khule ho?” matches a document stating “closed on Sundays” even without direct keyword overlap.

Each search is recorded on the call timeline as a kb.search event.

Sources and limits

SourceDetailsLimits
PDF fileText extracted from every page. Password-protected files or scanned images without readable text are not supported.5 MB and 100 pages per file
Text file (.txt, .md)UTF-8 plain text or Markdown.10 MB per file
Pasted textPlain text with a custom title.500,000 characters
Web pageMain article text extracted (navigation and boilerplate discarded).5 MB per page, public addresses only
LimitValue
Knowledge bases per workspace20
Sources per knowledge base50
Passages per knowledge base3,000 (roughly 3 MB of text)
Knowledge bases per agent10

Web pages must be accessible on the public internet. Private network addresses (loopback, private IP ranges, cloud metadata endpoints) are rejected.

Source status

statusMeaning
processingCurrently being extracted and indexed.
readySearchable. chunk_count reflects the indexed passages.
failedProcessing error. Check error for details.

Using knowledge bases with an agent

Attach knowledge bases via the console or specify knowledge_base_ids on the agent configuration:

FieldTypeDefaultDescription
knowledge_base_idsarray of strings[]Up to 10 knowledge base IDs accessible to your workspace.
knowledge_modestring"auto"Reading strategy: "auto" or "search".

PUT /api/v1/agents/{id} replaces the whole configuration, so fetch the agent, change knowledge_base_ids, and send it back:

curl -s https://api.vaakyo.com/api/v1/agents/$AGENT_ID -H "Authorization: Bearer $VAAKYO_API_KEY" \
  | jq '.knowledge_base_ids = ["kb_5f2c..."]' > agent.json
curl -X PUT https://api.vaakyo.com/api/v1/agents/$AGENT_ID \
  -H "Authorization: Bearer $VAAKYO_API_KEY" -H "Content-Type: application/json" \
  -d @agent.json

Retrieval modes

  • Inline context ("auto", default): When attached knowledge bases contain under 30,000 characters total, the entire text is provided directly in the prompt at call startup. This ensures instant, complete access without a separate retrieval round-trip.
  • Search: For larger knowledge bases (or when knowledge_mode is set to "search"), the agent calls search_knowledge_base during the conversation to retrieve up to 5 relevant passages combining semantic search and keyword matching.

search_knowledge_base is a reserved tool name and cannot be used for custom agent tools.

Test retrieval in the console: open the knowledge base and use Test a search to see which passages a question finds, with their scores.

API endpoints

All endpoints are available under /api/v1/knowledge-bases:

Method and pathDescription
GET /knowledge-basesList knowledge bases with usage statistics
POST /knowledge-basesCreate a knowledge base ({"name", "description"})
GET /knowledge-bases/{id}Retrieve knowledge base details and sources
DELETE /knowledge-bases/{id}Delete knowledge base (returns 409 if currently attached to active agents)
POST /knowledge-bases/{id}/sources/fileUpload a PDF or text file
POST /knowledge-bases/{id}/sources/urlAdd a web page source
POST /knowledge-bases/{id}/sources/textAdd plain text source
DELETE /knowledge-bases/{id}/sources/{source_id}Remove a source

Renaming a knowledge base, processing a source again and testing a search are done in the console.

Esc