{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pho-chat/json-schema/pho-chat-run-schema.json",
  "title": "Run",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pho-chat-openapi.json#/components/schemas/Run",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "object": {
      "const": "run"
    },
    "agent": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "planning",
        "awaiting_plan_approval",
        "running",
        "awaiting_approval",
        "paused",
        "needs_user_input",
        "completed",
        "failed",
        "cancelled"
      ]
    },
    "mode": {
      "type": "string"
    },
    "model": {
      "type": [
        "string",
        "null"
      ]
    },
    "credential_source": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "byok",
        "platform",
        null
      ]
    },
    "goal": {
      "type": [
        "string",
        "null"
      ]
    },
    "usage": {},
    "result": {},
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_seq": {
      "type": "integer"
    },
    "webhook_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "started_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "finished_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}