Subagent mesh

Behind every "Stage diff" run is a pipeline of specialized agents. This page is the map.

What it is

KrowForge's planner doesn't ship work to a single LLM. Each run is routed through a subagent mesh — 48 specialized roles that critique, route, and verify each step of the work.

The user-facing surface stays simple ("Plan only / Stage diff"); the mesh is what runs underneath.

The seven main roles

RoleJob
PlannerDecompose the task into ordered steps.
ReasonerPre-flight: is this approach sound? What edge cases?
CoderGenerate the actual diff.
Hallucination checkerCross-reference symbol references against the index.
Security reviewerLook for OWASP Top 10 patterns + secret leaks in the diff.
Test reviewerAre tests added/updated? Do they actually exercise the change?
SummarizerBuild the "What it did" timeline card.

The other 41 roles are specialists that the seven main roles can call (e.g., "regex-safety reviewer", "migration consultant", "license-compatibility checker").

Cost-aware routing

Each role gets routed to a model tier based on:

  • Workspace budget mode (Economy / Balanced / Deep).
  • The role's complexity tolerance.
  • The task's estimated impact.

Cheap roles (summarizer, hallucination checker) almost always go to small fast models. Expensive roles (planner, coder) only get premium models in Deep mode.

Where you see mesh activity

In the run detail's Geek mode view of the timeline card, each frame is tagged with the role that produced it. You'll see something like:

[planner]      → 3 steps proposed
[reasoner]     → flagged 1 risk: race condition in step 2
[coder]        → 1 file, 24 insertions, 5 deletions
[hallu-check]  → all symbols verified
[sec-review]   → no findings
[test-reviewer]→ tests updated, coverage +2%

Internal API

services/subagent_mesh.py is the entry point. The mesh is mostly internal — the user-facing surface is the planner. Surface knobs (which roles run, model tier per role) are exposed in Settings → Behavior → Mesh for advanced users.

When the mesh is most valuable

  • Multi-file refactors — the mesh catches inconsistencies across files.
  • Security-sensitive changes (auth, encryption, secrets) — the security reviewer is mandatory.
  • Anything where you want a high-confidence diff — Deep mode runs the full mesh.