Glossary
Decision trace
A decision trace is a structured record of a decision made by an AI agent or a person: what was decided, the inputs and context it relied on, the reasoning given, who or what made it and what happened as a result.
A decision trace is a structured record of a single decision: what was decided, the inputs and context it relied on, the reasoning given, who or what made it, when, and what happened as a result. For AI agents, it answers the question a reviewer asks after the fact, which is rarely “what did the agent do?” and usually “why did it do that, and what was it looking at when it did?”. Decision traces turn an agent’s behaviour from a stream of events into something that can be inspected, audited, compared with precedent and used to improve the next decision. They are also the raw material of a context graph, where decisions are linked to the people, policies and entities they concern.
Why decision traces matter for agents
When software follows fixed rules, explaining a result means reading the code. When an AI agent decides, the logic is spread across a prompt, the context it retrieved, the tools it called and the model’s output, and much of that disappears once the run ends. If a customer complains that an agent refunded the wrong order or refused a reasonable request, the team needs to reconstruct exactly what the agent saw. Without a decision trace, that reconstruction is guesswork.
Decision traces matter for four groups of people. Engineers need them to debug failures and to build evaluation sets from real cases. Reviewers and approvers need them to check an agent’s work before or after it takes effect. Compliance and risk teams need them to show how automated decisions were made. And the agents themselves benefit, because a store of past decisions with their outcomes is a source of precedent for similar cases later.
What a decision trace contains
The exact fields vary by domain, but a useful trace usually records the following.
Field | What it captures | Example |
|---|---|---|
Decision | The action or choice made | Approve a refund of £84 |
Actor | Which agent, model version or person made it | Refunds agent v3, model and prompt version recorded |
Inputs | The data and context the decision relied on | Order record, return policy section 4.2, customer history |
Reasoning | The stated rationale | Item arrived damaged; within 30-day window; first claim |
Alternatives | Options considered and rejected, if any | Store credit offered first; customer declined |
Approvals | Human or automated checks applied | Auto-approved under £100 threshold |
Outcome | What happened next | Refund issued; customer satisfied; no further contact |
Provenance and time | Timestamps and links to sources | Ticket 4471, 14:02 UTC |
The inputs field is the one teams most often skip and most often regret skipping. A trace that records the decision and reasoning but not the context the model was given cannot explain a bad decision caused by bad retrieval, stale data or a poisoned context. Capturing references to the exact documents, memories and records that were in the context window makes the trace reproducible.
Decision traces, logs and agent traces
Decision traces overlap with several other records, and the differences are worth keeping clear.
An application log is a flat stream of events written for engineers: requests, errors, timings. It rarely says why anything happened. An agent trace records the steps of a run, including model calls, tool calls and intermediate outputs, much like distributed tracing does for services. It is detailed and essential for debugging, but it is organised around execution rather than decisions, and a single decision may be buried among dozens of steps. An audit log records who did what and when, usually for security. A decision trace sits above these: it picks out the decisions that matter to the business, attaches the context and reasoning, and links to the underlying trace for detail. The post on why agents need an audit trail, not just logs develops this distinction, and the audit trail entry covers the broader record.
Reasoning in a trace
Language models can explain themselves, and reasoning models produce long internal chains of thought before answering. It is tempting to store that text as the reasoning field. Two cautions apply. First, a model’s stated reasoning is not guaranteed to be the process that produced its answer; research on chain-of-thought faithfulness has shown cases where explanations omit the factors that drove the output. Second, raw reasoning text is long and hard to review. A better pattern is to ask the agent for a short structured rationale, tied to specific inputs and policies, and to keep the full reasoning available in the underlying trace if the provider exposes it. A rationale that cites “return policy 4.2” can be checked; a paragraph of free-form reflection is harder to hold to account.
How to capture decision traces
Decide which decisions count. Tracing every token choice is noise. Start with decisions that change something outside the agent, cost money, affect a customer or would need explaining to an auditor: approvals, refusals, escalations, writes to records and messages sent. A support agent, for instance, might trace refunds and escalations but not which help article it quoted in a routine answer.
Capture at the point of decision. The cleanest approach is to have the agent emit a structured decision record as part of its action, often through function calling with a schema for the trace fields. Reconstructing decisions afterwards from logs is possible but lossy.
Record context by reference. Store identifiers and versions of the documents, memories and records the agent used, along with the prompt and model version, so the decision can be replayed. Snapshotting the state of the data at decision time helps when the underlying records change later.
Attach outcomes later. Outcomes often arrive after the decision: a refund is disputed, a lead converts, an escalation is resolved. Link those back to the original trace so it becomes a labelled example. Over time, these labelled traces are the most valuable data a team has about how its agents perform.
Govern the store. Traces contain personal and commercial data. Apply retention rules, restrict access and make sure deletion requests reach trace data as well.
Using decision traces
Review and approval. In human-in-the-loop workflows, the reviewer sees the decision, its inputs and its rationale in one place, which makes approval faster and more careful than reading a raw transcript.
Debugging and incident response. When something goes wrong, traces show whether the failure came from missing context, wrong context, a model error or a tool failure. A postmortem template for agent incidents works best when traces exist.
Evaluation. Traces with known good and bad outcomes become test cases. Teams can re-run old decisions against a new prompt or model and see which would change, a practice that ties into agent observability.
Precedent and consistency. Past decisions, retrieved by similarity to the current case, show an agent how similar situations were handled and why. This is a form of episodic memory: the agent recalls specific past events rather than general rules. Linked together with entities and policies, decision traces form a context graph.
Learning. Patterns across many traces, such as a policy exception granted repeatedly, can be turned into explicit rules or memories through reflection, improving future decisions without retraining the model.
A worked example
An insurance company uses an agent to triage incoming claims. For each claim, the agent records a decision trace: the triage outcome (fast-track, standard or refer to investigator), the claim fields and documents it read, the policy clauses it applied, a three-sentence rationale, the model and prompt version, and the confidence it reported. Claims above a value threshold are routed to a human, whose approval or override is added to the trace.
Three months in, the fraud team notices a rise in fast-tracked claims later found to be fraudulent. Querying the traces shows that all of them share a pattern: photos submitted as PDFs with no image metadata, which the agent treated the same as camera photos. The inputs field shows the agent never saw the missing metadata because the extraction step dropped it. The team fixes extraction, adds a rule that claims lacking image metadata go to standard review, and re-runs the affected traces against the new configuration to confirm the change. Workflows like this are described under insurance claims processing and decision traces.
Where Exabase fits
Exabase provides storage and history that decision traces can be built on; the schema of a trace and the decision logic belong to the builder. Workers, Exabase’s autonomous agents, record every run as a full conversation including the Worker’s reasoning, every tool call and the final output, which you can read through the run messages endpoint or in the console. That gives a ready-made agent trace for every scheduled or on-demand job, as the running workers guide explains.
For agents you run yourself, structured decision records can be stored as notes or files in a Base, where they are indexed and searchable at the passage level, so an agent can retrieve similar past decisions as precedent. Durable facts that come out of decisions can be written to Exabase Memory, where every memory carries creation and modification timestamps. With filesystem snapshotting enabled, you can query a Base as it was at the moment of a decision, which helps reconstruct what an agent saw, and the agent undo page shows how teams inspect and recover after a bad run.
Frequently asked questions
What is a decision trace in AI?
It is a record of a decision made by an AI agent or a person, including what was decided, the inputs and context used, the reasoning, the actor, the time and the outcome.
How is a decision trace different from a log?
A log is a flat stream of events, usually without reasons. A decision trace focuses on a specific decision and records why it was made and what it was based on, linking to logs and traces for detail.
What should a decision trace include?
At minimum the decision, the actor and version, references to the inputs and context, a short rationale, any approvals and the outcome, with timestamps and links to sources.
Should I store the model’s chain of thought as the reasoning?
Store it if available, but do not rely on it alone. Ask the agent for a short structured rationale tied to specific inputs and policies, which is easier to review and check.
How are decision traces used in practice?
For human review, debugging, incident response, building evaluation sets, giving agents precedent for similar cases and demonstrating to auditors how automated decisions were made.
Do decision traces help with compliance?
They support it by providing evidence of how decisions were made. Whether a particular deployment meets a specific regulation is for the organisation’s legal and engineering teams to determine.
Related pages: Context graph, Audit trail, Agent tracing, Agent observability, Human-in-the-loop, Decision traces use case, Compliance audit, Agent undo, Your agent’s memory is a liability until you can audit it, Best AI context platforms