ProvenLogEvent. Events follow a versioned schema (v1.0) designed for forward compatibility.
Event structure
Field reference
Identity fields
| Field | Type | Description |
|---|---|---|
id | string | UUID, server-assigned |
schema_version | string | Schema version (currently "1.0") |
Source fields
| Field | Type | Description |
|---|---|---|
agent_id | string | Required. Partition key for hash chains |
session_id | string | Optional. Groups events within a single session |
source | string | Origin: sdk, mcp-proxy, hook, otlp, cli |
capture_method | string | Transport path: http-api, cli-ingest, embedded, mcp-proxy, otlp |
Action fields
| Field | Type | Description |
|---|---|---|
action_type | string | Event category (see below) |
action_name | string | Specific action identifier (e.g., search_database) |
action_input | object | Raw JSON input to the action |
action_output | object | Raw JSON output from the action |
action_status | string | Result: success, error, timeout |
error_message | string | Error details when status is error |
Timing fields
| Field | Type | Description |
|---|---|---|
timestamp | string | ISO 8601 timestamp |
duration_ms | integer | Action duration in milliseconds |
Integrity fields (server-assigned)
| Field | Type | Description |
|---|---|---|
sequence | integer | Monotonically increasing per agent_id |
hash | string | SHA-256 hash of this event |
prev_hash | string | Hash of the previous event in the chain |
Dimension fields
| Field | Type | Description |
|---|---|---|
labels | object | Indexed key-value pairs for filtering. Included in hash chain |
metadata | object | Unindexed key-value pairs. Included in hash chain |
validation_warnings | array | Non-fatal validation issues. Excluded from hash chain |
Action types
| Type | Description |
|---|---|
TOOL_CALL | Agent invoked a tool or function |
TOOL_RESULT | Result returned from a tool call |
LLM_CALL | Request sent to a language model |
LLM_RESPONSE | Response received from a language model |
CUSTOM | Application-defined action |
Labels vs Metadata
Both are key-value pairs included in the hash chain, but they serve different purposes:| Labels | Metadata | |
|---|---|---|
| Storage | Separate indexed table | JSON blob in event row |
| Queryable | Yes — ?label.env=prod | No |
| Policy engine | labels.key field access | metadata.key field access |
| Use case | Environment, department, user ID | Model name, SDK version |
env, dept, loan_id, or user_id. Use metadata for informational fields you want hashed into the audit record but don’t need to query — model name, SDK version, prompt token counts, etc.
Label context
Labels are short identifiers (e.g.loan_id = "LN-2024-4821"), but dashboards often need richer information — the borrower name, the loan amount, the origination date. Label context lets you attach that business data to a label value so it can appear alongside events in the UI without being stored on every event.
Both SDKs expose a set_context / setContext method that sends a fire-and-forget PUT to store the context:
(label_key, label_value) and upserted — calling set_context again for the same pair replaces the previous data. Transport errors are logged as warnings and never raise, so context pushes won’t interrupt your agent.
See the Python SDK and TypeScript SDK guides for full usage details.
Validation
ProvenLog uses best-effort validation. Only a missingagent_id is fatal — all other issues are stored as validation_warnings on the event. The philosophy: audit gaps are worse than imperfect records.