Skip to content

Customer Dashboard — Call and Chatbot ​

This group is the AI calling + conversational core: Agents (AI/web agent config), Bulk Calling (outbound campaigns), Calls (inbound + call history), Analysis Schemas (what to extract from a call), AI Chatbot, and Knowledge Base.

The deep call mechanics are already documented. This doc maps the UI → API surface and cross-links rather than duplicating: see Campaign Call Flow, Inbound Calling System, Dynamic Agent Config, Analysis Schema System, and Recording Flow.

Screenshots ​

Agents — AI/web agent configBulk Calling — outbound campaignsCalls — inbound + historyAnalysis SchemasAI ChatbotKnowledge Base

Architecture Overview ​

How It Works (Step-by-Step) ​

  1. Agents (/agents). Create/clone/share AI and web agents, edit prompts (with versioning), enhance prompt via LLM, run Test Call / Test (web), link Dynamic Tools, and upload recorded-message / reference audio. Gated by voice_campaign + web_agent with the agents RBAC resource. Backed by Agent + AgentPromptVersion.
  2. Bulk Calling (/campaigns). Upload a CSV (/upload-campaign, with preview + AI column-mapping suggestion), or build a campaign from a segment (/create-campaign-from-segment). Start/stop/retry, schedule, and watch live progress via SSE (campaignUpdatesSSE). Gated by voice_campaign + the campaigns resource, with KYC required (requireKycForFeature). Backed by Campaign + CampaignReport. See Campaign Call Flow and Concurrent Calling System.
  3. Calls (/inbound). Inbound call handling + unified call history/analytics. Inbound IVR config per agent lives in inbound-ivr.routes.ts (GET/PUT/DELETE /api/agents/:agentId/inbound-ivr-config, call_flow_builder feature). Call history + recordings + per-call analysis come from contact.routes.ts. See Inbound Calling System.
  4. Analysis Schemas (/analysis-schemas). Define the structured fields to extract from each call. CRUD + clone + templates + industries. Gated by the analysis RBAC resource; feature call_analysis. Backed by AnalysisSchema. See Analysis Schema System.
  5. AI Chatbot (/chatbot). Build a chatbot flow, publish (generates an embed token), and review conversations, captured leads, and flow analytics (drop-off/paths/conversion). Gated by chatbot. Backed by Chatbot + ChatbotConversation + ChatbotLead.
  6. Knowledge Base (/knowledge-base). Crawl website URLs or upload documents; content is embedded for RAG so agents/chatbots can answer from it. Rate-limited (external HTTP). Gated by knowledge_base. Backed by KnowledgeBase + KnowledgeBasePage.

File Reference ​

FileRoleKey Functions
routes/agent.routes.tsAgent CRUD, test, prompt, tools, audiocreateAgent, testAgent, enhancePrompt, linkTool
routes/campaign.routes.tsBulk calling lifecycle + SSEuploadCampaign, startCampaign, campaignUpdatesSSE
routes/inbound-ivr.routes.tsPer-agent inbound IVR configgetInboundIvrConfig, updateInboundIvrConfig
routes/contact.routes.tsCall history, recordings, per-call analysislistContacts, getContactAnalysis
routes/analysisSchema.routes.tsAnalysis schema CRUD/templateslistSchemas, clone, create
routes/chatbot.routes.tsChatbot CRUD/publish/analyticscreateChatbot, publishChatbot, getAnalytics
routes/knowledge-base.routes.tsKB crawl/upload + RAGcreateKnowledgeBase, queryRAG

Data Model ​

CollectionWhy it existsKey fields
Agent / AgentPromptVersionAI/web agent config + prompt historyprompt, voice, tools
Campaign / CampaignReport / CampaignAnalysisOutbound call run + resultsstatus, contacts, metrics
ContactPer-call record (inbound + outbound)phone, outcome, recording
AnalysisSchemaExtraction schemafields, industry
Chatbot / ChatbotConversation / ChatbotLeadChatbot flow + chats + leadsflow, embed token
KnowledgeBase / KnowledgeBasePageCrawled/uploaded knowledge for RAGurl, content, embeddings

API Endpoints ​

Create agent ​

  • POST /create-agent · Auth: verifyJwt → requirePermission("agents","create") → requireFeatureAccess(voice_campaign/web_agent).

Upload + start campaign ​

  • POST /upload-campaign (campaigns.create + KYC + feature), POST /start-campaign/:campaignUID (campaigns.edit + KYC).

Inbound IVR config ​

  • GET/PUT/DELETE /api/agents/:agentId/inbound-ivr-config · Auth: verifyJwt → requirePermission("inbound",...) → (call_flow_builder on writes).

Analysis schemas ​

  • GET/POST/PUT/DELETE /api/v2/analysis-schemas[...] · Auth: verifyJwt + requirePermission("analysis", view|create|edit|delete).

Chatbot ​

  • POST /api/chatbots, POST /api/chatbots/:id/publish, GET /api/chatbots/:id/analytics · Auth: verifyJwt + requireFeatureAccess(chatbot) + requirePermission("chatbot",...).

Knowledge base ​

  • POST /api/knowledge-bases, POST /api/rag/query · Auth: verifyJwt + requireFeatureAccess(knowledge_base) (rate-limited).

External Integrations ​

  • LiveKit — all calling (outbound campaigns, inbound, web agent, test calls) runs through the LiveKit Agent Server. See Campaign Call Flow.
  • SIP providers / phone numbers — inbound routing uses provisioned numbers/trunks. See Inbound Calling System.
  • STT/LLM/TTS providers — transcription, analysis, and voice synthesis; recording-based transcription uses Sarvam STT.
  • RAG / embeddings — Knowledge Base content is embedded for agent/chatbot retrieval.

How to Test (End-to-End) ​

  1. Grant voice_campaign; create an Agent and run a Test Call.
  2. Upload a small CSV campaign (complete KYC first), Start it, and watch live progress via SSE; confirm a CampaignReport is produced.
  3. Open Calls; confirm the call history and per-call analysis render.
  4. Create an Analysis Schema and attach it to an agent; confirm extracted fields appear on a call.
  5. Build and publish a Chatbot; confirm an embed token is generated and a test conversation is logged.
  6. Create a Knowledge Base from a URL; confirm pages are crawled and a RAG query returns content.

Troubleshooting ​

SymptomCauseFix
Can't start a campaignKYC not completed, or no creditsComplete KYC; top up credits
Agents hiddenvoice_campaign/web_agent offGrant the calling features
Inbound config PUT 403call_flow_builder feature offGrant IVR Workflow
Analysis empty on callsNo analysis schema attached, or call_analysis offAttach a schema; grant Call Analysis
KB crawl fails/slowRate-limited or target site blocks crawlerRetry later; upload documents instead

Last updated: