Dusk over the Salt Lake skyline: a deep blue sky fading to a thin amber band along the horizon
AROKConstruct

Agent run recorder · Deterministic replay · v0.1.0

Every agent run, on the record.

Construct sits between your agent and the model. It records every call and every tool result into one file, replays the run offline byte for byte, and shows you the exact step where two runs part ways.

v0.1.0 released · Windows, Linux, macOS · MIT

01Replay it

Live runs drift. The recording doesn't.

This agent asks Claude for the time, and Claude calls a clock tool. The clock gives a new answer every second, so no two live runs match. Construct records the tool's answer with the run, and replay hands it back without touching the clock.

Clock reads while recording 1 · in the last run 0

The recording

    Replay

      This demo runs in your browser with a stand-in for the model. On October 12, 2026 the same run went through Construct against the real Claude API on Windows: it recorded "It's 7:02 PM on October 12, 2026.", replayed offline to the identical answer, and never read the clock again. python live_check.py repeats it with your own key.

      02How it works

      Three commands. One file.

      1. Record

        Start the proxy, then point your agent at it with ANTHROPIC_BASE_URL=http://127.0.0.1:8787 or OPENAI_BASE_URL=http://127.0.0.1:8787/v1. Every request, response, and streamed token lands in one SQLite file. Wrap tools that read the clock, search the web, or roll dice with construct.wrap() so their answers are recorded too.

        construct record --run base --upstream https://api.anthropic.com
      2. Replay

        No network calls and no API spend. If the agent sends anything that was never recorded, Construct answers 409 and names the step. That is where unrecorded randomness got in.

        construct replay --run r1 --from base
      3. Fork

        Change a prompt or swap the model. Steps before the change replay from the recording; everything after runs live and becomes a new branch you can compare.

        construct fork --run b1 --from base --upstream https://api.anthropic.com --model claude-sonnet-5-5
      A dirt road crossing high meadows splits in two below a stand of aspen

      03Where runs part ways

      One line marks the step that changed.

      construct view base b1 writes a single HTML file. Steps that match fold into one quiet row. From the first difference on, an orange line runs down the margin, and every differing step shows what went in and what came back.

      The Construct timeline comparing two runs. Step 0 is identical and folded into one row. Step 1 diverges, and its request diff shows the prompt changed from Proceed. to Proceed, but be brief. and the model from stub-1 to stub-2.
      The fork from the repo's demo: one prompt and the model changed at step 1. Open the full timeline, or run python demo.py to make your own.

      04Fixed points

      Built to be read by an auditor.

      One file
      Every run lives in one SQLite database. Open it with any SQLite tool; nothing is held by a service.
      Append-only
      SQLite triggers reject any edit or delete of the event log. The database enforces it, so no code path can skip it.
      Keys pass through
      Auth headers go to the model and nowhere else. A test scans the store to prove no key was written.
      Silent timelines
      A timeline is one HTML file that makes no network requests. It reads the same offline, years from now, or printed.
      Small
      One Rust binary, six dependencies, MIT licensed.

      05Where it's at

      What works today, and what doesn't yet.

      Built · v0.1.0, October 2026

      • Recording proxy for OpenAI- and Anthropic-style APIs, streaming included
      • Offline replay, fork with model swap, terminal diff, HTML timeline
      • Python SDK: wrap() for tools, serve() to start the proxy
      • Tested on Windows, Linux, and macOS on every push, through the real OpenAI and Anthropic SDKs
      • Verified against the live Claude API on Windows

      Not yet

      • Streaming tokens through while recording (streams are buffered, then sent)
      • Capturing response headers
      • Retention for long-lived logs

      Each gets built when a real run needs it.

      Released, and honest about it.

      v0.1.0 does one job: it remembers exactly what your agent did, so you can run it again and point at the step that changed.

      Also for Linux (x64) and macOS (Apple silicon).