Decision provenance for Python

Your Python code produced a result. Retrace shows you why.

Retrace records your Python application continuously, so the evidence exists before anyone asks. When a result is questioned, trace it back to the inputs and branches that produced it.

FIG. 01 · EXECUTION RECORD

One quote. Two rating tables.

Why was this customer quoted £8,500?

Similar customers were quoted about £6,200.

OBSERVED RESULTquote = £8,500

Recorded: responses from outside your program, and the order threads ran.

Reconstructed on replay: every value and branch inside it.

Neither table was wrong. The quote mixed them.

The logs show table v42 loaded at 09:14:02.125 and a quote of £8,500. They do not show which version each value came from.

Check the arithmetic

Mixed: £5,000 × 1.66 + £200 = £8,500

v41 only: £5,000 × 1.20 + £200 = £6,200

v42 only: £3,600 × 1.66 + £200 = £6,176

At 09:14:02.118 the quote read base_premium of £5,000 from rating table v41. At 09:14:02.125 a background refresh replaced v41 with v42. At 09:14:02.131 the quote read risk_multiplier of 1.66 from v42. The result was a quote of £8,500. The rating table responses and the refresh order were recorded. The calculation was reconstructed on replay.

Logs show what you chose to record.

More Python code now makes decisions that reach customers directly: quotes, credit limits, refunds issued by AI agents. When a customer asks why, the answer has to come from evidence.

Logs, traces and error monitoring capture what someone decided to record in advance. When a result is wrong but nothing failed, the answer is usually not in them.

Retrace records what your program receives from the outside world, and the order its threads run, all the time. You can replay any recorded run and trace how a result was computed, using Retrace's patented provenance method.

That is decision provenance: the inputs a result depended on, the operations that combined them and the values that decided each branch.

The questions behind the investigation

Explain a past calculation. Explain an agent's action.

Agents and automation

An agent took an unexpected action.

Your trace has the model and tool responses. Provenance shows which value decided the branch that became the action.

See how this works for an agent →

Historical calculations

A quote, credit decision or claim is challenged

The calculation succeeded, but its inputs may have changed since. Provenance traces this result back to the inputs that produced it.

See how to explain a past result →

How it works

Record continuously. Explain results later.

Recording runs alongside your Python application in your environment, always on. When a result is questioned, cloud Replay and Provenance explain the recorded run, with VS Code on your machine as the developer interface.

While your application runs

Your application

Recorded continuously: external calls, returned values, exceptions and thread ordering.

The recording

The external interactions and ordering needed to reconstruct the execution.

When a result is questioned

Cloud Replay

Return to the recorded run and step forwards and backwards through it in VS Code.

Provenance

Select a result to see the inputs, operations and source locations that produced it.

The evidence already exists.

Because recording is always on, nobody needs to predict which run will be questioned. A run can report success and still need explaining later.

Private preview

Start with one Python worker or workflow.

We record one worker or workflow continuously, then explain the next result your team questions. Every pilot includes Provenance.

Runtime and dependencies
Retrace runs on CPython 3.11–3.15 on 64-bit Linux and macOS. We check your libraries, native extensions and concurrency against the current build. See all requirements →
Recording and data
Recording runs in your environment, and by default nothing is uploaded automatically. Replay and Provenance run in Retrace's cloud. We agree how recordings reach Replay, which runs to keep and who may inspect the data.
A useful first investigation
We choose a concrete question and agree how to judge the explanation. If you want AI-assisted investigation, we agree how it can access the evidence.

Talk to the founders

What was difficult to establish?

Tell us about an investigation your team found difficult: an unexpected agent action, a disputed result, or a Python failure that was hard to explain.

We'll discuss what happened, what your existing tools recovered, and what evidence was missing.

A 25-minute conversation

Bring a recent example. If there is a fit, we'll agree one Python worker or workflow to record and investigate together.

A past incident tells us what to record, so the next one is explained.

We use what you send to respond to your enquiry. See the privacy notice. Prefer email? Write to henry@retracesoftware.com.

Built in London by engineers who work inside the Python interpreter.

Retrace is built in London by Henry Yates and Nathan Matthews. We work with engineering teams to explain the results their Python systems produce.

FoundersHenry Yates and Nathan Matthews
AdviserYury SelivanovCPython core developer, author of async/await (PEP 492), creator of uvloop
Backed byPreston-Werner Ventures