Harness thinking: build a mini-harness, then create_deep_agent
Notebook· 11.01· 2–3 h· Lesson 87 of 129
The notebook opens in your lab, in a new tab. If your server is stopped, it starts first (a few seconds).
By the end you can
- Explain "agent = model + harness" and name the four harness areas the docs use: execution environment, context management, delegation, steering.
- Build a mini-harness from
create_agent+ middleware: file tools over afilesdict in state, a todo tool whose plan is injected into every model call, and atasktool with an isolated subagent. - Build the same agent with
create_deep_agent, always passing the model explicitly, and map each built-in piece to the one you wrote. - Measure what each harness sends per call (system prompt, tool schemas, messages) and decide when a deep agent is the wrong tool.
Before you start
Module 09 (subagents, task_tool), Lesson 04.03 (custom middleware), Lesson 08.01 (checkpointers).
