Inbound Support Agent + Knowledge Base
Inbound Support Agent + Knowledge Base
What you build: a +234 phone line that, when called, is answered by an AI agent that speaks your greeting, understands the caller, and answers from your documents (FAQ, refund policy, price list) using retrieval-augmented generation (RAG). Unknown or sensitive requests get transferred to a human. You receive a webhook with the transcript when the call ends.
Who it’s for: the SME or fintech founder who wants their +234 line answered without staffing it. This is the platform’s “hello world” — it touches numbers, hosted AI, KB/RAG, and webhooks in one flow.
Prerequisites
- A live API key (
pk_live_…) or sandbox key (pk_test_…) from your dashboard. - A webhook receiver (any HTTPS endpoint) if you want the end-of-call transcript. See Webhooks for signature verification. You can skip this and add it later.
- One or more documents (PDF/DOCX/TXT/URL) to ground the agent.
Step 1 — Build the knowledge base
Create the KB, then add a document. Full detail (file uploads, status polling) is in the Knowledge Base deep-dive; here’s the short path with a URL source (no upload step):
Poll the document until status: "ready" before your first call — only ready documents are searched:
Step 2 — Create the agent
Create a hosted-AI agent with a greeting, a voice, and the KB attached. Because it’s hosted, retrieval is automatic on every turn — you write no RAG code.
recording_enabled requires workspace-level recording to be on, and consent_required: true plays a DTMF consent prompt before recording — the NDPR default. Set consent_required: false only if you collect consent independently.
<model_id> and <voice_id> are placeholders. List the models available to your workspace with GET /v1/ai/models, and the TTS voices with GET /v1/voice/models, then use one of those ids. Omit either field to use the platform default.
Step 3 — Provision a number bound to the agent
POST /v1/numbers/auto claims the first available number of the requested type and binds it to the agent in one call — so the number is answered by the agent immediately. (This is why the agent is created first.)
That’s the whole build. Anyone who dials +2341002223344 now reaches the agent.
Number type is one of geo_did, mobile_virtual, intl_did, shortcode. To pick a specific number instead of auto-claiming, list candidates with GET /v1/numbers/available and provision one via POST /v1/numbers with {number_id, agent_id, channels}. In the sandbox, numbers are drawn from the test range and there’s no charge.
Step 4 — Handle the end-of-call webhook (optional)
When a call ends, Voicebip POSTs call.completed to your workspace webhook with the transcript. Verify the signature, then log it:
The call.completed payload (inside the webhook envelope’s payload):
status is completed for any call that ended; there is no per-call “confirmed/declined” field. Voicebip separately AI-classifies the call outcome as resolution: resolved | unresolved on the Call object once classification runs.
Config: the whole thing
Test it (sandbox, no real call)
With a pk_test_ key, fire a synthetic call.completed at your webhook and watch it arrive with a real HMAC signature — no SIP, no billing:
You can also chat with the agent’s brain directly (no telephony) via the playground to sanity-check that the KB is grounding answers:
See Sandbox Mode for the full synthetic-event catalogue.
Troubleshooting
Next steps
- Let the agent do things, not just answer → Voice agent with tool-calling.
- Answer on WhatsApp too, from the same KB → WhatsApp AI agent.
- Serve callers in Hausa, Yoruba, Igbo, or Pidgin → set
languageon the agent. - Understand retrieval tuning (chunking,
top_k, relevance gate) → Knowledge Base deep-dive.