{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AgentStateChanged",
  "type": "object",
  "required": ["event", "agent_id", "state", "created_at"],
  "properties": {
    "event": { "const": "agent.state.changed" },
    "agent_id": { "type": "string" },
    "state": { "type": "string", "enum": ["READY", "BUSY", "BREAK", "OFFLINE"] },
    "queue_id": { "type": ["string", "null"] },
    "created_at": { "type": "string", "format": "date-time" }
  }
}
