# titechprabhasolutions/brahma-ai architecture

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

- Interactive diagram: https://gitdiagram.com/titechprabhasolutions/brahma-ai
- Repository: https://github.com/titechprabhasolutions/brahma-ai

## Overview

Brahma AI is a Windows-first personal assistant: a user speaks or enters a task, the Python application plans or dispatches work to local actions, and the Electron interface presents the interaction. Its documented capabilities include voice responses, multi-step automation, browser automation, and customizable UI. The graph separates the app, task execution, action domains, and the browser-agent service. Some subsystem links are based on README statements or SOURCE INDEX references; unsampled implementation details are not inferred.

Main entry points: [`agent/executor.py`](https://github.com/titechprabhasolutions/brahma-ai/blob/main/agent/executor.py) (Task executor), [`main.py`](https://github.com/titechprabhasolutions/brahma-ai/blob/main/main.py) (Assistant runtime), [`browser-agent/server.js`](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/server.js) (Browser agent service), [`browser-agent/agent.js`](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/agent.js) (Browser agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Assistant app"]
  node_electron["Electron UI<br/>[renderer.js]"]
  node_python_app["Assistant runtime<br/>[main.py]"]
  node_voice["Voice pipeline<br/>[voice_pipeline.py]"]
end

subgraph group_execution["Task execution"]
  node_planner["Task planner<br/>[planner.py]"]
  node_executor["Task executor<br/>[executor.py]"]
  node_error["Error recovery<br/>[error_handler.py]"]
end

subgraph group_actions["Local actions"]
  node_file_actions["File operations<br/>[file_controller.py]"]
  node_desktop_actions["Desktop control"]
  node_settings["Computer settings"]
  node_web_actions["Browser control<br/>[browser_control.py]"]
  node_dev_actions["Code and dev tools<br/>[dev_agent.py]"]
  node_communication["Communication tools<br/>[send_message.py]"]
  node_workflow["Saved workflows"]
end

subgraph group_browser["Browser automation"]
  node_browser_bridge["Browser bridge"]
  node_browser_server["Browser agent service<br/>[server.js]"]
  node_browser_agent["Browser agent<br/>[agent.js]"]
  node_browser_actions["Browser actions<br/>[actions.js]"]
  node_browser_control["Browser controller<br/>[browser.js]"]
  node_browser_memory[("Browser session state<br/>[memory.js]")]
end

subgraph group_state["User state"]
  node_memory[("User memory<br/>[memory_manager.py]")]
end

node_user(("User"))
node_gemini["Gemini API"]

node_user -->|"enters requests"| node_electron
node_electron -.->|"uses app"| node_python_app
node_user -->|"speaks requests"| node_python_app
node_python_app -.->|"uses voice"| node_voice
node_python_app -->|"requests plans"| node_planner
node_python_app -->|"dispatches tasks"| node_executor
node_python_app -->|"uses memory"| node_memory
node_planner -.->|"generates plans"| node_gemini
node_executor -.->|"requests text"| node_gemini
node_error -->|"analyzes failures"| node_gemini
node_executor -->|"requests recovery"| node_error
node_executor -->|"dispatches tools"| node_file_actions
node_executor -->|"dispatches tools"| node_desktop_actions
node_executor -->|"dispatches tools"| node_settings
node_executor -->|"dispatches tools"| node_web_actions
node_executor -->|"dispatches tools"| node_dev_actions
node_executor -->|"dispatches tools"| node_communication
node_python_app -->|"dispatches workflows"| node_workflow
node_workflow -->|"runs workflow steps"| node_web_actions
node_workflow -->|"runs workflow steps"| node_settings
node_browser_bridge -.->|"exchanges commands"| node_browser_server
node_browser_server -->|"routes commands"| node_browser_agent
node_browser_server -->|"launches browser"| node_browser_control
node_browser_server -->|"constructs action engine"| node_browser_actions
node_browser_server -->|"updates session state"| node_browser_memory
node_browser_agent -->|"executes actions"| node_browser_actions
node_browser_agent -->|"reads active page"| node_browser_control
node_browser_agent -->|"stores snapshots"| node_browser_memory

click node_electron "https://github.com/titechprabhasolutions/brahma-ai/blob/main/electron/renderer/renderer.js"
click node_python_app "https://github.com/titechprabhasolutions/brahma-ai/blob/main/main.py"
click node_voice "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/voice_pipeline.py"
click node_planner "https://github.com/titechprabhasolutions/brahma-ai/blob/main/agent/planner.py"
click node_executor "https://github.com/titechprabhasolutions/brahma-ai/blob/main/agent/executor.py"
click node_error "https://github.com/titechprabhasolutions/brahma-ai/blob/main/agent/error_handler.py"
click node_memory "https://github.com/titechprabhasolutions/brahma-ai/blob/main/memory/memory_manager.py"
click node_file_actions "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/file_controller.py"
click node_desktop_actions "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/computer_control.py"
click node_settings "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/computer_settings.py"
click node_web_actions "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/browser_control.py"
click node_dev_actions "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/dev_agent.py"
click node_communication "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/send_message.py"
click node_workflow "https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/workflow_manager.py"
click node_browser_bridge "https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser_agent_bridge.py"
click node_browser_server "https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/server.js"
click node_browser_agent "https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/agent.js"
click node_browser_actions "https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/actions.js"
click node_browser_control "https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/browser.js"
click node_browser_memory "https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/memory.js"

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_electron,node_python_app,node_voice,node_user toneBlue
class node_planner,node_executor,node_error toneAmber
class node_file_actions,node_desktop_actions,node_settings,node_web_actions,node_dev_actions,node_communication,node_workflow,node_gemini toneMint
class node_browser_bridge,node_browser_server,node_browser_agent,node_browser_actions,node_browser_control,node_browser_memory toneRose
class node_memory toneIndigo
```

## Components

### Assistant app

- [Electron UI](https://github.com/titechprabhasolutions/brahma-ai/blob/main/electron/renderer/renderer.js): `electron/renderer/renderer.js`
- [Assistant runtime](https://github.com/titechprabhasolutions/brahma-ai/blob/main/main.py): `main.py`
- [Voice pipeline](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/voice_pipeline.py): `actions/voice_pipeline.py`

### Task execution

- [Task planner](https://github.com/titechprabhasolutions/brahma-ai/blob/main/agent/planner.py): `agent/planner.py`
- [Task executor](https://github.com/titechprabhasolutions/brahma-ai/blob/main/agent/executor.py): `agent/executor.py`
- [Error recovery](https://github.com/titechprabhasolutions/brahma-ai/blob/main/agent/error_handler.py): `agent/error_handler.py`

### Local actions

- [File operations](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/file_controller.py): `actions/file_controller.py`
- [Desktop control](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/computer_control.py): `actions/computer_control.py`
- [Computer settings](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/computer_settings.py): `actions/computer_settings.py`
- [Browser control](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/browser_control.py): `actions/browser_control.py`
- [Code and dev tools](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/dev_agent.py): `actions/dev_agent.py`
- [Communication tools](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/send_message.py): `actions/send_message.py`
- [Saved workflows](https://github.com/titechprabhasolutions/brahma-ai/blob/main/actions/workflow_manager.py): `actions/workflow_manager.py`

### Browser automation

- [Browser bridge](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser_agent_bridge.py): `browser_agent_bridge.py`
- [Browser agent service](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/server.js): `browser-agent/server.js`
- [Browser agent](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/agent.js): `browser-agent/agent.js`
- [Browser actions](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/actions.js): `browser-agent/actions.js`
- [Browser controller](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/browser.js): `browser-agent/browser.js`
- [Browser session state](https://github.com/titechprabhasolutions/brahma-ai/blob/main/browser-agent/memory.js): `browser-agent/memory.js`

### User state

- [User memory](https://github.com/titechprabhasolutions/brahma-ai/blob/main/memory/memory_manager.py): `memory/memory_manager.py`

### Other components

- **User**
- **Gemini API**

## Connections

- User → Electron UI: enters requests (evidence: `README.md`)
- Electron UI → Assistant runtime: uses app
- User → Assistant runtime: speaks requests (evidence: `README.md`)
- Assistant runtime → Voice pipeline: uses voice
- Assistant runtime → Task planner: requests plans (evidence: `main.py`)
- Assistant runtime → Task executor: dispatches tasks (evidence: `main.py`)
- Assistant runtime → User memory: uses memory (evidence: `main.py`)
- Task planner → Gemini API: generates plans
- Task executor → Gemini API: requests text
- Error recovery → Gemini API: analyzes failures (evidence: `agent/error_handler.py`)
- Task executor → Error recovery: requests recovery (evidence: `agent/executor.py`)
- Task executor → File operations: dispatches tools (evidence: `agent/executor.py`)
- Task executor → Desktop control: dispatches tools (evidence: `agent/executor.py`)
- Task executor → Computer settings: dispatches tools (evidence: `agent/executor.py`)
- Task executor → Browser control: dispatches tools (evidence: `agent/executor.py`)
- Task executor → Code and dev tools: dispatches tools (evidence: `agent/executor.py`)
- Task executor → Communication tools: dispatches tools (evidence: `agent/executor.py`)
- Assistant runtime → Saved workflows: dispatches workflows (evidence: `main.py`)
- Saved workflows → Browser control: runs workflow steps (evidence: `actions/workflow_manager.py`)
- Saved workflows → Computer settings: runs workflow steps (evidence: `actions/workflow_manager.py`)
- Browser bridge → Browser agent service: exchanges commands
- Browser agent service → Browser agent: routes commands (evidence: `browser-agent/server.js`)
- Browser agent service → Browser controller: launches browser (evidence: `browser-agent/server.js`)
- Browser agent service → Browser actions: constructs action engine (evidence: `browser-agent/server.js`)
- Browser agent service → Browser session state: updates session state (evidence: `browser-agent/server.js`)
- Browser agent → Browser actions: executes actions (evidence: `browser-agent/agent.js`)
- Browser agent → Browser controller: reads active page (evidence: `browser-agent/agent.js`)
- Browser agent → Browser session state: stores snapshots (evidence: `browser-agent/agent.js`)
