Skip to main content
Events are the audit trail for Averta runtime decisions. Use them to confirm traffic is protected and to debug blocks, tool restrictions, tool-result failures, and output decisions.

What an Event Means

Each event is one checkpoint decision. A single model turn can produce several events:
request -> tool_call -> tool_result -> output
Not every turn produces every checkpoint. If the model does not call a tool, there will be no tool-call or tool-result event. If the model returns another tool call, output may not run yet because the turn is not final.

Fields to Check First

FieldWhy it matters
API keyConfirms which app, agent, or environment sent the request.
PolicyShows which policy produced the decision.
ProviderShows provider, operation, model, and streaming mode when available.
CheckpointShows which lifecycle stage made the decision.
DecisionShows allow, block, restrict_tools, or rewrite. The UI may display restrict tools.
Request contextLets you search by conversationId, requestId, or traceId.
TimeConfirms whether the event came from the run you are debugging.
Tool detailsShows blocked tools or checked tool identity when available.
ReasonsExplains why a decision happened when policy returns reason data.

Investigation Order

  1. Filter to the time range around your test run.
  2. Filter by API key prefix or environment.
  3. Search for conversationId, requestId, or traceId.
  4. Narrow by checkpoint if you know where the failure happened.
  5. Inspect block, restrict_tools, and rewrite decisions first.
Starting from policy settings before you find the relevant event is usually wasted time. Find the event, then tune the policy.

Decision Meanings

DecisionWhat happened
allowThe checkpoint allowed execution to continue.
blockThe checkpoint stopped execution at that stage.
restrict_toolsThe request continued, but one or more tools were removed before the provider call.
rewriteOutput policy requested a safer final answer.
For restrict_tools, inspect blocked tool names and then review the attached tool exposure policy.

Empty Events Checklist

If you expected events and the table is empty:
  • confirm your app uses a wrapped client or calls POST /v1/decide
  • confirm AVERTA_API_KEY is set in the same process that calls the provider
  • confirm the key is not revoked
  • confirm the key has an attached policy
  • confirm your app sends traffic to https://api.averta.io or the intended AVERTA_BASE_URL
  • confirm you are looking at the right organization and time range
  • add onDecision logging to prove the SDK is receiving decisions

Correlate with SDK Logs

Add onDecision while debugging:
client = wrapOpenAI(client, {
  onDecision(event) {
    console.log(event.checkpointType, event.decision.decision);
  },
  requestContext: {
    conversationId: "conversation_123",
    requestId: "request_456",
    traceId: "trace_789",
  },
});
Then search Events for the same conversationId, requestId, or traceId.

Common Investigations

SymptomWhat to inspect
No event appearsAPI key, wrapper usage, base URL, organization, time range.
Request blockedRequest checkpoint reason and attached policy threshold.
Tool disappearedRequest event blockedTools and tool exposure rules.
Tool execution never startsTool-call checkpoint decision.
Tool result blockedTool output content as untrusted input.
Output blocked or rewrittenOutput checkpoint decision and rewrite category.
Event is hard to map to logsrequestContext and API key naming.

Next Steps

Checkpoints

Understand the lifecycle stage behind each event.

API keys

Confirm which key and policy produced the event.