# vamshipepalla/myvoiceagent-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/vamshipepalla/myvoiceagent-sdk
- Repository: https://github.com/vamshipepalla/myvoiceagent-sdk

## Overview

MYvoiceagent combines a configuration-driven LiveKit voice-agent SDK, outbound call runner, and local dashboard. The main workflow is browser user → dashboard UI/API → LiveKit room and dispatch → customer agent runtime/session → persisted transcripts and metrics, which the dashboard reads back. A separate CLI path places outbound SIP calls. Inbound agent files exist, but inbound handling is not implemented or verified. Several key relationships are documented or visible in excerpts; unsampled implementation details are omitted rather than inferred.

Main entry points: [`myagentsdk/session.py`](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/session.py) (Session Builder), [`myagentsdk/runtime.py`](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/runtime.py) (Runtime Orchestration), [`myagentsdk/observability.py`](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/observability.py) (Call Observability), [`frontend/src/App.tsx`](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/frontend/src/App.tsx) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_call_experience["Outbound Calling"]
  node_dashboard_ui["Dashboard UI<br/>[App.tsx]"]
  node_dashboard_api["Dashboard API<br/>[dashboard.py]"]
  node_sip_dialer["SIP Dialer<br/>[dial.py]"]
  node_agent_runner["Agent Runner<br/>[runner.py]"]
end

subgraph group_agent_runtime["Agent Runtime"]
  node_customer_agent["Outbound Agent<br/>[agent.py]"]
  node_agent_config["Config Validation<br/>[config.py]"]
  node_agent_runtime_impl["Runtime Orchestration<br/>[runtime.py]"]
  node_session_builder["Session Builder<br/>[session.py]"]
  node_agent_server["LiveKit Server Setup<br/>[app.py]"]
  node_inbound_agent["Inbound Agent Files<br/>[agent.py]"]
end

subgraph group_dashboard_data["Dashboard and Data"]
  node_observability["Call Observability<br/>[observability.py]"]
  node_call_db[("Call Metadata DB<br/>[observability.py]")]
  node_transcript_files["Transcript JSONL<br/>[observability.py]"]
end

subgraph group_provider_services["Voice Providers"]
  node_stt_provider["Deepgram STT"]
  node_llm_provider["Google Gemini"]
  node_tts_provider["Sarvam TTS"]
  node_vad_provider["Silero VAD"]
end

node_developer(("Developer"))
node_browser_user(("Browser User"))
node_telephony_user(("Phone Recipient"))
node_livekit["LiveKit"]

node_browser_user -->|"uses"| node_dashboard_ui
node_dashboard_ui -->|"requests data"| node_dashboard_api
node_dashboard_api -->|"issues room credentials"| node_livekit
node_dashboard_ui -->|"connects room"| node_livekit
node_livekit -->|"dispatches session"| node_agent_server
node_agent_runner -->|"creates runtime"| node_agent_runtime_impl
node_agent_runner -->|"registers runtime"| node_agent_server
node_agent_runtime_impl -->|"loads config"| node_agent_config
node_agent_runtime_impl -->|"loads agent module"| node_customer_agent
node_agent_runtime_impl -->|"starts session"| node_session_builder
node_agent_server -->|"sets up plugins"| node_session_builder
node_session_builder -->|"creates STT"| node_stt_provider
node_session_builder -->|"creates LLM"| node_llm_provider
node_session_builder -->|"creates TTS"| node_tts_provider
node_session_builder -->|"loads VAD"| node_vad_provider
node_agent_runtime_impl -->|"records turns"| node_observability
node_observability -->|"writes metadata"| node_call_db
node_observability -->|"writes transcripts"| node_transcript_files
node_dashboard_api -->|"reads call data"| node_observability
node_telephony_user -->|"receives call"| node_sip_dialer
node_sip_dialer -->|"places SIP call"| node_livekit
node_developer -->|"starts worker"| node_agent_runner

click node_dashboard_ui "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/frontend/src/App.tsx"
click node_dashboard_api "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/dashboard.py"
click node_sip_dialer "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/dial.py"
click node_agent_runner "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/runner.py"
click node_customer_agent "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/customer/MyAgent/outbound/agent.py"
click node_agent_config "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/config.py"
click node_agent_runtime_impl "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/runtime.py"
click node_session_builder "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/session.py"
click node_agent_server "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/app.py"
click node_observability "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/observability.py"
click node_call_db "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/observability.py"
click node_transcript_files "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/observability.py"
click node_inbound_agent "https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/customer/MyAgent/inbound/agent.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_ui,node_dashboard_api,node_sip_dialer,node_agent_runner,node_browser_user toneBlue
class node_customer_agent,node_agent_config,node_agent_runtime_impl,node_session_builder,node_agent_server,node_inbound_agent toneAmber
class node_observability,node_call_db,node_transcript_files toneMint
class node_stt_provider,node_llm_provider,node_tts_provider,node_vad_provider toneRose
class node_developer,node_telephony_user,node_livekit toneIndigo
```

## Components

### Outbound Calling

- [Dashboard UI](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Dashboard API](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/dashboard.py): `myagentrunner/dashboard.py`
- [SIP Dialer](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/dial.py): `myagentrunner/dial.py`
- [Agent Runner](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/runner.py): `myagentrunner/runner.py`

### Agent Runtime

- [Outbound Agent](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/customer/MyAgent/outbound/agent.py): `myagentrunner/customer/MyAgent/outbound/agent.py`
- [Config Validation](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/config.py): `myagentsdk/config.py`
- [Runtime Orchestration](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/runtime.py): `myagentsdk/runtime.py`
- [Session Builder](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/session.py): `myagentsdk/session.py`
- [LiveKit Server Setup](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/app.py): `myagentsdk/app.py`
- [Inbound Agent Files](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentrunner/customer/MyAgent/inbound/agent.py): `myagentrunner/customer/MyAgent/inbound/agent.py`

### Dashboard and Data

- [Call Observability](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/observability.py): `myagentsdk/observability.py`
- [Call Metadata DB](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/observability.py): `myagentsdk/observability.py`
- [Transcript JSONL](https://github.com/vamshipepalla/myvoiceagent-sdk/blob/main/myagentsdk/observability.py): `myagentsdk/observability.py`

### Voice Providers

- **Deepgram STT**
- **Google Gemini**
- **Sarvam TTS**
- **Silero VAD**

### Other components

- **Developer**
- **Browser User**
- **Phone Recipient**
- **LiveKit**

## Connections

- Browser User → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → Dashboard API: requests data (evidence: `README.md`)
- Dashboard API → LiveKit: issues room credentials (evidence: `README.md`)
- Dashboard UI → LiveKit: connects room (evidence: `README.md`)
- LiveKit → LiveKit Server Setup: dispatches session (evidence: `README.md`)
- Agent Runner → Runtime Orchestration: creates runtime (evidence: `myagentrunner/runner.py`)
- Agent Runner → LiveKit Server Setup: registers runtime (evidence: `myagentrunner/runner.py`)
- Runtime Orchestration → Config Validation: loads config (evidence: `myagentsdk/runtime.py`)
- Runtime Orchestration → Outbound Agent: loads agent module (evidence: `myagentsdk/runtime.py`)
- Runtime Orchestration → Session Builder: starts session (evidence: `myagentsdk/runtime.py`)
- LiveKit Server Setup → Session Builder: sets up plugins (evidence: `myagentsdk/app.py`)
- Session Builder → Deepgram STT: creates STT (evidence: `myagentsdk/session.py`)
- Session Builder → Google Gemini: creates LLM (evidence: `myagentsdk/session.py`)
- Session Builder → Sarvam TTS: creates TTS (evidence: `myagentsdk/session.py`)
- Session Builder → Silero VAD: loads VAD (evidence: `myagentsdk/session.py`)
- Runtime Orchestration → Call Observability: records turns (evidence: `myagentsdk/runtime.py`)
- Call Observability → Call Metadata DB: writes metadata (evidence: `myagentsdk/observability.py`)
- Call Observability → Transcript JSONL: writes transcripts (evidence: `myagentsdk/observability.py`)
- Dashboard API → Call Observability: reads call data (evidence: `myagentrunner/dashboard.py`)
- Phone Recipient → SIP Dialer: receives call (evidence: `README.md`)
- SIP Dialer → LiveKit: places SIP call (evidence: `README.md`)
- Developer → Agent Runner: starts worker (evidence: `README.md`)
