Developer guide

From install to your own runs in the console.

Install the tools, look around the built-in examples, read an explanation, then record your own code. Each step takes a few minutes, and nothing is sent anywhere unless you ask.

1 · InstallThe recorder, the console and explain, in one environment.
2 · ExploreThe built-in examples, and an explanation of what changed.
3 · InstrumentYour agent, zero-config, or step by step. Then compare and check.
1

Install the complete toolkit

One virtual environment with Python 3.12 or later. It holds everything you need to record runs, look at them and explain them.

onetrace

Records each step of a run as a receipt. Brings onetrace-verify, the independent checker.

onetrace-console

Shows your runs in the browser, on your machine. Includes the example pipelines.

onetrace-explain

Reads two runs and says what changed, with the evidence. A model's reading is optional.

Terminal
python3 -m venv .venv
source .venv/bin/activate
pip install onetrace "onetrace-console[neighbours]" "onetrace-explain[keyring]"
onetrace doctor

onetrace doctor checks your setup. Your prompt starts with (.venv) while the environment is active. [neighbours] adds what finding similar runs needs (onnxruntime, tokenizers and numpy, about 140 to 170 MB on disk, by system); no model is downloaded until you turn the feature on, from the console (step 5b). [keyring] lets Explain keep its key in your system's keychain. For a smaller install, leave both out: pip install onetrace onetrace-console onetrace-explain. The console pins onetrace 0.9.0: the Hermes Agent recorder, from onetrace 0.9.1, needs an environment of its own beside the console until a console pins 0.9.1 (manual section 19).

New to Python or virtual environments?

A virtual environment keeps what you install here apart from the rest of your computer. Come back to it later with cd into the folder and the activate line again.

If onetrace-console --version shows 0.0.0, an older install answered first: make a fresh environment and install there.

2

Explore the built-in examples

The console ships with example pipelines and runs, some broken on purpose. Start here to see what a comparison shows before you record anything yourself.

Terminal
onetrace-console demo --open   # Ctrl+C stops it
  1. Overview. Pick a pipeline whose records agree, then the runs broken on purpose, each with what was done to it.
  2. A comparison. The first step whose output differs is marked; everything after it is marked as changed after it.
  3. The text diff. What the step wrote in each run, line by line, checked against its receipt first.
  4. Proof. Every check behind the page, and the command that repeats it in a terminal.
The demo's Overview: a pipeline whose records agree, then the runs broken on purpose and what each one's page reads.

No install yet? The same demo is online at demo.oneproof.dev.

Recorded runs to look around: the capture store at captures.oneproof.dev, a read-only demo of onetrace-console 0.9.1, holding 6 runs in 2 example pipelines as read on 2026-11-21. Three of the runs, in one pipeline, hold a model call's token-level record at L3, on example data written for the demo.

3

Explain a difference

onetrace-explain gives two kinds of answer and keeps them apart. The first is always there. The second is the probabilistic part, and only appears when you ask for it.

recorded · always

What changed, and the evidence

The first difference from the record, then read-only probes over runs you already have: how often the step varies across repeat runs, and whether the difference survives masking. No model and no network calls.

AI-generated · optional

What may have happened

A model you configure suggests what may have happened. It's labelled AI-generated and may be wrong. Each claim must cite a probe or a record item, or it's dropped and counted. You see what will be sent before anything goes.

Terminal
# the recorded part only: sends nothing
onetrace-explain runs/<run A> runs/<run B> --no-model
  • The exit code is onetrace diff's, whatever the model says.
  • Suggested checks are marked "runnable here" or "needs a runner you name", and never run for you.
  • Each explanation is saved as a run of its own: every probe, and what was sent.
A comparison with the short answer first, then a kept explanation labelled as written by a model.
3b

Set up a model (optional)

for the AI-generated part

One small file names the model. The key never goes in it: the file names the environment variable that holds the key. The terminal command and the console's Explain button read the same file. You write the file and set the variable yourself; the console shows whether they are in place.

The file: ~/.config/onetrace/explain.toml on macOS and Linux, C:\Users\<you>\.config\onetrace\explain.toml on Windows, or the path in ONETRACE_EXPLAIN_CONFIG.

explain.toml
[model]
provider = "anthropic"
name = "<model name>"
key_env = "ANTHROPIC_API_KEY"
Set the key, then explain
export ANTHROPIC_API_KEY=<your key>   # the name key_env gives
onetrace-explain runs/<run A> runs/<run B>
  • The first time a kind of item would go to a model's address, it names those kinds and asks first. --yes is for scripts.
  • To see the exact bytes before anything is sent: onetrace localize runs/<run A> runs/<run B> --for <step> --out report, then onetrace-explain report --dry-run.
  • Set the key in the terminal you start the console from, so its Explain button can use it. To check, open the gear at the top right of a local console, then Explain: it names the file it read, the model, the variable key_env names and whether that variable is set, never its value. If it isn't set, set it and start the console again.
  • Never put the key in the file, in your code, or in a decorator's settings.

Exactly what is read, sent and kept: the explain reference.

4

Instrument your own code

Three ways in, from least effort to most control. They mix: start with one and refine with another.

4a

With your coding agent

Claude Code · Cursor · Copilot · Windsurf · Cline · Codex

Open your project in the agent and paste this. The agent follows a recipe written for it, stops to ask you where the recipe says to, and finishes with a report and the commands to see your runs.

Prompt
Instrument this repository's Python pipeline with onetrace.
Read the recipe in full first: https://oneproof.dev/onetrace/agents/instrument.md
(the raw file, not a summary). Follow sections 0 to 7 in order. Add recording only:
results must stay exactly the same. Stop and ask me wherever the recipe says to ask.
Never put a secret in a decorator or config. Finish with the report from section 7,
and tell me the exact commands to run my program and open its runs in onetrace-console.
Use it as a command in your tool instead
ToolKit file to copy into your projectThen
Claude Code.claude/commands/onetrace-instrument.mdType /onetrace-instrument
Cursor.cursor/rules/onetrace-instrument.mdcIn Agent chat: follow @onetrace-instrument
GitHub Copilot (VS Code, agent mode).github/prompts/onetrace-instrument.prompt.mdType /onetrace-instrument
Windsurf.windsurf/rules/onetrace-instrument.mdIn Cascade: @onetrace-instrument
Cline.clinerules/onetrace-instrument.mdAsk it to instrument the repository with onetrace
Codex and other agents that read AGENTS.mdAGENTS.md (merge the section into yours)Ask it to instrument the repository with onetrace
Any other agentPROMPT.txtPaste it as your message

Download the agent kit · Read the recipe. If your agent can't fetch web pages, save the recipe as docs/onetrace/instrument.md in your project.

4b

Zero-config

onetrace-auto

Run your app as you do today, started through onetrace-run. Each call it makes through a supported library becomes a recorded step. Your code doesn't change.

Zero-config runs open in the console. From console 0.9.0, the console runs on onetrace 0.9.0 and reads record format 0.5, so pip install "onetrace-auto==0.9.0" goes in step 1's environment, beside the console: onetrace-auto 0.9.1 needs onetrace 0.9.1, and would move the console's onetrace with it. A run it records shows the libraries it hooked and each gap.
In your app's environment
pip install "onetrace-auto==0.9.0"
onetrace-run python app.py        # or: ONETRACE_AUTO=1 python app.py
onetrace diff runs/<run A> runs/<run B>
LibraryVersionsEach call records
openai1.40 to below 4The request and the response, and a model-call record where the hook saw the call (not for embeddings)
requests2.28 to below 3The request body, the status and the response body
httpx0.24 to below 1The request body, the status and the response body
anthropic2 to below 3The request and the response, and a model-call record where the hook saw the call; the stream helper messages.stream too
litellm1.80 to below 2The request and the response, and a model-call record where the hook saw the call, except where a fallback or a redirect took part
google-genai1.50 to below 4The request and the response, and a model-call record where the hook saw the call, for generate_content and its stream
langgraph-checkpoint2 to below 5No step of its own: each read and write of LangGraph's store is an entry on the step open at the time, its keys and values as digests
mem0ai1 to below 3No step of its own: each read and write of a memory is an entry on the step open at the time, as digests
letta-client1 to below 2No step of its own: each read and write of memory blocks and archival passages is an entry on the step open at the time, as digests
zep-cloud3 to below 5No step of its own: each read and write of a thread's messages or the graph is an entry on the step open at the time, as digests
  • Runs go to ./runs, or to ONETRACE_RUNS. A process with no supported call leaves no folder.
  • By default a run keeps digests only. ONETRACE_AUTO_KEEP=outputs,inputs keeps the bodies too, within the limits in onetrace-auto's README.
  • Recording never changes what your app gets back. A call it can't record is a gap that says so.
  • Steps in your own code are seen only through these libraries. Name them with 4c's decorators.
  • Each library's full list of what is and isn't hooked is in onetrace-auto 0.9.0's README.
4c

Step by step

@ot.stage · @ot.run

@ot.stage on each step, naming the tool that does the work. @ot.run on the function that does the whole job once. Change nothing else.

app.py
import onetrace as ot

@ot.stage("retrieve", instrument=ot.pkg("word-overlap", "onetrace",
                                         kind="retriever", config={"top_k": 2}))
def retrieve(question):
    ...

@ot.stage("answer", instrument=ot.pkg("first-passage", "onetrace", kind="model-call"))
def answer(question, passages):
    ...

@ot.run(stages=["retrieve", "answer"])
def main():
    ...
Run it as usual
python app.py
Switch it off
ONETRACE_DISABLE=1 python app.py

Each run writes a folder under runs/ and prints the command that checks it. To remove onetrace, delete the import and the decorator lines.

5

Compare and check your runs

Open your runs folder in the console, then use the same checks in a terminal or CI.

Terminal
onetrace-console runs --open                  # watches the folder: new runs appear by themselves
onetrace-console runs --compare before after  # name runs with ONETRACE_RUN_ID=before
onetrace-verify --require-artifacts runs/<run id>
onetrace diff runs/<run A> runs/<run B> --text
onetrace-verifyExit
PASS: every check that ran held0
FAIL: the row says where1
Not verified or refused2
onetrace diffExit
identical0
diverged1
not comparable · refused · could not check2 · 3 · 4

Port 8080 in use? Add --port 8091. The console listens on 127.0.0.1 only.

5b

Find runs with similar inputs (optional)

an embedding model

On a local console, a run's page can list other runs of the same configuration whose kept inputs are near its own, each with a Compare button. Compare two of them and a nearness ladder sits beside the exact one. It is off until you turn it on.

1 · Installed by step 1; otherwise add it
pip install "onetrace-console[neighbours]"
2 · Keep the inputs it reads
@ot.stage("answer", instrument=...,
          keep_inputs=["question"])

Only kept inputs, and the kept outputs of a run that keeps inputs, are read. A run that kept nothing has no neighbours.

3 · Choose the embedding model, in the console. Start the console as above, open the gear at the top right of the console's home page, or of any list or comparison page, then Neighbours (or go to http://127.0.0.1:8080/neighbours/setup). If the extra is missing, the page says so and gives the install line for the Python the console runs from.

  1. Pick The default (all-MiniLM-L6-v2, about 90 MB) or The alternate (bge-small-en-v1.5, about 133 MB), then Continue.
  2. Read the confirmation and press Confirm and turn on. The model's files are fetched once from huggingface.co at a pinned revision, each checked by its sha256, into the store's neighbours/models/ folder. The page shows the count of files checked and refreshes itself until it says Neighbours are on.
  3. After that, embedding runs on your CPU with onnxruntime and makes no network calls. No text leaves the machine.
  • On a run's page: "Runs with near inputs (same configuration)", each with its nearness and a Compare button.
  • On a comparison of two of them: "Nearness ladder: the embedder's view", per step, for inputs and outputs, with the largest drop marked. "1.00 by the record" means the digests are equal and nothing was embedded.
  • Nearness is the embedding model's reading. The exact comparison, the short answer and every verdict are unchanged.
  • "Same configuration" means what the record states: the plan, and each step's name, instrument (id, kind, version, configuration digest) and recorded settings; never its inputs or outputs. Runs whose recorded settings differ are never neighbours.
  • Local consoles only: it never runs on a public console, the hosted demo among them. Each embedding batch is recorded as a run of its own.
  • To stop, press Turn neighbours off on the same page.
6

Next

Open one when it matches your project.