# pipecat-ai/voice-ui-kit architecture

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

- Interactive diagram: https://gitdiagram.com/pipecat-ai/voice-ui-kit
- Repository: https://github.com/pipecat-ai/voice-ui-kit

## Overview

Pipecat Voice UI Kit provides React components, hooks, and templates for building voice-AI interfaces. The principal workflow is an app developer configuring a template or composing a custom UI, connecting it to a Pipecat bot through a transport, and presenting conversation, media controls, and diagnostics. The repository also contains a separate RAG indexing and retrieval tool. Relationships among UI modules are limited to those shown in excerpts or documented in the README; some unsampled integration links are therefore omitted.

Main entry points: [`package/src/templates/Console/index.tsx`](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Console/index.tsx) (Console Template), [`scripts/rag/run.py`](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/run.py) (RAG Runner), [`scripts/rag/db.py`](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/db.py) (Vector Database), [`scripts/rag/utils.py`](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/utils.py) (RAG Utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Foundation"]
  node_appbase["Pipecat App Base<br/>[PipecatAppBase.tsx]"]
  node_transport["Transport Adapters<br/>[transports.ts]"]
  node_connection["Connection State"]
  node_eventstream["Event Stream"]
end

subgraph group_experience["UI Experience"]
  node_console["Console Template<br/>[index.tsx]"]
  node_widget["Widget Template<br/>[index.tsx]"]
  node_conversation["Conversation UI<br/>[Conversation.tsx]"]
  node_events["Events Panel<br/>[EventsPanel.tsx]"]
  node_screencontrol["Screen Control"]
  node_keypad["Keypad Toggle<br/>[KeypadToggle.tsx]"]
  node_codec["Codec Setter"]
  node_metrics["Metrics<br/>[Metrics.tsx]"]
end

subgraph group_theme["Theme and Visuals"]
  node_themeprovider["Theme Provider<br/>[ThemeProvider.tsx]"]
  node_themecontext["Theme Context"]
  node_usetheme["Theme Hook<br/>[useTheme.ts]"]
  node_waveform["Voice Visualizer<br/>[index.tsx]"]
  node_circular["Circular Waveform<br/>[index.tsx]"]
  node_canvas["Waveform Renderer<br/>[canvas.ts]"]
  node_plasma["Plasma Visualizer<br/>[Plasma.tsx]"]
end

subgraph group_rag["RAG Tooling"]
  node_ragrun["RAG Runner<br/>[run.py]"]
  node_source["Source Processor<br/>[source.py]"]
  node_docs["Docs Processor<br/>[docs.py]"]
  node_examples["Example Processor<br/>[examples.py]"]
  node_database[("Vector Database<br/>[db.py]")]
  node_retrieval["Retrieval Chain<br/>[retrieve.py]"]
  node_ragconfig["RAG Configuration<br/>[config.py]"]
  node_ragutils["RAG Utilities<br/>[utils.py]"]
end

node_developer(("App Developer"))
node_raguser(("RAG Operator"))

node_developer -->|"configures"| node_console
node_developer -->|"composes"| node_appbase
node_console -->|"renders"| node_keypad
node_console -->|"configures"| node_codec
node_console -->|"renders"| node_screencontrol
node_console -->|"renders"| node_events
node_console -.->|"connects through"| node_appbase
node_appbase -.->|"uses"| node_transport
node_themeprovider -->|"provides"| node_themecontext
node_usetheme -->|"reads"| node_themecontext
node_circular -->|"renders with"| node_canvas
node_raguser -.->|"runs"| node_ragrun
node_ragrun -->|"processes source"| node_source
node_ragrun -->|"processes docs"| node_docs
node_ragrun -->|"processes examples"| node_examples
node_ragrun -.->|"indexes documents"| node_database
node_ragrun -->|"queries"| node_retrieval
node_retrieval -->|"retrieves from"| node_database
node_database -->|"loads settings"| node_ragconfig
node_database -->|"logs through"| node_ragutils
node_source -->|"uses"| node_ragutils
node_docs -->|"uses"| node_ragutils
node_examples -->|"loads settings"| node_ragconfig
node_examples -->|"uses"| node_ragutils
node_retrieval -->|"loads settings"| node_ragconfig

click node_console "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Console/index.tsx"
click node_widget "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Widget/index.tsx"
click node_appbase "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/PipecatAppBase.tsx"
click node_transport "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/lib/transports.ts"
click node_connection "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/hooks/usePipecatConnectionState.ts"
click node_eventstream "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/hooks/usePipecatEventStream.ts"
click node_conversation "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/elements/Conversation.tsx"
click node_events "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/panels/EventsPanel.tsx"
click node_screencontrol "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/elements/UserScreenControl.tsx"
click node_keypad "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Console/KeypadToggle.tsx"
click node_codec "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Console/SmallWebRTCCodecSetter.tsx"
click node_metrics "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/metrics/Metrics.tsx"
click node_themeprovider "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/ThemeProvider.tsx"
click node_themecontext "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/ThemeProviderContext.tsx"
click node_usetheme "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/hooks/useTheme.ts"
click node_waveform "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/VoiceVisualizer/index.tsx"
click node_circular "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/CircularWaveform/index.tsx"
click node_canvas "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/CircularWaveform/canvas.ts"
click node_plasma "https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/webgl/Plasma.tsx"
click node_ragrun "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/run.py"
click node_source "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/source.py"
click node_docs "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/docs.py"
click node_examples "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/examples.py"
click node_database "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/db.py"
click node_retrieval "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/retrieve.py"
click node_ragconfig "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/config.py"
click node_ragutils "https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/utils.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_appbase,node_transport,node_connection,node_eventstream toneBlue
class node_console,node_widget,node_conversation,node_events,node_screencontrol,node_keypad,node_codec,node_metrics toneAmber
class node_themeprovider,node_themecontext,node_usetheme,node_waveform,node_circular,node_canvas,node_plasma toneMint
class node_ragrun,node_source,node_docs,node_examples,node_database,node_retrieval,node_ragconfig,node_ragutils toneRose
class node_developer,node_raguser toneIndigo
```

## Components

### App Foundation

- [Pipecat App Base](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/PipecatAppBase.tsx): `package/src/components/PipecatAppBase.tsx`
- [Transport Adapters](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/lib/transports.ts): `package/src/lib/transports.ts`
- [Connection State](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/hooks/usePipecatConnectionState.ts): `package/src/hooks/usePipecatConnectionState.ts`
- [Event Stream](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/hooks/usePipecatEventStream.ts): `package/src/hooks/usePipecatEventStream.ts`

### UI Experience

- [Console Template](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Console/index.tsx): `package/src/templates/Console/index.tsx`
- [Widget Template](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Widget/index.tsx): `package/src/templates/Widget/index.tsx`
- [Conversation UI](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/elements/Conversation.tsx): `package/src/components/elements/Conversation.tsx`
- [Events Panel](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/panels/EventsPanel.tsx): `package/src/components/panels/EventsPanel.tsx`
- [Screen Control](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/elements/UserScreenControl.tsx): `package/src/components/elements/UserScreenControl.tsx`
- [Keypad Toggle](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Console/KeypadToggle.tsx): `package/src/templates/Console/KeypadToggle.tsx`
- [Codec Setter](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/templates/Console/SmallWebRTCCodecSetter.tsx): `package/src/templates/Console/SmallWebRTCCodecSetter.tsx`
- [Metrics](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/metrics/Metrics.tsx): `package/src/components/metrics/Metrics.tsx`

### Theme and Visuals

- [Theme Provider](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/ThemeProvider.tsx): `package/src/components/ThemeProvider.tsx`
- [Theme Context](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/components/ThemeProviderContext.tsx): `package/src/components/ThemeProviderContext.tsx`
- [Theme Hook](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/hooks/useTheme.ts): `package/src/hooks/useTheme.ts`
- [Voice Visualizer](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/VoiceVisualizer/index.tsx): `package/src/visualizers/VoiceVisualizer/index.tsx`
- [Circular Waveform](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/CircularWaveform/index.tsx): `package/src/visualizers/CircularWaveform/index.tsx`
- [Waveform Renderer](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/CircularWaveform/canvas.ts): `package/src/visualizers/CircularWaveform/canvas.ts`
- [Plasma Visualizer](https://github.com/pipecat-ai/voice-ui-kit/blob/main/package/src/visualizers/webgl/Plasma.tsx): `package/src/visualizers/webgl/Plasma.tsx`

### RAG Tooling

- [RAG Runner](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/run.py): `scripts/rag/run.py`
- [Source Processor](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/source.py): `scripts/rag/source.py`
- [Docs Processor](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/docs.py): `scripts/rag/docs.py`
- [Example Processor](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/examples.py): `scripts/rag/examples.py`
- [Vector Database](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/db.py): `scripts/rag/db.py`
- [Retrieval Chain](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/retrieve.py): `scripts/rag/retrieve.py`
- [RAG Configuration](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/config.py): `scripts/rag/config.py`
- [RAG Utilities](https://github.com/pipecat-ai/voice-ui-kit/blob/main/scripts/rag/utils.py): `scripts/rag/utils.py`

### Other components

- **App Developer**
- **RAG Operator**

## Connections

- App Developer → Console Template: configures (evidence: `README.md`)
- App Developer → Pipecat App Base: composes (evidence: `README.md`)
- Console Template → Keypad Toggle: renders (evidence: `package/src/templates/Console/index.tsx`)
- Console Template → Codec Setter: configures (evidence: `package/src/templates/Console/index.tsx`)
- Console Template → Screen Control: renders (evidence: `package/src/templates/Console/index.tsx`)
- Console Template → Events Panel: renders (evidence: `package/src/templates/Console/index.tsx`)
- Console Template → Pipecat App Base: connects through
- Pipecat App Base → Transport Adapters: uses
- Theme Provider → Theme Context: provides (evidence: `package/src/components/ThemeProvider.tsx`)
- Theme Hook → Theme Context: reads (evidence: `package/src/hooks/useTheme.ts`)
- Circular Waveform → Waveform Renderer: renders with (evidence: `package/src/visualizers/CircularWaveform/index.tsx`)
- RAG Operator → RAG Runner: runs
- RAG Runner → Source Processor: processes source (evidence: `scripts/rag/run.py`)
- RAG Runner → Docs Processor: processes docs (evidence: `scripts/rag/run.py`)
- RAG Runner → Example Processor: processes examples (evidence: `scripts/rag/run.py`)
- RAG Runner → Vector Database: indexes documents (evidence: `scripts/rag/run.py`)
- RAG Runner → Retrieval Chain: queries (evidence: `scripts/rag/run.py`)
- Retrieval Chain → Vector Database: retrieves from (evidence: `scripts/rag/retrieve.py`)
- Vector Database → RAG Configuration: loads settings (evidence: `scripts/rag/db.py`)
- Vector Database → RAG Utilities: logs through (evidence: `scripts/rag/db.py`)
- Source Processor → RAG Utilities: uses (evidence: `scripts/rag/source.py`)
- Docs Processor → RAG Utilities: uses (evidence: `scripts/rag/docs.py`)
- Example Processor → RAG Configuration: loads settings (evidence: `scripts/rag/examples.py`)
- Example Processor → RAG Utilities: uses (evidence: `scripts/rag/examples.py`)
- Retrieval Chain → RAG Configuration: loads settings (evidence: `scripts/rag/retrieve.py`)
