# kc1t/alethe-agents architecture

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

- Interactive diagram: https://gitdiagram.com/kc1t/alethe-agents
- Repository: https://github.com/kc1t/alethe-agents

## Overview

Alethe is a local-first Tauri desktop workspace for running coding agents and shells in persistent project layouts. The principal workflow is to organize projects, open terminals backed by real PTYs, run or resume agent sessions, and keep shared tools and context manageable. The README also documents orchestration, MCP and skills, plugins, routing, and GitHub/Git workflows. The graph combines those documented capabilities with sampled frontend and Rust modules; several feature links are README-level because their runtime implementations were not sampled.

Main entry points: [`src/components/XTermView/useXtermSession.ts`](https://github.com/kc1t/alethe-agents/blob/main/src/components/XTermView/useXtermSession.ts) (Terminal Session), [`src/App.tsx`](https://github.com/kc1t/alethe-agents/blob/main/src/App.tsx) (Desktop Shell), [`src/stores/projectsStore.ts`](https://github.com/kc1t/alethe-agents/blob/main/src/stores/projectsStore.ts) (Project State), [`src/components/WorkspaceView`](https://github.com/kc1t/alethe-agents/tree/main/src/components/WorkspaceView) (Workspace Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace"]
  node_app["Desktop Shell<br/>[App.tsx]"]
  node_project_state[("Project State<br/>[projectsStore.ts]")]
  node_workspace_views["Workspace Views"]
  node_terminal_ui["Terminal Session<br/>[useXtermSession.ts]"]
end

subgraph group_agents["Agent Runtime"]
  node_pty_runtime["PTY Runtime<br/>[pty.rs]"]
  node_agent_providers["Agent Providers<br/>[agentProviders.ts]"]
  node_agent_install["Agent Install<br/>[agentInstall.ts]"]
  node_session_support["Session Support<br/>[claude_sessions.rs]"]
end

subgraph group_coordination["Coordination"]
  node_orchestration_ui["Orchestration UI<br/>[index.tsx]"]
  node_orchestrator_core["Orchestrator Core<br/>[orchestrator.rs]"]
  node_mcp_ui["MCP Manager"]
  node_mcp_runtime["MCP Runtime<br/>[mcp_store.rs]"]
  node_memory[("AI Memory<br/>[ai_memory.rs]")]
end

subgraph group_shared["Shared Capabilities"]
  node_browser["Browser Panes<br/>[index.tsx]"]
  node_usage["Usage Analytics<br/>[activity_stats.rs]"]
  node_remote["Remote Control<br/>[http.rs]"]
  node_router9["9router Routing<br/>[router9.ts]"]
end

subgraph group_extensions["Extensions"]
  node_plugin_host["Plugin Host<br/>[host.ts]"]
  node_git_plugin["Git Control<br/>[GitControl.tsx]"]
end

node_user(("User"))
node_github[("GitHub")]

node_user -->|"uses"| node_app
node_app -->|"renders workspace"| node_project_state
node_project_state -.->|"organizes panes"| node_workspace_views
node_workspace_views -.->|"hosts sessions"| node_terminal_ui
node_terminal_ui -.->|"controls PTY"| node_pty_runtime
node_terminal_ui -->|"resolves commands"| node_agent_providers
node_agent_providers -.->|"supports installation"| node_agent_install
node_terminal_ui -.->|"resumes sessions"| node_session_support
node_user -.->|"configures workers"| node_orchestration_ui
node_orchestration_ui -.->|"dispatches work"| node_orchestrator_core
node_user -->|"manages servers"| node_mcp_ui
node_mcp_ui -.->|"manages MCP"| node_mcp_runtime
node_user -.->|"manages context"| node_memory
node_user -.->|"opens browser panes"| node_browser
node_user -.->|"reviews usage"| node_usage
node_user -.->|"enables remote access"| node_remote
node_terminal_ui -.->|"routes terminals"| node_router9
node_app -.->|"initializes plugins"| node_plugin_host
node_plugin_host -->|"loads contribution"| node_git_plugin
node_git_plugin -.->|"integrates GitHub"| node_github

click node_app "https://github.com/kc1t/alethe-agents/blob/main/src/App.tsx"
click node_project_state "https://github.com/kc1t/alethe-agents/blob/main/src/stores/projectsStore.ts"
click node_workspace_views "https://github.com/kc1t/alethe-agents/tree/main/src/components/WorkspaceView"
click node_terminal_ui "https://github.com/kc1t/alethe-agents/blob/main/src/components/XTermView/useXtermSession.ts"
click node_pty_runtime "https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/pty.rs"
click node_agent_providers "https://github.com/kc1t/alethe-agents/blob/main/src/lib/agentProviders.ts"
click node_agent_install "https://github.com/kc1t/alethe-agents/blob/main/src/lib/agentInstall.ts"
click node_session_support "https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/claude_sessions.rs"
click node_orchestration_ui "https://github.com/kc1t/alethe-agents/blob/main/src/components/OrchestratorPane/index.tsx"
click node_orchestrator_core "https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/orchestrator.rs"
click node_mcp_ui "https://github.com/kc1t/alethe-agents/blob/main/src/components/modals/McpManagerModal.tsx"
click node_mcp_runtime "https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/mcp_store.rs"
click node_memory "https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/ai_memory.rs"
click node_browser "https://github.com/kc1t/alethe-agents/blob/main/src/components/WebPane/index.tsx"
click node_usage "https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/activity_stats.rs"
click node_remote "https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/remote/http.rs"
click node_router9 "https://github.com/kc1t/alethe-agents/blob/main/src/lib/router9.ts"
click node_plugin_host "https://github.com/kc1t/alethe-agents/blob/main/src/lib/plugins/host.ts"
click node_git_plugin "https://github.com/kc1t/alethe-agents/blob/main/src/plugins/git-control/GitControl.tsx"

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_app,node_project_state,node_workspace_views,node_terminal_ui,node_user toneBlue
class node_pty_runtime,node_agent_providers,node_agent_install,node_session_support,node_github toneAmber
class node_orchestration_ui,node_orchestrator_core,node_mcp_ui,node_mcp_runtime,node_memory toneMint
class node_browser,node_usage,node_remote,node_router9 toneRose
class node_plugin_host,node_git_plugin toneIndigo
```

## Components

### Workspace

- [Desktop Shell](https://github.com/kc1t/alethe-agents/blob/main/src/App.tsx): `src/App.tsx`
- [Project State](https://github.com/kc1t/alethe-agents/blob/main/src/stores/projectsStore.ts): `src/stores/projectsStore.ts`
- [Workspace Views](https://github.com/kc1t/alethe-agents/tree/main/src/components/WorkspaceView): `src/components/WorkspaceView`
- [Terminal Session](https://github.com/kc1t/alethe-agents/blob/main/src/components/XTermView/useXtermSession.ts): `src/components/XTermView/useXtermSession.ts`

### Agent Runtime

- [PTY Runtime](https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/pty.rs): `src-tauri/src/pty.rs`
- [Agent Providers](https://github.com/kc1t/alethe-agents/blob/main/src/lib/agentProviders.ts): `src/lib/agentProviders.ts`
- [Agent Install](https://github.com/kc1t/alethe-agents/blob/main/src/lib/agentInstall.ts): `src/lib/agentInstall.ts`
- [Session Support](https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/claude_sessions.rs): `src-tauri/src/claude_sessions.rs`

### Coordination

- [Orchestration UI](https://github.com/kc1t/alethe-agents/blob/main/src/components/OrchestratorPane/index.tsx): `src/components/OrchestratorPane/index.tsx`
- [Orchestrator Core](https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/orchestrator.rs): `src-tauri/src/orchestrator.rs`
- [MCP Manager](https://github.com/kc1t/alethe-agents/blob/main/src/components/modals/McpManagerModal.tsx): `src/components/modals/McpManagerModal.tsx`
- [MCP Runtime](https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/mcp_store.rs): `src-tauri/src/mcp_store.rs`
- [AI Memory](https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/ai_memory.rs): `src-tauri/src/ai_memory.rs`

### Shared Capabilities

- [Browser Panes](https://github.com/kc1t/alethe-agents/blob/main/src/components/WebPane/index.tsx): `src/components/WebPane/index.tsx`
- [Usage Analytics](https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/activity_stats.rs): `src-tauri/src/activity_stats.rs`
- [Remote Control](https://github.com/kc1t/alethe-agents/blob/main/src-tauri/src/remote/http.rs): `src-tauri/src/remote/http.rs`
- [9router Routing](https://github.com/kc1t/alethe-agents/blob/main/src/lib/router9.ts): `src/lib/router9.ts`

### Extensions

- [Plugin Host](https://github.com/kc1t/alethe-agents/blob/main/src/lib/plugins/host.ts): `src/lib/plugins/host.ts`
- [Git Control](https://github.com/kc1t/alethe-agents/blob/main/src/plugins/git-control/GitControl.tsx): `src/plugins/git-control/GitControl.tsx`

### Other components

- **User**
- **GitHub**

## Connections

- User → Desktop Shell: uses (evidence: `README.md`)
- Desktop Shell → Project State: renders workspace (evidence: `src/App.tsx`)
- Project State → Workspace Views: organizes panes (evidence: `README.md`)
- Workspace Views → Terminal Session: hosts sessions (evidence: `README.md`)
- Terminal Session → PTY Runtime: controls PTY
- Terminal Session → Agent Providers: resolves commands (evidence: `src/components/XTermView/useXtermSession.ts`)
- Agent Providers → Agent Install: supports installation
- Terminal Session → Session Support: resumes sessions (evidence: `README.md`)
- User → Orchestration UI: configures workers (evidence: `README.md`)
- Orchestration UI → Orchestrator Core: dispatches work (evidence: `README.md`)
- User → MCP Manager: manages servers (evidence: `src/components/modals/McpManagerModal.tsx`)
- MCP Manager → MCP Runtime: manages MCP
- User → AI Memory: manages context (evidence: `README.md`)
- User → Browser Panes: opens browser panes (evidence: `README.md`)
- User → Usage Analytics: reviews usage (evidence: `README.md`)
- User → Remote Control: enables remote access (evidence: `README.md`)
- Terminal Session → 9router Routing: routes terminals (evidence: `README.md`)
- Desktop Shell → Plugin Host: initializes plugins
- Plugin Host → Git Control: loads contribution
- Git Control → GitHub: integrates GitHub (evidence: `README.md`)
