the agentic primer
every chapter that has been run, in order
ch01_single_call: 1 scenario
One invoke: no tools, no loop, no framework.
ch02_tool_call: 1 scenario
The model asks, we execute, and turn two knows.
ch03_the_loop: 1 scenario
The whole loop, and the two ways it is allowed to end.
ch04_tool_failures: 3 scenarios
The toolbox lets you down in three ways, and only one of them looks like it.
ch05_loop_endings: 2 scenarios
Every way this loop can stop, and only one of them means finished.
ch06_two_tools: 2 scenarios
The same two calls, together or in sequence, and the question decides.
ch07_tool_http: 5 scenarios
The first tool that leaves the process, and what comes back with it.
ch08_tool_program: 5 scenarios
A tool that runs a program, where an argument can become a command.
ch09_who_retries: 4 scenarios
Four cells of one matrix, and the question is who can change the outcome.
ch10_routing: 3 scenarios
The loop branches on its own, not on the name the model sent.
ch11_state: 2 scenarios
What travels beside `messages`, and who is allowed to write it.
ch12_supervisor: 2 scenarios
One loop calls another: a tool whose body is an agent.
ch13_workflow: 5 scenarios
The same job with nothing deciding -- is the loop worth it?
ch14_stream: 1 scenario
"stream": true -- a reply arrives in pieces.
ch15_stream_tools: 2 scenarios
Tool arguments arrive as fragments of a JSON string.
ch16_observability: 4 scenarios
Instrumentation that observes and never participates.
ch17_stream_producer: 5 scenarios
the harness becomes the server.
ch18_hooks: 7 scenarios
The named points in the loop, and the three powers.
ch19_guards: 2 scenarios
A hook that can say no, before dispatch -- with something real to refuse.
ch20_loop_veto: 2 scenarios
Stopped because forbidden, which is not stopped because done.
ch21_judge: 3 scenarios
A hook that reads the reply, per turn and not per run.
ch22_prompt_types: 3 scenarios
Everything that enters the context is a prompt.
ch23_mcp: 5 scenarios
A dispatch table you did not write.
ch24_mcp_injection: 3 scenarios
Descriptions you did not write, in a context you did.
ch25_rag_injection: 6 scenarios
A document you did not write, telling the model what to do.
ch26_skills: 4 scenarios
A tool whose result is instructions, not data.
ch27_compression: 10 scenarios
The list is too long; what do you drop, and what does it cost?
ch28_caching: 6 scenarios
What triggers a hit, what triggers a miss, and what a hit actually is.
ch29_memory: 5 scenarios
What survives when the list is thrown away.
ch30_roles: 5 scenarios
Same content, three roles -- who's saying it, and does it matter?
ch31_stop_resume: 4 scenarios
A jsonl snapshot after every turn, and picking a stopped run back up.
ch32_graph: 5 scenarios
The same behaviour as a StateGraph -- what did it buy?
ch33_limits: 4 scenarios
recursion_limit at the boundary.
ch34_checkpoint: 5 scenarios
MemorySaver, thread_id, resume -- and why that is not memory.
ch35_interrupt: 4 scenarios
interrupt and Command(resume=...) as an approval gate.
ch36_subgraph: 4 scenarios
The supervisor as a graph node -- what did it buy?
ch37_parallel: 5 scenarios
fan-out, Send, join, and the order things merge in.
ch38_reducers: 7 scenarios
Two updates to one field: append, or replace.
ch39_callbacks: 6 scenarios
The audit trail and the hook are the same mechanism in LangChain.
ch40_capstone: 3 scenarios
everything since graph, composed into one real scenario.
ch41_result_cache: 5 scenarios
a cache of answers, not of attention -- what's needed to hit it.
ch42_model_tiers: 4 scenarios
the same task, two models -- getting a complexity signal right.