Skip to main content

Security event types

Reference for POST /api/ingest/security-events, schema version 1.0. An event with an unknown type is rejected individually, not the whole batch.

Event types​

TypeMeaning
gateway.requestA request through the AI Gateway
policy.evaluationA policy was evaluated
policy.deniedA policy blocked an action
tool.invocationAn agent called a tool
tool.unauthorizedAn agent called a tool it may not
mcp.connectionA connection to an MCP server
llm.callA call to a model
egress.connectionAn outbound network connection
agent.activityActivity by a known agent
agent.unregistered_activityActivity by an agent with no registration
identity.owner_mismatchThe observed identity does not match the agent's owner
auth.cross_tenant_attemptAn attempt to cross a tenant boundary
guardrail.hitA guardrail matched
session.started, session.endedA session boundary
system.heartbeatA source is alive
data.exposureSensitive data was seen in a request
prompt.signalA prompt matched a risk signal

Severity​

info, low, medium, high, critical. Findings, incidents and shadow candidates use the four levels from low up.

Source kinds​

A token is bound to one source kind when you create it: mcp_gateway, api_gateway, otel, imported, infrastructure, sensor or test_fixture. The kinds gateway and lineage are used by Bairav's own built-in sync and cannot be chosen for a token.

Event fields​

FieldRequiredNotes
event_uidYesYour unique ID, at most 200 characters. Idempotent per source.
occurred_atYesISO-8601 time
event_typeYesOne of the types above
severityOne of the levels above
observed_identityWho or what produced it, at most 300 characters, for example host:BTG-LAP-04/proc:python
agent_versionAt most 100 characters
trace_id, span_id, correlation_idAt most 128, 64 and 128 characters
decisionThe outcome, if any
summaryA short human-readable line
fieldsAn object of normalised fields, each masked, at most 8 KB per event

Normalised fields​

All optional: host, port, endpoint, provider, model, tool, mcp_server, sdk, framework, user_agent, status, latency_ms, tokens_in, tokens_out, policy_id, rule, device, process, user, protocol, bytes_out, session_id, and attributes (an object of at most 20 keys).

Prompts, responses, chain-of-thought and tool arguments are never stored unless the tenant's data policy allows redacted content.

Who sees what​

Without the view_sensitive_telemetry permission a reader sees only a safe subset of fields (provider, model, status, latency_ms, tokens_in, tokens_out) and identities appear as [restricted].