# aipubg/zero architecture

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

## Overview

ZERO is a local-first assistant platform: users submit requests through its control UI, the host handles requests, and agent/inference components can use models and tools to perform work and return outcomes. The repository also includes distinct voice, screen-observation, memory, automation, skill/plugin, and research capabilities. The README describes the intended orchestration broadly, but many runtime connections are unsampled; only explicit imports, calls, or documented relationships are drawn, with unverified integration left out.

Main entry points: [`packages/agent-runtime/index.mjs`](https://github.com/aipubg/zero/blob/main/packages/agent-runtime/index.mjs) (Agent runtime), [`app/zero-control-ui/runtime-core.mjs`](https://github.com/aipubg/zero/blob/main/app/zero-control-ui/runtime-core.mjs) (Control UI), [`packages/agent-runtime/inference.mjs`](https://github.com/aipubg/zero/blob/main/packages/agent-runtime/inference.mjs) (Agent inference), [`services/host/request-orchestrator.mjs`](https://github.com/aipubg/zero/blob/main/services/host/request-orchestrator.mjs) (Host request handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_control_ui["Control UI<br/>[runtime-core.mjs]"]
  node_host_requests["Host request handling"]
  node_sessions[("Sessions<br/>[index.mjs]")]
  node_voice["Voice engine<br/>[index.mjs]"]
end

subgraph group_execution["Assistant execution"]
  node_agent_runtime["Agent runtime<br/>[index.mjs]"]
  node_inference["Agent inference<br/>[inference.mjs]"]
  node_model_fabric["Model fabric<br/>[index.mjs]"]
end

subgraph group_capabilities["Task capabilities"]
  node_capability_engine["Capability engine"]
  node_computer_tools["Computer tools<br/>[tools.js]"]
  node_research["Research and files<br/>[search.mjs]"]
end

subgraph group_context["Context and observation"]
  node_screen_intelligence["Screen intelligence<br/>[index.mjs]"]
  node_observation_engine["UI observation engine<br/>[engine.mjs]"]
  node_observation_store[("Observation store<br/>[memory-store.mjs]")]
  node_unified_memory[("Unified memory<br/>[unified-memory.mjs]")]
end

subgraph group_extensions["Background and extensions"]
  node_automation["Event automation"]
  node_skill_execution["Skill execution<br/>[execution.mjs]"]
  node_plugin_sdk["Plugin SDK<br/>[index.mjs]"]
  node_workspaces["Workspaces<br/>[index.mjs]"]
end

node_user(("User"))

node_user -->|"submits requests"| node_control_ui
node_control_ui -->|"sends requests"| node_host_requests
node_host_requests -.->|"orchestrates work"| node_agent_runtime
node_agent_runtime -->|"delegates inference"| node_inference
node_inference -->|"executes capabilities"| node_capability_engine
node_inference -->|"searches or reads files"| node_research
node_inference -.->|"requests model responses"| node_model_fabric
node_control_ui -->|"configures observation"| node_observation_engine
node_observation_engine -->|"records observations"| node_observation_store
node_control_ui -->|"exposes computer tools"| node_computer_tools
node_computer_tools -->|"delegates actions"| node_capability_engine
node_agent_runtime -.->|"uses session context"| node_sessions
node_agent_runtime -.->|"uses persistent memory"| node_unified_memory
node_control_ui -.->|"accepts voice input"| node_voice
node_agent_runtime -.->|"supports background work"| node_automation
node_agent_runtime -.->|"runs skills"| node_skill_execution
node_agent_runtime -.->|"uses plugins"| node_plugin_sdk
node_agent_runtime -.->|"delegates workspace tasks"| node_workspaces
node_screen_intelligence -.->|"persists observations"| node_unified_memory

click node_control_ui "https://github.com/aipubg/zero/blob/main/app/zero-control-ui/runtime-core.mjs"
click node_host_requests "https://github.com/aipubg/zero/blob/main/services/host/request-orchestrator.mjs"
click node_sessions "https://github.com/aipubg/zero/blob/main/packages/sessions/index.mjs"
click node_agent_runtime "https://github.com/aipubg/zero/blob/main/packages/agent-runtime/index.mjs"
click node_inference "https://github.com/aipubg/zero/blob/main/packages/agent-runtime/inference.mjs"
click node_model_fabric "https://github.com/aipubg/zero/blob/main/packages/model-fabric/index.mjs"
click node_capability_engine "https://github.com/aipubg/zero/blob/main/packages/capability-engine/computer-operator.mjs"
click node_computer_tools "https://github.com/aipubg/zero/blob/main/app/zero-control-ui/src/computer/tools.js"
click node_research "https://github.com/aipubg/zero/blob/main/packages/research-engine/search.mjs"
click node_screen_intelligence "https://github.com/aipubg/zero/blob/main/packages/screen-intelligence/index.mjs"
click node_observation_engine "https://github.com/aipubg/zero/blob/main/app/zero-control-ui/observation/engine.mjs"
click node_observation_store "https://github.com/aipubg/zero/blob/main/app/zero-control-ui/observation/memory-store.mjs"
click node_unified_memory "https://github.com/aipubg/zero/blob/main/packages/memory/unified-memory.mjs"
click node_voice "https://github.com/aipubg/zero/blob/main/packages/voice-engine/index.mjs"
click node_automation "https://github.com/aipubg/zero/blob/main/packages/automation/event-automation.mjs"
click node_skill_execution "https://github.com/aipubg/zero/blob/main/packages/skill-sdk/execution.mjs"
click node_plugin_sdk "https://github.com/aipubg/zero/blob/main/packages/plugin-sdk/index.mjs"
click node_workspaces "https://github.com/aipubg/zero/blob/main/packages/workspaces/index.mjs"

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_control_ui,node_host_requests,node_sessions,node_voice,node_user toneBlue
class node_agent_runtime,node_inference,node_model_fabric toneAmber
class node_capability_engine,node_computer_tools,node_research toneMint
class node_screen_intelligence,node_observation_engine,node_observation_store,node_unified_memory toneRose
class node_automation,node_skill_execution,node_plugin_sdk,node_workspaces toneIndigo
```

## Components

### User interaction

- [Control UI](https://github.com/aipubg/zero/blob/main/app/zero-control-ui/runtime-core.mjs): `app/zero-control-ui/runtime-core.mjs`
- [Host request handling](https://github.com/aipubg/zero/blob/main/services/host/request-orchestrator.mjs): `services/host/request-orchestrator.mjs`
- [Sessions](https://github.com/aipubg/zero/blob/main/packages/sessions/index.mjs): `packages/sessions/index.mjs`
- [Voice engine](https://github.com/aipubg/zero/blob/main/packages/voice-engine/index.mjs): `packages/voice-engine/index.mjs`

### Assistant execution

- [Agent runtime](https://github.com/aipubg/zero/blob/main/packages/agent-runtime/index.mjs): `packages/agent-runtime/index.mjs`
- [Agent inference](https://github.com/aipubg/zero/blob/main/packages/agent-runtime/inference.mjs): `packages/agent-runtime/inference.mjs`
- [Model fabric](https://github.com/aipubg/zero/blob/main/packages/model-fabric/index.mjs): `packages/model-fabric/index.mjs`

### Task capabilities

- [Capability engine](https://github.com/aipubg/zero/blob/main/packages/capability-engine/computer-operator.mjs): `packages/capability-engine/computer-operator.mjs`
- [Computer tools](https://github.com/aipubg/zero/blob/main/app/zero-control-ui/src/computer/tools.js): `app/zero-control-ui/src/computer/tools.js`
- [Research and files](https://github.com/aipubg/zero/blob/main/packages/research-engine/search.mjs): `packages/research-engine/search.mjs`

### Context and observation

- [Screen intelligence](https://github.com/aipubg/zero/blob/main/packages/screen-intelligence/index.mjs): `packages/screen-intelligence/index.mjs`
- [UI observation engine](https://github.com/aipubg/zero/blob/main/app/zero-control-ui/observation/engine.mjs): `app/zero-control-ui/observation/engine.mjs`
- [Observation store](https://github.com/aipubg/zero/blob/main/app/zero-control-ui/observation/memory-store.mjs): `app/zero-control-ui/observation/memory-store.mjs`
- [Unified memory](https://github.com/aipubg/zero/blob/main/packages/memory/unified-memory.mjs): `packages/memory/unified-memory.mjs`

### Background and extensions

- [Event automation](https://github.com/aipubg/zero/blob/main/packages/automation/event-automation.mjs): `packages/automation/event-automation.mjs`
- [Skill execution](https://github.com/aipubg/zero/blob/main/packages/skill-sdk/execution.mjs): `packages/skill-sdk/execution.mjs`
- [Plugin SDK](https://github.com/aipubg/zero/blob/main/packages/plugin-sdk/index.mjs): `packages/plugin-sdk/index.mjs`
- [Workspaces](https://github.com/aipubg/zero/blob/main/packages/workspaces/index.mjs): `packages/workspaces/index.mjs`

### Other components

- **User**

## Connections

- User → Control UI: submits requests
- Control UI → Host request handling: sends requests
- Host request handling → Agent runtime: orchestrates work
- Agent runtime → Agent inference: delegates inference (evidence: `packages/agent-runtime/index.mjs`)
- Agent inference → Capability engine: executes capabilities (evidence: `packages/agent-runtime/inference.mjs`)
- Agent inference → Research and files: searches or reads files (evidence: `packages/agent-runtime/inference.mjs`)
- Agent inference → Model fabric: requests model responses
- Control UI → UI observation engine: configures observation (evidence: `app/zero-control-ui/runtime-core.mjs`)
- UI observation engine → Observation store: records observations (evidence: `app/zero-control-ui/observation/engine.mjs`)
- Control UI → Computer tools: exposes computer tools (evidence: `app/zero-control-ui/runtime-core.mjs`)
- Computer tools → Capability engine: delegates actions (evidence: `app/zero-control-ui/src/computer/tools.js`)
- Agent runtime → Sessions: uses session context
- Agent runtime → Unified memory: uses persistent memory
- Control UI → Voice engine: accepts voice input
- Agent runtime → Event automation: supports background work
- Agent runtime → Skill execution: runs skills
- Agent runtime → Plugin SDK: uses plugins
- Agent runtime → Workspaces: delegates workspace tasks
- Screen intelligence → Unified memory: persists observations
