# simplexai-labs/linger architecture

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

- Interactive diagram: https://gitdiagram.com/simplexai-labs/linger
- Repository: https://github.com/simplexai-labs/linger

## Overview

Linger is a local-first personal agent: the user installs and checks a machine-suited model, then the resident computer daemon exposes local runtimes and computer capabilities to agent services. The README also describes proactive assistance and shared memory, but the supplied tree and excerpts provide limited evidence for those product branches. The graph emphasizes the local-computer and agent-runtime workflow; dashed links mark documented or plausible connections not confirmed by a shown call. Evidence is limited to the README, source index, and sampled excerpts.

Main entry points: [`apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`](https://github.com/simplexai-labs/linger/blob/main/apps/computer/local-daemon/cmd/linger-computer-daemon/main.go) (Resident daemon), [`apps/node-services/src/agent/executor/http/agent-manager-http-server.ts`](https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/executor/http/agent-manager-http-server.ts) (Agent HTTP server), [`apps/linger-installer/src/main.ts`](https://github.com/simplexai-labs/linger/blob/main/apps/linger-installer/src/main.ts) (Installer), [`apps/node-services/src/agent/bootstrap/bootstrap-agent-manager.ts`](https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/bootstrap/bootstrap-agent-manager.ts) (Agent bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and enrollment"]
  node_installer["Installer<br/>[main.ts]"]
  node_installer_ui["Installer UI<br/>[App.tsx]"]
  node_installer_storage["Private storage<br/>[storage.ts]"]
  node_computer_cli["Computer CLI"]
end

subgraph group_computer["Local computer"]
  node_daemon["Resident daemon<br/>[main.go]"]
  node_daemon_config["Configuration"]
  node_provider["Provider runtime"]
  node_local_models["Local models"]
  node_computer_tools["Computer tools<br/>[manager.go]"]
  node_context["Agent context"]
  node_permissions["Action permissions"]
end

subgraph group_agent["Agent runtime"]
  node_agent_bootstrap["Agent bootstrap"]
  node_agent_api["Agent manager API"]
  node_agent_http["Agent HTTP server"]
  node_runner_gateway["Runner gateway"]
end

subgraph group_platform["Local services"]
  node_state_store[("SQLite store")]
end

node_user(("User"))
node_teamhub["TeamHub"]

node_user -.->|"starts setup"| node_installer
node_installer -.->|"serves UI"| node_installer_ui
node_installer -->|"stores privately"| node_installer_storage
node_user -.->|"runs command"| node_computer_cli
node_computer_cli -.->|"starts daemon"| node_daemon
node_daemon -->|"loads configuration"| node_daemon_config
node_daemon -->|"monitors runtimes"| node_provider
node_daemon -->|"sets model source"| node_local_models
node_daemon -->|"creates manager"| node_computer_tools
node_daemon -->|"opens views"| node_context
node_daemon -->|"handles hooks"| node_permissions
node_computer_tools -->|"uses permission"| node_permissions
node_agent_bootstrap -.->|"builds manager"| node_agent_api
node_agent_bootstrap -.->|"starts server"| node_agent_http
node_agent_http -->|"routes requests"| node_agent_api
node_agent_http -->|"uses gateway"| node_runner_gateway
node_teamhub -.->|"manages agents"| node_agent_http
node_daemon -.->|"uses database"| node_state_store

click node_installer "https://github.com/simplexai-labs/linger/blob/main/apps/linger-installer/src/main.ts"
click node_installer_ui "https://github.com/simplexai-labs/linger/blob/main/apps/linger-installer/src/web/App.tsx"
click node_installer_storage "https://github.com/simplexai-labs/linger/blob/main/apps/linger-installer/src/server/storage.ts"
click node_computer_cli "https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/computercli"
click node_daemon "https://github.com/simplexai-labs/linger/blob/main/apps/computer/local-daemon/cmd/linger-computer-daemon/main.go"
click node_daemon_config "https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/computerconfig"
click node_provider "https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/provider"
click node_local_models "https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/localmodels"
click node_computer_tools "https://github.com/simplexai-labs/linger/blob/main/apps/computer/local-daemon/internal/linger/localtools/manager.go"
click node_context "https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/linger/context"
click node_permissions "https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/permission"
click node_agent_bootstrap "https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/bootstrap/bootstrap-agent-manager.ts"
click node_agent_api "https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/executor/agent-manager-api.ts"
click node_agent_http "https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/executor/http/agent-manager-http-server.ts"
click node_runner_gateway "https://github.com/simplexai-labs/linger/tree/main/apps/node-services/src/agent/runner-gateway"
click node_state_store "https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/platform/sqlitedb"

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_installer,node_installer_ui,node_installer_storage,node_computer_cli,node_user toneBlue
class node_daemon,node_daemon_config,node_provider,node_local_models,node_computer_tools,node_context,node_permissions toneAmber
class node_agent_bootstrap,node_agent_api,node_agent_http,node_runner_gateway toneMint
class node_state_store toneRose
class node_teamhub toneIndigo
```

## Components

### Setup and enrollment

- [Installer](https://github.com/simplexai-labs/linger/blob/main/apps/linger-installer/src/main.ts): `apps/linger-installer/src/main.ts`
- [Installer UI](https://github.com/simplexai-labs/linger/blob/main/apps/linger-installer/src/web/App.tsx): `apps/linger-installer/src/web/App.tsx`
- [Private storage](https://github.com/simplexai-labs/linger/blob/main/apps/linger-installer/src/server/storage.ts): `apps/linger-installer/src/server/storage.ts`
- [Computer CLI](https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/computercli): `apps/computer/local-daemon/internal/computercli`

### Local computer

- [Resident daemon](https://github.com/simplexai-labs/linger/blob/main/apps/computer/local-daemon/cmd/linger-computer-daemon/main.go): `apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`
- [Configuration](https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/computerconfig): `apps/computer/local-daemon/internal/computerconfig`
- [Provider runtime](https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/provider): `apps/computer/local-daemon/internal/provider`
- [Local models](https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/localmodels): `apps/computer/local-daemon/internal/localmodels`
- [Computer tools](https://github.com/simplexai-labs/linger/blob/main/apps/computer/local-daemon/internal/linger/localtools/manager.go): `apps/computer/local-daemon/internal/linger/localtools/manager.go`
- [Agent context](https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/linger/context): `apps/computer/local-daemon/internal/linger/context`
- [Action permissions](https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/permission): `apps/computer/local-daemon/internal/permission`

### Agent runtime

- [Agent bootstrap](https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/bootstrap/bootstrap-agent-manager.ts): `apps/node-services/src/agent/bootstrap/bootstrap-agent-manager.ts`
- [Agent manager API](https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/executor/agent-manager-api.ts): `apps/node-services/src/agent/executor/agent-manager-api.ts`
- [Agent HTTP server](https://github.com/simplexai-labs/linger/blob/main/apps/node-services/src/agent/executor/http/agent-manager-http-server.ts): `apps/node-services/src/agent/executor/http/agent-manager-http-server.ts`
- [Runner gateway](https://github.com/simplexai-labs/linger/tree/main/apps/node-services/src/agent/runner-gateway): `apps/node-services/src/agent/runner-gateway`

### Local services

- [SQLite store](https://github.com/simplexai-labs/linger/tree/main/apps/computer/local-daemon/internal/platform/sqlitedb): `apps/computer/local-daemon/internal/platform/sqlitedb`

### Other components

- **User**
- **TeamHub**

## Connections

- User → Installer: starts setup (evidence: `README.md`)
- Installer → Installer UI: serves UI (evidence: `apps/linger-installer/src/main.ts`)
- Installer → Private storage: stores privately (evidence: `apps/linger-installer/src/server/storage.ts`)
- User → Computer CLI: runs command (evidence: `README.md`)
- Computer CLI → Resident daemon: starts daemon
- Resident daemon → Configuration: loads configuration (evidence: `apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`)
- Resident daemon → Provider runtime: monitors runtimes (evidence: `apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`)
- Resident daemon → Local models: sets model source (evidence: `apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`)
- Resident daemon → Computer tools: creates manager (evidence: `apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`)
- Resident daemon → Agent context: opens views (evidence: `apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`)
- Resident daemon → Action permissions: handles hooks (evidence: `apps/computer/local-daemon/cmd/linger-computer-daemon/main.go`)
- Computer tools → Action permissions: uses permission (evidence: `apps/computer/local-daemon/internal/linger/localtools/manager.go`)
- Agent bootstrap → Agent manager API: builds manager (evidence: `apps/node-services/src/agent/bootstrap/bootstrap-agent-manager.ts`)
- Agent bootstrap → Agent HTTP server: starts server (evidence: `apps/node-services/src/agent/bootstrap/bootstrap-agent-manager.ts`)
- Agent HTTP server → Agent manager API: routes requests (evidence: `apps/node-services/src/agent/executor/http/agent-manager-http-server.ts`)
- Agent HTTP server → Runner gateway: uses gateway (evidence: `apps/node-services/src/agent/executor/http/agent-manager-http-server.ts`)
- TeamHub → Agent HTTP server: manages agents
- Resident daemon → SQLite store: uses database
