# lsszz2100/nuri architecture

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

- Interactive diagram: https://gitdiagram.com/lsszz2100/nuri
- Repository: https://github.com/lsszz2100/nuri

## Overview

Nuri is a Windows desktop AI browser: a user starts a task in the app, the browser agent observes pages and requests one action at a time from a local AI engine, then automation performs the action and returns results for display or export. Separate branches support desktop-app control, multi-step autopilot, sub-agents, scripts, schedules, and assistant mode. The README documents these capabilities, while the excerpts and source index show only selected call relationships; unverified wiring is omitted.

Main entry points: [`apps/desktop/src/agent/agent.js`](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/agent/agent.js) (Browser agent), [`apps/desktop/main.js`](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/main.js) (App host), [`packages/anb-orchestrator/src/server.ts`](https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/server.ts) (Local API server), [`apps/desktop/src/workflow/autopilot.js`](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/workflow/autopilot.js) (Autopilot planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_desktop_app["App host<br/>[main.js]"]
  node_ui["App interface"]
  node_settings["Settings and policy<br/>[settings.js]"]
end

subgraph group_browser["Browser work"]
  node_browser_agent["Browser agent<br/>[agent.js]"]
  node_page_observer["Page observation<br/>[observer.js]"]
  node_page_actions["Browser actions<br/>[actions.js]"]
  node_playwright["Playwright bridge"]
  node_attachments["Attachments and documents<br/>[attachments.js]"]
  node_subagents["Sub-agents<br/>[subagents.js]"]
  node_script_runner["Automation scripts<br/>[script.js]"]
  node_tabs["Browser tabs<br/>[tabs.js]"]
end

subgraph group_computer["Computer and workflows"]
  node_autopilot["Autopilot planner<br/>[autopilot.js]"]
  node_desktop_runner["Desktop automation<br/>[runner.js]"]
  node_scheduler["Task schedules<br/>[schedules.js]"]
end

subgraph group_engine["Local AI engine"]
  node_server_client["Engine client<br/>[server-client.js]"]
  node_engine_server["Local API server<br/>[server.ts]"]
  node_llm_routes["LLM routes<br/>[llm.ts]"]
  node_cli_sessions["AI CLI sessions<br/>[claudeSession.ts]"]
  node_cli_process["CLI process layer<br/>[process.ts]"]
  node_skills["Skills<br/>[skillManager.ts]"]
end

subgraph group_data["Policy and results"]
  node_approval_policy["Approval policy<br/>[policy.ts]"]
  node_task_storage[("Task and result storage<br/>[storage.ts]")]
end

node_user(("User"))

node_user -->|"enters task"| node_ui
node_ui -->|"sends requests"| node_desktop_app
node_desktop_app -->|"starts agent"| node_browser_agent
node_desktop_app -->|"manages engine"| node_server_client
node_desktop_app -->|"manages tabs"| node_tabs
node_desktop_app -->|"starts workflow"| node_autopilot
node_desktop_app -->|"manages schedules"| node_scheduler
node_browser_agent -->|"observes pages"| node_page_observer
node_browser_agent -->|"executes actions"| node_page_actions
node_browser_agent -->|"requests AI decisions"| node_server_client
node_browser_agent -->|"controls apps"| node_desktop_runner
node_browser_agent -->|"reads attachments"| node_attachments
node_browser_agent -->|"delegates research"| node_subagents
node_browser_agent -->|"runs scripts"| node_script_runner
node_page_actions -.->|"uses bridge"| node_playwright
node_autopilot -->|"runs task steps"| node_browser_agent
node_autopilot -->|"creates documents"| node_attachments
node_server_client -->|"sends requests"| node_engine_server
node_engine_server -->|"dispatches LLM requests"| node_llm_routes
node_llm_routes -->|"calls provider sessions"| node_cli_sessions
node_cli_sessions -->|"spawns CLI"| node_cli_process
node_browser_agent -.->|"checks risky actions"| node_approval_policy
node_engine_server -.->|"uses task records"| node_task_storage
node_engine_server -.->|"uses skills"| node_skills
node_desktop_app -->|"loads preferences"| node_settings

click node_desktop_app "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/main.js"
click node_ui "https://github.com/lsszz2100/nuri/tree/main/apps/desktop/ui/js"
click node_settings "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/settings.js"
click node_browser_agent "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/agent/agent.js"
click node_page_observer "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/observer.js"
click node_page_actions "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/actions.js"
click node_playwright "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/playwright-bridge.js"
click node_attachments "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/attachments.js"
click node_subagents "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/agent/subagents.js"
click node_script_runner "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/script.js"
click node_tabs "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/tabs.js"
click node_autopilot "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/workflow/autopilot.js"
click node_desktop_runner "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/desktop/runner.js"
click node_scheduler "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/schedules.js"
click node_server_client "https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/server-client.js"
click node_engine_server "https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/server.ts"
click node_llm_routes "https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/routes/llm.ts"
click node_cli_sessions "https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/llm/claudeSession.ts"
click node_cli_process "https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/llm/process.ts"
click node_approval_policy "https://github.com/lsszz2100/nuri/blob/main/packages/anb-core/src/policy.ts"
click node_task_storage "https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/storage.ts"
click node_skills "https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/skills/skillManager.ts"

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_desktop_app,node_ui,node_settings,node_user toneBlue
class node_browser_agent,node_page_observer,node_page_actions,node_playwright,node_attachments,node_subagents,node_script_runner,node_tabs toneAmber
class node_autopilot,node_desktop_runner,node_scheduler toneMint
class node_server_client,node_engine_server,node_llm_routes,node_cli_sessions,node_cli_process,node_skills toneRose
class node_approval_policy,node_task_storage toneIndigo
```

## Components

### Desktop app

- [App host](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/main.js): `apps/desktop/main.js`
- [App interface](https://github.com/lsszz2100/nuri/tree/main/apps/desktop/ui/js): `apps/desktop/ui/js`
- [Settings and policy](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/settings.js): `apps/desktop/src/settings.js`

### Browser work

- [Browser agent](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/agent/agent.js): `apps/desktop/src/agent/agent.js`
- [Page observation](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/observer.js): `apps/desktop/src/automation/observer.js`
- [Browser actions](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/actions.js): `apps/desktop/src/automation/actions.js`
- [Playwright bridge](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/playwright-bridge.js): `apps/desktop/src/automation/playwright-bridge.js`
- [Attachments and documents](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/attachments.js): `apps/desktop/src/attachments.js`
- [Sub-agents](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/agent/subagents.js): `apps/desktop/src/agent/subagents.js`
- [Automation scripts](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/automation/script.js): `apps/desktop/src/automation/script.js`
- [Browser tabs](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/tabs.js): `apps/desktop/src/tabs.js`

### Computer and workflows

- [Autopilot planner](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/workflow/autopilot.js): `apps/desktop/src/workflow/autopilot.js`
- [Desktop automation](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/desktop/runner.js): `apps/desktop/src/desktop/runner.js`
- [Task schedules](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/schedules.js): `apps/desktop/src/schedules.js`

### Local AI engine

- [Engine client](https://github.com/lsszz2100/nuri/blob/main/apps/desktop/src/server-client.js): `apps/desktop/src/server-client.js`
- [Local API server](https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/server.ts): `packages/anb-orchestrator/src/server.ts`
- [LLM routes](https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/routes/llm.ts): `packages/anb-orchestrator/src/routes/llm.ts`
- [AI CLI sessions](https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/llm/claudeSession.ts): `packages/anb-orchestrator/src/llm/claudeSession.ts`
- [CLI process layer](https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/llm/process.ts): `packages/anb-orchestrator/src/llm/process.ts`
- [Skills](https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/skills/skillManager.ts): `packages/anb-orchestrator/src/skills/skillManager.ts`

### Policy and results

- [Approval policy](https://github.com/lsszz2100/nuri/blob/main/packages/anb-core/src/policy.ts): `packages/anb-core/src/policy.ts`
- [Task and result storage](https://github.com/lsszz2100/nuri/blob/main/packages/anb-orchestrator/src/storage.ts): `packages/anb-orchestrator/src/storage.ts`

### Other components

- **User**

## Connections

- User → App interface: enters task (evidence: `README.md`)
- App interface → App host: sends requests (evidence: `apps/desktop/ui/js/app.js`)
- App host → Browser agent: starts agent (evidence: `apps/desktop/main.js`)
- App host → Engine client: manages engine (evidence: `apps/desktop/main.js`)
- App host → Browser tabs: manages tabs (evidence: `apps/desktop/main.js`)
- App host → Autopilot planner: starts workflow (evidence: `apps/desktop/main.js`)
- App host → Task schedules: manages schedules (evidence: `apps/desktop/main.js`)
- Browser agent → Page observation: observes pages (evidence: `apps/desktop/src/agent/agent.js`)
- Browser agent → Browser actions: executes actions (evidence: `apps/desktop/src/agent/agent.js`)
- Browser agent → Engine client: requests AI decisions (evidence: `README.md`)
- Browser agent → Desktop automation: controls apps (evidence: `apps/desktop/src/agent/agent.js`)
- Browser agent → Attachments and documents: reads attachments (evidence: `apps/desktop/src/agent/agent.js`)
- Browser agent → Sub-agents: delegates research (evidence: `apps/desktop/src/agent/agent.js`)
- Browser agent → Automation scripts: runs scripts (evidence: `apps/desktop/src/agent/agent.js`)
- Browser actions → Playwright bridge: uses bridge
- Autopilot planner → Browser agent: runs task steps (evidence: `apps/desktop/src/workflow/autopilot.js`)
- Autopilot planner → Attachments and documents: creates documents (evidence: `apps/desktop/src/workflow/autopilot.js`)
- Engine client → Local API server: sends requests (evidence: `apps/desktop/src/server-client.js`)
- Local API server → LLM routes: dispatches LLM requests (evidence: `packages/anb-orchestrator/src/server.ts`)
- LLM routes → AI CLI sessions: calls provider sessions (evidence: `packages/anb-orchestrator/src/routes/llm.ts`)
- AI CLI sessions → CLI process layer: spawns CLI (evidence: `packages/anb-orchestrator/src/llm/claudeSession.ts`)
- Browser agent → Approval policy: checks risky actions
- Local API server → Task and result storage: uses task records
- Local API server → Skills: uses skills
- App host → Settings and policy: loads preferences (evidence: `apps/desktop/main.js`)
