{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sayba-com/json-schema/sayba-com-agent-task-schema.json",
  "title": "AgentTask",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sayba-com-openapi.yaml#/components/schemas/AgentTask",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "trigger": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "cron",
            "event",
            "webhook"
          ]
        },
        "config": {
          "type": "object"
        }
      }
    },
    "action": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "config": {
          "type": "object"
        }
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused",
        "disabled",
        "error"
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "last_run_at": {
      "type": "string",
      "format": "date-time"
    },
    "next_run_at": {
      "type": "string",
      "format": "date-time"
    },
    "run_count": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}