# fishcodetech/muteki architecture

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

- Interactive diagram: https://gitdiagram.com/fishcodetech/muteki
- Repository: https://github.com/fishcodetech/muteki

## Overview

Muteki is a multi-agent security workbench for CTF and penetration-testing tasks, with conversation and competition workspaces as additional product areas. The principal flow is: an operator configures worker engines and a reasoning model, submits a challenge, dispatches a swarm, and reviews its run. The graph also preserves platform command handling, extensions, and desktop access. Some backend relationships are documented only at product level; unsampled implementations are represented by their enclosing directories, and uncertain links are omitted.

Main entry points: [`muteki/swarm`](https://github.com/fishcodetech/muteki/tree/main/muteki/swarm) (Swarm coordinator), [`muteki/conversation/manager.py`](https://github.com/fishcodetech/muteki/blob/main/muteki/conversation/manager.py) (Conversations), [`muteki/swarm/worker_session.py`](https://github.com/fishcodetech/muteki/blob/main/muteki/swarm/worker_session.py) (Worker sessions), [`apps/web/ui/app`](https://github.com/fishcodetech/muteki/tree/main/apps/web/ui/app) (Web workbench)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web["Web workbench"]
  node_taskui["Task workspace"]
end

subgraph group_workflows["Workspaces"]
  node_runapi["Run API<br/>[runs.py]"]
  node_runmanager["Run management<br/>[run_manager.py]"]
  node_conversation["Conversations<br/>[manager.py]"]
  node_competition["Competitions<br/>[services.py]"]
  node_pentest["Pentest evaluation"]
end

subgraph group_execution["Agent execution"]
  node_coordinator["Swarm coordinator"]
  node_engines["Engine registry<br/>[engine_registry.py]"]
  node_worker["Worker sessions<br/>[worker_session.py]"]
  node_runtime["Worker runtime"]
  node_llm["Reasoning models<br/>[llm.py]"]
end

subgraph group_platform["Platform services"]
  node_platformapi["Command handlers"]
  node_store[("Platform store<br/>[store.py]")]
  node_extensions["Extensions<br/>[handlers.py]"]
end

subgraph group_clients["Desktop client"]
  node_desktop["Desktop client<br/>[main.cjs]"]
end

node_operator(("Operator"))
node_target(("Authorized target"))

node_operator -->|"uses"| node_web
node_web -.->|"opens workspace"| node_taskui
node_taskui -.->|"dispatches run"| node_runapi
node_operator -->|"configures and submits"| node_taskui
node_runapi -.->|"manages runs"| node_runmanager
node_runmanager -->|"dispatches swarm"| node_coordinator
node_coordinator -->|"selects engines"| node_engines
node_coordinator -->|"uses planner"| node_llm
node_coordinator -->|"schedules workers"| node_worker
node_worker -.->|"runs agent"| node_runtime
node_worker -->|"creates agents"| node_engines
node_runtime -->|"tests target"| node_target
node_operator -->|"uses conversations"| node_conversation
node_operator -->|"uses competitions"| node_competition
node_operator -->|"uses pentest workspace"| node_pentest
node_platformapi -->|"reads and writes"| node_store
node_conversation -->|"uses platform store"| node_store
node_conversation -->|"resolves engines"| node_engines
node_competition -->|"uses competition store"| node_store
node_extensions -->|"handles commands"| node_platformapi
node_operator -->|"uses desktop app"| node_desktop
node_desktop -->|"connects to service"| node_web

click node_web "https://github.com/fishcodetech/muteki/tree/main/apps/web/ui/app"
click node_taskui "https://github.com/fishcodetech/muteki/blob/main/apps/web/ui/components/WorkerOrchestration.tsx"
click node_runapi "https://github.com/fishcodetech/muteki/blob/main/apps/web/routes/runs.py"
click node_runmanager "https://github.com/fishcodetech/muteki/blob/main/apps/web/run_manager.py"
click node_conversation "https://github.com/fishcodetech/muteki/blob/main/muteki/conversation/manager.py"
click node_competition "https://github.com/fishcodetech/muteki/blob/main/muteki/competition/services.py"
click node_pentest "https://github.com/fishcodetech/muteki/tree/main/muteki/pentest"
click node_coordinator "https://github.com/fishcodetech/muteki/tree/main/muteki/swarm"
click node_engines "https://github.com/fishcodetech/muteki/blob/main/muteki/solver/engine_registry.py"
click node_worker "https://github.com/fishcodetech/muteki/blob/main/muteki/swarm/worker_session.py"
click node_runtime "https://github.com/fishcodetech/muteki/tree/main/cmd/runtime-agent"
click node_llm "https://github.com/fishcodetech/muteki/blob/main/muteki/core/llm.py"
click node_platformapi "https://github.com/fishcodetech/muteki/tree/main/muteki/platform/command_handlers"
click node_store "https://github.com/fishcodetech/muteki/blob/main/muteki/platform/store.py"
click node_extensions "https://github.com/fishcodetech/muteki/blob/main/muteki/extensions/handlers.py"
click node_desktop "https://github.com/fishcodetech/muteki/blob/main/apps/desktop/src/main.cjs"

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_web,node_taskui toneBlue
class node_runapi,node_runmanager,node_conversation,node_competition,node_pentest toneAmber
class node_coordinator,node_engines,node_worker,node_runtime,node_llm toneMint
class node_platformapi,node_store,node_extensions toneRose
class node_desktop,node_operator,node_target toneIndigo
```

## Components

### User experience

- [Web workbench](https://github.com/fishcodetech/muteki/tree/main/apps/web/ui/app): `apps/web/ui/app`
- [Task workspace](https://github.com/fishcodetech/muteki/blob/main/apps/web/ui/components/WorkerOrchestration.tsx): `apps/web/ui/components/WorkerOrchestration.tsx`

### Workspaces

- [Run API](https://github.com/fishcodetech/muteki/blob/main/apps/web/routes/runs.py): `apps/web/routes/runs.py`
- [Run management](https://github.com/fishcodetech/muteki/blob/main/apps/web/run_manager.py): `apps/web/run_manager.py`
- [Conversations](https://github.com/fishcodetech/muteki/blob/main/muteki/conversation/manager.py): `muteki/conversation/manager.py`
- [Competitions](https://github.com/fishcodetech/muteki/blob/main/muteki/competition/services.py): `muteki/competition/services.py`
- [Pentest evaluation](https://github.com/fishcodetech/muteki/tree/main/muteki/pentest): `muteki/pentest`

### Agent execution

- [Swarm coordinator](https://github.com/fishcodetech/muteki/tree/main/muteki/swarm): `muteki/swarm`
- [Engine registry](https://github.com/fishcodetech/muteki/blob/main/muteki/solver/engine_registry.py): `muteki/solver/engine_registry.py`
- [Worker sessions](https://github.com/fishcodetech/muteki/blob/main/muteki/swarm/worker_session.py): `muteki/swarm/worker_session.py`
- [Worker runtime](https://github.com/fishcodetech/muteki/tree/main/cmd/runtime-agent): `cmd/runtime-agent`
- [Reasoning models](https://github.com/fishcodetech/muteki/blob/main/muteki/core/llm.py): `muteki/core/llm.py`

### Platform services

- [Command handlers](https://github.com/fishcodetech/muteki/tree/main/muteki/platform/command_handlers): `muteki/platform/command_handlers`
- [Platform store](https://github.com/fishcodetech/muteki/blob/main/muteki/platform/store.py): `muteki/platform/store.py`
- [Extensions](https://github.com/fishcodetech/muteki/blob/main/muteki/extensions/handlers.py): `muteki/extensions/handlers.py`

### Desktop client

- [Desktop client](https://github.com/fishcodetech/muteki/blob/main/apps/desktop/src/main.cjs): `apps/desktop/src/main.cjs`

### Other components

- **Operator**
- **Authorized target**

## Connections

- Operator → Web workbench: uses (evidence: `README.md`)
- Web workbench → Task workspace: opens workspace
- Task workspace → Run API: dispatches run
- Operator → Task workspace: configures and submits (evidence: `README.md`)
- Run API → Run management: manages runs
- Run management → Swarm coordinator: dispatches swarm (evidence: `README.md`)
- Swarm coordinator → Engine registry: selects engines (evidence: `README.md`)
- Swarm coordinator → Reasoning models: uses planner (evidence: `README.md`)
- Swarm coordinator → Worker sessions: schedules workers (evidence: `README.md`)
- Worker sessions → Worker runtime: runs agent
- Worker sessions → Engine registry: creates agents (evidence: `muteki/swarm/worker_session.py`)
- Worker runtime → Authorized target: tests target (evidence: `README.md`)
- Operator → Conversations: uses conversations (evidence: `README.md`)
- Operator → Competitions: uses competitions (evidence: `README.md`)
- Operator → Pentest evaluation: uses pentest workspace (evidence: `README.md`)
- Command handlers → Platform store: reads and writes (evidence: `muteki/platform/command_handlers/base.py`)
- Conversations → Platform store: uses platform store (evidence: `muteki/conversation/manager.py`)
- Conversations → Engine registry: resolves engines (evidence: `muteki/conversation/manager.py`)
- Competitions → Platform store: uses competition store (evidence: `muteki/competition/services.py`)
- Extensions → Command handlers: handles commands (evidence: `muteki/extensions/handlers.py`)
- Operator → Desktop client: uses desktop app (evidence: `README.md`)
- Desktop client → Web workbench: connects to service (evidence: `README.md`)
