Run the ShrimpHub orchestration server and spawn your first agent in under five minutes.
!
Early software notice. ShrimpHub is under active development and runs autonomous LLM agents that can write code and run tools. APIs and workflows are still evolving. Primarily tested with MiniMax M2.7; Claude, OpenRouter, Kimi, and custom providers are supported. Run it in a dedicated workspace, keep projects under git, and review diffs before relying on agent output.
i
The controller binds to localhost:5001 by default and stores state in a SQLite database at data/swarm.db. Effective use requires at least one configured LLM provider key.
Day-one workflow
The current happy path is to run ShrimpHub with a MiniMax token subscription. Claude and Codex are still useful for planning, review, and difficult judgment calls; ShrimpHub is the execution layer that runs many cheaper worker agents through a task queue.
01
Offload from Claude or Codex
Use your main assistant to decide what should be done, then send scoped implementation, QA, bugfix, polish, or cleanup tasks to ShrimpHub.
02
Run a whole sprint
Have Claude or Codex shape a sprint, convert it into dependent tasks, and let MiniMax-backed agents run the graph over hours or days.
03
Create inside ShrimpHub
Describe a new project in ShrimpHub, let it generate the plan, then run implementation, validation, recovery, and follow-up tasks autonomously.
i
Recommended provider path: configure llm_provider as minimax and set MINIMAX_API_KEY. Other providers are supported, but MiniMax M2.7 is the path ShrimpHub has been designed and exercised around for high-volume worker-agent runs.
A directory containing the projects you want managed
Install
Use the hosted installer. It clones the controller, creates a virtual environment, installs dependencies, and creates a local launcher.
The hosted installer is a Bash script for macOS, Linux, WSL, and Git Bash-style shells. On native Windows PowerShell, use the source install path below.
bash
curl-fsSL https://shrimphub.ai/install.sh | bash
You can also ask Claude or Codex to install it from GitHub for you. Give it the repository URL and ask it to clone the repo, create a Python 3.11+ virtual environment, install requirements.txt, configure .env and config.json, and start the local server.
prompt
Install ShrimpHub from https://github.com/shrimplabs/shrimphub.
Use Python 3.11+, create a virtual environment, install requirements.txt,
copy the example config files, configure MiniMax as the provider,
and start the local dashboard.
For source installs, clone the repository directly and install dependencies from requirements.txt.
macOS and Linux: use the hosted Bash installer or the source install commands above.
Windows with WSL or Git Bash: the hosted installer can work if Python 3.11+, Git, and Bash are available in that environment.
Windows PowerShell: clone from source, create the virtual environment with python -m venv .venv, activate with .venv\Scripts\Activate.ps1, install requirements.txt, then run python swarm_runner.py api.
Launcher note: the shrimphub launcher created by install.sh is a Bash launcher. Native Windows users should run the Python command directly unless a Windows launcher is added later.
Configure
The installer walks through workspace and API key setup. For source installs, copy the example configs and edit the workspace path. Your API keys go in .env; everything else in config.json.
bash
cp config.example.json config.json
cp .env.example .env
# then edit .env and fill in your key(s)
If you used the installer, start the local launcher.
bash
shrimphub start
If you are running from a source checkout, start the API server directly.
bash
python swarm_runner.py api
# Loaded managed projects · strategy=least_recently_worked · max_agents=3# ✓ SQLite WAL mode · queue empty# ✓ Dashboard live at http://localhost:5001
Open http://localhost:5001 in your browser. You should see the dashboard with your managed projects in the left sidebar.
Spawn your first agent
Use New Project or unified chat to describe what you want built. The wizard can imagine a project, plan a full task DAG, create it, and preserve explicit dependencies between generated tasks. Click Run or enable auto mode to start filling agent slots.
!
By default the API has no authentication. For local use this is fine; if you expose the server beyond localhost, enable auth — see Security & auth.
Next steps
Architecture — how the orchestrator, runtime, and validation pipeline fit together
ShrimpHub spawns LLM-powered subprocess agents to build, refactor, and maintain software projects — autonomously, in parallel, against a SQLite task queue.
What it is
ShrimpHub is an agent orchestration server that turns natural-language project descriptions into running DAGs of agents. Each agent runs as a subprocess, executing a constrained tool loop (max 200 calls). Tasks declare dependencies; the planner generates parallel-friendly graphs that converge at integration points.
Who it's for
Solo developers shipping side projects on nights and weekends
Game studios using Godot/Python pipelines who want continuous polish during off-hours
Engineering teams automating refactor and migration work across many repos
What it isn't
A SaaS product. The whole controller runs on your laptop, against your provider keys, your filesystem.
A hands-free product. You're the operator — the dashboard exists so you can intervene when an agent goes sideways.
An IDE. ShrimpHub manages the work; your editor still owns the code.
The controller is split across API route modules, orchestration modules, task mutation guards, maintenance helpers, and closure subsystems. State lives in SQLite. Agents run as subprocesses.
HTTP routes are no longer concentrated in one file. Projects, tasks, agents, config, chat, wizard, dependency integrity, history, webhooks, metrics, and plans each have dedicated swarm/api_*.py modules registered by the Flask app.
Agent lifecycle
orchestrator.fill_slots() picks the next ready task from SQLite (respecting deps, locks, paused projects)
generate_task_script() builds a thin Python wrapper with embedded config + prompts
The wrapper launches as a subprocess and imports swarm.agent_runtime
rt.main() runs the tool loop: call LLM → parse [TOOL_CALL] → execute → repeat, capped at 200 loops
On completion, orchestrator captures git diff --stat and runs post-task validation in a daemon thread
Failed validation auto-spawns a priority-100 bug task; exhausted retries spawn a recovery agent
State ownership
State
Owner
Persistence
Live task graph
swarm/db.py
SQLite tasks table
Project heads
swarm/maintenance/project_heads.py
SQLite
Runtime agent records
swarm/db.py
SQLite agents table
Live process handles
swarm/agent_lifecycle.py
in-memory only
Archived completions
swarm/orchestrator.py
data/agent-history.jsonl
Closure runs and regressions
swarm/closure/*
SQLite
i
Live process handles are intentionally not persisted. If the controller restarts mid-flight, the monitor thread reconciles surviving agents from ps output and marks orphans as failed.
All controller settings live in config.json at the project root. The file is gitignored. Most settings can be updated live from the dashboard without restarting the server.
Schema
Key
Default
Description
workspace
~/workspace
Root directory containing your projects
managed_projects
[]
Project folder names to assign work to
paused_projects
[]
Projects that receive no work
max_active_agents
3
Max concurrent agent subprocesses
max_lines
5000
Line count that triggers an auto-refactor task
lock_project
false
true = one agent per project; false = parallel
agent_timeout
7200
Wall-clock seconds before an agent is considered hung
quota_limit_percent
90
Stop spawning when API quota exceeds this %
llm_provider
"minimax"
Active LLM provider
llm_providers
{}
Per-provider overrides or custom provider definitions
task_selection_strategy
"least_recently_worked"
How to pick the next task
spawn_per_cycle
3
How many agents auto mode tries to spawn per monitor cycle
auto_scale
false
Ramp concurrency up or down under the configured ceiling
use_worktrees
true
Run agents in isolated git worktrees when available
godot_path
""
Absolute path to Godot binary; inherited by validation and agents as GODOT_PATH
qa_max_cycles
3
Max QA requeue cycles before stopping
thinking_task_types
[]
Task types that receive a thinking-token budget
thinking_task_budget
10000
Thinking-token budget for enabled task types
vision_provider
"minimax-mcp"
Provider used by vision-capable QA flows
vision_provider_fast
"local"
Fast vision backend used by some screenshot checks
vision_providers
{}
Per-vision-provider config overrides
fallback_providers
[]
Provider fallback order for resilient runs
mcp_servers
{}
MCP server definitions exposed to agents
disable_remote_repo
true
Disable remote repo provisioning in project creation
login_required
false
Require session authentication
meta_investigation
true
Launch out-of-band investigation when the same error repeats
meta_investigation_provider
""
Optional provider override for repeated-failure investigations
auto_replan_projects
[]
Projects eligible for automatic replanning
meta_mode_enabled
false
Master switch for scheduled swarm-level meta-agents
gardener_enabled
false
Enable cross-project pattern detection
gardener_schedule_hours
6
Gardener interval in hours
gardener_max_tasks_per_run
10
Maximum targeted fix tasks created per Gardener run
gardener_skip_projects
[]
Projects excluded from Gardener scans
librarian_enabled
false
Enable prompt-quality feedback loop
librarian_trigger_interval
50
Task completions before Librarian can fire
librarian_max_prompt_tasks
3
Maximum prompt-edit tasks proposed per Librarian run
cartographer_enabled
false
Enable project health narrative map
cartographer_interval_hours
2
Cartographer interval in hours
archaeologist_enabled
false
Enable stalled-project recovery investigation
archaeologist_stall_threshold_hours
72
Silent/stalled threshold before investigation
archaeologist_max_concurrent
2
Maximum concurrent archaeology investigations
meta_auditor_enabled
false
Enable systemic cross-project audit
meta_auditor_interval_days
7
Meta Auditor interval in days
meta_auditor_max_tasks
20
Maximum coordinated fix tasks per audit run
scheduler_enabled
false
Enable load-balancing meta-agent
scheduler_interval_minutes
15
Scheduler interval in minutes
scheduler_allow_pause
true
Allow Scheduler to pause or unpause projects
scheduler_allow_agent_ceiling_adjust
true
Allow Scheduler to adjust agent ceiling
scheduler_off_peak_hours
[0, 6]
Hours reserved for expensive work such as research or harness QA
Any task type string, such as bug, qa, project_plan, research
Only listed task types receive the configured thinking-token budget.
fallback_providers
Provider names from llm_providers or built-ins
Used when the primary provider rate-limits or errors.
auto_replan_projects
Project folder names
Projects in this list can receive automatic planner follow-up when their queue drains.
gardener.confidence
confirmed, suspected, disputed
Confidence labels shown in the dashboard knowledge viewer.
Meta-agent config
meta_mode_enabled is the master switch. Individual meta-agents keep their own enabled flag and cadence. The Gardener defaults to a 6-hour interval; the Scheduler defaults to 15 minutes; the Cartographer defaults to 2 hours; the Meta Auditor defaults to weekly.
escalation_policy controls what happens when a task exhausts its attempts. Each task type can set max_attempts and on_exhaust. Common exhaustion actions are research for implementation tasks and cancel for QA or planning tasks.
Most settings can be changed without a restart by POSTing to the API. /api/managed-projects accepts managed_projects and paused_projects; fields you omit are left unchanged.
The controller normally installs Godot bootstrap files automatically during project creation and imported-project repair. Use this page as a recovery checklist only when validation, QA, or replanning is failing because those files drifted or were removed.
i
For the normal dashboard/chat project flow, you should not need to copy these files by hand. The checklist below is for debugging a broken or manually imported project.
Bootstrap files
File or setting
Why it matters
autoload/state_server.gd
TCP endpoint on port 11009 used by QA to read game state, inject input, and take screenshots.
check_scripts.gd
Post-task validation script run after agent completion to catch GDScript parse/load errors.
addons/gut/
GUT test runner used during validation. Commit it inside each game project; do not gitignore it there.
test/ or tests/
At least one GUT test file prevents the test runner from erroring on a missing suite.
GAME_DESIGN.md
Intent source for QA, art pass, and auto-replan agents.
project.godot
Must register StateServer, enable GUT, and set a main scene.
Only run these steps if the automatic bootstrap did not run, or a project has lost required files. Template files live in templates/godot/ in the controller repo. GUT is installed from the controller's local cache or the pinned upstream source.
Every unit of work is a task. Tasks have a type, a priority, a set of dependencies, and a description. The scheduler picks the next ready task using the configured strategy.
At the role level, task types collapse into four groups: implementation agents do the work, QA agents validate it, research agents diagnose without owning implementation, and planning agents create task graphs for others to execute.
Built-in types
Type
Default priority
What it does
refactor
100
Split files over max_lines
bug
80
Find and fix bugs
feature
50
Implement new features
polish
50
Improve existing UI/code
art_pass
50
Replace placeholder assets and improve visuals
research
50
Read-only investigation that writes findings to history
plan
50
Read-only planner that creates tasks as its deliverable
python_plan
50
Python-specific planner that creates feature, bug, and refactor work with stack-aware validation
project_plan
50
Godot sprint planner that reads design docs and creates a DAG
triage
50
Read-only project health assessment that creates follow-up bugs or features
The batch endpoint generates IDs upfront so you can wire a full DAG in one request. Use integer indices in depends_on to reference siblings in the same batch.
Broad implementation tasks can delegate in two ways. delegate_helper is read-only, transient analysis that reports back to the parent. delegate_task_batch creates durable child tasks in the DAG with declared write scopes, parent metadata, retries, recovery, and normal operator visibility.
Child batches must declare file or module ownership. Parallel children are valid only when write scopes are disjoint; overlapping work must be explicitly sequenced or kept inside the parent task.
Custom task types
The built-in list is no longer the whole story. Agent profile plugins can register new task types with a role family, prompt file, permission profile, tool allowlist or blocklist, and context providers. See Plugins.
scenario_qa writes a focused JSON scenario and runs it deterministically against a live Godot game. It is best for concrete player flows such as booting to the main menu, starting gameplay, or reaching a scoring state.
Scenario format
json
{
"goal": "Boot to the main menu and start gameplay",
"seed": 42,
"steps": [
{ "op": "capture", "name": "01_boot", "vision": "Is a main menu visible? Answer yes or no.", "timeout_seconds": 15 },
{ "op": "assert_invariant", "name": "nonblank_screen", "timeout_seconds": 5 },
{ "op": "press_button", "id": "StartButton", "timeout_seconds": 10 },
{ "op": "wait", "seconds": 2 },
{ "op": "assert_state", "path": "game_state.scene", "ne": null, "timeout_seconds": 5 }
]
}
Supported operations
Op
Required fields
Behavior
capture
name
Takes a screenshot. Optional vision question is logged and a no/fail/error answer fails the step.
press_button
id
Presses a button by node name or QA label.
wait
seconds
Sleeps for a fixed duration.
macro
actions
Runs a timed input sequence.
assert_state
path plus comparator
Checks a dotted path in game_state.
assert_invariant
name
Runs a built-in invariant.
Assertions
assert_state supports these comparators: eq, ne, gt, lt, gte, lte, and contains. Built-in invariants are nonblank_screen, stateserver_ok, and no_crash.
Agent tools
The scenario_qa agent gets two scenario-specific tools:
write_scenario(path, scenario) writes JSON under test/scenarios/.
run_scenario(scenario_path, project_path, out_dir) executes the scenario and returns pass/fail details plus trace paths.
If the scenario fails, the executor files a bug task automatically. scenario_qa does not loop retrying the same scenario.
Maturity gate
Scenario QA should only run once the project has GAME_DESIGN.md, at least one real .tscn scene, and autoload/state_server.gd registered. Earlier than that, it should complete with a note rather than producing noisy bug tasks.
When agents fail, ShrimpHub recovers automatically. Retries, continuation tasks, validation bug insertion, recovery branches, and integrity repairs cooperate to keep dependency chains alive.
Automatic retry
Failed tasks reset to pending with the failure reason prepended to the prompt on the next attempt. The default is 3 attempts. After the final failure, a recovery task is created — its description includes the full failure history of all prior attempts.
i
Recovery tasks inherit the original task's dependents. Anything that was waiting on the original now waits on the recovery — the chain doesn't break.
Continuation reparenting
When an agent hits the 200-loop ceiling, it spawns a continuation task. The orchestrator detects the spawn and reparents all downstream dependents to the continuation. The user sees one logical task; under the hood it's a chain.
Validation bug insertion
After a successful run, project validation can still fail. The controller creates a high-priority bug task and places it into the dependency chain, so downstream tasks wait on the validation fix instead of trusting the original completed task.
Self-healing dependencies
A task's dependency is considered "met" if it is completedor no longer exists in the database. This is intentional: if a dep gets pruned as failed, dependents unblock automatically. Chains never stall on missing deps.
Integrity repairs
The dependency integrity API classifies live issues separately from archival-only graph hygiene. Repairs are deterministic endpoints for stale heads, stale planner snapshots, recursive recovery chains, and orphaned agents.
!
Repair actions should be used when the integrity panel reports live state drift. Normal blocked tasks are expected DAG behavior; invalid blockers mean controller state needs repair before more work is attached.
Tasks form a directed acyclic graph (DAG). The planner generates parallel-friendly graphs that fan out from shared foundations and converge at integration tasks.
Cycle detection
Cycles are rejected at task-creation time. Posting a task whose dependencies form a cycle returns 400 with a path showing the offending loop.
Parallel execution levels
The DAG is partitioned into levels — tasks with no remaining unmet deps form level 0; tasks whose deps are all in level 0 form level 1; and so on. The scheduler can spawn an arbitrary number of level-N tasks concurrently, bounded only by max_active_agents.
Visualization
The dashboard renders a live SVG of the dependency graph using Graphviz DOT, served from GET /api/dependencies/dot. Nodes are colored by status; edges show direction; failed nodes are circled in magenta.
Graph tools
The API also exposes ready tasks, execution order, dependency integrity, bulk graph edits, subgraphs, critical path data, task lookup, and task-history views. The dashboard's dependency panel uses these routes for operator repair and graph inspection.
Graph hygiene and forensic issues, not direct runnable blockers
Active DAG
ready tasks, blocked tasks, missing dependencies
Current runnable task graph status
API and repairs
Read integrity with GET /api/dependencies/integrity. Repair through deterministic endpoints: POST /api/projects/<project>/reconcile-head, POST /api/plans/<project>/cleanup, POST /api/projects/<project>/cleanup-recovery, and POST /api/agents/reconcile.
Mutation boundaries
New mutation paths should route through canonical modules: swarm/integrity.py for predicates, swarm/task_mutations.py for safe dependency rewrites and resets, swarm/maintenance/project_heads.py for project heads, swarm/maintenance/plans.py for planner snapshots, swarm/maintenance/agents.py for runtime drift, and swarm/maintenance/recovery.py for recovery branches.
ShrimpHub ships with four built-in providers and supports any custom OpenAI-compatible or Anthropic-compatible endpoint. The recommended happy path is MiniMax M2.7 for worker agents, especially when you are offloading work from Claude or Codex into a longer-running task queue.
The controller exposes a Flask HTTP API on localhost:5001. All endpoints return JSON. Manager-equivalent actions are available — the dashboard chat uses these same routes.
Common request bodies
bash
# Create one taskcurl-X POST http://localhost:5001/api/tasks \
-H"Content-Type: application/json" \
-d'{"project":"my-game","type":"feature","description":"Add pause menu","priority":50}'# Create a dependency-aware batchcurl-X POST http://localhost:5001/api/tasks/batch \
-H"Content-Type: application/json" \
-d'{"project":"my-game","tasks":[{"type":"feature","description":"Build HUD"},{"type":"qa","description":"Verify HUD flow","depends_on":[0]}]}'# Fill available agent slotscurl-X POST http://localhost:5001/api/spawn-batch
# Enable auto modecurl-X POST http://localhost:5001/api/auto-mode \
-H"Content-Type: application/json" \
-d'{"enabled":true}'
bash
# Switch providercurl-X POST http://localhost:5001/api/provider \
-H"Content-Type: application/json" \
-d'{"provider":"claude"}'# Append a dependency edge: task waits on dependencycurl-X POST http://localhost:5001/api/tasks/feature-hud/dependencies \
-H"Content-Type: application/json" \
-d'{"dependency":"feature-foundation"}'# Set a closure spec, then verify itcurl-X POST http://localhost:5001/api/projects/my-game/closure/spec \
-H"Content-Type: application/json" \
-d'{"closure_spec":{"profile":"godot","mode":"stabilize","critical_flows":[{"id":"main-flow","description":"Boot to main menu and start gameplay."}]}}'curl-X POST http://localhost:5001/api/projects/my-game/closure/verify
Projects
Method
Endpoint
Description
GET
/api/projects
List all projects
POST
/api/projects
Add a project
GET/PUT
/api/projects/<name>
Read or update project details
POST
/api/projects/<name>/scan
Scan project file sizes
GET
/api/projects/<name>/health
Health metrics
GET/POST
/api/projects/<name>/locks / /lock / /unlock
File-lock inspection and mutation
POST
/api/projects/<name>/repair
Surgical repair (reset failed/orphaned tasks)
POST
/api/projects/<name>/restart
Nuclear reset — all tasks → pending
POST
/api/projects/<name>/replan
Request replanning
POST
/api/projects/<name>/spawn
Spawn project agents
Tasks
Method
Endpoint
Description
GET
/api/tasks
List all tasks
POST
/api/tasks
Add a task
POST
/api/tasks/batch
Create multiple tasks with DAG wiring
POST
/api/tasks/batch-status
Bulk status updates
GET/PATCH/DELETE
/api/tasks/<id>
Read, update, or delete a task
GET
/api/tasks/<id>/delegation
Read delegation metadata
GET/PUT/POST
/api/tasks/<id>/dependencies
Read, replace, or append dependencies
DELETE
/api/tasks/<id>/dependencies/<dep_id>
Remove one dependency edge
POST
/api/tasks/<id>/reset
Reset failed task to pending
GET
/api/tasks/<id>/dependents
List dependents
POST
/api/tasks/<id>/insert-after
Insert a task after another task
GET/POST
/api/tasks/export / /api/tasks/import
Export or import tasks
Agents
Method
Endpoint
Description
GET
/api/agents
List active agents
GET
/api/agents/<id>
Get one agent
GET
/api/agents/<id>/output
Read log output
GET
/api/agents/<id>/stream
Server-Sent Events stream of live output
POST
/api/agents/<id>/kill
Kill an agent process
POST
/api/agents/<id>/hint
Send a runtime hint
GET
/api/agents/active
Active count
POST
/api/agents/reconcile
Repair agent/runtime drift
Control and configuration
Method
Endpoint
Description
POST
/api/spawn
Spawn one agent
POST
/api/spawn-batch
Fill available agent slots
GET/POST
/api/auto-mode
Read or set auto mode
GET/POST
/api/auto-scale
Read or set auto-scale behavior
GET/POST
/api/config
Read or update runtime config
GET/POST
/api/max-agents
Read or update agent cap
GET/POST
/api/managed-projects
Update managed and paused projects
GET/POST
/api/provider
Read or set active LLM provider
GET/POST
/api/mcp-servers
Read or update MCP server config
Meta mode
Method
Endpoint
Description
GET
/api/meta-mode
Master meta-mode state plus status summaries for Gardener, Librarian, Archaeologist, Cartographer, Auditor, and Scheduler
POST
/api/meta-mode
Enable or disable the meta-agent layer with {"meta_mode_enabled": true}
Gardener
Method
Endpoint
Description
GET
/api/gardener/status
Enabled state, last run time, knowledge entry count, and last report text
POST
/api/gardener/run
Trigger an immediate Gardener run
GET
/api/gardener/knowledge
List all cross-project knowledge entries
GET/POST
/api/gardener/config
Read or update enabled state, schedule interval, and skip-project list
Meta Auditor
Method
Endpoint
Description
GET
/api/meta-auditor/status
Enabled state, last run time, interval, max tasks, and last audit report
POST
/api/meta-auditor/run
Trigger an immediate systemic audit task
GET/POST
/api/meta-auditor/config
Read or update meta_auditor_enabled, interval, and max task cap
Other meta-agent route pattern
The broader meta-agent suite follows the same route pattern by namespace: /api/librarian/status, /run, /config; /api/cartographer/status, /run, /config; and /api/scheduler/status, /run, /config. Archaeologist follows the same project-focused investigation model.
Chat, wizard, and plans
Method
Endpoint
Description
POST
/api/unified-chat
Unified manager/project chat
POST
/api/project-chat
Project creation chat
POST
/api/wizard/imagine
Generate a project concept
POST
/api/wizard/plan
Plan a project DAG
POST
/api/wizard/create
Create a planned project
GET/POST
/api/plans and /api/plans/<project>
Read, reset, or clean planner snapshots
Closure and integrity
Method
Endpoint
Description
GET/POST
/api/dependencies/integrity
Integrity summary and repair actions
POST
/api/dependencies/bulk
Bulk dependency edits
GET
/api/dependencies/subgraph
Focused dependency subgraph
GET
/api/dependencies/critical-path
Critical path summary
GET
/api/projects/<project>/closure
Read project closure status
POST
/api/projects/<project>/closure/spec
Set project closure spec
POST
/api/projects/<project>/closure/verify
Run closure verification
POST
/api/projects/<project>/closure/repair
Create closure repair work
GET
/api/projects/<project>/regressions
List regressions
i
The public routes are split across route modules in swarm/api_*.py. Use the running dashboard and /api/ping for operational checks against your local controller.
The current controller is operated primarily through the dashboard and REST API. Local command-line use is centered on starting the server and running validation/test utilities.
Commands
bash
shrimphub start # start installed launcherpython swarm_runner.py api # start from source checkoutpython-m pytest # run controller testspython validate_godot.py /path/to/game # run Godot validation helpercurl http://localhost:5001/api/ping # check local server health
API scripting
For automation, call the REST API directly. For example, POST /api/tasks/batch seeds a DAG, POST /api/spawn-batch fills available slots, and POST /api/auto-mode toggles continuous operation.
Notes
config.json controls workspace, providers, concurrency, auth, and project lists.
The installer creates a small shrimphub launcher for start, update, and config. Deeper automation should call the REST API directly.
Remote repo provisioning is optional and disabled by default in the example config.
Agents can call any MCP (Model Context Protocol) server you configure. Use this to give agents domain-specific tools — game engines, design tools, internal APIs.
Optional environment variables merged into the server process environment.
MCP clients are initialized inside the agent process with the project path as their working directory. If a server fails to start, agents will see MCP tool errors in their logs; the controller does not silently replace that server with a fallback.
Agent-facing tools
Each registered server exposes two tools to agents:
mcp_list_tools(server) — discover available tools
mcp_call_tool(server, tool_name, args) — invoke a tool
Plugins let you add new task types, or override existing task behavior, without editing the controller core. A plugin is declared as YAML under plugins/ and loaded when the server starts.
What plugins can do
Register a new task type such as lore_pass or accessibility_audit
Override the prompt used for a task type
Assign one of the four role families: implementation, QA, research, or planning
Enforce a permission profile at tool-dispatch time, not just in prompt text
Allow or block specific tools with an explicit allowlist or blocklist
Inject runtime context from project files, shell commands, or HTTP GET calls
Create a plugin
Create a *.yaml file in plugins/ at the swarm root.
Optionally create a separate prompt YAML file with system and user keys.
Restart the server. Plugins are loaded once at startup.
Create a task with the new type through the dashboard, API, or agent tools.
Allowlisting a task-specific tool does not make it globally available. For example, harness_step is still only registered for harness QA task types, and write_scenario is still only registered for scenario_qa.
Read-only investigation: allow file inspection, search, scratchpad, task context, and optionally write_file for a report path if the role needs one.
Text-only implementation: allow file inspection and mutation, then block run_command, web_search, create_task, and git_push if you want human review before pushing.
QA-style task: prefer permission_profile: "qa_write", then allow the specific QA tools the task needs.
Context providers
Context providers run before the agent starts and append labelled context to the task description. Output is truncated by max_chars.
Provider
Behavior
file
Reads a project-relative file. Missing files inject a file-not-found note.
command
Runs in the project directory with combined stdout/stderr. Timeout defaults to 10 seconds and is capped at 30.
http
Runs an HTTP GET request using the server process network access. POST is not supported.
Prompt files
A plugin prompt file must be YAML with system and user keys. It uses Jinja-style variables with << variable >> syntax.
yaml
system: |
You are a lore consistency editor for the game << project >>.
Review narrative text against GAME_DESIGN.md. Fix inconsistencies in place.
Commit and push when done.
user: |
<< description >>
Common variables include project, description, project_path, project_path_arg, godot_bin, godot_command, godot_status, and prompt_intent_variant.
Constraints
Plugins are loaded at startup only. Restart the server to pick up new or changed plugin files.
Only *.yaml plugin files are loaded.
Duplicate task_type declarations are ignored after the first plugin, with a warning.
Command and HTTP provider timeouts are capped at 30 seconds.
Plugins can override built-in task types, but new task types are safer for most use cases.
Troubleshooting
If a plugin does not load, check startup logs for [Plugins] lines and validate the YAML.
If a context provider does not run, check agent logs for provider entries and confirm paths are relative to the project root.
If a blocked tool is still available, restart the server and check for authority-denial messages in the agent log.
If a prompt fails to render, confirm the prompt path is relative to the swarm root and uses << var >>, not double-curly syntax.
Meta-agents are scheduled agents that operate across the entire swarm rather than on one project. They form the observability and self-improvement layer above the standard task pool: read broadly, create tasks narrowly, and avoid direct project-code edits.
Suite
Agent
Status
Role
Cadence
Gardener
Implemented
Cross-project failure pattern detection and shared knowledge
Every 6 hours
Librarian
Active
Prompt quality feedback loop from real task failures
After N completions, default 50
Cartographer
Active
Narrative project health map for dashboard and other meta-agents
Every 2 hours
Meta Auditor
Implemented
Systemic code-quality and template-drift audit across projects
Weekly
Scheduler
Active
Load balancing, project pause/unpause recommendations, and agent ceiling tuning
Every 15 minutes
Archaeologist
Active
Deep investigation and recovery plan for dead or stalled projects
On stall threshold or manual request
Operating rules
Meta-agents read all active projects and swarm history.
They create normal project tasks for execution rather than directly editing project code.
Each meta-agent has its own prompt at prompts/<agent_name>.yaml and task type matching its name.
Reports are written under data/, usually as <AGENT_NAME>_REPORT.md.
meta_mode_enabled acts as the master switch for the layer.
Gardener
The Gardener surveys all active projects, identifies failure patterns that appear across multiple codebases, creates targeted fix tasks, and maintains the shared swarm knowledge base.
Reads recent failures, active agent state, and data/swarm_knowledge.jsonl
Writes data/swarm_knowledge.jsonl, data/SWARM_KNOWLEDGE.md, and data/GARDENER_REPORT.md
Uses confidence labels: confirmed, suspected, and disputed
Dashboard controls: enabled toggle, status line, Run Now, and knowledge viewer
Librarian
The Librarian closes the feedback loop between real agent failures and the prompt files that drive future agents. It groups recurring failures by task type, identifies likely prompt instruction gaps, and creates bounded prompt-edit tasks on swarm-controller.
Reads data/task-history.jsonl, data/agent-history.jsonl, prompts/*.yaml, and shared knowledge
Writes data/LIBRARIAN_REPORT.md
Creates at most librarian_max_prompt_tasks prompt refactor tasks per run
Cartographer
The Cartographer turns task counts and health scores into a readable project map: what each project is doing, where it is stuck, how long it has been in that state, and whether known Gardener patterns apply.
Writes data/PROJECT_MAP.md and data/SWARM_SUMMARY.json
Feeds the dashboard and gives other meta-agents shared narrative context
Meta Auditor
The Meta Auditor is distinct from the per-project audit task type. It looks across projects for systemic template drift, missing required files, autoload collisions, and dependency hygiene issues, then creates coordinated fix tasks instead of N unrelated repairs.
Writes data/AUDIT_REPORT.md
Creates at most meta_auditor_max_tasks coordinated fix tasks
Focuses on repeated structural issues, especially shared Godot templates and project setup
Scheduler
The Scheduler observes queue composition, active agents, quota pressure, health scores, time of day, and project priority, then adjusts future scheduling decisions. It does not kill running agents.
Can adjust max_active_agents when enabled
Can pause or unpause projects when scheduler_allow_pause is true
Writes data/SCHEDULER_LOG.md as its decision log
Archaeologist
The Archaeologist is the recovery investigator for projects that have gone silent, emptied their queue after failures, or fallen into long recovery chains. It is read-only on project code and produces an ARCHAEOLOGY_REPORT.md plus a recovery task DAG.
API endpoints
See REST API for current endpoint tables. The active pattern is /status, /run, and /config under each meta-agent API namespace.
ShrimpHub is designed to run under your control. Authentication is opt-in. Exposing the server to a network without auth is a footgun.
!
By default the API has no authentication. It is accessible to anyone on your network. For local-only use this is fine; if you expose the server beyond localhost, enable auth.
Enable authentication
Set login_required: true in config.json. Default credentials are admin / admin — change them before exposing the server.
Closure mode moves the controller beyond expansion. Each project can carry a machine-readable finish contract, durable verification runs, regression tracking, and repair-first scheduling when health drops.
Durable evidence of executed checks, artifacts, results, and normalized failure fingerprints
Regression
Recurring failure record with occurrence count, source run, linked repair task, severity, and resolution state
ClosureStatus
Computed status: green, yellow, red, stalled, or frozen
Modules
Closure logic lives under swarm/closure/: specs, verification runs, regressions, verification execution, status derivation, repair planning, proposals, escalation, documents, and project seeds. Project-scoped API routes live in swarm/api_projects.py.
Repair-first behavior
Failed verification becomes structured regressions and repair tasks. Red or stalled projects can freeze feature expansion while the controller spends its repair budget on restoring boot, tests, smoke checks, and required critical flows.
When automatic self-healing isn't enough, operator-facing repair tools let you intervene surgically without editing the database by hand.
Reset a single task
Resets a failed task to pending with attempts=0. Optionally include a recovery note — it gets prepended to the prompt on the next attempt, telling the agent what went wrong and what to try differently.
Project repair
Surgical fix for a broken project — resets failed/orphaned tasks, resurrects missing dep tasks from task-history.jsonl, and recomputes the project head. Safe to run repeatedly.
Integrity repair
Use the integrity panel for stale heads, stale plans, recursive recovery chains, continuity gaps, and agent/runtime drift. These repairs map to dedicated endpoints and are intended to be deterministic and idempotent.
Closure repair
Closure repair converts failed verification into structured follow-up tasks tied to regressions. This is the preferred path when a project boots incorrectly, fails smoke checks, or repeats the same failure fingerprint.
Project restart
Nuclear reset — every task in the project goes back to pending with attempts=0. Use only when repair can't resolve the breakage.
Re-queue from history
If a task was pruned (deleted from the live queue but archived in task-history.jsonl), the dashboard's ↺ Re-queue button on a history card resurrects it with attempts reset.