Skip to content
VoiceMint Developers

Knowledge

Give agents your documents, pages and FAQs to answer from.

A knowledge base holds sources (files, web pages, text). Attach it to an agent with knowledge_base_ids and the agent answers from it, citing the passages it used.

Create a knowledge base and add sources#

curl -X POST https://api.voicemint.io/api/v1/agents/knowledge \
  -H "Authorization: Bearer $VOICEMINT_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "Product docs"}'

curl -X POST https://api.voicemint.io/api/v1/agents/knowledge/KB_ID/sources/file \
  -H "Authorization: Bearer $VOICEMINT_API_KEY" -F "file=@./handbook.pdf"

curl -X POST https://api.voicemint.io/api/v1/agents/knowledge/KB_ID/sources/url \
  -H "Authorization: Bearer $VOICEMINT_API_KEY" -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/pricing"}'

Files up to 25 MB. Ingestion runs in the background: a source is processing, then ready (or failed with a reason); poll GET /agents/knowledge/{kb_id}/sources.

Search it yourself#

POST /agents/knowledge/{kb_id}/search returns the best-matching passages for a query (top_k), the same retrieval the agent uses; handy for checking what an agent will see.