How sanketwork300-hash/voiceagent_for_bsfi works
This is a BFSI conversational-agent platform: a shared backend runtime serves customer chat and voice, while a Next.js assistant and operator console provide the user-facing surfaces. The principal flow is a customer message through a channel and API into the agent runtime, which can retrieve grounded knowledge or request a tool; tool execution is mediated by policy before reaching institution systems. Document ingestion, authentication, handoff, governance, and evaluation are distinct product capabilities. Some links are documented only at README level; unsampled integrations are not mapped in detail.
Main entry points: orchestrator.py Agent runtime · router.py Tool gateway · engine.py Policy engine · app Assistant and console
Components 23
User experiences
- Assistant and console
frontend/src/app - Chat channel
backend/app/channels/chat - Voice channel
backend/app/channels/voice
Agent runtime
- Agent runtime
backend/app/agents/orchestrator.py - Workflow execution
backend/app/agents/execution/executor.py - LLM providers
backend/app/llm - Tool gateway
backend/app/tools/router.py - Tool registry
backend/app/tools/registry.py - Institution APIs and MCP
backend/app/tools
Knowledge
- Document ingestion
backend/app/knowledge/ingestion/pipeline.py - Knowledge retrieval
backend/app/knowledge/rag.py - Knowledge index
backend/app/knowledge/retrieval/base.py
Trust and governance
- Policy engine
backend/app/policies/engine.py - Human approval
backend/app/policies/approval.py - Human handoff
backend/app/escalation/handoff.py - Customer authentication
backend/app/auth/authentication.py
Platform services
- HTTP API
backend/app/main.py - Session state
backend/app/sessions/manager.py - Platform database
backend/app/database/session.py - Agent evaluation
backend/app/evaluation - Audit and observability
backend/app/observability
Other components
- Customer
- Operator
Connections 23
- Customer → Assistant and console: uses
README.md - Operator → Assistant and console: operates
README.md - Assistant and console → HTTP API: calls
- HTTP API → Chat channel: routes requests
- Chat channel → Agent runtime: submits turns
README.md - Voice channel → Agent runtime: submits turns
README.md - Agent runtime → LLM providers: orchestrates
backend/app/agents/orchestrator.py - Agent runtime → Workflow execution: delegates
backend/app/agents/orchestrator.py - Workflow execution → Tool gateway: executes tools
backend/app/agents/execution/executor.py - Tool gateway → Policy engine: checks policy
backend/app/tools/router.py - Tool gateway → Tool registry: resolves tools
backend/app/tools/router.py - Tool gateway → Institution APIs and MCP: dispatches calls
backend/app/tools/router.py - Agent runtime → Knowledge retrieval: retrieves context
backend/app/agents/orchestrator.py - Knowledge retrieval → Knowledge index: searches index
backend/app/knowledge/rag.py - Document ingestion → Knowledge index: indexes chunks
backend/app/knowledge/ingestion/pipeline.py - Policy engine → Human approval: requests approval
backend/app/policies/engine.py - Agent runtime → Human handoff: initiates handoff
backend/app/agents/orchestrator.py - Agent runtime → Customer authentication: checks identity
backend/app/agents/orchestrator.py - Agent runtime → Session state: uses session state
backend/app/agents/orchestrator.py - Session state → Platform database: persists state
backend/app/sessions/manager.py - Policy engine → Platform database: loads rules
backend/app/policies/engine.py - Agent evaluation → Agent runtime: evaluates behavior
README.md - Audit and observability → Agent runtime: records runtime
README.md