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.
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.
onetraceRecords each step of a run as a receipt. Brings onetrace-verify, the independent checker.
onetrace-consoleShows your runs in the browser, on your machine. Includes the example pipelines.
onetrace-explainReads two runs and says what changed, with the evidence. A model's reading is optional.
python3 -m venv .venv source .venv/bin/activate pip install onetrace "onetrace-console[neighbours]" "onetrace-explain[keyring]" onetrace doctor
py -3.12 -m venv .venv .venv\Scripts\Activate.ps1 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.
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.
onetrace-console demo --open # Ctrl+C stops it- Overview. Pick a pipeline whose records agree, then the runs broken on purpose, each with what was done to it.
- A comparison. The first step whose output differs is marked; everything after it is marked as changed after it.
- The text diff. What the step wrote in each run, line by line, checked against its receipt first.
- Proof. Every check behind the page, and the command that repeats it in a terminal.

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.
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.
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.
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.
# 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.

Set up a model (optional)
for the AI-generated partOne 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.
[model] provider = "anthropic" name = "<model name>" key_env = "ANTHROPIC_API_KEY"
[model] provider = "openai" name = "<model name>" base_url = "https://api.openai.com/v1" key_env = "OPENAI_API_KEY"
[model] provider = "openai" # any OpenAI-compatible server name = "<model name>" base_url = "http://localhost:8000/v1" # key_env only if your server wants a key
export ANTHROPIC_API_KEY=<your key> # the name key_env gives
onetrace-explain runs/<run A> runs/<run B>$env: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.
--yesis for scripts. - To see the exact bytes before anything is sent:
onetrace localize runs/<run A> runs/<run B> --for <step> --out report, thenonetrace-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_envnames 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.
Instrument your own code
Three ways in, from least effort to most control. They mix: start with one and refine with another.
onetrace-run. Library calls become steps.
most control4c · Step by stepTwo decorators. You name each step and its settings.
With your coding agent
Claude Code · Cursor · Copilot · Windsurf · Cline · CodexOpen 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.
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
| Tool | Kit file to copy into your project | Then |
|---|---|---|
| Claude Code | .claude/commands/onetrace-instrument.md | Type /onetrace-instrument |
| Cursor | .cursor/rules/onetrace-instrument.mdc | In Agent chat: follow @onetrace-instrument |
| GitHub Copilot (VS Code, agent mode) | .github/prompts/onetrace-instrument.prompt.md | Type /onetrace-instrument |
| Windsurf | .windsurf/rules/onetrace-instrument.md | In Cascade: @onetrace-instrument |
| Cline | .clinerules/onetrace-instrument.md | Ask it to instrument the repository with onetrace |
Codex and other agents that read AGENTS.md | AGENTS.md (merge the section into yours) | Ask it to instrument the repository with onetrace |
| Any other agent | PROMPT.txt | Paste 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.
Zero-config
onetrace-autoRun 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.
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.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>| Library | Versions | Each call records |
|---|---|---|
openai | 1.40 to below 4 | The request and the response, and a model-call record where the hook saw the call (not for embeddings) |
requests | 2.28 to below 3 | The request body, the status and the response body |
httpx | 0.24 to below 1 | The request body, the status and the response body |
anthropic | 2 to below 3 | The request and the response, and a model-call record where the hook saw the call; the stream helper messages.stream too |
litellm | 1.80 to below 2 | The 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-genai | 1.50 to below 4 | The request and the response, and a model-call record where the hook saw the call, for generate_content and its stream |
langgraph-checkpoint | 2 to below 5 | No 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 |
mem0ai | 1 to below 3 | No step of its own: each read and write of a memory is an entry on the step open at the time, as digests |
letta-client | 1 to below 2 | No 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-cloud | 3 to below 5 | No 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 toONETRACE_RUNS. A process with no supported call leaves no folder. - By default a run keeps digests only.
ONETRACE_AUTO_KEEP=outputs,inputskeeps 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.
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.
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(): ...
python app.py
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.
Compare and check your runs
Open your runs folder in the console, then use the same checks in a terminal or CI.
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-verify | Exit |
|---|---|
| PASS: every check that ran held | 0 |
| FAIL: the row says where | 1 |
| Not verified or refused | 2 |
| onetrace diff | Exit |
|---|---|
| identical | 0 |
| diverged | 1 |
| not comparable · refused · could not check | 2 · 3 · 4 |
Port 8080 in use? Add --port 8091. The console listens on 127.0.0.1 only.
Find runs with similar inputs (optional)
an embedding modelOn 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.
pip install "onetrace-console[neighbours]"@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.
- Pick The default (all-MiniLM-L6-v2, about 90 MB) or The alternate (bge-small-en-v1.5, about 133 MB), then Continue.
- 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. - After that, embedding runs on your CPU with onnxruntime and makes no network calls. No text leaves the machine.
ollama pull nomic-embed-text # an embedding model ollama serve # if it is not already running
- On the setup page, choose Or name an OpenAI-compatible embedding endpoint of your own.
- Endpoint
http://localhost:11434/v1, Modelnomic-embed-text, then Continue and Confirm and turn on. - The console fetches nothing. Kept inputs and outputs go to your Ollama server, on your machine.
- Any OpenAI-compatible server that answers
POST <endpoint>/embeddingswith{"model", "input"}, such as llama.cpp's server started with--embedding. - On the setup page, choose the endpoint option, enter its address (for example
http://127.0.0.1:8000/v1) and the model name, then Continue and Confirm and turn on. - Kept inputs and kept outputs are sent to that address. No key is sent, and none can be set.
- 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.
Next
Open one when it matches your project.
Plain Python
The reference pipeline, with no framework.
Read →LangChain
Loaders, splitters and chains, each step a stage.
Read →LlamaIndex
Readers, index and retriever.
Read →Langflow
Steps run as Langflow components.
Read →Errors and fixes
Every message, and a one-line fix.
Read →The manual
Every command and option.
Read →