Job pack · orch
Research agent
Long-horizon search with notes on disk, isolated researcher subagents, and a parent that synthesizes.
When: The path is unknown, sources are many, and the deliverable is a brief — not a side effect.
Parent synthesizes. Researchers write notes.md and return 30 lines. Never dump 40 hits into the parent window.
GET /api/canon/jobs/research-agent?format=md
Playbooks
- Spawn subagentsA nested loop to protect the parent window, to parallelize, or to apply a different skill set.
- Own the windowBuild the working set every turn. Pin the goal. File the bulk. Compact the errors.
- Write evals firstThe golden set is the product specification. Architecture waits on it.
- Design an agentEvals first. Raw loop second. Framework last, and only for a missing primitive.
Doctrine to load
- Orchestrator–WorkersA central model decomposes work it cannot predict in advance, delegates to workers, and synthesizes. The multi-agent pattern Anthropic actually endorses.
- SubagentsA subagent is a nested loop with a narrower prompt, a fresh or sliced context, and a written return value. It is the isolation primitive of modern harnesses.
- Filesystem as WorkspaceThe filesystem is the agent's memory, bus, and artifact store. Notes, plans, patches, screenshots — if it must survive a compaction, it is a file.
- Compaction and ErrorsFactor 9: compact errors into the window. The general rule: every observation should be the smallest string that still lets the model choose the next correct action.
- Retrieval and Document AgentsLlamaIndex's claim: the hard problem is often the corpus, not the orchestrator. Agentic RAG is a router over query engines, not a smarter chatbot.
- Context EngineeringThe discipline of deciding, every turn, what tokens the model sees. More leveraged than prompt wording, more neglected than tool choice.
Refuse
- Context hoarding. Raw HTML, full CI logs, six PDFs, entire JSON envelopes stuffed 'just in case'. The goal is the first thing forgotten.
- Shared mega-context. A crew sharing one bloated window. Specialists drown in each other's work.
- Subagent inherits the parent. Nested loops get every tool and every secret. Isolation was theater.
- Unbounded loop. No max-turns, token, wall-clock, or money budget. The agent rambles until the bill or the context dies.
Checklists
Ready to build
- Named termination: done schema, max turns, token/money cap.
- Sandbox / allowlist for every side effect. Secrets in the executor.
- An explicit context builder: pinned, working, recalled, compacted.
- A golden set of 20–50 real tasks, run in CI on prompt change.
- Launch / pause / resume APIs. HITL is a tool that checkpoints.
Harness quality
- Filesystem workspace. Disk is source of truth; the window is a cache.
- Progressive-disclosure skill loader.
- Plan/act modes. Plan is a file the human can edit.
- Subagent spawner with reduced tools and a written return.
- Sandbox plus permission gates.
- Verifier in the loop (test, typecheck, build, browser).
Recipes
Default corpus
deer-flowdeepagentsfirecrawllangchain