Part 5 of 6 · 2 min read
Exercises
Easy
Easy 1: Run it and read the table (30 minutes)
In code/mini-paradigms, run pytest -q and python run_all.py.
Done when: you report calls and duplicates for the loop and the graph at 15 percent crashes and explain the difference.
Hint
the loop restarts from the first step; the graph resumes.
Easy 2: Build a checklist (30 minutes)
Fill the capability table in section 3 for one framework from its documentation.
Done when: every row has a documentation link and a date.
Hint
use the vendor's own docs and record the access date.
Easy 3: Handoff arithmetic (30 minutes)
Compute both token totals for k = 4 with a base of 3,000.
Done when: your numbers match handoff_tokens(4, base=3000) and as_tool_tokens(4, base=3000).
Hint
handoff is the sum of growing contexts; agent-as-tool adds a brief per specialist.
Medium
Medium 1: Move the crossover (2 hours)
Sweep brief and summary sizes.
Done when: you plot the k at which agent-as-tool becomes cheaper and say what makes it earlier or later.
Hint
vary brief and summary in as_tool_tokens.
Medium 2: A second crash point (3 hours)
Add a crash before the work and a crash during checkpoint writing.
Done when: you show which crash point produces missing effects, not just duplicates, if any.
Hint
raise Crash before _work, and between saved = ... steps.
Medium 3: Checkpoint cost (2 hours)
Add a per-checkpoint latency and find the best checkpoint interval.
Done when: you report total time against interval for two crash rates.
Hint
add a constant per checkpoint to a time counter.
Hard
Hard 1: Same agent, two frameworks (8 hours)
Implement one two-tool agent in two frameworks. (I did not run this, so your numbers are the ground truth.)
Done when: you report lines of code, calls, tokens, and the behaviour after a forced crash, with versions and dates.
Hint
kill the process with a signal after the first effect.
Hard 2: An adapter layer (5 hours)
Put your own interface (run, tools, state) in front of the two frameworks. (I did not run this.)
Done when: the same test suite passes on both, and you list what leaked.
Hint
keep the adapter to three functions.
Hard 3: Trace comparison (5 hours)
Run a failing task in both and compare how quickly you can find the cause from each trace. (I did not run this.)
Done when: you report the time to diagnose and the missing fields in each.
Hint
time yourself and record each field you needed.