# helixml/helix architecture

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

- Interactive diagram: https://gitdiagram.com/helixml/helix
- Repository: https://github.com/helixml/helix

## Overview

Helix is a self-hostable platform for running a team fleet of coding agents in isolated desktop sandboxes. The primary workflow is project task creation, agent-authored planning, human spec review and approval, sandbox implementation, and pull-request review/merge. The graph also shows the API and agent/model layers and README-documented platform capabilities. Several subsystem links are documented at product level; unsampled implementation details are not inferred as call chains.

Main entry points: [`api/pkg/agent/agent.go`](https://github.com/helixml/helix/blob/main/api/pkg/agent/agent.go) (Agent orchestration), [`api/pkg/controller/sessions.go`](https://github.com/helixml/helix/blob/main/api/pkg/controller/sessions.go) (Agent sessions), [`api/pkg/webservice/controller.go`](https://github.com/helixml/helix/blob/main/api/pkg/webservice/controller.go) (HTTP API), [`api/pkg/server/spec_task_design_review_handlers.go`](https://github.com/helixml/helix/blob/main/api/pkg/server/spec_task_design_review_handlers.go) (Spec task handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_work["Spec-driven work"]
  node_spec_handlers["Spec task handlers"]
  node_projects["Projects and tasks<br/>[projects.go]"]
  node_review["Plan review"]
end

subgraph group_runtime["Agent runtime"]
  node_agent_session["Agent sessions<br/>[sessions.go]"]
  node_agent["Agent orchestration<br/>[agent.go]"]
  node_skills["Skills and tools<br/>[skill.go]"]
  node_llm["LLM client<br/>[llm_client.go]"]
  node_desktop["Sandbox desktop<br/>[desktop.go]"]
  node_sandbox["Sandbox management<br/>[manager.go]"]
end

subgraph group_platform["Platform services"]
  node_knowledge["Knowledge and RAG"]
  node_auth["Auth and tenancy<br/>[auth.go]"]
  node_observability["Usage and tracing<br/>[observability.go]"]
end

subgraph group_interfaces["User interfaces"]
  node_frontend["Web dashboard"]
  node_spec_ui["Spec task UI<br/>[useSpecTasks.ts]"]
  node_api["HTTP API<br/>[controller.go]"]
  node_web_client["Web API client<br/>[api.ts]"]
  node_mac_app["macOS companion<br/>[app.go]"]
end

subgraph group_integrations["External integrations"]
  node_source_control["Git providers<br/>[client.go]"]
  node_llm_providers["Model providers"]
  node_notification["Notifications<br/>[notification.go]"]
  node_pull_request["Pull request"]
end

node_teammate(("Team member"))

node_teammate -->|"uses"| node_frontend
node_frontend -->|"manages tasks"| node_spec_ui
node_spec_ui -->|"requests task data"| node_web_client
node_web_client -.->|"calls API"| node_api
node_api -.->|"routes requests"| node_spec_handlers
node_spec_handlers -.->|"updates task"| node_projects
node_spec_handlers -->|"handles review"| node_review
node_teammate -->|"reviews plan"| node_review
node_review -->|"sends feedback"| node_agent_session
node_projects -->|"dispatches work"| node_agent_session
node_agent_session -->|"runs in"| node_sandbox
node_sandbox -->|"provides desktop"| node_desktop
node_agent_session -.->|"hosts agent"| node_agent
node_agent -->|"uses tools"| node_skills
node_agent -.->|"requests completions"| node_llm
node_llm -->|"sends requests"| node_llm_providers
node_agent -->|"uses retrieval"| node_knowledge
node_api -.->|"enforces access"| node_auth
node_agent -->|"records activity"| node_observability
node_projects -->|"connects repositories"| node_source_control
node_agent_session -->|"opens pull request"| node_source_control
node_source_control -->|"creates"| node_pull_request
node_teammate -->|"reviews and merges"| node_pull_request
node_api -.->|"sends alerts"| node_notification
node_teammate -.->|"uses companion"| node_mac_app

click node_frontend "https://github.com/helixml/helix/tree/main/frontend/src"
click node_spec_ui "https://github.com/helixml/helix/blob/main/frontend/src/hooks/useSpecTasks.ts"
click node_api "https://github.com/helixml/helix/blob/main/api/pkg/webservice/controller.go"
click node_spec_handlers "https://github.com/helixml/helix/blob/main/api/pkg/server/spec_task_design_review_handlers.go"
click node_projects "https://github.com/helixml/helix/blob/main/api/pkg/org/application/projects/projects.go"
click node_review "https://github.com/helixml/helix/blob/main/api/pkg/server/spec_task_design_review_handlers.go"
click node_agent_session "https://github.com/helixml/helix/blob/main/api/pkg/controller/sessions.go"
click node_agent "https://github.com/helixml/helix/blob/main/api/pkg/agent/agent.go"
click node_skills "https://github.com/helixml/helix/blob/main/api/pkg/agent/skill.go"
click node_llm "https://github.com/helixml/helix/blob/main/api/pkg/agent/llm_client.go"
click node_desktop "https://github.com/helixml/helix/blob/main/api/pkg/desktop/desktop.go"
click node_sandbox "https://github.com/helixml/helix/blob/main/api/pkg/sandbox/compute/manager.go"
click node_knowledge "https://github.com/helixml/helix/tree/main/api/pkg/controller/knowledge"
click node_auth "https://github.com/helixml/helix/blob/main/api/pkg/auth/auth.go"
click node_observability "https://github.com/helixml/helix/blob/main/api/pkg/agent/observability.go"
click node_web_client "https://github.com/helixml/helix/blob/main/frontend/src/api/api.ts"
click node_mac_app "https://github.com/helixml/helix/blob/main/for-mac/app.go"
click node_source_control "https://github.com/helixml/helix/blob/main/api/pkg/github/client.go"
click node_llm_providers "https://github.com/helixml/helix/blob/main/api/pkg/openai/manager/provider_manager.go"
click node_notification "https://github.com/helixml/helix/blob/main/api/pkg/notification/notification.go"

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_spec_handlers,node_projects,node_review toneBlue
class node_agent_session,node_agent,node_skills,node_llm,node_desktop,node_sandbox toneAmber
class node_knowledge,node_auth,node_observability toneMint
class node_frontend,node_spec_ui,node_api,node_web_client,node_mac_app toneRose
class node_source_control,node_llm_providers,node_notification,node_pull_request,node_teammate toneIndigo
```

## Components

### Spec-driven work

- [Spec task handlers](https://github.com/helixml/helix/blob/main/api/pkg/server/spec_task_design_review_handlers.go): `api/pkg/server/spec_task_design_review_handlers.go`
- [Projects and tasks](https://github.com/helixml/helix/blob/main/api/pkg/org/application/projects/projects.go): `api/pkg/org/application/projects/projects.go`
- [Plan review](https://github.com/helixml/helix/blob/main/api/pkg/server/spec_task_design_review_handlers.go): `api/pkg/server/spec_task_design_review_handlers.go`

### Agent runtime

- [Agent sessions](https://github.com/helixml/helix/blob/main/api/pkg/controller/sessions.go): `api/pkg/controller/sessions.go`
- [Agent orchestration](https://github.com/helixml/helix/blob/main/api/pkg/agent/agent.go): `api/pkg/agent/agent.go`
- [Skills and tools](https://github.com/helixml/helix/blob/main/api/pkg/agent/skill.go): `api/pkg/agent/skill.go`
- [LLM client](https://github.com/helixml/helix/blob/main/api/pkg/agent/llm_client.go): `api/pkg/agent/llm_client.go`
- [Sandbox desktop](https://github.com/helixml/helix/blob/main/api/pkg/desktop/desktop.go): `api/pkg/desktop/desktop.go`
- [Sandbox management](https://github.com/helixml/helix/blob/main/api/pkg/sandbox/compute/manager.go): `api/pkg/sandbox/compute/manager.go`

### Platform services

- [Knowledge and RAG](https://github.com/helixml/helix/tree/main/api/pkg/controller/knowledge): `api/pkg/controller/knowledge`
- [Auth and tenancy](https://github.com/helixml/helix/blob/main/api/pkg/auth/auth.go): `api/pkg/auth/auth.go`
- [Usage and tracing](https://github.com/helixml/helix/blob/main/api/pkg/agent/observability.go): `api/pkg/agent/observability.go`

### User interfaces

- [Web dashboard](https://github.com/helixml/helix/tree/main/frontend/src): `frontend/src`
- [Spec task UI](https://github.com/helixml/helix/blob/main/frontend/src/hooks/useSpecTasks.ts): `frontend/src/hooks/useSpecTasks.ts`
- [HTTP API](https://github.com/helixml/helix/blob/main/api/pkg/webservice/controller.go): `api/pkg/webservice/controller.go`
- [Web API client](https://github.com/helixml/helix/blob/main/frontend/src/api/api.ts): `frontend/src/api/api.ts`
- [macOS companion](https://github.com/helixml/helix/blob/main/for-mac/app.go): `for-mac/app.go`

### External integrations

- [Git providers](https://github.com/helixml/helix/blob/main/api/pkg/github/client.go): `api/pkg/github/client.go`
- [Model providers](https://github.com/helixml/helix/blob/main/api/pkg/openai/manager/provider_manager.go): `api/pkg/openai/manager/provider_manager.go`
- [Notifications](https://github.com/helixml/helix/blob/main/api/pkg/notification/notification.go): `api/pkg/notification/notification.go`
- **Pull request**

### Other components

- **Team member**

## Connections

- Team member → Web dashboard: uses (evidence: `README.md`)
- Web dashboard → Spec task UI: manages tasks (evidence: `frontend/src/hooks/useSpecTasks.ts`)
- Spec task UI → Web API client: requests task data (evidence: `frontend/src/hooks/useSpecTasks.ts`)
- Web API client → HTTP API: calls API
- HTTP API → Spec task handlers: routes requests
- Spec task handlers → Projects and tasks: updates task
- Spec task handlers → Plan review: handles review (evidence: `api/pkg/server/spec_task_design_review_handlers.go`)
- Team member → Plan review: reviews plan (evidence: `README.md`)
- Plan review → Agent sessions: sends feedback (evidence: `api/pkg/server/spec_task_design_review_handlers.go`)
- Projects and tasks → Agent sessions: dispatches work (evidence: `README.md`)
- Agent sessions → Sandbox management: runs in (evidence: `README.md`)
- Sandbox management → Sandbox desktop: provides desktop (evidence: `README.md`)
- Agent sessions → Agent orchestration: hosts agent
- Agent orchestration → Skills and tools: uses tools (evidence: `README.md`)
- Agent orchestration → LLM client: requests completions
- LLM client → Model providers: sends requests (evidence: `api/pkg/agent/llm_client.go`)
- Agent orchestration → Knowledge and RAG: uses retrieval (evidence: `README.md`)
- HTTP API → Auth and tenancy: enforces access
- Agent orchestration → Usage and tracing: records activity (evidence: `README.md`)
- Projects and tasks → Git providers: connects repositories (evidence: `README.md`)
- Agent sessions → Git providers: opens pull request (evidence: `README.md`)
- Git providers → Pull request: creates (evidence: `README.md`)
- Team member → Pull request: reviews and merges (evidence: `README.md`)
- HTTP API → Notifications: sends alerts
- Team member → macOS companion: uses companion
