Files
memabra/docs/schemas/event.schema.json
2026-04-15 11:06:05 +08:00

57 lines
1.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://memabra.local/schemas/event.schema.json",
"title": "Event",
"description": "Atomic event emitted during retrieval, routing, execution, and evaluation in memabra.",
"type": "object",
"additionalProperties": false,
"required": [
"event_id",
"trajectory_id",
"timestamp",
"stage",
"event_type",
"payload"
],
"properties": {
"event_id": {"type": "string", "minLength": 1},
"trajectory_id": {"type": "string", "minLength": 1},
"timestamp": {"type": "string", "format": "date-time"},
"stage": {
"type": "string",
"enum": ["retrieval", "policy", "execution", "evaluation", "memory_writeback"]
},
"event_type": {
"type": "string",
"enum": [
"task_received",
"context_summarized",
"candidates_recalled",
"candidate_scored",
"action_selected",
"tool_called",
"tool_result",
"skill_loaded",
"memory_injected",
"user_clarified",
"user_corrected",
"reward_computed",
"memory_written",
"memory_revoked",
"task_completed",
"task_failed"
]
},
"payload": {
"type": "object",
"description": "Event-specific structured body"
},
"metrics": {
"type": "object",
"default": {}
},
"parent_event_id": {
"type": ["string", "null"]
}
}
}