# aipubg/genie architecture

> Architecture diagram of the GitHub repository aipubg/genie, 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/aipubg/genie
- Repository: https://github.com/aipubg/genie

## Overview

GENIE is a persistent personal-intelligence daemon with a thin UI/API boundary. The principal path is an owner request through the director and mission orchestration to a permitted computer or browser action, verification, audit, and a result. Separate branches provide voice interaction, memory, models, plugins, device/perception services, and agent teams. The graph follows README-described capabilities and relationships visible in excerpts or the source index; unsampled implementations are represented only at supported paths, and uncertain links are omitted.

Main entry points: [`core/orchestrator.py`](https://github.com/aipubg/genie/blob/main/core/orchestrator.py) (Request orchestrator), [`computer/service.py`](https://github.com/aipubg/genie/blob/main/computer/service.py) (Computer capabilities), [`core/ipc/server.py`](https://github.com/aipubg/genie/blob/main/core/ipc/server.py) (Local API), [`missions/service.py`](https://github.com/aipubg/genie/blob/main/missions/service.py) (Mission state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Interaction and orchestration"]
  node_ui["Desktop and web UI<br/>[api.js]"]
  node_api["Local API<br/>[server.py]"]
  node_orchestrator["Request orchestrator<br/>[orchestrator.py]"]
  node_events["Event bus<br/>[events.py]"]
end

subgraph group_execution["Planning and execution"]
  node_director["Director routing<br/>[heuristics.py]"]
  node_missions[("Mission state<br/>[service.py]")]
  node_computer["Computer capabilities<br/>[service.py]"]
  node_browser["Browser automation<br/>[service.py]"]
end

subgraph group_trust["Trust and persistence"]
  node_security["PTE and policy<br/>[policy.py]"]
  node_audit[("Audit and trust<br/>[audit.py]")]
  node_memory[("Persistent memory<br/>[service.py]")]
end

subgraph group_intelligence["Intelligence services"]
  node_models["Model gateway<br/>[gateway.py]"]
  node_context["Context compiler<br/>[compiler.py]"]
  node_voice["Voice pipeline<br/>[pipeline.py]"]
  node_agents["Agent teams<br/>[service.py]"]
end

subgraph group_extensions["Devices and extensions"]
  node_plugins["Isolated plugins<br/>[client.py]"]
  node_devices["Device mesh<br/>[service.py]"]
  node_perception["Perception service<br/>[service.py]"]
  node_skills["Skill execution<br/>[service.py]"]
end

node_owner(("Owner"))

node_owner -->|"sends request"| node_ui
node_ui -->|"calls API"| node_api
node_api -->|"routes requests"| node_orchestrator
node_orchestrator -->|"routes intent"| node_director
node_orchestrator -->|"schedules missions"| node_missions
node_director -->|"proposes mission"| node_missions
node_missions -->|"runs capability"| node_computer
node_computer -->|"checks permission"| node_security
node_computer -->|"audits action"| node_audit
node_computer -->|"uses browser"| node_browser
node_orchestrator -->|"builds context"| node_context
node_orchestrator -.->|"requests model"| node_models
node_orchestrator -.->|"delegates work"| node_agents
node_voice -->|"submits utterance"| node_orchestrator
node_orchestrator -.->|"uses memory"| node_memory
node_api -->|"streams events"| node_events
node_orchestrator -->|"publishes events"| node_events
node_api -->|"routes device APIs"| node_devices
node_api -->|"serves awareness"| node_perception
node_orchestrator -.->|"executes skills"| node_skills
node_computer -.->|"dispatches plugins"| node_plugins
node_computer -.->|"routes device action"| node_devices
node_missions -.->|"records outcomes"| node_audit

click node_ui "https://github.com/aipubg/genie/blob/main/ui/web/api.js"
click node_api "https://github.com/aipubg/genie/blob/main/core/ipc/server.py"
click node_orchestrator "https://github.com/aipubg/genie/blob/main/core/orchestrator.py"
click node_events "https://github.com/aipubg/genie/blob/main/core/events.py"
click node_director "https://github.com/aipubg/genie/blob/main/director/heuristics.py"
click node_missions "https://github.com/aipubg/genie/blob/main/missions/service.py"
click node_computer "https://github.com/aipubg/genie/blob/main/computer/service.py"
click node_browser "https://github.com/aipubg/genie/blob/main/browser/service.py"
click node_security "https://github.com/aipubg/genie/blob/main/security/policy.py"
click node_audit "https://github.com/aipubg/genie/blob/main/security/audit.py"
click node_memory "https://github.com/aipubg/genie/blob/main/memory/service.py"
click node_models "https://github.com/aipubg/genie/blob/main/models/gateway.py"
click node_context "https://github.com/aipubg/genie/blob/main/context/compiler.py"
click node_voice "https://github.com/aipubg/genie/blob/main/voice/pipeline.py"
click node_agents "https://github.com/aipubg/genie/blob/main/agents/service.py"
click node_plugins "https://github.com/aipubg/genie/blob/main/plugins/client.py"
click node_devices "https://github.com/aipubg/genie/blob/main/devices/service.py"
click node_perception "https://github.com/aipubg/genie/blob/main/perception/service.py"
click node_skills "https://github.com/aipubg/genie/blob/main/skills/service.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_ui,node_api,node_orchestrator,node_events toneBlue
class node_director,node_missions,node_computer,node_browser toneAmber
class node_security,node_audit,node_memory toneMint
class node_models,node_context,node_voice,node_agents toneRose
class node_plugins,node_devices,node_perception,node_skills,node_owner toneIndigo
```

## Components

### Interaction and orchestration

- [Desktop and web UI](https://github.com/aipubg/genie/blob/main/ui/web/api.js): `ui/web/api.js`
- [Local API](https://github.com/aipubg/genie/blob/main/core/ipc/server.py): `core/ipc/server.py`
- [Request orchestrator](https://github.com/aipubg/genie/blob/main/core/orchestrator.py): `core/orchestrator.py`
- [Event bus](https://github.com/aipubg/genie/blob/main/core/events.py): `core/events.py`

### Planning and execution

- [Director routing](https://github.com/aipubg/genie/blob/main/director/heuristics.py): `director/heuristics.py`
- [Mission state](https://github.com/aipubg/genie/blob/main/missions/service.py): `missions/service.py`
- [Computer capabilities](https://github.com/aipubg/genie/blob/main/computer/service.py): `computer/service.py`
- [Browser automation](https://github.com/aipubg/genie/blob/main/browser/service.py): `browser/service.py`

### Trust and persistence

- [PTE and policy](https://github.com/aipubg/genie/blob/main/security/policy.py): `security/policy.py`
- [Audit and trust](https://github.com/aipubg/genie/blob/main/security/audit.py): `security/audit.py`
- [Persistent memory](https://github.com/aipubg/genie/blob/main/memory/service.py): `memory/service.py`

### Intelligence services

- [Model gateway](https://github.com/aipubg/genie/blob/main/models/gateway.py): `models/gateway.py`
- [Context compiler](https://github.com/aipubg/genie/blob/main/context/compiler.py): `context/compiler.py`
- [Voice pipeline](https://github.com/aipubg/genie/blob/main/voice/pipeline.py): `voice/pipeline.py`
- [Agent teams](https://github.com/aipubg/genie/blob/main/agents/service.py): `agents/service.py`

### Devices and extensions

- [Isolated plugins](https://github.com/aipubg/genie/blob/main/plugins/client.py): `plugins/client.py`
- [Device mesh](https://github.com/aipubg/genie/blob/main/devices/service.py): `devices/service.py`
- [Perception service](https://github.com/aipubg/genie/blob/main/perception/service.py): `perception/service.py`
- [Skill execution](https://github.com/aipubg/genie/blob/main/skills/service.py): `skills/service.py`

### Other components

- **Owner**

## Connections

- Owner → Desktop and web UI: sends request
- Desktop and web UI → Local API: calls API (evidence: `core/ipc/server.py`)
- Local API → Request orchestrator: routes requests (evidence: `core/ipc/server.py`)
- Request orchestrator → Director routing: routes intent (evidence: `core/orchestrator.py`)
- Request orchestrator → Mission state: schedules missions (evidence: `core/orchestrator.py`)
- Director routing → Mission state: proposes mission
- Mission state → Computer capabilities: runs capability
- Computer capabilities → PTE and policy: checks permission
- Computer capabilities → Audit and trust: audits action
- Computer capabilities → Browser automation: uses browser (evidence: `browser/service.py`)
- Request orchestrator → Context compiler: builds context (evidence: `core/orchestrator.py`)
- Request orchestrator → Model gateway: requests model
- Request orchestrator → Agent teams: delegates work
- Voice pipeline → Request orchestrator: submits utterance (evidence: `voice/pipeline.py`)
- Request orchestrator → Persistent memory: uses memory
- Local API → Event bus: streams events (evidence: `core/ipc/server.py`)
- Request orchestrator → Event bus: publishes events (evidence: `core/orchestrator.py`)
- Local API → Device mesh: routes device APIs (evidence: `core/ipc/server.py`)
- Local API → Perception service: serves awareness (evidence: `core/ipc/server.py`)
- Request orchestrator → Skill execution: executes skills
- Computer capabilities → Isolated plugins: dispatches plugins
- Computer capabilities → Device mesh: routes device action
- Mission state → Audit and trust: records outcomes
