Trace · API reference
Trace assessments
Each time your Trace rules ran on an agent's action, with the facts they read and what was unavailable, and the Trace pause.
Related guide: Trace rules
The trace pause object
Attributes
objectenumRequired- The type of object. One of
trace_pause. pausedbooleanRequired- Whether Trace is paused now.
paused_attimestamp | nullRequired- When the pause started (null when not paused).
paused_bystring | nullRequired- Who paused: a member's user ID, or
owner(null when not paused). paused_by_emailstring | nullRequired- The email of the person who paused.
reasonstring | nullRequired- The note given with the pause.
still_paused_byenumRequiredpause_allwhile Pause all holds: it stops Trace too, so Trace stays stopped after a resume. One ofpause_all.alreadyboolean- On the pause and resume actions only: true when Trace was already in that state, so nothing changed.
The trace pause object
{
"object": "trace_pause",
"paused": true,
"paused_at": "2026-11-25T16:04:22.381Z",
"paused_by": "usr_01M5R0C0555A43E2PW7SB25YVG",
"paused_by_email": "maya@pellowmarsh.example",
"reason": "Injection campaign on the support model",
"still_paused_by": null,
"already": false
}Events
Sent to your webhook endpoints when they subscribe:
trace.assessment.deniedtrace.assessment.updatedtrace.pause.startedtrace.pause.ended
Retrieve the Trace pause
GET/v1/trace/settings/pause
Whether Trace is paused, by whom and why. Any member, or a key with the trace scope.
Parameters
No parameters.
Returns
The pause. See the trace pause object.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/trace/settings/pause" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/settings/pause`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/trace/settings/pause", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "trace_pause",
"paused": false,
"paused_at": null,
"paused_by": null,
"paused_by_email": null,
"reason": null,
"still_paused_by": null
}Retrieve an assessment
GET/v1/trace/assessments/{id}
One trace assessment.
Parameters
idstringpathRequired- The assessment's ID (
tsa_). waitintegerquery- Long-poll a challenge: wait up to this many seconds for the person to decide.
Returns
The assessment.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/trace/assessments" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Idempotency-Key: tsa-reference-2" \
-H "Content-Type: application/json" \
-d '{ "action": { "tool": "crm.search" } }' > step.json
export TRACE_ASSESSMENT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/trace/assessments/$TRACE_ASSESSMENT_ID" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json", "Idempotency-Key": "tsa-reference-2" },
body: JSON.stringify({ "action": { "tool": "crm.search" } }),
})).json();
const traceAssessmentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments/${traceAssessmentId}`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/trace/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Idempotency-Key": "tsa-reference-2"}, json={
"action": {
"tool": "crm.search"
}
}).json()
trace_assessment_id = step1["id"]
data = httpx.get(f"{api}/v1/trace/assessments/{trace_assessment_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "trace_assessment",
"id": "tsa_01M8AD188NC2S3HHN1VJ2JYW3F",
"created_at": "2026-11-25T22:25:46.773Z",
"outcome": "allow",
"reason": null,
"stage": "action",
"action": {
"tool": "crm.search",
"risk": "read",
"risk_source": "derived",
"args_hash": null
},
"signature": null,
"authority": null,
"agent_id": null,
"agent_session_id": null,
"run_id": null,
"policy": null,
"approval": null,
"approval_context": null,
"findings": [],
"trace": null,
"facts": {
"trace.reading_source": "none",
"action.tool": "crm.search",
"action.risk": "read"
},
"facts_version": 1,
"lock": null,
"trip_id": null,
"unavailable": [],
"unassessed": false,
"decided_at": "2026-11-25T22:25:46.773Z"
}List assessments
GET/v1/trace/assessments
Your trace assessments, newest first.
Parameters
limitintegerquery- Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery- Opaque; pass a response's
next_cursorback to get the next page. outcomeenumquery- Only this outcome. One of
allow,challenge,deny. stageenumquery- Only this stage. One of
action,completion. agent_idstringquery- Only this agent.
riskenumquery- Only this risk class. One of
read,write,send,delete,pay. rule_idstringquery- Only those this rule decided.
unassessedbooleanquery- Only SDK records (
true) or only assessments (false). created_gtetimestampquery- Created at or after.
created_ltetimestampquery- Created at or before.
Returns
A page of assessments.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/trace/assessments" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Idempotency-Key: tsa-reference-list-1" \
-H "Content-Type: application/json" \
-d '{ "action": { "tool": "crm.search" } }' > /dev/null
curl -s -X POST "$PROVENANCE_API/v1/trace/assessments" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Idempotency-Key: tsa-reference-list-2" \
-H "Content-Type: application/json" \
-d '{ "action": { "tool": "crm.search" } }' > /dev/null
curl "$PROVENANCE_API/v1/trace/assessments?limit=1&stage=action" \
-H "Authorization: Bearer $PROVENANCE_KEY"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json", "Idempotency-Key": "tsa-reference-list-1" },
body: JSON.stringify({ "action": { "tool": "crm.search" } }),
})).json();
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json", "Idempotency-Key": "tsa-reference-list-2" },
body: JSON.stringify({ "action": { "tool": "crm.search" } }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments?limit=1&stage=action`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/trace/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Idempotency-Key": "tsa-reference-list-1"}, json={
"action": {
"tool": "crm.search"
}
}).json()
step2 = httpx.post(f"{api}/v1/trace/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Idempotency-Key": "tsa-reference-list-2"}, json={
"action": {
"tool": "crm.search"
}
}).json()
data = httpx.get(f"{api}/v1/trace/assessments?limit=1&stage=action", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "list",
"data": [
{
"object": "trace_assessment",
"id": "tsa_01M8ARHPNVRNTCPRVMTGF23HFR",
"created_at": "2026-11-26T01:47:00.155Z",
"outcome": "allow",
"reason": null,
"stage": "action",
"action": {
"tool": "crm.search",
"risk": "read",
"risk_source": "derived",
"args_hash": null
},
"signature": null,
"authority": null,
"agent_id": null,
"agent_session_id": null,
"run_id": null,
"policy": null,
"approval": null,
"approval_context": null,
"findings": [],
"trace": null,
"facts": {
"trace.reading_source": "none",
"action.tool": "crm.search",
"action.risk": "read"
},
"facts_version": 1,
"lock": null,
"trip_id": null,
"unavailable": [],
"unassessed": false,
"decided_at": "2026-11-26T01:47:00.155Z"
}
],
"has_more": true,
"next_cursor": "eyJpZCI6InRzYV8wMU04QVJIUE5WUk5UQ1BSVk1UR0YyM0hGUiIsImRpcmVjdGlvbiI6Im5leHQifQ"
}Assess an action
POST/v1/trace/assessments
Runs your Trace rules on an agent's action before the tool runs. Idempotency-Key is required: a retry with the same key returns the same assessment. Send the action's structured fields; args is kept only as its SHA-256. With unassessed: true, records a tool your SDK ran while Provenance couldn't be reached (never evaluated, never billed). One decision per action assessment.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
stageenumaction: before a tool call. One ofaction.trace_idstring- The trace of the model call that produced the tool call.
agent_idstring- The registered agent.
agent_session_idstring- The agent's session (a rule's lock names it).
run_idstring- The run the action belongs to.
actionobjectRequired- The action the agent is about to take.
Show child attributes
toolstringRequired- The tool's name, such as
payments.send. riskenum- The risk class; read from the tool's name when left out. One of
read,write,send,delete,pay. amountinteger- The amount in minor units.
currencystring- ISO 4217.
payeestring- A payee ID or domain.
descriptionstring- What the action does, in words.
argsany- The tool's arguments: hashed (
args_hash), never kept.
contextobject- What was in the model's context.
Show child attributes
untrusted_sourcesarray of enums- Kinds of untrusted content in the model's context.
findingsarray of objects- What your own guards reported. An unknown category is refused (
finding_category_unknown).Show child attributes
reporterenumRequired- Who reported it. One of
lakera,bedrock_guardrails,prompt_shields,nemo_guardrails,own. categoryenum- The finding's category. One of
prompt_injection,indirect_injection,jailbreak,unsafe_output,pii_leak,malicious_link,credential_exfiltration,off_task. confidencenumber- The reporter's confidence.
unansweredboolean- The guard ran and didn't answer (its
finding.*facts are unavailable).
unassessedboolean- An SDK's record of a tool that ran while Provenance couldn't be reached.
unassessed_attimestamp- When the tool ran.
unassessed_reasonenum- Why it ran unchecked. One of
unreachable,timeout,server_error. droppedinteger- Records the SDK dropped before this one could be posted.
waitobject- Wait for a person to decide a challenge before answering.
Show child attributes
approval_sinteger- Seconds to wait (at most 25); the answer is still
challengeif nobody decided.
Returns
The assessment.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X PUT "$PROVENANCE_API/v1/trace/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "ask before paying after an injected email; never delete",
"document": {
"rules": [
{
"id": "injected-email-payments",
"label": "Payments after an injected email",
"when": [
{
"fact": "action.risk",
"op": "eq",
"value": "pay"
},
{
"fact": "context.untrusted_sources",
"op": "contains",
"value": "email"
},
{
"fact": "finding.categories",
"op": "contains",
"value": "indirect_injection"
}
],
"require": {
"approval": true
}
},
{
"id": "no-deletes",
"label": "Deletes",
"when": [
{
"fact": "action.risk",
"op": "eq",
"value": "delete"
}
],
"require": {
"deny": true,
"lock": true
}
}
]
}
}' > step.json
export TRACE_POLICY_VERSION=$(jq -r '.version' step.json)
curl -X POST "$PROVENANCE_API/v1/trace/assessments" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Idempotency-Key: tsa-reference-1" \
-H "Content-Type: application/json" \
-d '{
"agent_session_id": "ses_reference_trace",
"action": {
"tool": "payments.send",
"amount": 185000,
"currency": "USD",
"payee": "acct_brindlecote_supplies",
"description": "Pay invoice INV-2041"
},
"context": {
"untrusted_sources": [
"email"
]
},
"findings": [
{
"reporter": "own",
"category": "indirect_injection",
"confidence": 0.91
}
]
}'
curl -s -X DELETE "$PROVENANCE_API/v1/trace/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" > /dev/nullconst step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/policies`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"note": "ask before paying after an injected email; never delete",
"document": {
"rules": [
{
"id": "injected-email-payments",
"label": "Payments after an injected email",
"when": [
{
"fact": "action.risk",
"op": "eq",
"value": "pay"
},
{
"fact": "context.untrusted_sources",
"op": "contains",
"value": "email"
},
{
"fact": "finding.categories",
"op": "contains",
"value": "indirect_injection"
}
],
"require": {
"approval": true
}
},
{
"id": "no-deletes",
"label": "Deletes",
"when": [
{
"fact": "action.risk",
"op": "eq",
"value": "delete"
}
],
"require": {
"deny": true,
"lock": true
}
}
]
}
}),
})).json();
const tracePolicyVersion = step1.version;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json", "Idempotency-Key": "tsa-reference-1" },
body: JSON.stringify({
"agent_session_id": "ses_reference_trace",
"action": {
"tool": "payments.send",
"amount": 185000,
"currency": "USD",
"payee": "acct_brindlecote_supplies",
"description": "Pay invoice INV-2041"
},
"context": {
"untrusted_sources": [
"email"
]
},
"findings": [
{
"reporter": "own",
"category": "indirect_injection",
"confidence": 0.91
}
]
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.put(f"{api}/v1/trace/policies", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"note": "ask before paying after an injected email; never delete",
"document": {
"rules": [
{
"id": "injected-email-payments",
"label": "Payments after an injected email",
"when": [
{
"fact": "action.risk",
"op": "eq",
"value": "pay"
},
{
"fact": "context.untrusted_sources",
"op": "contains",
"value": "email"
},
{
"fact": "finding.categories",
"op": "contains",
"value": "indirect_injection"
}
],
"require": {
"approval": True
}
},
{
"id": "no-deletes",
"label": "Deletes",
"when": [
{
"fact": "action.risk",
"op": "eq",
"value": "delete"
}
],
"require": {
"deny": True,
"lock": True
}
}
]
}
}).json()
trace_policy_version = step1["version"]
data = httpx.post(f"{api}/v1/trace/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Idempotency-Key": "tsa-reference-1"}, json={
"agent_session_id": "ses_reference_trace",
"action": {
"tool": "payments.send",
"amount": 185000,
"currency": "USD",
"payee": "acct_brindlecote_supplies",
"description": "Pay invoice INV-2041"
},
"context": {
"untrusted_sources": [
"email"
]
},
"findings": [
{
"reporter": "own",
"category": "indirect_injection",
"confidence": 0.91
}
]
}).json()Response 201
{
"object": "trace_assessment",
"id": "tsa_01M8AD188JGCSZHVSRKMWZGMRY",
"created_at": "2026-11-25T22:25:46.770Z",
"outcome": "challenge",
"reason": "approval_required",
"stage": "action",
"action": {
"tool": "payments.send",
"risk": "pay",
"risk_source": "derived",
"amount": 185000,
"currency": "USD",
"payee": "acct_brindlecote_supplies",
"description": "Pay invoice INV-2041",
"args_hash": null
},
"signature": null,
"authority": null,
"agent_id": null,
"agent_session_id": "ses_reference_trace",
"run_id": null,
"policy": {
"id": "pol_956287817DE7DEF7A3C4E0C732",
"version": 7,
"rule": {
"id": "rul_01M8AD18814Z7YZAN1KM1D5677",
"name": "Payments after an injected email",
"phase": "action",
"action": "challenge",
"conditions": [
{
"fact": "action.risk",
"op": "eq",
"value": "pay",
"actual": "pay"
},
{
"fact": "context.untrusted_sources",
"op": "contains",
"value": "email",
"actual": [
"email"
]
},
{
"fact": "finding.categories",
"op": "contains",
"value": "indirect_injection",
"actual": [
"indirect_injection"
]
}
]
},
"logged": []
},
"approval": {
"id": "appr_01M8AD188J8JX6FET9CM1P6TW2",
"status": "pending",
"expires_at": "2026-11-25T22:35:46.770Z",
"delivery": "sent"
},
"approval_context": null,
"findings": [
{
"reporter": "own",
"category": "indirect_injection",
"confidence": 0.91
}
],
"trace": null,
"facts": {
"trace.reading_source": "none",
"finding.categories": [
"indirect_injection"
],
"finding.reporters": [
"own"
],
"finding.max_confidence": 0.91,
"action.tool": "payments.send",
"action.risk": "pay",
"action.amount": 185000,
"action.currency": "USD",
"action.payee": "acct_brindlecote_supplies",
"context.untrusted_sources": [
"email"
],
"agent_session_id": "ses_reference_trace"
},
"facts_version": 1,
"lock": null,
"trip_id": null,
"unavailable": [],
"unassessed": false,
"decided_at": null
}Pause Trace
POST/v1/trace/pause
Pauses Trace for an incident: model calls, trace assessments, checks, signed readings, new trace jobs and eval runs stop with trace_paused; payments and the other products keep running. Owner or admin, from a console session, with a recent second-factor check; no API key can. Sends trace.pause.started.
Parameters
reasonstring- A note for the banner, the security event and the webhook.
Returns
The pause. See the trace pause object.
Errors
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/trace/pause" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Injection campaign on the support model" }'const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/pause`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ "reason": "Injection campaign on the support model" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/trace/pause", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
"reason": "Injection campaign on the support model"
}).json()Response 200
{
"object": "trace_pause",
"paused": true,
"paused_at": "2026-11-25T16:04:22.381Z",
"paused_by": "usr_01M5R0C0555A43E2PW7SB25YVG",
"paused_by_email": "maya@pellowmarsh.example",
"reason": "Injection campaign on the support model",
"still_paused_by": null,
"already": false
}Resume Trace
POST/v1/trace/resume
Lifts the Trace pause. While Pause all holds, Trace stays stopped and still_paused_by is pause_all. Owner or admin, from a console session, with a recent second-factor check; no API key can. Sends trace.pause.ended.
Parameters
No parameters.
Returns
The pause. See the trace pause object.
Errors
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/trace/resume" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/resume`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/trace/resume", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()Response 200
{
"object": "trace_pause",
"paused": false,
"paused_at": null,
"paused_by": null,
"paused_by_email": null,
"reason": null,
"still_paused_by": null,
"already": false
}