Audit and evidence

Recording evidence

Report task boundaries, human decisions, policy denials and notices from your agents as ordinary events, and read an agent's declared policy at runtime.

Most of what the audit pages show comes from telemetry you already send. A few facts only your application knows: when a task starts and what it is for, when a person approves or overrides an action, when your code blocks a tool call, and when a person was shown a notice. You report these as ordinary events with reserved names. axonpush seals them with everything else and derives the oversight metrics, off-goal checks and obligation evidence from them.

SDK helpers are coming

The published SDKs (Python 0.0.19, TypeScript 0.0.12, .NET 0.0.6) have no dedicated evidence helpers yet; they are planned for a future release. Send the events below through POST /event, or through your SDK’s ordinary event publish call with the same identifier, payload and metadata.

The vocabulary

Set identifier to one of these names. Required fields are checked when the event is projected; an event that misses one is still stored and sealed, but it is counted as invalid and left out of the metrics.

identifierRequired in payloadRequired in metadataOptional
agent.task.startgoalaxonpush.task_id
agent.task.endoutcomeaxonpush.task_id
oversight.decisiondecision, actor, target_span_idlatency_ms, axonpush.task_id in metadata
policy.deniedrule, tool, modeaxonpush.task_id in metadata
notice.shownnotice_id, audience, channel
  • decision is one of approved, overrode, stopped, escalated.
  • target_span_id is the span ID of the action the person decided on, usually a tool call. Review rate counts an interaction as reviewed when a decision targets its span.
  • latency_ms is how long the decision took, for Median decision latency.
  • mode is shadow (recorded, not blocked) or enforce (your code blocked it).
  • notice_id is the ID of a notice on Audit → Notices.

Set agentId on every event so evidence is attributed to the right agent. The operation name is taken from identifier unless the payload sets its own name, operationName or gen_ai.operation.name, so keep those keys out of evidence payloads.

These names are written by the server, not by you: agent.suspended, agent.resumed, agent.config.changed, assessment.approved and request.replied. They are recorded when someone acts in the audit workflows, with source management.

Send a task and a decision

# Start a task
curl -X POST https://api.axonpush.xyz/event \
  -H "X-API-Key: $AXONPUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "agent.task.start",
    "agentId": "support-bot",
    "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
    "payload": { "goal": "Resolve ticket T-8812: refund request" },
    "metadata": { "axonpush.task_id": "task_8812" },
    "dedupKey": "task_8812:start"
  }'

# A person approves the refund tool call (span 00f067aa0ba902b7)
curl -X POST https://api.axonpush.xyz/event \
  -H "X-API-Key: $AXONPUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "oversight.decision",
    "agentId": "support-bot",
    "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
    "payload": {
      "decision": "approved",
      "actor": "jane@example.com",
      "target_span_id": "00f067aa0ba902b7",
      "latency_ms": 42000
    },
    "metadata": { "axonpush.task_id": "task_8812" },
    "dedupKey": "task_8812:decision:00f067aa0ba902b7"
  }'

# End the task
curl -X POST https://api.axonpush.xyz/event \
  -H "X-API-Key: $AXONPUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "agent.task.end",
    "agentId": "support-bot",
    "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
    "payload": { "outcome": "Refund issued after approval" },
    "metadata": { "axonpush.task_id": "task_8812" },
    "dedupKey": "task_8812:end"
  }'

Use dedupKey and occurredAt so a retried event is not counted twice and keeps its original time. Batches work the same way through POST /events/batch; see SDK events.

Denials and notices

curl -X POST https://api.axonpush.xyz/event \
  -H "X-API-Key: $AXONPUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "policy.denied",
    "agentId": "support-bot",
    "payload": { "rule": "blocked", "tool": "issue_refund", "mode": "enforce" },
    "metadata": { "axonpush.task_id": "task_8812" }
  }'

curl -X POST https://api.axonpush.xyz/event \
  -H "X-API-Key: $AXONPUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "notice.shown",
    "agentId": "support-bot",
    "payload": { "notice_id": "'"$NOTICE_ID"'", "audience": "customers", "channel": "in_app" }
  }'

Tie interactions to tasks

Tool calls and model calls are interactions: events with a tool name, or with a semantic kind of tool, llm, agent or retriever. They join a task when their metadata carries the same axonpush.task_id (task_id is also accepted). Interactions with no task are counted under Events without declared tasks.

For registered agents, each interaction is checked against the agent’s declared permissions and settings. A mismatch marks it off-goal, with one or more reasons:

ReasonWhen
tool_outside_declared_grantsNo grant matches the tool (a grant for tool * matches any)
tool_blocked_by_declared_grantA matching grant has rule blocked
declared_approval_missingA matching grant has rule approval, and no approved decision targeting this span came first
recipient_outside_expected_domainsThe payload’s recipient_domain, or the host of recipient, is not in the agent’s expected domains
declared_action_count_exceededThe task has more interactions than the agent’s expected maximum per task

Off-goal interactions get the attribute axonpush.audit.off_goal = true, so you can filter on them and alert on them. They appear in Off-goal observations under Observed task boundaries. Checks run on what was reported; nothing is blocked by axonpush.

Read an agent’s policy at runtime

Your agent can read its own declared policy and enforce it locally.

curl "https://api.axonpush.xyz/audit/agents/support-bot/policy" \
  -H "X-API-Key: $AXONPUSH_API_KEY"
{
  "agentId": "support-bot",
  "suspended": false,
  "version": 7,
  "grants": [
    { "agentId": "support-bot", "tool": "issue_refund", "system": "Stripe", "mode": "act", "rule": "approval", "enforcement": "enforce" }
  ],
  "optOut": false,
  "mode": "observational; SDK may enforce locally"
}

To check whether a person has an active opt-out for this agent, post their subject identifier instead of putting it in a URL:

curl -X POST "https://api.axonpush.xyz/audit/agents/support-bot/policy/check" \
  -H "X-API-Key: $AXONPUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "subjectRef": "u_123" }'

optOut is true when an opt_out request for that agent and subject has been fulfilled on Audit → Requests.

Both endpoints accept a key with audit:read, or a publishing key with events:publish. A publishing key must be listed under Bound API keys on the agent’s register entry, otherwise the call returns 403 “ingest credential is not explicitly bound to this agent”. Only active grants are returned, up to 100.

Provenance

Events sent through POST /event have source sdk. A decision’s actor is whatever your code reported: axonpush records it as your assertion, not as an authenticated person. Projections mark it actorVerified: false, the observed actors list marks it customer_reported, and evidence packs and the trust page say so in their disclaimers. Only actions taken in the audit workflows by a signed-in member are recorded as authenticated, with source management.

The derived evidence (task boundaries, decisions, off-goal flags) is a projection kept for 30 days or until the source event expires, whichever is sooner. The events themselves are sealed in the archive for your full retention.

API reference: createEvent, auditProduct.agent.policy, auditProduct.agent.policyCheck.