Skip to content
Agent Field Notes

Projects

Build Agent systems around complete tasks, with runnable materials and acceptance checks for each project.

Recommended project

The merchant created the return, but the worker never got its receipt. Follow one task across the queue, state merging, a workflow upgrade, model fallback, and the evidence contract. Then recover it without creating a duplicate return.

Before you start
Use Python 3.10+ and be ready to read JSON, HTTP requests, and SQLite records. The offline lab uses local processes and loopback networking and requires no model key. Find the prerequisite lesson for each exercise →
Acceptance criteria
Save the failing check and the passing check after recovery. Match the original operation key to the merchant receipt, confirm a single return was created, and verify the task settled.

First experiment: Replay an old event and inspect the state

Replay an old event while a task is executing. Check whether the system returns the original receipt and preserves the current state.

Use Python 3.10+. Download and extract the offline lab. Open a terminal at the extraction location and enter the harness-journey directory containing journey.py. Download the offline lab ↓

Run these three lines in order. To run again, use the same new work directory in both Python commands.

cd harness-journey
python3 -B journey.py scenario --name replay_conflict --work ./journey-first-replay
python3 -B journey.py verify --work ./journey-first-replay

Check your result

The last command exits successfully. In this excerpt from an actual run, passed is true, failed is empty, and event_sequence passes.

{
  "passed": true,
  "checks": [
    {
      "id": "event_sequence",
      "passed": true,
      "actual": null
    }
  ],
  "failed": []
}

Open journey-first-replay/report.json to check the replay details. In the actual report, the old receipt still shows ready at sequence 1, and a new event that tries to move back to ready is rejected.

{
  "replayed_ready_receipt": {
    "seq": 1,
    "status": "ready"
  },
  "backward": {
    "observed_error": "status_transition"
  }
}

Work through the lab

  1. Run the complete task

    Run the offline path, then stop at the lost receipt checkpoint and save the failing check.

    Run the lab →
  2. Diagnose and verify recovery

    Look up the merchant receipt using the original operation key, recover the task, and rerun independent checks.

    Recover from the receipt →
  3. Review live model and MCP traces

    Compare the recorded failure and recovery, then examine the atomic facts, rule derivations, and human review criteria.

    Inspect live runs and measurements →

Practice a failure by topic

Extract the offline lab and run these commands in the folder containing journey.py. Use a fresh work directory each time and inspect its report.json.

Other runnable projects