# mirzatheduck/multi-agent-telemetry-hub architecture

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

- Interactive diagram: https://gitdiagram.com/mirzatheduck/multi-agent-telemetry-hub
- Repository: https://github.com/mirzatheduck/multi-agent-telemetry-hub

## Overview

This is a multi-agent assistant for personal telemetry and game-code analysis. A user submits a task through the CLI; the orchestrator plans and routes it to telemetry and/or code-analysis agents, then the DB bridge validates and persists their results. The product also exposes its MCP tools to external clients and supports querying stored data. The graph reflects README-documented flows and shown source references; unsampled implementation details are omitted where call relationships cannot be verified.

Main entry points: [`agents/orchestrator.py`](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/orchestrator.py) (Task orchestrator), [`agents/db_bridge_agent.py`](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/db_bridge_agent.py) (DB bridge agent), [`mcp_tools/base.py`](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/base.py) (Tool registry), [`mcp_tools/mysql_mcp_tool.py`](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/mysql_mcp_tool.py) (MySQL tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Interface"]
  node_cli["CLI entry<br/>[main.py]"]
  node_renderer["Event renderer<br/>[renderer.py]"]
end

subgraph group_agents["Agent Workflow"]
  node_orchestrator["Task orchestrator<br/>[orchestrator.py]"]
  node_router["Model router<br/>[settings.py]"]
  node_gamedev["GameDev agent<br/>[gamedev_agent.py]"]
  node_telemetry["Telemetry agent<br/>[telemetry_agent.py]"]
  node_bridge["DB bridge agent<br/>[db_bridge_agent.py]"]
  node_agentbase["Agent plumbing<br/>[base.py]"]
end

subgraph group_tools["MCP Tools"]
  node_mcpserver["MCP stdio server<br/>[server.py]"]
  node_registry["Tool registry<br/>[base.py]"]
  node_systemtools["Code and file tools"]
  node_mysqltools["MySQL tools<br/>[mysql_mcp_tool.py]"]
end

subgraph group_storage["Persistence"]
  node_crud["Schema and CRUD<br/>[crud.py]"]
  node_database["Database facade<br/>[database.py]"]
  node_mysql[("MySQL store")]
  node_mock[("In-memory store<br/>[database.py]")]
end

node_user(("User"))
node_mcpclient(("MCP client"))
node_llm{{"Model providers"}}

node_user -->|"submits task"| node_cli
node_cli -->|"runs pipeline"| node_orchestrator
node_cli -->|"renders events"| node_renderer
node_orchestrator -->|"selects models"| node_router
node_orchestrator -->|"dispatches analysis"| node_gamedev
node_orchestrator -->|"dispatches parsing"| node_telemetry
node_orchestrator -->|"dispatches persistence"| node_bridge
node_gamedev -->|"passes analysis JSON"| node_bridge
node_telemetry -->|"passes telemetry JSON"| node_bridge
node_orchestrator -->|"passes execution history"| node_bridge
node_agentbase -->|"requests completion"| node_router
node_agentbase -->|"calls tools"| node_registry
node_gamedev -->|"calls analysis tools"| node_systemtools
node_bridge -->|"calls write tools"| node_mysqltools
node_mcpclient -->|"sends JSON-RPC"| node_mcpserver
node_mcpserver -->|"dispatches calls"| node_registry
node_registry -->|"registers tools"| node_systemtools
node_registry -->|"registers tools"| node_mysqltools
node_mysqltools -->|"validates table rows"| node_crud
node_mysqltools -->|"reads and writes"| node_database
node_database -.->|"uses when configured"| node_mysql
node_database -->|"falls back to"| node_mock
node_router -.->|"calls providers"| node_llm

click node_cli "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/main.py"
click node_renderer "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/cli/renderer.py"
click node_orchestrator "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/orchestrator.py"
click node_router "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/config/settings.py"
click node_gamedev "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/gamedev_agent.py"
click node_telemetry "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/telemetry_agent.py"
click node_bridge "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/db_bridge_agent.py"
click node_agentbase "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/base.py"
click node_mcpserver "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/server.py"
click node_registry "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/base.py"
click node_systemtools "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/system_stats_tool.py"
click node_mysqltools "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/mysql_mcp_tool.py"
click node_crud "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/database/crud.py"
click node_database "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/config/database.py"
click node_mock "https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/config/database.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_cli,node_renderer,node_user,node_mcpclient toneBlue
class node_orchestrator,node_router,node_gamedev,node_telemetry,node_bridge,node_agentbase toneAmber
class node_mcpserver,node_registry,node_systemtools,node_mysqltools toneMint
class node_crud,node_database,node_mysql,node_mock toneRose
class node_llm toneIndigo
```

## Components

### User Interface

- [CLI entry](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/main.py): `main.py`
- [Event renderer](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/cli/renderer.py): `cli/renderer.py`

### Agent Workflow

- [Task orchestrator](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/orchestrator.py): `agents/orchestrator.py`
- [Model router](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/config/settings.py): `config/settings.py`
- [GameDev agent](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/gamedev_agent.py): `agents/gamedev_agent.py`
- [Telemetry agent](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/telemetry_agent.py): `agents/telemetry_agent.py`
- [DB bridge agent](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/db_bridge_agent.py): `agents/db_bridge_agent.py`
- [Agent plumbing](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/agents/base.py): `agents/base.py`

### MCP Tools

- [MCP stdio server](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/server.py): `mcp_tools/server.py`
- [Tool registry](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/base.py): `mcp_tools/base.py`
- [Code and file tools](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/system_stats_tool.py): `mcp_tools/system_stats_tool.py`
- [MySQL tools](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/mcp_tools/mysql_mcp_tool.py): `mcp_tools/mysql_mcp_tool.py`

### Persistence

- [Schema and CRUD](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/database/crud.py): `database/crud.py`
- [Database facade](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/config/database.py): `config/database.py`
- **MySQL store**
- [In-memory store](https://github.com/mirzatheduck/multi-agent-telemetry-hub/blob/main/config/database.py): `config/database.py`

### Other components

- **User**
- **MCP client**
- **Model providers**

## Connections

- User → CLI entry: submits task (evidence: `README.md`)
- CLI entry → Task orchestrator: runs pipeline (evidence: `README.md`)
- CLI entry → Event renderer: renders events (evidence: `main.py`)
- Task orchestrator → Model router: selects models (evidence: `agents/orchestrator.py`)
- Task orchestrator → GameDev agent: dispatches analysis (evidence: `agents/orchestrator.py`)
- Task orchestrator → Telemetry agent: dispatches parsing (evidence: `agents/orchestrator.py`)
- Task orchestrator → DB bridge agent: dispatches persistence (evidence: `README.md`)
- GameDev agent → DB bridge agent: passes analysis JSON (evidence: `README.md`)
- Telemetry agent → DB bridge agent: passes telemetry JSON (evidence: `README.md`)
- Task orchestrator → DB bridge agent: passes execution history (evidence: `README.md`)
- Agent plumbing → Model router: requests completion (evidence: `agents/base.py`)
- Agent plumbing → Tool registry: calls tools (evidence: `agents/base.py`)
- GameDev agent → Code and file tools: calls analysis tools (evidence: `README.md`)
- DB bridge agent → MySQL tools: calls write tools (evidence: `agents/db_bridge_agent.py`)
- MCP client → MCP stdio server: sends JSON-RPC (evidence: `README.md`)
- MCP stdio server → Tool registry: dispatches calls (evidence: `mcp_tools/server.py`)
- Tool registry → Code and file tools: registers tools (evidence: `mcp_tools/__init__.py`)
- Tool registry → MySQL tools: registers tools (evidence: `mcp_tools/__init__.py`)
- MySQL tools → Schema and CRUD: validates table rows (evidence: `mcp_tools/mysql_mcp_tool.py`)
- MySQL tools → Database facade: reads and writes (evidence: `mcp_tools/mysql_mcp_tool.py`)
- Database facade → MySQL store: uses when configured (evidence: `config/database.py`)
- Database facade → In-memory store: falls back to (evidence: `config/database.py`)
- Model router → Model providers: calls providers (evidence: `config/settings.py`)
