Agent Architecture

Decision lineage you can replay, not just read

When an autonomous agent takes an action, you need to answer one question fast: why? Lineage links every output back through its tool calls, retrieved context, and prompts — a provenance graph for machine decisions.

  • Prompt + context provenance
  • Full tool-call trace
  • Deterministic replay
  • Audit-ready by design
100%
of agent actions traced to their inputs
< 1ms
added user-facing latency at capture
1 click
from an output to its source chunks
7 yr
configurable retention for regulated work
// the problem

An agent's reasoning is invisible by default

A chatbot that gives a wrong answer is an annoyance. An agent that issues a refund, files a ticket, or edits a record on bad reasoning is a liability — and without lineage, you cannot prove what went wrong.

Most agent stacks emit a stream of opaque events: a prompt went in, some tool calls happened, an action came out. When a stakeholder asks why the agent denied a claim or escalated a case, the honest answer is usually a shrug and a grep through unstructured logs.

Decision lineage closes that gap. We treat every agent decision as a first-class, queryable artifact — a directed graph that links the final action back to the exact prompt, model version, retrieved documents, and intermediate tool results that produced it. The 'why' stops being archaeology and becomes a lookup.

// what gets captured

The anatomy of a traced decision

Six layers of provenance, linked into one replayable record per agent run.

// how capture works

From action to provenance graph

Instrumentation that rides alongside the agent without slowing it down.

01

Instrument

We wrap the model client, tool layer, and retriever so every call emits a structured span — no scattered print statements.

02

Correlate

Spans are stitched by a run ID into a single decision graph: output → tool calls → context → prompt → model.

03

Persist

Records land in your store, redacted and indexed, with retention and access policies you control.

04

Query

Trace any output to its inputs, replay it, or export an evidence bundle for an auditor — on demand.

// design tradeoff

Capture everything, store what matters

The naive approach is to persist every byte of every prompt and response forever. That is correct, ruinously expensive, and a compliance hazard. The engineering decision is where to draw the line between completeness and cost.

We capture full fidelity at the boundary, then apply policy: high-risk actions keep verbose lineage indefinitely; routine, low-stakes runs are sampled and summarized. PII is redacted at write time, payloads are compressed, and old records tier to cold storage. You get replayability where it counts without an unbounded storage bill.

  • Full-fidelity capture, policy-driven retention
  • Redaction and tokenization at write time
  • Hot/cold tiering keyed to action risk

Application logs vs. decision lineage

Both record events. Only one lets you answer 'why did the agent do that?'

Conventional logsDecision lineage
StructureFlat, timestamped linesLinked provenance graph per run
AnswersWhat happened, roughlyWhy a specific action was taken
ReplayRead-only after the factDeterministic re-execution
SourcingOutput stands aloneOutput → tool calls → source chunks
AuditManual log spelunkingExportable evidence bundle

Frequently asked questions

What exactly does decision lineage capture?

Every input that shaped an action: the model and version, the system prompt, retrieved context with source IDs, the full tool-call sequence with arguments and results, any human approvals, and the final output. Enough to reconstruct why the agent did what it did.

Isn't this just logging with extra steps?

Logs tell you what happened; lineage tells you why. Lineage is a structured, linked graph — output traces back through tool calls to the exact retrieved chunks and prompt that produced it — so you can replay a decision, not just read a timestamped text dump.

How do you keep lineage from leaking sensitive data?

Lineage lives inside your perimeter — your VPC, your object store, your retention policy. We redact or tokenize PII at capture time, scope access by role, and let you set TTLs so records expire on your schedule, not a vendor's.

What does lineage cost in latency and storage?

Capture is asynchronous and off the critical path, so user-facing latency is effectively unchanged. Storage is the real cost; we sample verbose traces, compress payloads, and tier older records to cold storage to keep it bounded.

Related architecture decisions

Lineage is one pillar of a governed agent fleet. Explore the rest.

Make every agent decision answerable

Bring a workflow you're afraid to automate. We'll show you the lineage architecture that makes it auditable enough to trust.