Lion Cipher Lab

Catch silent agent regressions: pin an AI agent's tool-call trajectory across model swaps

Why it matters

The moment you give an LLM tools — read a file, run a query, delete a record, send a message — you have an agent, and its risk is no longer 'is the wording good?' but 'what did it actually DO to get there?'. Swap the model (a new Ollama release, a bump from an 8B to a 7B, a provider migration) and the final answer can stay perfectly plausible while the agent quietly changes its behaviour: it calls a destructive tool it used to steer around, skips the verification step it used to run first, loops three extra times, or stops pausing for approval. A final-answer eval — even a good golden-set one…

What you'll learn

Steps in this lab

  1. The blind spot: a good answer can hide bad behaviour
  2. Set up a free, local, two-model bench
  3. Build a tiny security agent with read-only tools — and one dangerous one
  4. Freeze the tasks and record a GOLDEN trajectory from the trusted model
  5. Decide which trajectory properties are invariants — and which are cosmetic
  6. Write the pytest harness that asserts on BEHAVIOUR
  7. Swap the model, replay, and watch a behavioural regression fail the gate
  8. Gate CI: run the trajectory test on every model bump

Open the full interactive lab →