# fawad07/nebius-personal-ai architecture

> Architecture diagram of the GitHub repository fawad07/nebius-personal-ai, 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/fawad07/nebius-personal-ai
- Repository: https://github.com/fawad07/nebius-personal-ai

## Overview

Nebius Personal AI is a private, voice-driven assistant with an optional hosted Gradio demo. The primary local flow captures speech, gates and transcribes a turn, identifies the speaker and vocal emotion, obtains a mood-aware response or tool action, then synthesizes speech that can be interrupted. The graph also preserves memory, local automation, web search, speaker enrollment, and the public-safe demo. Some connections are documented in the README; source excerpts show orchestration and wiring, but unsampled implementation details are not asserted.

Main entry points: [`src/orchestration/session_manager.py`](https://github.com/fawad07/nebius-personal-ai/blob/main/src/orchestration/session_manager.py) (Turn orchestration), [`webapp/agent_core.py`](https://github.com/fawad07/nebius-personal-ai/blob/main/webapp/agent_core.py) (Hosted reasoning core), [`src/conversation/conversation_manager.py`](https://github.com/fawad07/nebius-personal-ai/blob/main/src/conversation/conversation_manager.py) (Dialogue and routing), [`src/tools/registry.py`](https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/registry.py) (Tool registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_voice["Voice input"]
  node_session["Turn orchestration<br/>[session_manager.py]"]
  node_audio_in["Audio capture<br/>[input.py]"]
  node_vad["Speech detection<br/>[vad.py]"]
  node_stt["Whisper transcription<br/>[stt_service.py]"]
  node_speaker_id["Speaker recognition"]
  node_emotion["Emotion classification"]
  node_tts["Speech synthesis<br/>[system_tts.py]"]
  node_audio_out["Audio playback<br/>[output.py]"]
end

subgraph group_reasoning["Assistant reasoning"]
  node_conversation["Dialogue and routing"]
  node_llm["OpenAI-compatible client<br/>[llm_client.py]"]
end

subgraph group_tools["Actions and tools"]
  node_registry["Tool registry<br/>[registry.py]"]
  node_builtins["Built-in tools<br/>[builtins.py]"]
  node_automation_adapter["Automation adapter"]
  node_automation["Local automation"]
  node_web_search["Web search tool<br/>[web_search.py]"]
end

subgraph group_memory["Identity and memory"]
  node_fact_store[("Fact memory<br/>[fact_store.py]")]
  node_conversation_store[("Conversation history")]
  node_speaker_db[("Speaker profiles")]
end

subgraph group_surfaces["Runtime surfaces"]
  node_local_entry["Local runner<br/>[main.py]"]
  node_voice_agent["Voice agent<br/>[agent.py]"]
  node_hosted_app["Hosted Gradio demo<br/>[app.py]"]
  node_hosted_core["Hosted reasoning core<br/>[agent_core.py]"]
end

node_user(("User"))
node_nebius{{"Nebius Nemotron"}}
node_tavily{{"Tavily API"}}

node_user -->|"speaks to"| node_audio_in
node_local_entry -->|"starts"| node_voice_agent
node_voice_agent -->|"configures"| node_session
node_session -->|"captures audio"| node_audio_in
node_session -->|"checks speech"| node_vad
node_session -->|"transcribes"| node_stt
node_session -.->|"identifies speaker"| node_speaker_id
node_session -.->|"classifies emotion"| node_emotion
node_session -->|"requests response"| node_conversation
node_conversation -->|"requests reasoning"| node_llm
node_llm -->|"sends prompt"| node_nebius
node_conversation -->|"dispatches action"| node_registry
node_registry -.->|"dispatches tools"| node_builtins
node_registry -->|"dispatches tools"| node_automation_adapter
node_automation_adapter -->|"exposes actions"| node_automation
node_registry -.->|"dispatches search"| node_web_search
node_web_search -->|"searches"| node_tavily
node_builtins -.->|"stores facts"| node_fact_store
node_conversation -->|"loads and saves history"| node_conversation_store
node_voice_agent -->|"loads and saves profiles"| node_speaker_db
node_session -->|"synthesizes reply"| node_tts
node_session -.->|"plays speech"| node_audio_out
node_audio_in -->|"interrupts playback"| node_session
node_user -->|"uses demo"| node_hosted_app
node_hosted_app -->|"invokes"| node_hosted_core
node_hosted_core -->|"reuses client"| node_llm
node_hosted_core -->|"creates managers"| node_conversation
node_hosted_core -->|"filters tools"| node_registry
node_hosted_core -->|"creates memory"| node_fact_store

click node_local_entry "https://github.com/fawad07/nebius-personal-ai/blob/main/src/main.py"
click node_voice_agent "https://github.com/fawad07/nebius-personal-ai/blob/main/src/agent/agent.py"
click node_session "https://github.com/fawad07/nebius-personal-ai/blob/main/src/orchestration/session_manager.py"
click node_audio_in "https://github.com/fawad07/nebius-personal-ai/blob/main/src/audio/input.py"
click node_vad "https://github.com/fawad07/nebius-personal-ai/blob/main/src/audio/vad.py"
click node_stt "https://github.com/fawad07/nebius-personal-ai/blob/main/src/stt/stt_service.py"
click node_speaker_id "https://github.com/fawad07/nebius-personal-ai/blob/main/src/speaker/speaker_identifier.py"
click node_emotion "https://github.com/fawad07/nebius-personal-ai/blob/main/src/ser/emotion_classifier.py"
click node_conversation "https://github.com/fawad07/nebius-personal-ai/blob/main/src/conversation/conversation_manager.py"
click node_llm "https://github.com/fawad07/nebius-personal-ai/blob/main/src/llm/llm_client.py"
click node_registry "https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/registry.py"
click node_builtins "https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/builtins.py"
click node_automation_adapter "https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/offline_automation.py"
click node_automation "https://github.com/fawad07/nebius-personal-ai/tree/main/automation"
click node_web_search "https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/web_search.py"
click node_fact_store "https://github.com/fawad07/nebius-personal-ai/blob/main/src/memory/fact_store.py"
click node_conversation_store "https://github.com/fawad07/nebius-personal-ai/blob/main/src/memory/conversation_store.py"
click node_speaker_db "https://github.com/fawad07/nebius-personal-ai/blob/main/src/speaker/speaker_database.py"
click node_tts "https://github.com/fawad07/nebius-personal-ai/blob/main/src/tts/system_tts.py"
click node_audio_out "https://github.com/fawad07/nebius-personal-ai/blob/main/src/audio/output.py"
click node_hosted_app "https://github.com/fawad07/nebius-personal-ai/blob/main/webapp/app.py"
click node_hosted_core "https://github.com/fawad07/nebius-personal-ai/blob/main/webapp/agent_core.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_session,node_audio_in,node_vad,node_stt,node_speaker_id,node_emotion,node_tts,node_audio_out,node_user toneBlue
class node_conversation,node_llm toneAmber
class node_registry,node_builtins,node_automation_adapter,node_automation,node_web_search,node_tavily toneMint
class node_fact_store,node_conversation_store,node_speaker_db toneRose
class node_local_entry,node_voice_agent,node_hosted_app,node_hosted_core,node_nebius toneIndigo
```

## Components

### Voice input

- [Turn orchestration](https://github.com/fawad07/nebius-personal-ai/blob/main/src/orchestration/session_manager.py): `src/orchestration/session_manager.py`
- [Audio capture](https://github.com/fawad07/nebius-personal-ai/blob/main/src/audio/input.py): `src/audio/input.py`
- [Speech detection](https://github.com/fawad07/nebius-personal-ai/blob/main/src/audio/vad.py): `src/audio/vad.py`
- [Whisper transcription](https://github.com/fawad07/nebius-personal-ai/blob/main/src/stt/stt_service.py): `src/stt/stt_service.py`
- [Speaker recognition](https://github.com/fawad07/nebius-personal-ai/blob/main/src/speaker/speaker_identifier.py): `src/speaker/speaker_identifier.py`
- [Emotion classification](https://github.com/fawad07/nebius-personal-ai/blob/main/src/ser/emotion_classifier.py): `src/ser/emotion_classifier.py`
- [Speech synthesis](https://github.com/fawad07/nebius-personal-ai/blob/main/src/tts/system_tts.py): `src/tts/system_tts.py`
- [Audio playback](https://github.com/fawad07/nebius-personal-ai/blob/main/src/audio/output.py): `src/audio/output.py`

### Assistant reasoning

- [Dialogue and routing](https://github.com/fawad07/nebius-personal-ai/blob/main/src/conversation/conversation_manager.py): `src/conversation/conversation_manager.py`
- [OpenAI-compatible client](https://github.com/fawad07/nebius-personal-ai/blob/main/src/llm/llm_client.py): `src/llm/llm_client.py`

### Actions and tools

- [Tool registry](https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/registry.py): `src/tools/registry.py`
- [Built-in tools](https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/builtins.py): `src/tools/builtins.py`
- [Automation adapter](https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/offline_automation.py): `src/tools/offline_automation.py`
- [Local automation](https://github.com/fawad07/nebius-personal-ai/tree/main/automation): `automation`
- [Web search tool](https://github.com/fawad07/nebius-personal-ai/blob/main/src/tools/web_search.py): `src/tools/web_search.py`

### Identity and memory

- [Fact memory](https://github.com/fawad07/nebius-personal-ai/blob/main/src/memory/fact_store.py): `src/memory/fact_store.py`
- [Conversation history](https://github.com/fawad07/nebius-personal-ai/blob/main/src/memory/conversation_store.py): `src/memory/conversation_store.py`
- [Speaker profiles](https://github.com/fawad07/nebius-personal-ai/blob/main/src/speaker/speaker_database.py): `src/speaker/speaker_database.py`

### Runtime surfaces

- [Local runner](https://github.com/fawad07/nebius-personal-ai/blob/main/src/main.py): `src/main.py`
- [Voice agent](https://github.com/fawad07/nebius-personal-ai/blob/main/src/agent/agent.py): `src/agent/agent.py`
- [Hosted Gradio demo](https://github.com/fawad07/nebius-personal-ai/blob/main/webapp/app.py): `webapp/app.py`
- [Hosted reasoning core](https://github.com/fawad07/nebius-personal-ai/blob/main/webapp/agent_core.py): `webapp/agent_core.py`

### Other components

- **User**
- **Nebius Nemotron**
- **Tavily API**

## Connections

- User → Audio capture: speaks to
- Local runner → Voice agent: starts (evidence: `src/main.py`)
- Voice agent → Turn orchestration: configures (evidence: `src/agent/agent.py`)
- Turn orchestration → Audio capture: captures audio (evidence: `src/orchestration/session_manager.py`)
- Turn orchestration → Speech detection: checks speech (evidence: `src/orchestration/session_manager.py`)
- Turn orchestration → Whisper transcription: transcribes (evidence: `src/orchestration/session_manager.py`)
- Turn orchestration → Speaker recognition: identifies speaker
- Turn orchestration → Emotion classification: classifies emotion
- Turn orchestration → Dialogue and routing: requests response (evidence: `src/orchestration/session_manager.py`)
- Dialogue and routing → OpenAI-compatible client: requests reasoning
- OpenAI-compatible client → Nebius Nemotron: sends prompt
- Dialogue and routing → Tool registry: dispatches action (evidence: `src/conversation/conversation_manager.py`)
- Tool registry → Built-in tools: dispatches tools (evidence: `src/tools/builtins.py`)
- Tool registry → Automation adapter: dispatches tools (evidence: `src/tools/offline_automation.py`)
- Automation adapter → Local automation: exposes actions (evidence: `src/tools/offline_automation.py`)
- Tool registry → Web search tool: dispatches search (evidence: `src/tools/web_search.py`)
- Web search tool → Tavily API: searches (evidence: `src/tools/web_search.py`)
- Built-in tools → Fact memory: stores facts
- Dialogue and routing → Conversation history: loads and saves history (evidence: `src/conversation/conversation_manager.py`)
- Voice agent → Speaker profiles: loads and saves profiles (evidence: `src/agent/agent.py`)
- Turn orchestration → Speech synthesis: synthesizes reply
- Turn orchestration → Audio playback: plays speech
- Audio capture → Turn orchestration: interrupts playback
- User → Hosted Gradio demo: uses demo
- Hosted Gradio demo → Hosted reasoning core: invokes (evidence: `webapp/app.py`)
- Hosted reasoning core → OpenAI-compatible client: reuses client (evidence: `webapp/agent_core.py`)
- Hosted reasoning core → Dialogue and routing: creates managers (evidence: `webapp/agent_core.py`)
- Hosted reasoning core → Tool registry: filters tools (evidence: `webapp/agent_core.py`)
- Hosted reasoning core → Fact memory: creates memory (evidence: `webapp/agent_core.py`)
