# coss-india/voicera architecture

> Architecture diagram of the GitHub repository coss-india/voicera, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/coss-india/voicera
- Repository: https://github.com/coss-india/voicera

## Overview

VoicEra is self-hosted infrastructure for real-time voice agents, with a dashboard/API control plane and a separate live-call runtime. Operators configure agents and campaigns; calls enter through browser or carrier telephony, then the runtime coordinates speech recognition, language-model responses, and speech synthesis. The repository also includes knowledge ingestion, asynchronous campaign work, provider adapters, and an optional self-hosted model gateway. Edges follow the README architecture or explicit source references in the supplied index; unsampled implementation details are not inferred.

Main entry points: [`apps/api/app/main.py`](https://github.com/coss-india/voicera/blob/main/apps/api/app/main.py) (Control API), [`apps/runtime/services/pipecat/pipeline.py`](https://github.com/coss-india/voicera/blob/main/apps/runtime/services/pipecat/pipeline.py) (Voice runtime), [`apps/telephony/providers/plivo/application.py`](https://github.com/coss-india/voicera/blob/main/apps/telephony/providers/plivo/application.py) (Carrier adapters), [`frontend/src/app/(app)/dashboard/page.tsx`](https://github.com/coss-india/voicera/blob/main/frontend/src/app/(app)/dashboard/page.tsx) (Operator dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Control plane"]
  node_dashboard["Operator dashboard<br/>[page.tsx]"]
  node_api["Control API<br/>[main.py]"]
  node_agent_config["Agent configuration<br/>[agent_service.py]"]
  node_campaign["Campaign orchestration"]
  node_knowledge["Knowledge management"]
end

subgraph group_execution["Voice execution"]
  node_runtime["Voice runtime<br/>[pipeline.py]"]
  node_runtime_routes["Call entry routes<br/>[telephony.py]"]
  node_browser_call["Browser calling"]
  node_ai_factory["AI service selection"]
end

subgraph group_integrations["Provider integrations"]
  node_telephony["Telephony integrations<br/>[base.py]"]
  node_carriers["Carrier adapters<br/>[application.py]"]
  node_provider_registry["AI provider registry<br/>[registry.py]"]
  node_provider_adapters["Speech and LLM adapters<br/>[service.py]"]
end

subgraph group_data["Data and jobs"]
  node_rag_ingest["PDF ingestion<br/>[ingest_pipeline.py]"]
  node_vector_store[("Knowledge vectors<br/>[chroma_store.py]")]
  node_database[("Application database<br/>[database.py]")]
  node_object_storage[("Object storage<br/>[object_storage.py]")]
  node_queue_workers["Campaign workers<br/>[campaign_tasks.py]"]
end

subgraph group_models["Model serving"]
  node_model_gateway["Model gateway<br/>[main.py]"]
  node_model_servers["Self-hosted models<br/>[core_engine.py]"]
end

node_operator(("Operator"))
node_caller(("Caller"))

node_operator -->|"uses"| node_dashboard
node_dashboard -->|"calls"| node_api
node_api -->|"configures"| node_agent_config
node_api -->|"orchestrates"| node_campaign
node_api -.->|"manages"| node_knowledge
node_knowledge -.->|"ingests documents"| node_rag_ingest
node_rag_ingest -->|"upserts vectors"| node_vector_store
node_api -->|"reads and writes"| node_database
node_api -->|"stores artifacts"| node_object_storage
node_api -->|"dispatches jobs"| node_queue_workers
node_caller -->|"calls through"| node_carriers
node_carriers -->|"streams audio"| node_runtime_routes
node_browser_call -.->|"connects"| node_runtime
node_runtime_routes -.->|"routes calls"| node_runtime
node_api -->|"configures"| node_runtime
node_runtime -->|"builds services"| node_ai_factory
node_ai_factory -->|"selects providers"| node_provider_registry
node_provider_registry -->|"registers adapters"| node_provider_adapters
node_runtime -->|"exchanges audio"| node_carriers
node_runtime -->|"stores call media"| node_object_storage
node_provider_adapters -.->|"may call"| node_model_gateway
node_model_gateway -->|"proxies inference"| node_model_servers

click node_dashboard "https://github.com/coss-india/voicera/blob/main/frontend/src/app/(app)/dashboard/page.tsx"
click node_api "https://github.com/coss-india/voicera/blob/main/apps/api/app/main.py"
click node_agent_config "https://github.com/coss-india/voicera/blob/main/apps/api/app/services/agent_service.py"
click node_campaign "https://github.com/coss-india/voicera/blob/main/apps/api/app/services/campaign/campaign_orchestrator.py"
click node_knowledge "https://github.com/coss-india/voicera/blob/main/apps/api/app/services/knowledge_service.py"
click node_rag_ingest "https://github.com/coss-india/voicera/blob/main/apps/api/app/rag/ingest_pipeline.py"
click node_vector_store "https://github.com/coss-india/voicera/blob/main/apps/api/app/rag/chroma_store.py"
click node_database "https://github.com/coss-india/voicera/blob/main/apps/api/app/database.py"
click node_object_storage "https://github.com/coss-india/voicera/blob/main/apps/runtime/services/storage/object_storage.py"
click node_queue_workers "https://github.com/coss-india/voicera/blob/main/apps/api/app/tasks/campaign_tasks.py"
click node_runtime "https://github.com/coss-india/voicera/blob/main/apps/runtime/services/pipecat/pipeline.py"
click node_runtime_routes "https://github.com/coss-india/voicera/blob/main/apps/runtime/routes/telephony.py"
click node_browser_call "https://github.com/coss-india/voicera/blob/main/frontend/src/components/call/BrowserCallSession.tsx"
click node_telephony "https://github.com/coss-india/voicera/blob/main/apps/telephony/base.py"
click node_carriers "https://github.com/coss-india/voicera/blob/main/apps/telephony/providers/plivo/application.py"
click node_ai_factory "https://github.com/coss-india/voicera/blob/main/apps/runtime/services/ai_service_factory.py"
click node_provider_registry "https://github.com/coss-india/voicera/blob/main/apps/providers/registry.py"
click node_provider_adapters "https://github.com/coss-india/voicera/blob/main/apps/providers/adapters/bhashini/service.py"
click node_model_gateway "https://github.com/coss-india/voicera/blob/main/model-server/gateway/app/main.py"
click node_model_servers "https://github.com/coss-india/voicera/blob/main/model-server/stt/indic-transcribe/core_engine.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_api,node_agent_config,node_campaign,node_knowledge toneBlue
class node_runtime,node_runtime_routes,node_browser_call,node_ai_factory toneAmber
class node_telephony,node_carriers,node_provider_registry,node_provider_adapters toneMint
class node_rag_ingest,node_vector_store,node_database,node_object_storage,node_queue_workers toneRose
class node_model_gateway,node_model_servers,node_operator,node_caller toneIndigo
```

## Components

### Control plane

- [Operator dashboard](https://github.com/coss-india/voicera/blob/main/frontend/src/app/(app)/dashboard/page.tsx): `frontend/src/app/(app)/dashboard/page.tsx`
- [Control API](https://github.com/coss-india/voicera/blob/main/apps/api/app/main.py): `apps/api/app/main.py`
- [Agent configuration](https://github.com/coss-india/voicera/blob/main/apps/api/app/services/agent_service.py): `apps/api/app/services/agent_service.py`
- [Campaign orchestration](https://github.com/coss-india/voicera/blob/main/apps/api/app/services/campaign/campaign_orchestrator.py): `apps/api/app/services/campaign/campaign_orchestrator.py`
- [Knowledge management](https://github.com/coss-india/voicera/blob/main/apps/api/app/services/knowledge_service.py): `apps/api/app/services/knowledge_service.py`

### Voice execution

- [Voice runtime](https://github.com/coss-india/voicera/blob/main/apps/runtime/services/pipecat/pipeline.py): `apps/runtime/services/pipecat/pipeline.py`
- [Call entry routes](https://github.com/coss-india/voicera/blob/main/apps/runtime/routes/telephony.py): `apps/runtime/routes/telephony.py`
- [Browser calling](https://github.com/coss-india/voicera/blob/main/frontend/src/components/call/BrowserCallSession.tsx): `frontend/src/components/call/BrowserCallSession.tsx`
- [AI service selection](https://github.com/coss-india/voicera/blob/main/apps/runtime/services/ai_service_factory.py): `apps/runtime/services/ai_service_factory.py`

### Provider integrations

- [Telephony integrations](https://github.com/coss-india/voicera/blob/main/apps/telephony/base.py): `apps/telephony/base.py`
- [Carrier adapters](https://github.com/coss-india/voicera/blob/main/apps/telephony/providers/plivo/application.py): `apps/telephony/providers/plivo/application.py`
- [AI provider registry](https://github.com/coss-india/voicera/blob/main/apps/providers/registry.py): `apps/providers/registry.py`
- [Speech and LLM adapters](https://github.com/coss-india/voicera/blob/main/apps/providers/adapters/bhashini/service.py): `apps/providers/adapters/bhashini/service.py`

### Data and jobs

- [PDF ingestion](https://github.com/coss-india/voicera/blob/main/apps/api/app/rag/ingest_pipeline.py): `apps/api/app/rag/ingest_pipeline.py`
- [Knowledge vectors](https://github.com/coss-india/voicera/blob/main/apps/api/app/rag/chroma_store.py): `apps/api/app/rag/chroma_store.py`
- [Application database](https://github.com/coss-india/voicera/blob/main/apps/api/app/database.py): `apps/api/app/database.py`
- [Object storage](https://github.com/coss-india/voicera/blob/main/apps/runtime/services/storage/object_storage.py): `apps/runtime/services/storage/object_storage.py`
- [Campaign workers](https://github.com/coss-india/voicera/blob/main/apps/api/app/tasks/campaign_tasks.py): `apps/api/app/tasks/campaign_tasks.py`

### Model serving

- [Model gateway](https://github.com/coss-india/voicera/blob/main/model-server/gateway/app/main.py): `model-server/gateway/app/main.py`
- [Self-hosted models](https://github.com/coss-india/voicera/blob/main/model-server/stt/indic-transcribe/core_engine.py): `model-server/stt/indic-transcribe/core_engine.py`

### Other components

- **Operator**
- **Caller**

## Connections

- Operator → Operator dashboard: uses (evidence: `README.md`)
- Operator dashboard → Control API: calls (evidence: `README.md`)
- Control API → Agent configuration: configures
- Control API → Campaign orchestration: orchestrates
- Control API → Knowledge management: manages
- Knowledge management → PDF ingestion: ingests documents
- PDF ingestion → Knowledge vectors: upserts vectors (evidence: `apps/api/app/rag/ingest_pipeline.py`)
- Control API → Application database: reads and writes (evidence: `apps/api/app/main.py`)
- Control API → Object storage: stores artifacts
- Control API → Campaign workers: dispatches jobs (evidence: `README.md`)
- Caller → Carrier adapters: calls through (evidence: `README.md`)
- Carrier adapters → Call entry routes: streams audio (evidence: `README.md`)
- Browser calling → Voice runtime: connects
- Call entry routes → Voice runtime: routes calls
- Control API → Voice runtime: configures (evidence: `README.md`)
- Voice runtime → AI service selection: builds services (evidence: `apps/runtime/services/pipecat/pipeline.py`)
- AI service selection → AI provider registry: selects providers (evidence: `apps/runtime/services/ai_service_factory.py`)
- AI provider registry → Speech and LLM adapters: registers adapters (evidence: `apps/providers/adapters/bhashini/service.py`)
- Voice runtime → Carrier adapters: exchanges audio (evidence: `README.md`)
- Voice runtime → Object storage: stores call media (evidence: `README.md`)
- Speech and LLM adapters → Model gateway: may call
- Model gateway → Self-hosted models: proxies inference (evidence: `model-server/gateway/app/main.py`)
