Skip to content

Sub-agents

The orchestrator (Claude Opus) never generates content. It delegates to specialized sub-agents that read their prompt in .agent/prompts/, fetch context from Engram, and return results via the Engram bus.

The bus protocol (5 steps)

Each sub-agent follows this protocol mandatorily:

STEP 1 (orchestrator): mem_save("task: {agent} — {what to do}")
STEP 2 (orchestrator): Agent(short prompt < 30 lines)
STEP 3 (sub-agent):    mem_search("task: {agent}") + reads files + works
STEP 4 (sub-agent):    mem_save("result: {agent} — {summary < 500 chars}")
STEP 5 (orchestrator): mem_search("result: {agent}")

Forbidden anti-pattern

The orchestrator NEVER copies a file's content into the sub-agent's prompt. The sub-agent reads its own files. This keeps the orchestrator's context clean (10-15%).

The sub-agent catalog

Writing pipeline (T1)

Agent Activates when
Verifier Change in physical models, numeric result bound for the draft
Physical Critic New load / boundary condition / modified geometry
Bibliography Agent Preparing refs, domain change
Figure Agent Generating figures (IMPLEMENT B2 / FINALIZE)
Reviewer Simulator Draft moves to review, pre-submission (Gates 0-2)
Defense Simulator Pre-submission, oral defense prep
Ideation Dialogue User without a clear topic, Socratic exploration

Deep research + scaffolding (T1)

Agent Activates when
Citation LLM Verifier VERITAS pre-verification, hallucination suspicion
Data Config Agent COMPUTE C1 with domain params in TODO
Domain Scaffolder New domain detected → auto-generates config + backend + skill
Patent Agent EXPLORE with reference PDFs, gap analysis

Commercial (T2 — NEW Phase C)

Agent Role
quotation_generator Client quotations
venue_router Target venue routing (Haiku, cost-optimized)
submission_tracker Submission tracking (NO LLM, state machine)
client_feedback_coordinator Client feedback coordination

The result contract (envelope)

Each sub-agent returns an envelope with standard fields: status, executive_summary, artifacts, next_recommended, risks. If the envelope is incomplete, the orchestrator re-invokes the sub-agent asking for the missing fields.

Why Tiers

  • T1 are the core paper-pipeline sub-agents (always available).
  • T2 are commercial (quotations, routing, tracking) — activated when there's a client.
  • T3 are specialized (translation, research_compliance) — on demand.

Tier classification lets you scale cost: metadata-heavy or aggregator agents use Haiku (~39% savings) without losing quality. See Case studies → Phase C.

How independence is guaranteed

The devils_advocate and reviewers operate with independence enforcement: they share no context with the agent they audit, so the critique is genuine and not self-congratulatory.

See also

Canonical source

Derives from docs/shared/SUB_AGENTS.md.