# fynnfluegge/agtx architecture

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

- Interactive diagram: https://gitdiagram.com/fynnfluegge/agtx
- Repository: https://github.com/fynnfluegge/agtx

## Overview

agtx is a terminal-native kanban and orchestration environment for coding agents. A user creates and organizes project tasks on the TUI board; workflow phases and plugins guide agent selection, while the app provisions worktrees and tmux sessions, hands work to agents, and tracks progress for review and merging. SQLite stores board state. MCP and the optional mobile server provide alternate ways to inspect or operate the board. The README documents additional skills and orchestration features; unsampled wiring is shown only where documented or supported by the tree.

Main entry points: [`src/tui/app.rs`](https://github.com/fynnfluegge/agtx/blob/main/src/tui/app.rs) (Board app), [`src/web/routes.rs`](https://github.com/fynnfluegge/agtx/blob/main/src/web/routes.rs) (HTTP routes), [`src/tmux/mod.rs`](https://github.com/fynnfluegge/agtx/blob/main/src/tmux/mod.rs) (Session control), [`src/db/mod.rs`](https://github.com/fynnfluegge/agtx/blob/main/src/db/mod.rs) (Board database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_board["Board workflow"]
  node_actions["Task actions<br/>[actions.rs]"]
  node_workflow["Workflow config<br/>[mod.rs]"]
  node_skills["Agent skills<br/>[skills.rs]"]
end

subgraph group_execution["Agent execution"]
  node_agents["Agent registry<br/>[operations.rs]"]
  node_agent_specs["Agent specs<br/>[spec.rs]"]
  node_worktrees["Git worktrees<br/>[worktree.rs]"]
  node_tmux["Session control<br/>[mod.rs]"]
  node_agent_hooks["Agent status hooks<br/>[hook_status.rs]"]
end

subgraph group_interfaces["Board interfaces"]
  node_main["CLI entry<br/>[main.rs]"]
  node_tui["Board app<br/>[app.rs]"]
  node_board["Kanban views<br/>[board.rs]"]
  node_mcp["MCP server<br/>[server.rs]"]
  node_web_server["Mobile server<br/>[mod.rs]"]
  node_web_routes["HTTP routes<br/>[routes.rs]"]
  node_web_writes["Mobile writes<br/>[writes.rs]"]
  node_web_client["Mobile board<br/>[app.js]"]
  node_web_api["Mobile API<br/>[api.js]"]
  node_websocket["Live terminal stream<br/>[ws.rs]"]
end

subgraph group_state["Project state"]
  node_database[("Board database<br/>[mod.rs]")]
end

subgraph group_integrations["External integrations"]
  node_git_ops["Git operations<br/>[operations.rs]"]
  node_github["GitHub operations<br/>[provider.rs]"]
  node_coding_agents{{"Coding agent CLIs"}}
  node_tmux_service{{"tmux server"}}
  node_git_service[("Git repository")]
end

node_user(("Developer"))
node_phone_user(("Mobile user"))

node_user -->|"runs"| node_main
node_main -->|"starts"| node_tui
node_main -->|"starts MCP"| node_mcp
node_main -.->|"starts server"| node_web_server
node_tui -->|"renders"| node_board
node_tui -->|"dispatches actions"| node_actions
node_tui -->|"reads and writes"| node_database
node_tui -->|"loads settings"| node_workflow
node_tui -->|"selects agent"| node_agents
node_tui -->|"provisions worktree"| node_worktrees
node_tui -->|"controls sessions"| node_tmux
node_tui -->|"uses skills"| node_skills
node_agents -->|"builds commands"| node_agent_specs
node_agents -->|"launches"| node_coding_agents
node_tmux -->|"controls"| node_tmux_service
node_worktrees -->|"creates worktrees"| node_git_service
node_git_ops -->|"operates on"| node_git_service
node_agent_hooks -->|"records status"| node_database
node_mcp -->|"reads and writes"| node_database
node_mcp -->|"inspects sessions"| node_tmux
node_mcp -->|"checks repository"| node_git_ops
node_phone_user -.->|"uses board"| node_web_client
node_web_client -.->|"requests data"| node_web_api
node_web_api -.->|"calls endpoints"| node_web_routes
node_web_server -.->|"serves routes"| node_web_routes
node_web_routes -.->|"reads board"| node_database
node_web_routes -.->|"reads diffs"| node_git_ops
node_web_routes -.->|"reads sessions"| node_tmux
node_web_routes -.->|"dispatches writes"| node_web_writes
node_web_writes -.->|"updates board"| node_database
node_web_client -.->|"opens live stream"| node_websocket
node_websocket -.->|"streams pane"| node_tmux
node_tui -.->|"uses PR operations"| node_github

click node_main "https://github.com/fynnfluegge/agtx/blob/main/src/main.rs"
click node_tui "https://github.com/fynnfluegge/agtx/blob/main/src/tui/app.rs"
click node_board "https://github.com/fynnfluegge/agtx/blob/main/src/tui/board.rs"
click node_actions "https://github.com/fynnfluegge/agtx/blob/main/src/core/actions.rs"
click node_workflow "https://github.com/fynnfluegge/agtx/blob/main/src/config/mod.rs"
click node_skills "https://github.com/fynnfluegge/agtx/blob/main/src/skills.rs"
click node_agents "https://github.com/fynnfluegge/agtx/blob/main/src/agent/operations.rs"
click node_agent_specs "https://github.com/fynnfluegge/agtx/blob/main/src/agent/spec.rs"
click node_worktrees "https://github.com/fynnfluegge/agtx/blob/main/src/git/worktree.rs"
click node_git_ops "https://github.com/fynnfluegge/agtx/blob/main/src/git/operations.rs"
click node_tmux "https://github.com/fynnfluegge/agtx/blob/main/src/tmux/mod.rs"
click node_agent_hooks "https://github.com/fynnfluegge/agtx/blob/main/src/agent/hook_status.rs"
click node_database "https://github.com/fynnfluegge/agtx/blob/main/src/db/mod.rs"
click node_mcp "https://github.com/fynnfluegge/agtx/blob/main/src/mcp/server.rs"
click node_web_server "https://github.com/fynnfluegge/agtx/blob/main/src/web/mod.rs"
click node_web_routes "https://github.com/fynnfluegge/agtx/blob/main/src/web/routes.rs"
click node_web_writes "https://github.com/fynnfluegge/agtx/blob/main/src/web/writes.rs"
click node_web_client "https://github.com/fynnfluegge/agtx/blob/main/web/app.js"
click node_web_api "https://github.com/fynnfluegge/agtx/blob/main/web/api.js"
click node_websocket "https://github.com/fynnfluegge/agtx/blob/main/src/web/ws.rs"
click node_github "https://github.com/fynnfluegge/agtx/blob/main/src/git/provider.rs"

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_actions,node_workflow,node_skills,node_phone_user toneBlue
class node_agents,node_agent_specs,node_worktrees,node_tmux,node_agent_hooks toneAmber
class node_main,node_tui,node_board,node_mcp,node_web_server,node_web_routes,node_web_writes,node_web_client,node_web_api,node_websocket toneMint
class node_database toneRose
class node_git_ops,node_github,node_coding_agents,node_tmux_service,node_git_service,node_user toneIndigo
```

## Components

### Board workflow

- [Task actions](https://github.com/fynnfluegge/agtx/blob/main/src/core/actions.rs): `src/core/actions.rs`
- [Workflow config](https://github.com/fynnfluegge/agtx/blob/main/src/config/mod.rs): `src/config/mod.rs`
- [Agent skills](https://github.com/fynnfluegge/agtx/blob/main/src/skills.rs): `src/skills.rs`

### Agent execution

- [Agent registry](https://github.com/fynnfluegge/agtx/blob/main/src/agent/operations.rs): `src/agent/operations.rs`
- [Agent specs](https://github.com/fynnfluegge/agtx/blob/main/src/agent/spec.rs): `src/agent/spec.rs`
- [Git worktrees](https://github.com/fynnfluegge/agtx/blob/main/src/git/worktree.rs): `src/git/worktree.rs`
- [Session control](https://github.com/fynnfluegge/agtx/blob/main/src/tmux/mod.rs): `src/tmux/mod.rs`
- [Agent status hooks](https://github.com/fynnfluegge/agtx/blob/main/src/agent/hook_status.rs): `src/agent/hook_status.rs`

### Board interfaces

- [CLI entry](https://github.com/fynnfluegge/agtx/blob/main/src/main.rs): `src/main.rs`
- [Board app](https://github.com/fynnfluegge/agtx/blob/main/src/tui/app.rs): `src/tui/app.rs`
- [Kanban views](https://github.com/fynnfluegge/agtx/blob/main/src/tui/board.rs): `src/tui/board.rs`
- [MCP server](https://github.com/fynnfluegge/agtx/blob/main/src/mcp/server.rs): `src/mcp/server.rs`
- [Mobile server](https://github.com/fynnfluegge/agtx/blob/main/src/web/mod.rs): `src/web/mod.rs`
- [HTTP routes](https://github.com/fynnfluegge/agtx/blob/main/src/web/routes.rs): `src/web/routes.rs`
- [Mobile writes](https://github.com/fynnfluegge/agtx/blob/main/src/web/writes.rs): `src/web/writes.rs`
- [Mobile board](https://github.com/fynnfluegge/agtx/blob/main/web/app.js): `web/app.js`
- [Mobile API](https://github.com/fynnfluegge/agtx/blob/main/web/api.js): `web/api.js`
- [Live terminal stream](https://github.com/fynnfluegge/agtx/blob/main/src/web/ws.rs): `src/web/ws.rs`

### Project state

- [Board database](https://github.com/fynnfluegge/agtx/blob/main/src/db/mod.rs): `src/db/mod.rs`

### External integrations

- [Git operations](https://github.com/fynnfluegge/agtx/blob/main/src/git/operations.rs): `src/git/operations.rs`
- [GitHub operations](https://github.com/fynnfluegge/agtx/blob/main/src/git/provider.rs): `src/git/provider.rs`
- **Coding agent CLIs**
- **tmux server**
- **Git repository**

### Other components

- **Developer**
- **Mobile user**

## Connections

- Developer → CLI entry: runs
- CLI entry → Board app: starts
- CLI entry → MCP server: starts MCP
- CLI entry → Mobile server: starts server
- Board app → Kanban views: renders
- Board app → Task actions: dispatches actions
- Board app → Board database: reads and writes
- Board app → Workflow config: loads settings
- Board app → Agent registry: selects agent
- Board app → Git worktrees: provisions worktree
- Board app → Session control: controls sessions
- Board app → Agent skills: uses skills
- Agent registry → Agent specs: builds commands
- Agent registry → Coding agent CLIs: launches
- Session control → tmux server: controls
- Git worktrees → Git repository: creates worktrees
- Git operations → Git repository: operates on
- Agent status hooks → Board database: records status
- MCP server → Board database: reads and writes
- MCP server → Session control: inspects sessions
- MCP server → Git operations: checks repository
- Mobile user → Mobile board: uses board
- Mobile board → Mobile API: requests data
- Mobile API → HTTP routes: calls endpoints
- Mobile server → HTTP routes: serves routes
- HTTP routes → Board database: reads board
- HTTP routes → Git operations: reads diffs
- HTTP routes → Session control: reads sessions
- HTTP routes → Mobile writes: dispatches writes
- Mobile writes → Board database: updates board
- Mobile board → Live terminal stream: opens live stream
- Live terminal stream → Session control: streams pane
- Board app → GitHub operations: uses PR operations
