Lion Cipher Lab

Parallelize an IR agent's tool calls with a dependency graph, measure the speedup, and catch the ordering bugs

Why it matters

Incident-response agents are getting faster the obvious way: instead of calling one tool, waiting, then calling the next, they fire many tool calls at once. Research systems such as LLMCompiler report several-fold latency wins from exactly that. For lookups it is pure profit - asking three reputation services about an IP address in parallel changes nothing but the wait. But an incident plan is not only lookups. It also captures a host's memory, collects its live network connections, isolates it from the network, revokes a user's sessions and resets their password, and some of those steps…

What you'll learn

Steps in this lab

  1. The words first: tool call, plan, dependency graph, makespan, order of volatility - and the fact that the agent is a stub
  2. Open a terminal, check Python, make a scratch folder (Windows, macOS, Linux)
  3. Write the stub planner: 40 incidents, one plan each, with 'needs' and 'after'
  4. Why some edges are not data: order of volatility, and revoke before reset
  5. Write the executor: graphlib on a simulated clock, five edge policies, one rule checker
  6. Measure all 40 incidents: sequential, gather, data-only graph, declared graph
  7. Read it honestly: what the safe order costs
  8. The rule nobody declared: quarantine_file, and side-effect classes as the fix
  9. Where speedup stops: the critical path, the worker cap, and HTTP 429
  10. Confirm with real asyncio tasks (about 10 seconds of real waiting)
  11. Why this, not that - and when NOT to parallelize
  12. The way a pro does it differently
  13. Ship it: re-run, break a rule on purpose, and clean up

Open the full interactive lab →