Event schema
Every AgentEvent contains the same envelope:
| Field | Type | Meaning |
|---|---|---|
schema_version |
str |
Serialized contract version, currently 1.0 |
event_id |
str |
UUID4 identifier for this event |
run_id |
str |
UUID4 identifier shared by a run |
event_type |
str |
Validated standard or explicitly allowed custom type |
timestamp |
str |
ISO 8601 UTC timestamp ending in Z |
agent_name |
str \| null |
Stable logical agent name |
workflow_name |
str \| null |
Stable workflow name |
parent_event_id |
str \| null |
Optional causal parent event |
provider |
str \| null |
Model provider where applicable |
model |
str \| null |
Model identifier where applicable |
tool_name |
str \| null |
Tool identifier where applicable |
status |
str \| null |
Outcome or lifecycle status |
payload |
object |
Event-specific data |
risk |
object |
Classification and risk context |
metadata |
object |
Operational context |
Standard types
run_start, run_end, user_message, system_instruction, model_call,
model_response, tool_call, tool_result, retrieval_query,
retrieval_result, policy_check, human_approval, decision, error, and
custom.
Serialization
to_json() produces compact UTF-8-compatible JSON without ASCII-escaping Unicode.
The allow_custom_event_types construction option is not part of the serialized
event envelope.
JSON Schema
The Draft 2020-12 schema is packaged at
agentlogsafe/schemas/agent-event.schema.json, available through
AgentEvent.json_schema(), and published with this site at
/schemas/agent-event.schema.json.
Consumers should select validation and migration behavior using schema_version,
not the installed package version. New optional fields can be introduced in a future
compatible schema; breaking field or meaning changes require a new schema version.