{
  "openapi": "3.1.0",
  "info": {
    "title": "Everruns API",
    "description": "API for managing AI agents, sessions, messages, and events",
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    },
    "version": "0.2.0"
  },
  "servers": [
    {
      "url": "https://app.everruns.com/api",
      "description": "Production API"
    }
  ],
  "paths": {
    "/v1/agent-examples": {
      "get": {
        "tags": [
          "agent-examples"
        ],
        "summary": "List all available examples",
        "description": "list all available examples",
        "operationId": "list_agent_examples",
        "responses": {
          "200": {
            "description": "List of agent examples",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentExample"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "List all active agents",
        "operationId": "list_agents",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or description (case-insensitive substring match).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived agents. Deleted agents never appear in lists.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset (default 0).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum items to return (default 20, max 100).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of agents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_WithUrls_AgentWithCounts"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Create a new agent",
        "operationId": "create_agent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Agent created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "400": {
            "description": "Input exceeds allowed limits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/activity": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Org-wide agent and channel activity",
        "operationId": "get_agent_activity",
        "responses": {
          "200": {
            "description": "Agent and channel activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentActivityOverview"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/analyze": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Run advisory checks against an agent shape",
        "description": "Runs built-in rules plus on-demand LLM analysis\nand returns merged advisory findings. Requires the system utility LLM\nservice to be configured.",
        "operationId": "analyze_agent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent analysis completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAnalysisResponse"
                }
              }
            }
          },
          "400": {
            "description": "Utility LLM service not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Utility LLM provider rejected the analysis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/check-name": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Check agent name",
        "description": "Returns whether an agent name is available for use. Optionally excludes\na specific agent ID (for edit forms where the agent's own name is valid).",
        "operationId": "check_agent_name",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "The agent name to check.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_id",
            "in": "query",
            "description": "Optional agent ID to exclude (for edit forms where the current agent's own name is valid).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Name availability result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckAgentNameResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid exclude_id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/config": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Agent config",
        "operationId": "agent_config",
        "responses": {
          "200": {
            "description": "Resource config for agents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/cost-plan": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Plan agent cost workloads",
        "description": "Suggest editable typical task workloads for agent cost planning. Does not execute or save the agent.",
        "operationId": "plan_agent_costs",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCostPlan"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/diff": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Diff an agent package against an existing agent",
        "description": "Generate a semantic diff against an existing agent without mutation.",
        "operationId": "diff_agent_package",
        "parameters": [
          {
            "name": "from-example",
            "in": "query",
            "description": "Import from a built-in example by name (e.g. `dad-jokes-agent`).\nWhen set, the request body is ignored.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "description": "Explicit target agent name for an update. Omit to create a new agent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Input format: markdown, toml, yaml, json or zip. Omit to detect it.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackageInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Semantic changes",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/draft": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Revise an agent draft with the agent builder",
        "description": "Revise an agent draft from a conversation with the agent builder. Returns the draft only; nothing is created.",
        "operationId": "draft_agent",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDraftResult"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/import": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Import agent from file or built-in example",
        "description": "Two modes:\n1. **From example** — `POST /v1/agents/import?from-example={name}` (body ignored)\n2. **From package** — text (Markdown/TOML/YAML/JSON), ZIP, or a PackageInput envelope.\n\nPackage mode accepts:\n- Markdown with YAML front matter (if starts with ---)\n- Pure YAML\n- Pure JSON\n- Plain text (treated as instructions; defaults to name agent)\n- TOML and ZIP folders, with complete assets and skill directories\n\nIf the file contains an `id` field and an agent with that ID already exists,\nthe agent is updated (upsert). Returns 201 on create, 200 on update.",
        "operationId": "import_agent",
        "parameters": [
          {
            "name": "from-example",
            "in": "query",
            "description": "Import from a built-in example by name (e.g. `dad-jokes-agent`).\nWhen set, the request body is ignored.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "description": "Explicit target agent name for an update. Omit to create a new agent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Input format: markdown, toml, yaml, json or zip. Omit to detect it.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent updated via import",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "201": {
            "description": "Agent imported successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid format or input exceeds limits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "High-risk capabilities require admin role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Example not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/preview": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Preview the final agent shape with capabilities applied",
        "description": "Returns the merged system prompt and all tools that would be available to the agent.\nThis is useful for previewing what the agent will look like before saving.",
        "operationId": "preview_agent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent preview generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPreviewResponse"
                }
              }
            }
          },
          "403": {
            "description": "Harness view permission required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Harness not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/validate": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Validate an agent package and its dependencies",
        "description": "Validate an agent package and its destination dependencies without mutation.",
        "operationId": "validate_agent_package",
        "parameters": [
          {
            "name": "from-example",
            "in": "query",
            "description": "Import from a built-in example by name (e.g. `dad-jokes-agent`).\nWhen set, the request body is ignored.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "description": "Explicit target agent name for an update. Omit to create a new agent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Input format: markdown, toml, yaml, json or zip. Omit to detect it.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PackageInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Validation diagnostics",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get agent by ID or name",
        "description": "Accepts either an agent ID (e.g. `agent_01933b5a...`) or a\nname (e.g. `customer-support`). Names are resolved within the caller's org.",
        "operationId": "get_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_AgentWithCounts"
                }
              }
            }
          },
          "400": {
            "description": "Invalid agent ID"
          },
          "404": {
            "description": "Agent not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "agents"
        ],
        "summary": "Create or update agent (upsert)",
        "description": "Accepts either an agent ID (e.g. `agent_01933b5a...`) or a\nname (e.g. `customer-support`). If the agent exists, update it; if not,\ncreate it. Returns 201 on create, 200 on update.",
        "operationId": "upsert_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "201": {
            "description": "Agent created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agents"
        ],
        "summary": "Archive agent",
        "operationId": "delete_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed, e.g., agt_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Agent archived successfully"
          },
          "400": {
            "description": "Invalid agent ID"
          },
          "404": {
            "description": "Agent not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "agents"
        ],
        "summary": "Update agent",
        "operationId": "update_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed, e.g., agt_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid agent ID or input exceeds allowed limits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/avatar": {
      "put": {
        "tags": [
          "agents"
        ],
        "summary": "Upload the agent's avatar",
        "description": "Upload an avatar for an agent as multipart field `file` (PNG, JPEG, GIF or WebP, at least 64x64, at most 10 MB). The image is center-cropped to a square and pre-rendered as square and circular PNG presets. Replaces any previous avatar, whose URLs stop resolving. Also sets the icon of the agent's one-click Slack apps.",
        "operationId": "upload_agent_avatar",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Multipart form with a `file` field",
          "content": {
            "multipart/form-data": {}
          }
        },
        "responses": {
          "200": {
            "description": "Avatar stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAvatar"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid image",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed to manage this agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agents"
        ],
        "summary": "Remove the agent's avatar",
        "operationId": "delete_agent_avatar",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Avatar removed (or there was none)"
          },
          "403": {
            "description": "Not allowed to manage this agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/avatar/generate": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Generate an agent's avatar with the org's image model",
        "description": "Generate an agent's avatar with the organization's default image model and set it, in one step. Describe it in prompt, or omit prompt to draw one from the agent's name and description. Replaces the previous avatar and updates the icon of the agent's one-click Slack apps. Calls the image provider (billed like any image generation) and can take up to a minute.",
        "operationId": "generate_agent_avatar",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateAgentAvatarRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratedAgentAvatar"
                }
              }
            }
          },
          "400": {
            "description": "Invalid prompt or quality, or no image model available"
          },
          "404": {
            "description": "Agent not found"
          },
          "503": {
            "description": "The image provider failed"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/avatar/preset": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get the agent's current avatar preset",
        "description": "Return the agent's current curated preset ID, or null for a custom upload or no avatar. Requires permission to manage the agent.",
        "operationId": "get_avatar_preset_selection",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarPresetSelection"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "agents"
        ],
        "summary": "Set an agent's avatar from a curated preset",
        "description": "Replace an agent's avatar with a curated preset, storing fresh immutable image URLs and updating its Slack app icons.",
        "operationId": "select_avatar_preset",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectAvatarPreset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAvatar"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/avatar/set": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Set an agent's avatar from a preset or an image",
        "description": "Set an agent's avatar from a curated preset (preset_id, see list_avatar_presets) or an image (image_base64: PNG, JPEG, GIF or WebP, at least 64x64, at most 1 MB). Replaces the previous avatar and updates the icon of the agent's one-click Slack apps.",
        "operationId": "set_agent_avatar",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAgentAvatarRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAvatar"
                }
              }
            }
          },
          "400": {
            "description": "Invalid preset or image"
          },
          "404": {
            "description": "Agent not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels": {
      "get": {
        "tags": [
          "agent-channels"
        ],
        "summary": "List agent channels",
        "description": "List ingress channels owned by an Agent.",
        "operationId": "list_agent_channels",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent channels",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentChannel"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Create agent channel",
        "description": "Create an ingress channel owned by an Agent.",
        "operationId": "create_agent_channel",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Channel created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid channel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}": {
      "get": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Get agent channel",
        "description": "Get one ingress channel owned by an Agent.",
        "operationId": "get_agent_channel",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent channel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Delete agent channel",
        "description": "Delete an ingress channel owned by an Agent.",
        "operationId": "delete_agent_channel",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel deleted"
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Update agent channel",
        "description": "Update an ingress channel owned by an Agent.",
        "operationId": "update_agent_channel",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Channel updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid channel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}/keys": {
      "get": {
        "tags": [
          "agent-channels"
        ],
        "summary": "List agent keys",
        "description": "List the agent keys of an agent's API channel. Secrets are never returned.",
        "operationId": "list_agent_keys",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "API channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent keys, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentKey"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Agent or API channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Create agent key",
        "description": "Create an agent key for an agent's API channel. The secret is in this response only.",
        "operationId": "create_agent_key",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "API channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Key created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentKeyWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent or API channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}/keys/{key_id}/revoke": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Revoke agent key",
        "description": "Revoke an agent key. It never works again, including a secret still in its rotation overlap.",
        "operationId": "revoke_agent_key",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "API channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "description": "Agent key ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Key revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentKey"
                }
              }
            }
          },
          "404": {
            "description": "Key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}/keys/{key_id}/rotate": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Rotate agent key",
        "description": "Replace an agent key's secret, keeping its id. The new secret is in this response only; the old one keeps working for the overlap.",
        "operationId": "rotate_agent_key",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "API channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "description": "Agent key ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateAgentKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Key rotated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentKeyWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid overlap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Key not found or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}/publish": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Publish agent channel",
        "description": "Publish an Agent channel so it can accept ingress traffic.",
        "operationId": "publish_agent_channel",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}/trigger": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Trigger agent channel",
        "description": "Run a published Agent schedule channel now.",
        "operationId": "trigger_agent_channel",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerAgentChannelOutput"
                }
              }
            }
          },
          "400": {
            "description": "Channel cannot run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}/unpublish": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Unpublish agent channel",
        "description": "Unpublish an Agent channel so it no longer accepts ingress traffic.",
        "operationId": "unpublish_agent_channel",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel unpublished",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/channels/{channel_id}/voice/calls": {
      "post": {
        "tags": [
          "voice"
        ],
        "summary": "Create channel call",
        "description": "Call an agent's voice channel. Starts a new session for the call, or continues an existing session of the agent.",
        "operationId": "create_channel_call",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelVoiceCallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Session and realtime WebRTC call started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceSessionResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/chat-features": {
      "get": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Get eligible chat interfaces",
        "operationId": "get_agent_chat_features",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Effective hosted interface features",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatFeatures"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/copy": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Copy an agent",
        "description": "Creates a new agent with the same configuration as the source agent.\nThe new agent's name will be \"{original name} (copy)\".",
        "operationId": "copy_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Source agent ID to copy",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Agent copied successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid agent ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Source agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/costs": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "What one agent cost the organization this month",
        "operationId": "get_agent_cost",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCost"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/credentials": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "List credentials",
        "description": "List write-only MCP credential bindings for an agent. Responses contain metadata and configuration status, never credential values.",
        "operationId": "list_credentials",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Credential binding metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_AgentCredentialBinding"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Create credential binding",
        "description": "Declare a write-only credential binding for one MCP tool parameter. The secret value is provisioned separately.",
        "operationId": "create_credential_binding",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentCredentialBinding"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Credential binding created or updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCredentialBinding"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/credentials/{binding_id}": {
      "put": {
        "tags": [
          "agents"
        ],
        "summary": "Set credential value",
        "description": "Encrypt and replace the write-only value for an agent credential binding.",
        "operationId": "set_credential_value",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "binding_id",
            "in": "path",
            "description": "Credential binding ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAgentCredentialValueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Credential value replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCredentialBinding"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agents"
        ],
        "summary": "Delete credential binding",
        "description": "Revoke an agent credential binding and permanently remove its encrypted value.",
        "operationId": "delete_credential_binding",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "binding_id",
            "in": "path",
            "description": "Credential binding ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Credential binding revoked"
          },
          "404": {
            "description": "Credential binding not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/endpoints": {
      "get": {
        "tags": [
          "agent-channels"
        ],
        "summary": "List agent endpoints",
        "description": "List ingress channels owned by an Agent.",
        "operationId": "list_agent_endpoints",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent channels",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentChannel"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "list_agent_channels"
      },
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Create agent endpoint",
        "description": "Create an ingress channel owned by an Agent.",
        "operationId": "create_agent_endpoint",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Channel created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid channel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "create_agent_channel"
      }
    },
    "/v1/agents/{agent_id}/endpoints/{endpoint_id}": {
      "get": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Get agent endpoint",
        "description": "Get one ingress channel owned by an Agent.",
        "operationId": "get_agent_endpoint",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent channel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "get_agent_channel"
      },
      "delete": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Delete agent endpoint",
        "description": "Delete an ingress channel owned by an Agent.",
        "operationId": "delete_agent_endpoint",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel deleted"
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "delete_agent_channel"
      },
      "patch": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Update agent endpoint",
        "description": "Update an ingress channel owned by an Agent.",
        "operationId": "update_agent_endpoint",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Channel updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid channel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "update_agent_channel"
      }
    },
    "/v1/agents/{agent_id}/endpoints/{endpoint_id}/publish": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Publish agent endpoint",
        "description": "Publish an Agent channel so it can accept ingress traffic.",
        "operationId": "publish_agent_endpoint",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "publish_agent_channel"
      }
    },
    "/v1/agents/{agent_id}/endpoints/{endpoint_id}/trigger": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Trigger agent endpoint",
        "description": "Run a published Agent schedule channel now.",
        "operationId": "trigger_agent_endpoint",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerAgentChannelOutput"
                }
              }
            }
          },
          "400": {
            "description": "Channel cannot run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "trigger_agent_channel"
      }
    },
    "/v1/agents/{agent_id}/endpoints/{endpoint_id}/unpublish": {
      "post": {
        "tags": [
          "agent-channels"
        ],
        "summary": "Unpublish agent endpoint",
        "description": "Unpublish an Agent channel so it no longer accepts ingress traffic.",
        "operationId": "unpublish_agent_endpoint",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel unpublished",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentChannel"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "unpublish_agent_channel"
      }
    },
    "/v1/agents/{agent_id}/endpoints/{endpoint_id}/voice/calls": {
      "post": {
        "tags": [
          "voice"
        ],
        "summary": "Create endpoint call",
        "description": "Call an agent's voice channel. Starts a new session for the call, or continues an existing session of the agent.",
        "operationId": "create_endpoint_call",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelVoiceCallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Session and realtime WebRTC call started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceSessionResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "create_channel_call"
      }
    },
    "/v1/agents/{agent_id}/eval-proposals": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List the Eval Builder's proposals for an agent",
        "description": "List an agent's open eval case proposals, newest first, with the Eval Builder's latest run.",
        "operationId": "list_eval_proposals",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalProposalList"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Ask the Eval Builder for cases",
        "description": "Ask the Eval Builder to propose eval cases for an agent from its instructions, its recent sessions and the gaps in its datasets. Runs in the background on the organization's default model; nothing is added until a person accepts a proposal.",
        "operationId": "propose_eval_cases",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalBuilderRun"
                }
              }
            }
          },
          "409": {
            "description": "A run for this agent is still going"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/export": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Export agent in Markdown format with YAML front matter",
        "operationId": "export_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent name or ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "markdown (default), json, yaml, toml, or zip.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Portable agent definition (format selects text or ZIP)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manifest"
                }
              }
            }
          },
          "400": {
            "description": "Invalid agent ID"
          },
          "404": {
            "description": "Agent not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/exposures/resume": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Deprecated alias of resume",
        "operationId": "resume_agent_exposures",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the pause or resume route. This alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "resume_agent"
      }
    },
    "/v1/agents/{agent_id}/exposures/suspend": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Deprecated alias of pause",
        "operationId": "suspend_agent_exposures",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent paused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the pause or resume route. This alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "pause_agent"
      }
    },
    "/v1/agents/{agent_id}/external-worker": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Read an Agent's external execution status",
        "operationId": "get_external_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalAgentStatus"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Connect or rotate an external HTTPS worker",
        "description": "Requires dangerous-settings permission and installation enablement. Stop\nactive turns first. The preinstalled secret is encrypted and never returned.",
        "operationId": "register_external_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterExternalAgent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalAgent"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agents"
        ],
        "summary": "Disable external worker execution",
        "description": "Revocation never falls back to the built-in runtime.",
        "operationId": "disable_external_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {}
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/failures": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "List sessions with failed turns",
        "description": "List sessions with failed turns. Filters by failure time and includes older, recovered, and archived sessions, matching agent activity. Returns the latest matching failure per session.",
        "operationId": "list_agent_failures",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Exclusive lower bound on failure time; defaults to 24 hours before `before`.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Inclusive upper bound, normally the Agents activity response's generated_at.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFailureSessions"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/github": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get an agent's GitHub App status",
        "description": "Show an agent's own GitHub App: whether it exists, whether it is installed, on which account, and which permissions it lacks.",
        "operationId": "get_agent_github",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentGitHubStatus"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agents"
        ],
        "summary": "Disconnect an agent from GitHub",
        "description": "Disconnect an agent from GitHub: uninstall its GitHub App and remove the connection, keeping the App for a later reconnect. When the App was never installed, forget it instead, so the next connect creates a new one (for example in a GitHub organization).",
        "operationId": "disconnect_agent_github",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentGitHubDisconnect"
                }
              }
            }
          },
          "404": {
            "description": "Agent or GitHub connection not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/github/connect": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Connect an agent to GitHub through its own App",
        "description": "Start connecting an agent to GitHub through its own GitHub App. Returns `install` with a URL to open in a browser when the App exists, or `create_app` when GitHub must first create it, which needs the web UI (Agent > Integrations > Connect GitHub).",
        "operationId": "connect_agent_github",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeginConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BeginConnectResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/github/everruns-app": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Make an agent act as the shared Everruns GitHub App",
        "description": "Make an agent act on GitHub as the shared Everruns App, through one installation an org admin linked in Settings > Organization. Only for an agent without a GitHub App of its own; disconnect that first.",
        "operationId": "use_agent_everruns_app",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UseEverrunsAppRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentGitHubStatus"
                }
              }
            }
          },
          "404": {
            "description": "Agent or linked installation not found"
          },
          "409": {
            "description": "The agent has a GitHub App of its own"
          },
          "503": {
            "description": "The shared Everruns App is not configured"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/health-checks": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "List recent health check runs",
        "operationId": "list_health_checks",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Health check runs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HealthCheckRun"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Trigger a behavioral health check",
        "operationId": "trigger_health_check",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Health check run started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthCheckRun"
                }
              }
            }
          },
          "400": {
            "description": "Health checks unavailable on this deployment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/health-checks/latest": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Latest run + stale flag",
        "operationId": "get_latest_health_check",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Latest health check run with stale-config flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LatestHealthCheckRun"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/health-checks/{run_id}": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get a health check run",
        "operationId": "get_health_check",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Health check run ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Health check run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthCheckRun"
                }
              }
            }
          },
          "404": {
            "description": "Run not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/mcp-attachments": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "List agent mcp attachments",
        "description": "Lists the effective MCP attachments after capability, harness, and agent layers are merged. Connection state, the agent's sign-in state, and permitted actions are resolved for the current caller.",
        "operationId": "list_agent_mcp_attachments",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Effective MCP attachments for the agent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentMcpAttachment"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Agent or harness not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/mcp-attachments/{name}/connection": {
      "delete": {
        "tags": [
          "agents"
        ],
        "summary": "Revoke agent mcp connection",
        "description": "Revokes the current caller's user connection or the virtual user's shared service connection for an effective MCP attachment. The attachment configuration remains unchanged.",
        "operationId": "revoke_agent_mcp_connection",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Effective MCP attachment name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "MCP connection revoked or already absent"
          },
          "400": {
            "description": "Attachment does not use a connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent, attachment, or preset not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/pause": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Pause an agent",
        "description": "Its channels stop accepting messages and its triggers and schedules do not\nrun until it is resumed. Each channel keeps its own published state.",
        "operationId": "pause_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent paused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/resume": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Resume a paused agent",
        "operationId": "resume_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Agent"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/scripts": {
      "get": {
        "tags": [
          "agent-scripts"
        ],
        "summary": "List agent scripts",
        "description": "List an agent's saved scripts with their bodies. Set include_archived=true to also return archived scripts.",
        "operationId": "list_agent_scripts",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived scripts (default false).",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent scripts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentScript"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agent-scripts"
        ],
        "summary": "Create agent script",
        "description": "Save a new script for an agent. The name must be unique among the agent's active scripts.",
        "operationId": "create_agent_script",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentScriptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Script created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScript"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Name already in use",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/scripts/{script_id}": {
      "get": {
        "tags": [
          "agent-scripts"
        ],
        "summary": "Get agent script",
        "description": "Get one saved script, including its body and input schema.",
        "operationId": "get_agent_script",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "script_id",
            "in": "path",
            "description": "Script ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Script",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScript"
                }
              }
            }
          },
          "404": {
            "description": "Script not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agent-scripts"
        ],
        "summary": "Delete agent script",
        "description": "Archive a saved script. It is hidden from the agent and its name becomes free again.",
        "operationId": "delete_agent_script",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "script_id",
            "in": "path",
            "description": "Script ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Script archived"
          },
          "404": {
            "description": "Script not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "agent-scripts"
        ],
        "summary": "Update agent script",
        "description": "Update a saved script's description, input schema or body. Omitted fields stay unchanged.",
        "operationId": "update_agent_script",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "script_id",
            "in": "path",
            "description": "Script ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentScriptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Script updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScript"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Script not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/source": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get Agent source status",
        "description": "Show the Agent's continuous GitHub source binding and sync status.",
        "operationId": "get_agent_source",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AgentSourceStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "agents"
        ],
        "summary": "Connect continuous GitHub source sync",
        "description": "Apply a reviewed GitHub package and enable continuous sync. Pull mode is read-only; two_way also publishes local edits using conditional commits.",
        "operationId": "connect_agent_source",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectSourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSourceStatus"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agents"
        ],
        "summary": "Disconnect Agent source sync",
        "description": "Disconnect GitHub source sync and restore local editing. Keeps the last applied Agent definition.",
        "operationId": "disconnect_agent_source",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/source/accounts": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "List GitHub accounts for Agent source sync",
        "description": "Show the caller's own GitHub sign-in and the organization's linked GitHub accounts that source sync can read through, with their repositories. Never the Agent's runtime GitHub identity.",
        "operationId": "list_agent_source_accounts",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSourceAccounts"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/source/options": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Browse GitHub source locations",
        "description": "Browse GitHub branches and Agent package paths.",
        "operationId": "get_agent_source_options",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceOptionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/source/preview": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Preview Agent source changes",
        "description": "Validate and compare a GitHub Agent package without changing the Agent.",
        "operationId": "preview_agent_source",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceLocation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/source/sync": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Request an Agent source check",
        "description": "Queue an immediate check of this Agent's GitHub source.",
        "operationId": "sync_agent_source",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSourceStatus"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/stats": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get aggregate usage stats for an agent",
        "operationId": "get_agent_stats",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent aggregate stats",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceStats"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/tracing": {
      "get": {
        "tags": [
          "tracing"
        ],
        "summary": "Get agent routing",
        "operationId": "get_agent_routing",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingPolicyView"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "tracing"
        ],
        "summary": "Save agent routing",
        "operationId": "save_agent_routing",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveRoutingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingPolicyView"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/triggers": {
      "get": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "List agent triggers",
        "description": "List an agent's triggers. Set include_archived=true to also return archived triggers.",
        "operationId": "list_agent_triggers",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived triggers (default false).",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent triggers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentTrigger"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "Create agent trigger",
        "operationId": "create_agent_trigger",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentTriggerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Trigger created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTrigger"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Agent not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/triggers/{trigger_id}": {
      "get": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "Get agent trigger",
        "operationId": "get_agent_trigger",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "Trigger ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTrigger"
                }
              }
            }
          },
          "404": {
            "description": "Trigger not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "Delete agent trigger",
        "operationId": "delete_agent_trigger",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "Trigger ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Trigger archived"
          },
          "404": {
            "description": "Trigger not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "PATCH|PUT /v1/agents/{agent_id}/triggers/{trigger_id}",
        "operationId": "update_agent_trigger",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "Trigger ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentTriggerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Trigger updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTrigger"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Trigger not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/triggers/{trigger_id}/deliveries": {
      "get": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "List agent trigger deliveries",
        "description": "List recent events delivered to an agent trigger, newest first, with what happened to each: dispatched, filtered, duplicate or failed.",
        "operationId": "list_agent_trigger_deliveries",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "Trigger ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum rows to return (1-200, default 50).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recent deliveries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentTriggerDelivery"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Trigger not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/triggers/{trigger_id}/runs": {
      "get": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "List agent trigger runs",
        "description": "List the ten most recent durable execution outcomes for an agent trigger.",
        "operationId": "list_agent_trigger_runs",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "Trigger ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recent trigger outcomes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentTriggerRun"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Trigger not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/triggers/{trigger_id}/trigger": {
      "post": {
        "tags": [
          "agent-triggers"
        ],
        "summary": "Trigger agent trigger",
        "operationId": "trigger_agent_trigger",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Agent ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trigger_id",
            "in": "path",
            "description": "Trigger ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Optional event to fire the trigger with",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FireAgentTriggerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Trigger fired, or the event was filtered or a duplicate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerAgentTriggerOutput"
                }
              }
            }
          },
          "400": {
            "description": "The event does not fit the trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Trigger not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{agent_id}/view": {
      "get": {
        "tags": [
          "agent_views"
        ],
        "summary": "Read the view definition and its revision for an Agent",
        "operationId": "get_agent_view_settings",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentViewSettings"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "agent_views"
        ],
        "summary": "Replace or remove an Agent view using its current revision",
        "operationId": "replace_agent_view",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceAgentViewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentViewSettings"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/agents/{id}/delete": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Permanently delete an archived agent",
        "operationId": "destroy_agent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Agent not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/apps": {
      "get": {
        "tags": [
          "apps"
        ],
        "summary": "List apps",
        "description": "List archival App records. This endpoint is read-only and deprecated.",
        "operationId": "list_apps",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or description (case-insensitive substring match).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived apps. Deleted apps never appear in lists.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archival list of Apps",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_App"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Read-only archival App records. Use agent channels for new integrations; there is no drop-in replacement."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/apps/{app_id}": {
      "get": {
        "tags": [
          "apps"
        ],
        "summary": "Get app",
        "description": "Get an archival App record. This endpoint is read-only and deprecated.",
        "operationId": "get_app",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "description": "App ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archival App record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_App"
                }
              }
            }
          },
          "400": {
            "description": "Invalid App ID"
          },
          "404": {
            "description": "App not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Read-only archival App records. Use agent channels for new integrations; there is no drop-in replacement."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/apps/{app_id}/a2a/{channel_id}": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Invoke a2a legacy",
        "operationId": "invoke_a2a_legacy",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "description": "App ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "A2A channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response. For message/send and tasks/* the body is a single JSON envelope; for message/stream the body is text/event-stream of JSON-RPC envelopes. tasks/get and tasks/cancel surface -32001 Task not found for unknown task ids."
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "App or channel not found, not published, or channel disabled (collapsed to a single generic 404 to prevent app-existence enumeration)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Per-channel A2A rate limit exceeded, or SSE connection limit reached for the org/session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/apps/{app_id}/a2a/{channel_id}/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "apps"
        ],
        "summary": "Get an A2A agent card (legacy app route)",
        "description": "GET /v1/apps/{app_id}/a2a/{channel_id}/.well-known/agent-card.json",
        "operationId": "agent_card_legacy",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "description": "App ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "A2A channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent Card JSON"
          },
          "404": {
            "description": "App or channel not found / unpublished / disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/apps/{app_id}/fcp": {
      "get": {
        "tags": [
          "apps"
        ],
        "summary": "`GET /v1/apps/{app_id}/fcp` — handshake",
        "description": "`GET /v1/apps/{app_id}/fcp` — handshake. Always returns the same\ngeneric 404 body for unknown apps so the endpoint cannot be used to\nprobe which app ids are real.",
        "operationId": "handshake",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "description": "App ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown handshake describing the FCP endpoint and how to authenticate. Always `text/markdown`.",
            "content": {
              "text/markdown": {}
            }
          },
          "404": {
            "description": "No FCP endpoint at this URL. Single sanitized body covers unknown apps, unpublished apps, apps without an FCP channel, and disabled FCP channels — operator state is never disclosed.",
            "content": {
              "text/markdown": {}
            }
          },
          "429": {
            "description": "Per-channel FCP rate limit exceeded. `Retry-After: 60` header is set.",
            "content": {
              "text/markdown": {}
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "`POST /v1/apps/{app_id}/fcp` — text-in, text-out",
        "operationId": "message_legacy",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "description": "App ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Plain UTF-8 text, or `application/json` of shape `{\"message\": \"...\"}`. Maximum 256 KiB.",
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent reply as Markdown. The `Set-Cookie: fcp_session=...` header is emitted so subsequent POSTs can resume the same conversation.",
            "content": {
              "text/markdown": {}
            }
          },
          "400": {
            "description": "Malformed body. Distinct messages for empty body, non-UTF-8 bytes, and JSON that did not parse into the expected shape — each Markdown body points back at the handshake.",
            "content": {
              "text/markdown": {}
            }
          },
          "401": {
            "description": "Token required but missing or wrong. Markdown body explains both accepted headers (`Authorization: Bearer` and `X-Everruns-FCP-Token`) and points at the handshake.",
            "content": {
              "text/markdown": {}
            }
          },
          "404": {
            "description": "Same generic 404 as the handshake — operator state is never disclosed.",
            "content": {
              "text/markdown": {}
            }
          },
          "410": {
            "description": "FCP session expired. Body tells the client to drop the `fcp_session` cookie and POST again.",
            "content": {
              "text/markdown": {}
            }
          },
          "413": {
            "description": "Body exceeds 256 KiB.",
            "content": {
              "text/markdown": {}
            }
          },
          "429": {
            "description": "Per-channel FCP rate limit exceeded. `Retry-After: 60` header is set.",
            "content": {
              "text/markdown": {}
            }
          },
          "504": {
            "description": "Agent did not reply within the configured timeout. The same `fcp_session` cookie is set so the client can retry the same conversation.",
            "content": {
              "text/markdown": {}
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/apps/{app_id}/webhooks/{channel_id}": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Invoke webhook legacy",
        "description": "Invoke a webhook channel for a published App. The body is forwarded to the agent as a message.",
        "operationId": "invoke_webhook_legacy",
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "description": "App ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "description": "Webhook channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Webhook accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookInvocationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing webhook token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "App or channel not found, not published, or channel disabled (collapsed to a single generic 404 to prevent app-existence enumeration)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/avatar-presets": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "List curated avatar presets",
        "description": "The public catalog contains presentation metadata only, never agent configuration.",
        "operationId": "list_avatar_presets",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvatarPreset"
                  }
                }
              }
            }
          }
        },
        "security": [
          {}
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/avatar-presets/{preset_id}/{variant}": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Get a PNG preview of a curated avatar preset",
        "description": "Retrieve a public PNG preview of a curated preset using the agent avatar sizes and shapes.",
        "operationId": "get_avatar_preset_variant",
        "parameters": [
          {
            "name": "preset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/png": {}
            }
          },
          "404": {}
        },
        "security": [
          {}
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/avatars/{avatar_id}/{variant}": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Avatar image",
        "description": "Public, immutable avatar image. `variant` is `square-{size}.png` or `circle-{size}.png` for a size in the avatar's `sizes`, or `source.png` for the uploaded square crop.",
        "operationId": "get_avatar_variant",
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "description": "Avatar ID (avatar_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant",
            "in": "path",
            "description": "e.g. square-128.png, circle-64.png, source.png",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PNG image",
            "content": {
              "image/png": {}
            }
          },
          "404": {
            "description": "Unknown avatar or variant"
          }
        },
        "security": [
          {}
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/budgets": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "List budgets",
        "description": "List budgets. Filter by subject_type and subject_id.",
        "operationId": "list_budgets",
        "parameters": [
          {
            "name": "subject_type",
            "in": "query",
            "description": "Only budgets on this kind of subject (session, agent, user, org, ...).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject_id",
            "in": "query",
            "description": "Only budgets on this subject's prefixed public identifier.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WithUrls_Budget"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "budgets"
        ],
        "summary": "Create a budget for a subject (session, agent, user, org)",
        "description": "Create a budget for a subject (session, agent, user, org). Sets a spending cap in the given currency.",
        "operationId": "create_budget",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBudgetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Budget"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/budgets/{budget_id}": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "Get a single budget by ID",
        "operationId": "get_budget",
        "parameters": [
          {
            "name": "budget_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Budget"
                }
              }
            }
          },
          "404": {
            "description": "Budget not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "budgets"
        ],
        "summary": "Delete a budget",
        "operationId": "delete_budget",
        "parameters": [
          {
            "name": "budget_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Budget not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "budgets"
        ],
        "summary": "Update a budget limit, status, or metadata",
        "operationId": "update_budget",
        "parameters": [
          {
            "name": "budget_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBudgetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Budget"
                }
              }
            }
          },
          "404": {
            "description": "Budget not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/budgets/{budget_id}/check": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "Check budget status for a session-scoped budget",
        "operationId": "check_budget",
        "parameters": [
          {
            "name": "budget_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetCheckResult"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/budgets/{budget_id}/ledger": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "List ledger entries for a budget",
        "operationId": "list_budget_ledger",
        "parameters": [
          {
            "name": "budget_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items returned in this page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Zero-based offset into the result set.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LedgerEntry"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/budgets/{budget_id}/top-up": {
      "post": {
        "tags": [
          "budgets"
        ],
        "summary": "Add credits to a budget",
        "description": "Add credits to a budget. Reactivates exhausted or paused budgets if balance becomes positive.",
        "operationId": "top_up_budget",
        "parameters": [
          {
            "name": "budget_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TopUpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Budget"
                }
              }
            }
          },
          "404": {
            "description": "Budget not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities": {
      "get": {
        "tags": [
          "capabilities"
        ],
        "summary": "List available capabilities with pagination",
        "operationId": "list_capabilities",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name/description",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset (default: 0)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (default: 20, max: 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "include_retired",
            "in": "query",
            "description": "Include retired capabilities and capabilities hidden by a rollout flag (default: false)",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_WithUrls_CapabilityInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "capabilities"
        ],
        "summary": "Create a persisted declarative capability",
        "operationId": "create_declarative_capability",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeclarativeCapabilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Declarative capability created. Response id uses cap_<32-hex>; capability_id uses declarative:<unique_name>.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_DeclarativeCapability"
                }
              }
            }
          },
          "400": {
            "description": "Invalid declarative capability definition, name, limits, file mount, skill, or MCP server configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A declarative capability with the same unique name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities/declarative": {
      "get": {
        "tags": [
          "capabilities"
        ],
        "summary": "List persisted declarative resources",
        "operationId": "list_declarative_capabilities",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by unique name, display name, or description",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived declarative capabilities",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Persisted declarative capability resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_DeclarativeCapability"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities/declarative/config": {
      "get": {
        "tags": [
          "capabilities"
        ],
        "summary": "Declarative capabilities config",
        "operationId": "declarative_capabilities_config",
        "responses": {
          "200": {
            "description": "Resource config for declarative capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities/declarative/{capability_id}": {
      "get": {
        "tags": [
          "capabilities"
        ],
        "summary": "Get a declarative resource",
        "operationId": "get_declarative_capability",
        "parameters": [
          {
            "name": "capability_id",
            "in": "path",
            "description": "Public declarative capability resource ID, e.g. cap_01933b5a000070008000000000000001",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Declarative capability resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_DeclarativeCapability"
                }
              }
            }
          },
          "404": {
            "description": "Declarative capability not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "capabilities"
        ],
        "summary": "Archive a declarative resource",
        "operationId": "delete_declarative_capability",
        "parameters": [
          {
            "name": "capability_id",
            "in": "path",
            "description": "Public declarative capability resource ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Declarative capability archived"
          },
          "404": {
            "description": "Declarative capability not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "capabilities"
        ],
        "summary": "Update a declarative resource",
        "operationId": "update_declarative_capability",
        "parameters": [
          {
            "name": "capability_id",
            "in": "path",
            "description": "Public declarative capability resource ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeclarativeCapabilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Declarative capability updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_DeclarativeCapability"
                }
              }
            }
          },
          "400": {
            "description": "Invalid update payload or declarative capability definition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A declarative capability with the same unique name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities/declarative/{capability_id}/delete": {
      "post": {
        "tags": [
          "capabilities"
        ],
        "summary": "Permanently delete archived resource",
        "operationId": "destroy_declarative_capability",
        "parameters": [
          {
            "name": "capability_id",
            "in": "path",
            "description": "Public declarative capability resource ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archived declarative capability permanently deleted"
          },
          "404": {
            "description": "Declarative capability not found or not archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities/guardrails/dry-run": {
      "post": {
        "tags": [
          "capabilities"
        ],
        "summary": "Evaluate guardrail checks against sample text",
        "operationId": "dry_run_guardrails",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuardrailsDryRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Triggered checks for the sample content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsDryRunResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid guardrails config, stage, or oversized text",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities/guardrails/examples": {
      "get": {
        "tags": [
          "capabilities"
        ],
        "summary": "List adoptable guardrail presets",
        "operationId": "list_guardrail_examples",
        "responses": {
          "200": {
            "description": "Adoptable guardrail presets with trust metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailExamplesResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/capabilities/{capability_id}": {
      "get": {
        "tags": [
          "capabilities"
        ],
        "summary": "Get a specific capability",
        "operationId": "get_capability",
        "parameters": [
          {
            "name": "capability_id",
            "in": "path",
            "description": "Capability ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Capability found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_CapabilityInfo"
                }
              }
            }
          },
          "404": {
            "description": "Capability not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get agent card",
        "description": "Agent card of an api channel: what a caller needs to start talking to the agent.",
        "operationId": "agent_api_get_card",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent card",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCard"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/a2a": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Invoke a2a channel",
        "description": "Invoke a published A2A endpoint with JSON-RPC 2.0. Authentication follows the endpoint channel configuration.",
        "operationId": "invoke_a2a_channel",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "A2A endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response or event stream"
          },
          "400": {
            "description": "Invalid JSON-RPC request"
          },
          "401": {
            "description": "Missing or invalid endpoint credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found, app not published, or channel disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Per-channel or SSE connection limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/a2a/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "apps"
        ],
        "summary": "Agent card channel",
        "description": "Get the public Agent Card for a published A2A endpoint.",
        "operationId": "agent_card_channel",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "A2A endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent Card JSON"
          },
          "404": {
            "description": "Endpoint not found, app not published, or channel disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/chat/config": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get work chat config",
        "description": "Public bootstrap for one live Work Chat channel.",
        "operationId": "get_work_chat_config",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "security": [],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/chat/main": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Resolve work chat main",
        "description": "Resolve the consumer’s permanent main conversation.",
        "operationId": "resolve_work_chat_main",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/chat/shared/{token}": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Read work chat share",
        "operationId": "read_work_chat_share",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only transcript page"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "security": [],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/chat/view": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get work chat view",
        "description": "Return the view available to the signed-in Work Chat viewer.",
        "operationId": "get_work_chat_view",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishedAgentView"
                }
              }
            }
          },
          "404": {
            "description": "View unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agent-api",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Set work chat view preference",
        "description": "Save or reset the signed-in Work Chat viewer's personal layout.",
        "operationId": "set_work_chat_view_preference",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentViewPreference"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved personal layout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishedAgentView"
                }
              }
            }
          },
          "404": {
            "description": "View unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/fcp": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Message channel",
        "description": "Send a message to a published FCP endpoint. Authenticate with Authorization: Bearer or X-Everruns-FCP-Token when the endpoint requires a token.",
        "operationId": "message_channel",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "FCP endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Plain UTF-8 text or JSON with a message field. Maximum 256 KiB.",
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent reply as Markdown",
            "content": {
              "text/markdown": {}
            }
          },
          "400": {
            "description": "Malformed or empty message",
            "content": {
              "text/markdown": {}
            }
          },
          "401": {
            "description": "Missing or invalid FCP token",
            "content": {
              "text/markdown": {}
            }
          },
          "404": {
            "description": "Channel not found, app not published, or channel disabled",
            "content": {
              "text/markdown": {}
            }
          },
          "410": {
            "description": "FCP session expired",
            "content": {
              "text/markdown": {}
            }
          },
          "413": {
            "description": "Body exceeds 256 KiB",
            "content": {
              "text/markdown": {}
            }
          },
          "429": {
            "description": "Per-channel FCP rate limit exceeded",
            "content": {
              "text/markdown": {}
            }
          },
          "504": {
            "description": "Agent response timeout",
            "content": {
              "text/markdown": {}
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/runtime-auth": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Create a runtime token",
        "operationId": "exchange",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "An agent key without an End-User id"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "List sessions",
        "description": "The calling key's sessions on an api channel, most recently active first.",
        "operationId": "agent_api_list_sessions",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 1 to 200 (default 50).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "description": "`next_page_token` of the previous page.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of sessions: `{data, next_page_token?}`",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid page size or token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Start a session",
        "description": "Start a session on an api channel. The session starts idle; send a message to start a turn.",
        "operationId": "agent_api_create_session",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Optional title. May be empty.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePlatformAgentSessionRequest"
              },
              "example": {
                "title": "Order 42"
              }
            }
          },
          "required": false
        },
        "responses": {
          "201": {
            "description": "Session started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or the retired api_endpoint body `{\"message\": …}`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate or daily spending limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "cURL",
            "lang": "bash",
            "source": "curl --request POST \\\n  \"$EVERRUNS_AGENT_URL/sessions\" \\\n  --header \"Authorization: Bearer $EVERRUNS_AGENT_KEY\" \\\n  --header \"Content-Type: application/json\" \\\n  --data '{\"title\": \"Order 42\"}'"
          },
          {
            "label": "TypeScript",
            "lang": "typescript",
            "source": "import { AgentClient } from \"@everruns/sdk\";\n\nconst agent = new AgentClient();\nconst session = await agent.createSession({\n  title: \"Order 42\",\n  idempotencyKey: \"order-42-start\",\n});"
          },
          {
            "label": "Python",
            "lang": "python",
            "source": "from everruns_sdk import AgentClient\n\nasync with AgentClient() as agent:\n    session = await agent.create_session(\n        \"Order 42\",\n        idempotency_key=\"order-42-start\",\n    )"
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get a session",
        "description": "One of the caller's sessions on an api channel, with the questions and approvals it waits on.",
        "operationId": "agent_api_get_session",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionView"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/cancel": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Cancel a turn",
        "description": "Cancel the running turn of one of the caller's sessions.",
        "operationId": "agent_api_cancel",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Turn cancelled",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/events": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Read events",
        "description": "A session's events, oldest first, as the channel's visibility allows.",
        "operationId": "agent_api_list_events",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "description": "Return events after this sequence number (exclusive).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 1 to 500 (default 100).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events: `{data}`, each in the canonical event envelope",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid page size",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/files": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get work chat files",
        "description": "Browse or read authorized workspace files.",
        "operationId": "get_work_chat_files",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Write work chat file",
        "description": "Create or update a writable workspace file.",
        "operationId": "write_work_chat_file",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Delete work chat file",
        "description": "Delete a writable workspace file.",
        "operationId": "delete_work_chat_file",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/messages": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Send a message",
        "description": "Send a user message to one of the caller's sessions: starts a turn, or steers the running one.",
        "operationId": "agent_api_send_message",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "`{\"message\": {\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": …}]}, \"files\": [MessageFile]}`. Content holds text and image parts; `files` (optional) carries files as base64 `data` or a public https `url`, each kept in the session's `/attachments`.",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Message stored",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid body, or the retired api_endpoint body `{\"message\": \"text\"}`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate or daily spending limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/messages/{message_id}/reactions/{emoji}": {
      "put": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Add a reaction",
        "description": "Put an emoji reaction on a message of one of the caller's sessions. Adding one already there changes nothing. A reaction on the agent's reply reaches the agent as a short note.",
        "operationId": "agent_api_add_reaction",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Message ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "description": "One emoji (URL-encoded), or a custom emoji as :name:",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The reaction is on the message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionChange"
                }
              }
            }
          },
          "400": {
            "description": "Not one emoji",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel, session or message not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Remove a reaction",
        "description": "Take the caller's emoji reaction off a message. Removing one that is not there changes nothing.",
        "operationId": "agent_api_remove_reaction",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Message ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "description": "One emoji (URL-encoded), or a custom emoji as :name:",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The reaction is off the message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionChange"
                }
              }
            }
          },
          "400": {
            "description": "Not one emoji",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel, session or message not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/question-answers": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Answer questions",
        "description": "Answer the question set the agent asked with `ask_user`, and resume the turn.",
        "operationId": "agent_api_answer_questions",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionAnswersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Answer recorded and turn resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionAnswersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Answers that do not match what was asked, or a credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel, session or pending question set not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Not waiting, or already answered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/reactions": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "List reactions",
        "description": "Reactions on the messages of one of the caller's sessions, the agent's included. `me` marks the caller's own.",
        "operationId": "agent_api_list_reactions",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "query",
            "description": "Only this message's reactions.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reactions by message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MessageReactions"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/settings": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Update work chat conversation",
        "operationId": "update_work_chat_conversation",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/share": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Share work chat conversation",
        "operationId": "share_work_chat_conversation",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revocable link token"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Revoke work chat share",
        "operationId": "revoke_work_chat_share",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/sse": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Stream events",
        "description": "Follow a session's events live, as the channel's visibility allows. Same framing as `/v1/sessions/{id}/sse`: `connected`, `id:` on durable events (resume with `since_id`), a heartbeat, and `disconnecting` before the server cycles the connection.",
        "operationId": "agent_api_stream_events",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since_id",
            "in": "query",
            "description": "Resume after this event (the last `id:` received).",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/eventId"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "description": "Replay events after this sequence first. `0` replays the whole session.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server-Sent Events stream of canonical event envelopes",
            "content": {
              "text/event-stream": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many open streams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/tool-approvals": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Approve tool calls",
        "description": "Allow or reject tool calls the agent's approval gate held back, and resume the turn. The person using the agent answers its approvals.",
        "operationId": "agent_api_submit_tool_approvals",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitToolApprovalsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Decisions recorded and turn resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitToolApprovalsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid decisions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel, session or pending request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Not waiting, expired, or already answered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/sessions/{session_id}/work": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "List work chat tasks",
        "description": "Background work and threads in this consumer conversation.",
        "operationId": "list_work_chat_tasks",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/channels/{channel_id}/webhook": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Invoke webhook channel",
        "description": "Invoke a published webhook endpoint. Authenticate with its channel token in Authorization: Bearer or X-Everruns-Webhook-Token.",
        "operationId": "invoke_webhook_channel",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "Webhook endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Webhook accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookInvocationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing webhook token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found, app not published, or channel disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Per-channel rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/commands": {
      "get": {
        "tags": [
          "commands"
        ],
        "summary": "List the command contract",
        "operationId": "list_commands",
        "responses": {
          "200": {
            "description": "Commands the caller can dispatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandCatalog"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/commands/{name}": {
      "post": {
        "tags": [
          "commands"
        ],
        "summary": "Run one command",
        "operationId": "execute_command",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Command wire name, e.g. create_agent",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Makes a mutating command safe to retry: a repeat with the same key and request returns the first response (with `Idempotent-Replayed: true`) instead of running again. Up to 255 printable ASCII characters, remembered for 24 hours per caller. Ignored by read-only commands.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommandRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command output",
            "headers": {
              "Idempotent-Replayed": {
                "schema": {
                  "type": "string"
                },
                "description": "`true` when this is the stored response of an earlier request with the same Idempotency-Key"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or params",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown command or resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A request with this Idempotency-Key is still running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "The Idempotency-Key was used for a different request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/connection-providers": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List providers available to this runtime",
        "description": "List providers available to this runtime account and endpoint.",
        "operationId": "list_runtime_connectors",
        "responses": {
          "200": {
            "description": "Available connection providers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderResponse"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/context/{entity_ref}": {
      "get": {
        "tags": [
          "history"
        ],
        "summary": "Read an entity's manager context",
        "operationId": "get_manager_context",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id, e.g. agent_01933b5a...",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Entity kind, needed only for ids without a prefix (`schedule`,\n`check_rule`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_revision",
            "in": "query",
            "description": "For DELETE: the revision being cleared; refused when stale.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The manager context; empty content and revision 0 when none was written",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagerContext"
                }
              }
            }
          },
          "400": {
            "description": "Unknown kind, or a kind without manager context",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller does not manage this kind, or is the entity's own session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Entity not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "history"
        ],
        "summary": "Replace an entity's manager context",
        "operationId": "set_manager_context",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Entity kind, needed only for ids without a prefix (`schedule`,\n`check_rule`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_revision",
            "in": "query",
            "description": "For DELETE: the revision being cleared; refused when stale.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetManagerContextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new manager context",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagerContext"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Entity not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Stale expected_revision (manager_context_changed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Larger than 16 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "history"
        ],
        "summary": "Empty an entity's manager context",
        "operationId": "clear_manager_context",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Entity kind, needed only for ids without a prefix (`schedule`,\n`check_rule`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_revision",
            "in": "query",
            "description": "For DELETE: the revision being cleared; refused when stale.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The emptied manager context, with its new revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagerContext"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Entity not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Stale expected_revision (manager_context_changed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/context/{entity_ref}/append": {
      "post": {
        "tags": [
          "history"
        ],
        "summary": "Add a paragraph to an entity's manager context",
        "operationId": "append_manager_context",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Entity kind, needed only for ids without a prefix (`schedule`,\n`check_rule`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_revision",
            "in": "query",
            "description": "For DELETE: the revision being cleared; refused when stale.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppendManagerContextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new manager context",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagerContext"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Entity not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Larger than 16 KiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/cost-rates": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "List the organization's price list, history included",
        "operationId": "list_cost_rates",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CostRate"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "budgets"
        ],
        "summary": "Add a rate to the organization's price list",
        "description": "Add a rate to the organization's price list. A rate is a fixed price per unit or a multiple of the list price; rates are never edited, a change is a new rate from a later date.",
        "operationId": "create_cost_rate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCostRate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostRate"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/cost-rates/{rate_id}/retire": {
      "post": {
        "tags": [
          "budgets"
        ],
        "summary": "End a rate from a date",
        "description": "End a rate from a date. Past costs keep the rate they used; usage after the date falls back to the provider's or catalog price.",
        "operationId": "retire_cost_rate",
        "parameters": [
          {
            "name": "rate_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostRate"
                }
              }
            }
          },
          "404": {
            "description": "Rate not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/costs/settings": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "Read the organization's cost settings",
        "operationId": "get_cost_settings",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostSettings"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "budgets"
        ],
        "summary": "Set the timezone usage policy windows reset in",
        "description": "Set the timezone usage policy windows reset in. Windows already running keep their start; the next boundary uses the new timezone.",
        "operationId": "update_cost_settings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCostSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostSettings"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/costs/summary": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "Summarize what usage cost the organization",
        "operationId": "get_cost_summary",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Window start (inclusive). Default: the start of this month.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end (exclusive). Default: now.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "description": "Only this agent (`agent_...`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostSummary"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/credential-bindings": {
      "get": {
        "tags": [
          "credentials"
        ],
        "summary": "List",
        "operationId": "list",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "description": "session, agent, virtual_user, organization",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "description": "Owner ID, or me for the current virtual user",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "usage",
            "in": "query",
            "description": "user or service",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Write-only credential metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManagedCredential"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "credentials"
        ],
        "summary": "Create",
        "operationId": "create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopedCredential"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Binding declared; value is provisioned separately",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedResource"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/credential-bindings/{id}": {
      "put": {
        "tags": [
          "credentials"
        ],
        "summary": "Set value",
        "operationId": "set_value",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Binding ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCredentialValue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Credential securely stored; no value is returned"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "credentials"
        ],
        "summary": "Revoke",
        "operationId": "revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Binding ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "description": "Last observed resource revision",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Credential revoked"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/durable/circuit-breakers": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "List circuit breakers",
        "operationId": "list_circuit_breakers",
        "responses": {
          "200": {
            "description": "List of circuit breakers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CircuitBreakersListResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/circuit-breakers/{key}": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Get a single circuit breaker",
        "operationId": "get_circuit_breaker",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Circuit breaker key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Circuit breaker details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CircuitBreakerResponse"
                }
              }
            }
          },
          "404": {
            "description": "Circuit breaker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "durable"
        ],
        "summary": "Delete/reset a circuit breaker",
        "operationId": "delete_circuit_breaker",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Circuit breaker key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Circuit breaker deleted"
          },
          "404": {
            "description": "Circuit breaker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/circuit-breakers/{key}/close": {
      "post": {
        "tags": [
          "durable"
        ],
        "summary": "Force close a circuit breaker",
        "operationId": "force_close_circuit_breaker",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Circuit breaker key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Circuit breaker closed"
          },
          "404": {
            "description": "Circuit breaker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/circuit-breakers/{key}/open": {
      "post": {
        "tags": [
          "durable"
        ],
        "summary": "Force open a circuit breaker",
        "operationId": "force_open_circuit_breaker",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Circuit breaker key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Circuit breaker opened"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/config": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Durable policy results for UI gating",
        "operationId": "durable_config",
        "responses": {
          "200": {
            "description": "Resource config for durable surfaces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/dlq": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "List dead letter queue entries",
        "operationId": "list_dlq",
        "parameters": [
          {
            "name": "workflow_id",
            "in": "query",
            "description": "Filter by workflow ID",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "activity_type",
            "in": "query",
            "description": "Filter by activity type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Pagination limit",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of DLQ entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DlqListResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/dlq/{dlq_id}/retry": {
      "post": {
        "tags": [
          "durable"
        ],
        "summary": "Retry a DLQ entry",
        "operationId": "retry_dlq",
        "parameters": [
          {
            "name": "dlq_id",
            "in": "path",
            "description": "DLQ entry ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task requeued",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "404": {
            "description": "DLQ entry not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/executions/{execution_id}": {
      "get": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Get execution details",
        "operationId": "get_execution",
        "parameters": [
          {
            "name": "execution_id",
            "in": "path",
            "description": "Execution ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Execution details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleExecutionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Execution not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/health": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Get system health",
        "operationId": "get_health",
        "responses": {
          "200": {
            "description": "System health",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/metrics/timeseries": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Get metrics time series",
        "operationId": "get_metrics_timeseries",
        "responses": {
          "200": {
            "description": "Metrics time series",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsTimeSeriesResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/monitoring": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Get platform-wide execution monitoring",
        "description": "Get platform-wide execution monitoring. Requires platform-user access.",
        "operationId": "get_fleet_monitoring",
        "responses": {
          "200": {
            "description": "Platform-wide execution monitoring",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringSnapshot"
                }
              }
            }
          },
          "403": {
            "description": "Platform access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/monitoring/actors": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "List a bounded platform-wide page of session actors",
        "operationId": "list_fleet_monitoring_actors",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Zero-based offset for fixed 200-actor pages; maximum 1000000.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 0
          },
          {
            "name": "worker_id",
            "in": "query",
            "description": "Filter by a valid current lease holder, up to 256 UTF-8 bytes.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "worker-01"
          },
          {
            "name": "phase",
            "in": "query",
            "description": "Filter by runnable, model, tools, waiting, or setup execution state.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "model"
          }
        ],
        "responses": {
          "200": {
            "description": "Platform actor page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringActorPage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/monitoring/actors/{session_id}": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Inspect a session actor across organizations",
        "description": "Inspect a session actor across organizations. Requires platform-user access.",
        "operationId": "get_fleet_monitoring_actor",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Platform actor diagnostics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringActorDetail"
                }
              }
            }
          },
          "404": {
            "description": "Actor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/monitoring/shards": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "List shards with their newest report and history",
        "description": "List shards with their newest report and history. Requires platform-user access.",
        "operationId": "get_fleet_monitoring_shards",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "description": "Range ending now: 15m, 1h, 6h, 24h, 7d, or 30d. Ignored when `from` is set. Defaults to 24h.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "24h"
          },
          {
            "name": "from",
            "in": "query",
            "description": "Inclusive UTC start; use with `to` for a custom range of up to 31 days.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Exclusive UTC end; defaults to now.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "bucket",
            "in": "query",
            "description": "Bucket size in seconds: 60, 300, 900, 3600, 21600, or 86400. Chosen from the range when omitted.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 300
          }
        ],
        "responses": {
          "200": {
            "description": "Shards and their history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringShards"
                }
              }
            }
          },
          "400": {
            "description": "Invalid range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Platform access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/monitoring/shards/{shard}/detail": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Read one shard's per-node detail for the last hour",
        "description": "Read one shard's per-node detail for the last hour. Requires platform-user access.",
        "operationId": "get_fleet_monitoring_shard_detail",
        "parameters": [
          {
            "name": "shard",
            "in": "path",
            "description": "Shard name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minutes",
            "in": "query",
            "description": "Minutes ending now, 5 to 60. Defaults to 60.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Per-node detail, or why there is none",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringShardDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid shard name or minutes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Platform access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/monitoring/timeline": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Get recorded execution history across all organizations",
        "description": "Get recorded execution history across all organizations. Requires platform-user access.",
        "operationId": "get_fleet_monitoring_timeline",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "description": "Range ending now: 15m, 1h, 6h, 24h, 7d, or 30d. Ignored when `from` is set. Defaults to 24h.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "24h"
          },
          {
            "name": "from",
            "in": "query",
            "description": "Inclusive UTC start; use with `to` for a custom range of up to 31 days.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Exclusive UTC end; defaults to now.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "bucket",
            "in": "query",
            "description": "Bucket size in seconds: 60, 300, 900, 3600, 21600, or 86400. Chosen from the range when omitted.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 300
          }
        ],
        "responses": {
          "200": {
            "description": "Platform execution history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringTimeline"
                }
              }
            }
          },
          "400": {
            "description": "Invalid range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Platform access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/monitoring/timeline/window": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Break down a selected window across organizations",
        "description": "Break down a selected window across organizations. Requires platform-user access.",
        "operationId": "get_fleet_monitoring_timeline_window",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Inclusive UTC start of the selected window.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Exclusive UTC end of the selected window; at most 7 days after `from`.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Platform window breakdown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringTimelineWindow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid window",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Platform access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/schedules": {
      "get": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "List schedules",
        "operationId": "list_schedules",
        "parameters": [
          {
            "name": "enabled",
            "in": "query",
            "description": "Filter by enabled status",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "target_type",
            "in": "query",
            "description": "Filter by target type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Pagination limit",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of schedules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchedulesListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Create a new schedule",
        "operationId": "create_schedule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Schedule created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "409": {
            "description": "Schedule name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/schedules/{schedule_id}": {
      "get": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Get schedule details",
        "operationId": "get_schedule",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Delete schedule",
        "operationId": "delete_schedule",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Schedule deleted"
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Update schedule",
        "operationId": "update_schedule",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Schedule updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/schedules/{schedule_id}/executions": {
      "get": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "List schedule executions",
        "operationId": "list_schedule_executions",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Pagination limit",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of executions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleExecutionsListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/schedules/{schedule_id}/pause": {
      "post": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Pause schedule",
        "operationId": "pause_schedule",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule paused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/schedules/{schedule_id}/resume": {
      "post": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Resume schedule",
        "operationId": "resume_schedule",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/schedules/{schedule_id}/stats": {
      "get": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Get schedule statistics",
        "operationId": "get_schedule_stats",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleStatsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/schedules/{schedule_id}/trigger": {
      "post": {
        "tags": [
          "durable-schedules"
        ],
        "summary": "Manually trigger schedule",
        "operationId": "trigger_schedule",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "description": "Schedule ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/sse": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Stream global durable state (SSE)",
        "description": "Establishes a Server-Sent Events (SSE) connection for real-time durable system monitoring.\n\n## Connection Lifecycle Events\n\n- **connected**: Sent immediately when the stream is established.\n- **snapshot**: Sent when system state changes (health, workers, workflows, tasks, DLQ, circuit breakers).\n- **disconnecting**: Sent before the server closes the connection for graceful cycling.\n  Data: `{\"reason\":\"connection_cycle\",\"retry_ms\":1000}`\n\n## Connection Cycling\n\nConnections are automatically cycled every 10 minutes. Before closing, the server sends\na `disconnecting` event so clients can reconnect.\n\n## Retry Hints\n\nEach SSE event includes a `retry:` field (in milliseconds) that hints reconnection timing:\n- During active updates: 1000ms\n- During idle periods: increases with backoff up to 20000ms\n- After `disconnecting` event: 1000ms",
        "operationId": "stream_durable_sse",
        "responses": {
          "200": {
            "description": "SSE event stream with 'connected', 'snapshot', and 'disconnecting' events",
            "content": {
              "text/event-stream": {}
            }
          },
          "503": {
            "description": "Durable store not available"
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/tasks": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "List tasks",
        "operationId": "list_durable_tasks",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activity_type",
            "in": "query",
            "description": "Filter by activity type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflow_id",
            "in": "query",
            "description": "Filter by workflow ID",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Pagination limit",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TasksListResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "durable"
        ],
        "summary": "Enqueue a standalone task (generic queue)",
        "operationId": "enqueue_task",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnqueueTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Task enqueued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnqueueTaskResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workers": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "List workers",
        "operationId": "list_workers",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "worker_group",
            "in": "query",
            "description": "Filter by worker group",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of workers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkersListResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workers/{worker_id}/drain": {
      "post": {
        "tags": [
          "durable"
        ],
        "summary": "Drain a worker",
        "operationId": "drain_worker",
        "parameters": [
          {
            "name": "worker_id",
            "in": "path",
            "description": "Worker ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Worker drained"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workers/{worker_id}/resume": {
      "post": {
        "tags": [
          "durable"
        ],
        "summary": "Resume a draining worker",
        "operationId": "resume_worker",
        "parameters": [
          {
            "name": "worker_id",
            "in": "path",
            "description": "Worker ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Worker resumed"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workflows": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "List workflows",
        "operationId": "list_workflows",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflow_type",
            "in": "query",
            "description": "Filter by workflow type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Pagination offset",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Pagination limit",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of workflows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowsListResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workflows/{workflow_id}": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Get workflow details",
        "operationId": "get_workflow",
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "description": "Workflow ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workflow not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workflows/{workflow_id}/cancel": {
      "post": {
        "tags": [
          "durable"
        ],
        "summary": "Cancel a workflow",
        "operationId": "cancel_workflow",
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "description": "Workflow ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow cancelled"
          },
          "404": {
            "description": "Workflow not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workflows/{workflow_id}/events": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Get workflow events",
        "operationId": "get_workflow_events",
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "description": "Workflow ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of workflow events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowEventsListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workflow not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/durable/workflows/{workflow_id}/sse": {
      "get": {
        "tags": [
          "durable"
        ],
        "summary": "Stream workflow state (SSE)",
        "description": "Establishes a Server-Sent Events (SSE) connection for real-time workflow monitoring.\n\n## Connection Lifecycle Events\n\n- **connected**: Sent immediately when the stream is established.\n- **snapshot**: Sent when workflow state or events change.\n- **disconnecting**: Sent before the server closes the connection for graceful cycling.\n  Data: `{\"reason\":\"connection_cycle\",\"retry_ms\":1000}`\n\n## Connection Cycling\n\nConnections are automatically cycled every 10 minutes. Before closing, the server sends\na `disconnecting` event so clients can reconnect.\n\n## Retry Hints\n\nEach SSE event includes a `retry:` field (in milliseconds) that hints reconnection timing.",
        "operationId": "stream_workflow_sse",
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "description": "Workflow ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SSE event stream with 'connected', 'snapshot', and 'disconnecting' events",
            "content": {
              "text/event-stream": {}
            }
          },
          "404": {
            "description": "Workflow not found"
          },
          "503": {
            "description": "Durable store not available"
          }
        },
        "x-docs": {
          "audience": "internal",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/e/{channel_id}/a2a": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Invoke a2a endpoint",
        "description": "Invoke a published A2A endpoint with JSON-RPC 2.0. Authentication follows the endpoint channel configuration.",
        "operationId": "invoke_a2a_endpoint",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "A2A endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response or event stream"
          },
          "400": {
            "description": "Invalid JSON-RPC request"
          },
          "401": {
            "description": "Missing or invalid endpoint credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found, app not published, or channel disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Per-channel or SSE connection limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "invoke_a2a_channel"
      }
    },
    "/v1/e/{channel_id}/a2a/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "apps"
        ],
        "summary": "Agent card endpoint",
        "description": "Get the public Agent Card for a published A2A endpoint.",
        "operationId": "agent_card_endpoint",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "A2A endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent Card JSON"
          },
          "404": {
            "description": "Endpoint not found, app not published, or channel disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "agent_card_channel"
      }
    },
    "/v1/e/{channel_id}/chat/config": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get work chat config legacy",
        "description": "Public bootstrap for one live Work Chat channel.",
        "operationId": "get_work_chat_config_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "deprecated": true,
        "security": [],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "get_work_chat_config"
      }
    },
    "/v1/e/{channel_id}/chat/main": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Resolve work chat main legacy",
        "description": "Resolve the consumer’s permanent main conversation.",
        "operationId": "resolve_work_chat_main_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "resolve_work_chat_main"
      }
    },
    "/v1/e/{channel_id}/chat/shared/{token}": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Read work chat share legacy",
        "operationId": "read_work_chat_share_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only transcript page"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "deprecated": true,
        "security": [],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "read_work_chat_share"
      }
    },
    "/v1/e/{channel_id}/chat/view": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get work chat view legacy",
        "description": "Return the view available to the signed-in Work Chat viewer.",
        "operationId": "get_work_chat_view_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishedAgentView"
                }
              }
            }
          },
          "404": {
            "description": "View unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "get_work_chat_view"
      },
      "put": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Set work chat view preference legacy",
        "description": "Save or reset the signed-in Work Chat viewer's personal layout.",
        "operationId": "set_work_chat_view_preference_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentViewPreference"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved personal layout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishedAgentView"
                }
              }
            }
          },
          "404": {
            "description": "View unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "set_work_chat_view_preference"
      }
    },
    "/v1/e/{channel_id}/fcp": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Message endpoint",
        "description": "Send a message to a published FCP endpoint. Authenticate with Authorization: Bearer or X-Everruns-FCP-Token when the endpoint requires a token.",
        "operationId": "message_endpoint",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "FCP endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Plain UTF-8 text or JSON with a message field. Maximum 256 KiB.",
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent reply as Markdown",
            "content": {
              "text/markdown": {}
            }
          },
          "400": {
            "description": "Malformed or empty message",
            "content": {
              "text/markdown": {}
            }
          },
          "401": {
            "description": "Missing or invalid FCP token",
            "content": {
              "text/markdown": {}
            }
          },
          "404": {
            "description": "Channel not found, app not published, or channel disabled",
            "content": {
              "text/markdown": {}
            }
          },
          "410": {
            "description": "FCP session expired",
            "content": {
              "text/markdown": {}
            }
          },
          "413": {
            "description": "Body exceeds 256 KiB",
            "content": {
              "text/markdown": {}
            }
          },
          "429": {
            "description": "Per-channel FCP rate limit exceeded",
            "content": {
              "text/markdown": {}
            }
          },
          "504": {
            "description": "Agent response timeout",
            "content": {
              "text/markdown": {}
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "message_channel"
      }
    },
    "/v1/e/{channel_id}/sessions": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Start a session",
        "description": "Start a session on an api channel. The session starts idle; send a message to start a turn.",
        "operationId": "agent_api_create_session_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Optional title. May be empty.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePlatformAgentSessionRequest"
              },
              "example": {
                "title": "Order 42"
              }
            }
          },
          "required": false
        },
        "responses": {
          "201": {
            "description": "Session started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or the retired api_endpoint body `{\"message\": …}`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate or daily spending limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "agent_api_create_session"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get a session",
        "description": "One of the caller's sessions on an api channel, with the questions and approvals it waits on.",
        "operationId": "agent_api_get_session_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionView"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "agent_api_get_session"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/cancel": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Cancel a turn",
        "description": "Cancel the running turn of one of the caller's sessions.",
        "operationId": "agent_api_cancel_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Turn cancelled",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "agent_api_cancel"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/files": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get work chat files legacy",
        "description": "Browse or read authorized workspace files.",
        "operationId": "get_work_chat_files_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "get_work_chat_files"
      },
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Write work chat file legacy",
        "description": "Create or update a writable workspace file.",
        "operationId": "write_work_chat_file_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileWrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "write_work_chat_file"
      },
      "delete": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Delete work chat file legacy",
        "description": "Delete a writable workspace file.",
        "operationId": "delete_work_chat_file_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "delete_work_chat_file"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/messages": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Send a message",
        "description": "Send a user message to one of the caller's sessions: starts a turn, or steers the running one.",
        "operationId": "agent_api_send_message_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "`{\"message\": {\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": …}]}, \"files\": [MessageFile]}`. Content holds text and image parts; `files` (optional) carries files as base64 `data` or a public https `url`, each kept in the session's `/attachments`.",
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Message stored",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid body, or the retired api_endpoint body `{\"message\": \"text\"}`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Agent not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate or daily spending limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "agent_api_send_message"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/question-answers": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Answer questions",
        "description": "Answer the question set the agent asked with `ask_user`, and resume the turn.",
        "operationId": "agent_api_answer_questions_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionAnswersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Answer recorded and turn resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionAnswersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Answers that do not match what was asked, or a credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel, session or pending question set not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Not waiting, or already answered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "agent_api_answer_questions"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/settings": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Update work chat conversation legacy",
        "operationId": "update_work_chat_conversation_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "update_work_chat_conversation"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/share": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Share work chat conversation legacy",
        "operationId": "share_work_chat_conversation_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revocable link token"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "share_work_chat_conversation"
      },
      "delete": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Revoke work chat share legacy",
        "operationId": "revoke_work_chat_share_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked"
          },
          "404": {
            "description": "Unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "revoke_work_chat_share"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/sse": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Stream events",
        "description": "Follow a session's events live, as the channel's visibility allows. Same framing as `/v1/sessions/{id}/sse`: `connected`, `id:` on durable events (resume with `since_id`), a heartbeat, and `disconnecting` before the server cycles the connection.",
        "operationId": "agent_api_stream_events_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since_id",
            "in": "query",
            "description": "Resume after this event (the last `id:` received).",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/eventId"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "description": "Replay events after this sequence first. `0` replays the whole session.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server-Sent Events stream of canonical event envelopes",
            "content": {
              "text/event-stream": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many open streams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "agent_api_stream_events"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/tool-approvals": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Approve tool calls",
        "description": "Allow or reject tool calls the agent's approval gate held back, and resume the turn. The person using the agent answers its approvals.",
        "operationId": "agent_api_submit_tool_approvals_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "api channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitToolApprovalsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Decisions recorded and turn resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitToolApprovalsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid decisions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid agent key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel, session or pending request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Not waiting, expired, or already answered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "agent_api_submit_tool_approvals"
      }
    },
    "/v1/e/{channel_id}/sessions/{session_id}/work": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "List work chat tasks legacy",
        "description": "Background work and threads in this consumer conversation.",
        "operationId": "list_work_chat_tasks_legacy",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Consumer sign-in required"
          },
          "404": {
            "description": "Channel or resource unavailable"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "list_work_chat_tasks"
      }
    },
    "/v1/e/{channel_id}/webhook": {
      "post": {
        "tags": [
          "apps"
        ],
        "summary": "Invoke webhook endpoint",
        "description": "Invoke a published webhook endpoint. Authenticate with its channel token in Authorization: Bearer or X-Everruns-Webhook-Token.",
        "operationId": "invoke_webhook_endpoint",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "Webhook endpoint channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Webhook accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookInvocationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing webhook token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found, app not published, or channel disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Per-channel rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        },
        "x-superseded-by": "invoke_webhook_channel"
      }
    },
    "/v1/e/{endpoint_id}/runtime-auth": {
      "post": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Create a runtime token",
        "operationId": "exchange_legacy",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "An agent key without an End-User id"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "deprecated": true,
        "security": [
          {
            "AgentCredential": []
          }
        ],
        "x-deprecation": {
          "migration": "Use the canonical channel route. The legacy alias remains available; no removal date has been announced."
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        },
        "x-superseded-by": "exchange"
      }
    },
    "/v1/eval-proposals/{proposal_id}/accept": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Add a proposed case to a dataset",
        "description": "Add an Eval Builder proposal to a dataset as a new case. The dataset must target the proposal's agent.",
        "operationId": "accept_eval_proposal",
        "parameters": [
          {
            "name": "proposal_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptEvalProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCase"
                }
              }
            }
          },
          "409": {
            "description": "The proposal was already decided"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/eval-proposals/{proposal_id}/dismiss": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Turn a proposed case down",
        "description": "Dismiss an Eval Builder proposal, optionally saying why. The Eval Builder does not offer it again.",
        "operationId": "dismiss_eval_proposal",
        "parameters": [
          {
            "name": "proposal_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissEvalProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCaseProposal"
                }
              }
            }
          },
          "409": {
            "description": "The proposal was already decided"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List evals",
        "operationId": "list_evals",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Case-insensitive name filter.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived evals.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_Eval"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Create a new eval",
        "operationId": "create_eval",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEvalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Eval"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/experiments": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List experiments across evals",
        "description": "List the organization's experiments across evals, newest first.",
        "operationId": "list_all_eval_experiments",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_EvalExperiment"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/fixes": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List suggested fixes",
        "description": "List the fixes the Inspector suggested for one finding or for one agent's findings, with where checking and approving each stands.",
        "operationId": "list_finding_fixes",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingFixList"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/fixes/{fix_id}": {
      "patch": {
        "tags": [
          "evals"
        ],
        "summary": "Edit a suggested fix",
        "description": "Change the text a suggested fix adds to the agent's instructions. An edited fix must be checked again before it can be applied.",
        "operationId": "update_finding_fix",
        "parameters": [
          {
            "name": "fix_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFindingFixRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingFix"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/fixes/{fix_id}/apply": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Apply a suggested fix",
        "description": "Add a checked fix to the agent's instructions as a new agent revision. Only a fix whose check showed no regressions, against the instructions the agent has now, can be applied.",
        "operationId": "apply_finding_fix",
        "parameters": [
          {
            "name": "fix_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingFix"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/fixes/{fix_id}/check": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Check a suggested fix",
        "description": "Run one of the agent's evals as an experiment with and without a suggested fix. The fix can be applied once the check shows no regressions.",
        "operationId": "check_finding_fix",
        "parameters": [
          {
            "name": "fix_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckFindingFixRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingFix"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/fixes/{fix_id}/reject": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Reject a suggested fix",
        "description": "Turn down a suggested fix, saying why. The agent is not changed.",
        "operationId": "reject_finding_fix",
        "parameters": [
          {
            "name": "fix_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectFindingFixRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingFix"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/import": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Import externally-executed eval results",
        "operationId": "import_eval_run",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportEvalRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_EvalRun"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/import/preflight": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Report whether the caller can import eval results",
        "operationId": "eval_import_preflight",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalImportPreflight"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Get a single eval",
        "operationId": "get_eval",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Eval"
                }
              }
            }
          },
          "404": {
            "description": "Eval not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "evals"
        ],
        "summary": "Delete an eval",
        "operationId": "delete_eval",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Eval not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "evals"
        ],
        "summary": "Update an eval",
        "operationId": "update_eval",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEvalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Eval"
                }
              }
            }
          },
          "404": {
            "description": "Eval not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/atif_import": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Import ATIF trajectories as eval cases",
        "operationId": "import_atif",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Eval ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "ATIF trajectories as NDJSON or JSON",
          "content": {
            "application/x-ndjson": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Import report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AtifImportReport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Eval not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/cases": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List eval cases",
        "operationId": "list_eval_cases",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_EvalCase"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Create an eval case",
        "operationId": "create_eval_case",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEvalCaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCase"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/cases/{case_id}": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Get an eval case",
        "operationId": "get_eval_case",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "case_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCase"
                }
              }
            }
          },
          "404": {
            "description": "Eval case not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "evals"
        ],
        "summary": "Delete an eval case",
        "operationId": "delete_eval_case",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "case_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Eval case not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "evals"
        ],
        "summary": "Update an eval case",
        "operationId": "update_eval_case",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "case_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEvalCaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCase"
                }
              }
            }
          },
          "404": {
            "description": "Eval case not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/experiments": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List an eval's experiments, newest first",
        "operationId": "list_eval_experiments",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_EvalExperiment"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Start an eval experiment",
        "description": "Start an experiment: run an eval's cases against one to four variants and compare them case by case.",
        "operationId": "create_eval_experiment",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEvalExperimentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalExperiment"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/experiments/{experiment_id}": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Get an eval experiment with its comparison",
        "description": "Get an experiment with its case-by-case comparison and verdicts.",
        "operationId": "get_eval_experiment",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experiment_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalExperiment"
                }
              }
            }
          },
          "404": {
            "description": "Experiment not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/experiments/{experiment_id}/gate": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Check an experiment's variant against a bar, for CI",
        "description": "Check an experiment's variant against a bar, for CI. Answers 409 while runs are going and 422 when the variant misses the bar, so the command exits non-zero.",
        "operationId": "gate_eval_experiment",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "experiment_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentGateResult"
                }
              }
            }
          },
          "404": {
            "description": "Experiment not found"
          },
          "409": {
            "description": "Some variant's run is still going"
          },
          "422": {
            "description": "The variant missed the bar"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List eval runs",
        "operationId": "list_eval_runs",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_EvalRun"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Create an eval run",
        "operationId": "create_eval_run",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEvalRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRun"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Get an eval run",
        "operationId": "get_eval_run",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRun"
                }
              }
            }
          },
          "404": {
            "description": "Eval run not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}/artifacts": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Export eval run artifacts as NDJSON",
        "operationId": "export_run_artifacts",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Eval ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Eval run ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "NDJSON artifacts",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Eval run not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}/cancel": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Cancel an eval run",
        "operationId": "cancel_eval_run",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRun"
                }
              }
            }
          },
          "404": {
            "description": "Eval run not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}/dataset": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Start an async dataset export for an eval run",
        "description": "The NDJSON is produced by a background job; fetch it once ready via\n`GET .../dataset/{dataset_id}`.",
        "operationId": "export_run_dataset",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Eval ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Eval run ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportEvalRunDatasetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Export enqueued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRunDataset"
                }
              }
            }
          },
          "404": {
            "description": "Eval run not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}/dataset/{dataset_id}": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Get an eval run's dataset export",
        "description": "Fetch an eval-run dataset export handle (status + NDJSON body).",
        "operationId": "get_eval_run_dataset",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRunDataset"
                }
              }
            }
          },
          "404": {
            "description": "Dataset export not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}/results/{result_id}/scores": {
      "patch": {
        "tags": [
          "evals"
        ],
        "summary": "Update scores for one eval result",
        "operationId": "update_eval_result_scores",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "result_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEvalResultScoresRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCaseResult"
                }
              }
            }
          },
          "404": {
            "description": "Eval result not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}/scores": {
      "patch": {
        "tags": [
          "evals"
        ],
        "summary": "Bulk update scores for all results in an eval run",
        "operationId": "bulk_update_eval_run_scores",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateEvalRunScoresRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_EvalCaseResult"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/runs/{run_id}/share": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Whether an eval run has an active share link",
        "operationId": "get_eval_run_share",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRunShareStatus"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Mint a read-only share link for an eval run",
        "operationId": "create_eval_run_share",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRunShareLink"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "evals"
        ],
        "summary": "Revoke all share links for an eval run",
        "operationId": "revoke_eval_run_share",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/evals/{eval_id}/samples": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "Export a dataset as Mira samples",
        "description": "Export an eval's cases as Mira samples, one per case. Settings Mira has no field for ride under metadata.everruns, so the export imports back unchanged.",
        "operationId": "export_eval_samples",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalSampleList"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Import Mira samples as cases",
        "description": "Create or update an eval's cases from Mira samples, matched by name. A sample's expected text becomes a contains scorer unless metadata.everruns names the scorers.",
        "operationId": "import_eval_samples",
        "parameters": [
          {
            "name": "eval_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalSampleImportReport"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/extractions": {
      "post": {
        "tags": [
          "extractions"
        ],
        "summary": "Extract typed fields",
        "operationId": "extract_typed_fields",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Typed extraction values, evidence and usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractionOutcome"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported extraction request"
          },
          "403": {
            "description": "Organization adoption and model management permission required"
          },
          "404": {
            "description": "Model not found"
          },
          "413": {
            "description": "Request body exceeds 8 MiB"
          },
          "502": {
            "description": "Extraction provider failed"
          },
          "504": {
            "description": "Extraction timed out"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires an organization-owned provider and an enabled extraction model",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/files": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List uploaded files, newest first",
        "operationId": "list_files",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of files to return.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List files",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FileInfo"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Upload a PDF or zip file as a message attachment",
        "operationId": "upload_file",
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "description": "Optional session to attribute the upload to.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "File uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid file"
          },
          "413": {
            "description": "File too large"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Download a stored file's bytes",
        "operationId": "get_file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File bytes"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete a stored file",
        "operationId": "delete_file",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File deleted"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/harness-examples": {
      "get": {
        "tags": [
          "harness-examples"
        ],
        "summary": "List all available harness examples",
        "description": "list all available harness examples.",
        "operationId": "list_examples",
        "responses": {
          "200": {
            "description": "List of harness examples",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HarnessExample"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses": {
      "get": {
        "tags": [
          "harnesses"
        ],
        "summary": "List harnesses",
        "operationId": "list_harnesses",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or description (case-insensitive substring match).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived harnesses. Deleted harnesses never appear in lists.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of harnesses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_ResourceWithCounts_Harness"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "harnesses"
        ],
        "summary": "Create harness",
        "operationId": "create_harness",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateHarnessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Harness created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Harness"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/check-name": {
      "get": {
        "tags": [
          "harnesses"
        ],
        "summary": "Check harness name",
        "description": "Returns whether a harness name is available for use. Optionally excludes\na specific harness ID (for edit forms where the harness's own name is valid).",
        "operationId": "check_harness_name",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "The harness name to check.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_id",
            "in": "query",
            "description": "Optional harness ID to exclude (for edit forms where the current harness's own name is valid).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Name availability result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckNameResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid exclude_id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/config": {
      "get": {
        "tags": [
          "harnesses"
        ],
        "summary": "Harness config",
        "description": "Returns which harness policies the caller satisfies.\nUI uses this to show/hide controls (e.g. delete button).",
        "operationId": "harness_config",
        "responses": {
          "200": {
            "description": "Resource config for harnesses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/import": {
      "post": {
        "tags": [
          "harnesses"
        ],
        "summary": "Adopt a harness example as a regular org-owned harness",
        "description": "Creates a normal harness (`is_built_in = false`) from a code-defined\nexample. The new harness inherits from the example's parent harness\n(for example `sandbox-worker` for Coding), resolved by name in the org;\nno UUIDs are hardcoded. Capabilities and other config flow through\nthe same validation paths as `POST /v1/harnesses`.\n\nReturns 201 on creation. If the example name collides with an existing\nharness in the org, a random alphanumeric suffix is appended (parity with\nagent example import). Delegates to the `adopt_harness_example` command.",
        "operationId": "import_harness",
        "parameters": [
          {
            "name": "from-example",
            "in": "query",
            "description": "Import from a built-in harness example by name (e.g. `data-analyst`).\nRequired: the only currently supported import mode is from-example.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Harness adopted from example",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Harness"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or missing capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Example not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/preview": {
      "post": {
        "tags": [
          "harnesses"
        ],
        "summary": "Preview harness",
        "operationId": "preview_harness",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewHarnessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Harness preview generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HarnessPreviewResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/{harness_id}": {
      "get": {
        "tags": [
          "harnesses"
        ],
        "summary": "Get harness",
        "description": "Accepts either a harness ID (e.g. `harness_01933b5a...`) or a\nname (e.g. `generic`). The virtual name `default` resolves to the org's\nconfigured default harness. Names are resolved within the caller's org.",
        "operationId": "get_harness",
        "parameters": [
          {
            "name": "harness_id",
            "in": "path",
            "description": "Harness ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Harness found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_ResourceWithCounts_Harness"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Harness not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "harnesses"
        ],
        "summary": "Delete harness",
        "operationId": "delete_harness",
        "parameters": [
          {
            "name": "harness_id",
            "in": "path",
            "description": "Harness ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Harness archived"
          },
          "400": {
            "description": "Invalid harness ID"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Harness not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "harnesses"
        ],
        "summary": "Update harness",
        "operationId": "update_harness",
        "parameters": [
          {
            "name": "harness_id",
            "in": "path",
            "description": "Harness ID (prefixed)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateHarnessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Harness updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Harness"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Harness not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/{harness_id}/copy": {
      "post": {
        "tags": [
          "harnesses"
        ],
        "summary": "Copy a harness",
        "description": "Creates a new harness with the same configuration as the source harness.\nThe new harness's name will be \"{original name} (copy)\".",
        "operationId": "copy_harness",
        "parameters": [
          {
            "name": "harness_id",
            "in": "path",
            "description": "Source harness ID to copy",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Harness copied successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Harness"
                }
              }
            }
          },
          "400": {
            "description": "Invalid harness ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Source harness not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/{harness_id}/stats": {
      "get": {
        "tags": [
          "harnesses"
        ],
        "summary": "Get aggregate usage stats for a harness",
        "operationId": "get_harness_stats",
        "parameters": [
          {
            "name": "harness_id",
            "in": "path",
            "description": "Harness ID (prefixed) or name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Harness aggregate stats",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceStats"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Harness not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/harnesses/{id}/delete": {
      "post": {
        "tags": [
          "harnesses"
        ],
        "summary": "Permanently delete an archived harness",
        "operationId": "destroy_harness",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Harness not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues": {
      "get": {
        "tags": [
          "health-issues"
        ],
        "summary": "List pending health issues in the organization",
        "description": "List pending operational health issues visible to the caller in the current organization.",
        "operationId": "list_health_issues",
        "parameters": [
          {
            "name": "channel_id",
            "in": "query",
            "description": "Filter by public channel identifier.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of matching issues to skip; defaults to zero.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size from 1 through 100; defaults to 20.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthIssueList"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues/{issue_id}": {
      "get": {
        "tags": [
          "health-issues"
        ],
        "summary": "Get a health issue with evidence and recovery steps",
        "description": "Get current issue evidence and recovery guidance in the current organization.",
        "operationId": "get_health_issue",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthIssue"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues/{issue_id}/actions": {
      "get": {
        "tags": [
          "evals"
        ],
        "summary": "List actions on a finding",
        "description": "List what Everruns or a person did about a finding, such as pausing a repeating schedule, and what the organization's self-healing policy offers to do now.",
        "operationId": "list_finding_actions",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingActions"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Act on a finding",
        "description": "Take an action the organization's self-healing policy offers on a finding, such as pausing a schedule whose runs keep ending the same way. It is recorded on the finding and can be undone.",
        "operationId": "take_finding_action",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TakeFindingActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingActions"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues/{issue_id}/actions/{action_id}/undo": {
      "post": {
        "tags": [
          "evals"
        ],
        "summary": "Undo an action on a finding",
        "description": "Undo an action taken on a finding, automatic or not. Undoing a pause resumes the schedule and starts its repeated-outcome count over.",
        "operationId": "undo_finding_action",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingActions"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires the evals feature flag",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues/{issue_id}/check": {
      "post": {
        "tags": [
          "health-issues"
        ],
        "summary": "Re-check a health issue",
        "description": "Verify current installation permissions without changing provider data; requires agent management access and enforces a check cooldown.",
        "operationId": "check_health_issue",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthIssue"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues/{issue_id}/dismiss": {
      "post": {
        "tags": [
          "health-issues"
        ],
        "summary": "Dismiss a detector finding with a reason",
        "description": "Close a finding that needs nothing. The reason is kept to calibrate detectors, and a dismissed session finding stays closed when the same session is flagged again.",
        "operationId": "dismiss_health_issue",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissHealthIssueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthIssue"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues/{issue_id}/fix": {
      "post": {
        "tags": [
          "health-issues"
        ],
        "summary": "Fix a health issue",
        "description": "Run a fixer the issue offers, such as adding missing Slack permissions to the agent's app. A fix that needs approval in the provider returns the page to approve it on; the issue resolves only when a fresh check confirms it.",
        "operationId": "run_health_issue_fixer",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunIssueFixerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueFixOutcome"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/health-issues/{issue_id}/snooze": {
      "post": {
        "tags": [
          "health-issues"
        ],
        "summary": "Snooze reminders for a health issue for one day",
        "description": "Snooze the authenticated user's reminders for one day while keeping the shared issue pending.",
        "operationId": "snooze_health_issue",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthIssue"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/history": {
      "get": {
        "tags": [
          "history"
        ],
        "summary": "Changes across the organization",
        "operationId": "list_org_history",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "description": "Only this entity kind.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "Only this action.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actor_user_id",
            "in": "query",
            "description": "Only changes made as this user.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "via_agent_id",
            "in": "query",
            "description": "Only changes an agent made, by the agent's public id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Only changes at or after this timestamp.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Only changes older than this timestamp (page cursor).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max entries (default 50, max 200).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recorded changes, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EntityChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown kind or action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/history/{entity_ref}": {
      "get": {
        "tags": [
          "history"
        ],
        "summary": "Changes to one entity",
        "operationId": "list_entity_history",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id, e.g. agent_01933b5a...",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Entity kind, needed only for kinds whose ids have no prefix\n(`schedule`, `check_rule`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "Only this action (`created`, `updated`, `deleted`, ...).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Only changes older than this timestamp (page cursor).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max entries (default 50, max 200).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recorded changes, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EntityChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown kind or action, or a ref whose kind cannot be told",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/history/{entity_ref}/diff": {
      "get": {
        "tags": [
          "history"
        ],
        "summary": "Two revisions compared field by field",
        "operationId": "diff_entity_revisions",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Entity kind, needed only for kinds whose ids have no prefix.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "The older revision.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "The newer revision; the latest when omitted.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fields that differ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FieldDiff"
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/history/{entity_ref}/restore": {
      "post": {
        "tags": [
          "history"
        ],
        "summary": "Bring a revision back as a new change",
        "operationId": "restore_entity_revision",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Restored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoreResult"
                }
              }
            }
          },
          "404": {
            "description": "No such revision, or the entity was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The entity's manager context changed since it was read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/history/{entity_ref}/revisions/{revision}": {
      "get": {
        "tags": [
          "history"
        ],
        "summary": "The entity at one revision",
        "operationId": "show_entity_revision",
        "parameters": [
          {
            "name": "entity_ref",
            "in": "path",
            "description": "The entity's public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "path",
            "description": "Revision number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Entity kind, needed only for kinds whose ids have no prefix.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The entity as it stood after that change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityRevision"
                }
              }
            }
          },
          "404": {
            "description": "No such revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/images": {
      "get": {
        "tags": [
          "images"
        ],
        "summary": "List images",
        "operationId": "list_images",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Max items to return (default 50)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Items to skip",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of images",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ImageInfo"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "images"
        ],
        "summary": "Upload an image",
        "operationId": "upload_image",
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "description": "Optional: session ID stored as metadata for tracking (not required for upload)",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Multipart form data with 'file' field",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Image uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (bad format, size exceeded, etc.)"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/images/{image_id}": {
      "get": {
        "tags": [
          "images"
        ],
        "summary": "Get image (returns binary data)",
        "operationId": "get_image",
        "parameters": [
          {
            "name": "image_id",
            "in": "path",
            "description": "Image ID (prefixed, e.g., img_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Image binary data",
            "content": {
              "image/*": {}
            }
          },
          "400": {
            "description": "Invalid image ID"
          },
          "404": {
            "description": "Image not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "images"
        ],
        "summary": "Delete an image",
        "operationId": "delete_image",
        "parameters": [
          {
            "name": "image_id",
            "in": "path",
            "description": "Image ID (prefixed, e.g., img_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Image deleted"
          },
          "400": {
            "description": "Invalid image ID"
          },
          "404": {
            "description": "Image not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/images/{image_id}/thumbnail": {
      "get": {
        "tags": [
          "images"
        ],
        "summary": "Get image thumbnail",
        "operationId": "get_thumbnail",
        "parameters": [
          {
            "name": "image_id",
            "in": "path",
            "description": "Image ID (prefixed, e.g., img_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Thumbnail binary data",
            "content": {
              "image/jpeg": {}
            }
          },
          "400": {
            "description": "Invalid image ID"
          },
          "404": {
            "description": "Image not found or no thumbnail"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge": {
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "List knowledge",
        "operationId": "list_knowledge",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "extracted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "length",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "tree",
            "in": "query",
            "description": "List only the immediate children of `path`: its files plus one entry per\nsubfolder (`kind: \"folder\"`), for browsing a collection folder by folder.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Knowledge collections",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Create knowledge",
        "operationId": "create_knowledge",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Created collection",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge-indexers": {
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "List knowledge indexers",
        "operationId": "list_knowledge_indexers",
        "responses": {
          "200": {
            "description": "Organization search accounts",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Create knowledge indexer",
        "operationId": "create_knowledge_indexer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndexerInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Configured search account",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/search": {
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Search knowledge collections",
        "operationId": "search_knowledge_collections",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Versioned search results",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/{collection_id}": {
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "Get knowledge",
        "operationId": "get_knowledge",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Collection and processing status",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "knowledge"
        ],
        "summary": "Archive knowledge",
        "operationId": "archive_knowledge",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archived collection",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "knowledge"
        ],
        "summary": "Update knowledge",
        "operationId": "update_knowledge",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated collection",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/{collection_id}/files": {
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "List knowledge files",
        "operationId": "list_knowledge_files",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "extracted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "length",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "tree",
            "in": "query",
            "description": "List only the immediate children of `path`: its files plus one entry per\nsubfolder (`kind: \"folder\"`), for browsing a collection folder by folder.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File catalog page",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "knowledge"
        ],
        "summary": "Write knowledge file",
        "operationId": "write_knowledge_file",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Stored immutable file version",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "knowledge"
        ],
        "summary": "Delete knowledge file",
        "operationId": "delete_knowledge_file",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "File path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted file",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "knowledge"
        ],
        "summary": "Update knowledge file metadata",
        "operationId": "update_knowledge_file_metadata",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileMetadataInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated file metadata and policy",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/{collection_id}/files/content": {
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "Get knowledge file content",
        "operationId": "get_knowledge_file_content",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "extracted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "length",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "tree",
            "in": "query",
            "description": "List only the immediate children of `path`: its files plus one entry per\nsubfolder (`kind: \"folder\"`), for browsing a collection folder by folder.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded original or extracted bytes",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/{collection_id}/okf": {
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "Validate knowledge okf",
        "operationId": "validate_knowledge_okf",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "extracted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "length",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "tree",
            "in": "query",
            "description": "List only the immediate children of `path`: its files plus one entry per\nsubfolder (`kind: \"folder\"`), for browsing a collection folder by folder.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OKF metadata validation page",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/{collection_id}/sources": {
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Add knowledge source",
        "operationId": "add_knowledge_source",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Connected source",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/{collection_id}/sync": {
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Sync knowledge",
        "operationId": "sync_knowledge",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Refresh queued",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/knowledge/{collection_id}/upload": {
      "put": {
        "tags": [
          "knowledge"
        ],
        "summary": "Upload knowledge file",
        "operationId": "upload_knowledge_file",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "description": "Knowledge collection",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mime_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Stored streamed original",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers": {
      "get": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "List all MCP servers",
        "operationId": "list_mcp_servers",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or description (case-insensitive substring match).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived MCP servers. Deleted MCP servers never appear in lists.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of MCP servers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_McpServer"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "Create a new MCP server",
        "operationId": "create_mcp_server",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMcpServerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "MCP server created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_McpServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or duplicate name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/catalog": {
      "get": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "List mcp server catalog",
        "description": "List a cursor-paginated MCP server catalog with active-agent usage counts for the selected organization.",
        "operationId": "list_mcp_server_catalog",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Continue after this MCP server ID.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (default: 50, max: 100).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cursor-paginated MCP server catalog with active-agent usage counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerCatalogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid cursor or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/config": {
      "get": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "Mcp server config",
        "description": "Returns which MCP server policies the caller satisfies.",
        "operationId": "mcp_server_config",
        "responses": {
          "200": {
            "description": "Resource config for MCP servers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/{id}/check-connection": {
      "post": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Re-check an OAuth MCP server's sign-in service",
        "description": "Check again whether an OAuth MCP server's sign-in service is reachable, and record the result on the server.",
        "operationId": "check_mcp_server_connection",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_McpServer"
                }
              }
            }
          },
          "404": {
            "description": "MCP server not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/{id}/delete": {
      "post": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Permanently delete an archived MCP server",
        "operationId": "destroy_mcp_server",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "MCP server not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/{id}/tools": {
      "get": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "List an MCP server's tools with their risk labels",
        "description": "List the tools an MCP server offers, with each tool's annotations and saved risk label.",
        "operationId": "list_mcp_server_tools",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpServerTool"
                  }
                }
              }
            }
          },
          "404": {
            "description": "MCP server not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/{id}/tools/suggest-labels": {
      "post": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Suggest risk labels for an MCP server's unlabeled tools",
        "description": "Ask the organization's decision model (or the deployment's decision service when the organization does not select its own) to suggest read_only or changes for every tool of an MCP server that has no label yet. Suggestions are never applied: a person confirms one by setting the label.",
        "operationId": "suggest_mcp_tool_labels",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpServerTool"
                  }
                }
              }
            }
          },
          "404": {
            "description": "MCP server not found"
          },
          "503": {
            "description": "No decision model is available to rate the tools"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/{id}/tools/{tool_name}/label": {
      "put": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Set or clear a person's risk label for one MCP server tool",
        "description": "Set or clear a person's risk label for one MCP server tool. read_only never asks for approval in normal mode, changes always asks, null clears.",
        "operationId": "set_mcp_tool_label",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tool_name",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerTool"
                }
              }
            }
          },
          "404": {
            "description": "MCP server or tool not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/{server_id}": {
      "get": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "Get MCP server by ID",
        "operationId": "get_mcp_server",
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "description": "MCP server ID (prefixed, e.g., mcp_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "MCP server found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_McpServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid server ID"
          },
          "404": {
            "description": "MCP server not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "Delete MCP server",
        "operationId": "delete_mcp_server",
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "description": "MCP server ID (prefixed, e.g., mcp_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "MCP server deleted successfully"
          },
          "400": {
            "description": "Invalid server ID"
          },
          "404": {
            "description": "MCP server not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "Update MCP server",
        "operationId": "update_mcp_server",
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "description": "MCP server ID (prefixed, e.g., mcp_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMcpServerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "MCP server updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_McpServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid server ID or input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "MCP server not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/mcp-servers/{server_id}/usage": {
      "get": {
        "tags": [
          "mcp-servers"
        ],
        "summary": "Get mcp server usage",
        "description": "Get the bounded active-agent impact summary used before archiving an MCP server preset.",
        "operationId": "get_mcp_server_usage",
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "description": "MCP server ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bounded active-agent archive impact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerUsageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid MCP server ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "MCP server not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/me/invitations": {
      "get": {
        "tags": [
          "organization invitations"
        ],
        "summary": "List my invitations",
        "description": "List actionable organization invitations addressed to the authenticated user's verified email.",
        "operationId": "list_my_invitations",
        "responses": {
          "200": {
            "description": "Actionable invitations for the authenticated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_MyInvitationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Email address is not verified"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/me/invitations/{public_id}/accept": {
      "post": {
        "tags": [
          "organization invitations"
        ],
        "summary": "Accept my invitation",
        "description": "Accept an actionable organization invitation addressed to the authenticated user's verified email.",
        "operationId": "accept_my_invitation",
        "parameters": [
          {
            "name": "public_id",
            "in": "path",
            "description": "Public invitation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptInviteResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Email is unverified"
          },
          "404": {
            "description": "Invitation not found"
          },
          "409": {
            "description": "Invitation is revoked, accepted, or no longer actionable"
          },
          "410": {
            "description": "Invitation expired"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/memories": {
      "get": {
        "tags": [
          "memory"
        ],
        "summary": "List memories",
        "description": "List workspace memories.",
        "operationId": "list_memories",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List memories",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_Memory"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "memory"
        ],
        "summary": "Create memory",
        "description": "Create a new workspace memory.",
        "operationId": "create_memory",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMemoryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Memory created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Memory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate memory name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/memories/{memory_id}": {
      "get": {
        "tags": [
          "memory"
        ],
        "summary": "Get memory",
        "description": "Get a workspace memory by ID.",
        "operationId": "get_memory",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Memory found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Memory"
                }
              }
            }
          },
          "404": {
            "description": "Memory not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "memory"
        ],
        "summary": "Delete memory",
        "description": "Delete a workspace memory.",
        "operationId": "delete_memory",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Memory archived"
          },
          "404": {
            "description": "Memory not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "memory"
        ],
        "summary": "Update memory",
        "description": "Update a workspace memory. Only provided fields are modified.",
        "operationId": "update_memory",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemoryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Memory updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Memory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Memory not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate memory name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/memories/{memory_id}/fs": {
      "get": {
        "tags": [
          "memory"
        ],
        "summary": "List root",
        "description": "List immediate children of the Memory root.",
        "operationId": "list_root",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Directory listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_MemoryFileInfo"
                }
              }
            }
          },
          "404": {
            "description": "Memory not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/memories/{memory_id}/fs/_/download/{path}": {
      "get": {
        "tags": [
          "memory"
        ],
        "summary": "Download action",
        "description": "Download raw bytes of a Memory file.",
        "operationId": "download_action",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Raw file bytes"
          },
          "400": {
            "description": "Path is a directory",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/memories/{memory_id}/fs/_/grep": {
      "post": {
        "tags": [
          "memory"
        ],
        "summary": "Grep action",
        "description": "Search Memory files by regex.",
        "operationId": "grep_action",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Matched files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_MemoryGrepResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Memory not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/memories/{memory_id}/fs/_/stat": {
      "post": {
        "tags": [
          "memory"
        ],
        "summary": "Stat action",
        "description": "Stat a file or directory inside a Memory.",
        "operationId": "stat_action",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "File metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFileInfo"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/memories/{memory_id}/fs/{path}": {
      "get": {
        "tags": [
          "memory"
        ],
        "summary": "Get memory file",
        "description": "Read a file or list a directory inside a Memory.",
        "operationId": "get_memory_file",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File or directory path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File content or directory listing"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "memory"
        ],
        "summary": "Update file",
        "description": "Update a file's content. Directories cannot be updated.",
        "operationId": "update_file",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Target path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemoryFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Source-backed Memory is read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "memory"
        ],
        "summary": "Create file",
        "description": "Create a file or directory inside a Memory.",
        "operationId": "create_file",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Target path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMemoryFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFileInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Source-backed Memory is read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Path already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "memory"
        ],
        "summary": "Delete memory file",
        "description": "Delete a file or directory. Pass `recursive=true` to delete non-empty directories.",
        "operationId": "delete_memory_file",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Target path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "403": {
            "description": "Source-backed Memory is read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Directory not empty",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/memories/{memory_id}/sync": {
      "post": {
        "tags": [
          "memory"
        ],
        "summary": "Sync memory now",
        "description": "Trigger a synchronous sync of a memory now.",
        "operationId": "sync_memory_now",
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "description": "Memory ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Memory sync queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Memory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid sync request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Memory not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "knowledge-memory",
          "support": "preview"
        }
      }
    },
    "/v1/model-presets": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "List model presets",
        "description": "List model presets: built-in Automatic, one per connected provider, and custom presets, each with its model per job.",
        "operationId": "list_model_presets",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_ModelPreset"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "models"
        ],
        "summary": "Create a custom model preset",
        "description": "Create a custom model preset, blank or copied from another preset with `from`.",
        "operationId": "create_model_preset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelPreset"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/model-presets/{id}": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "Get a model preset",
        "description": "Get one model preset with its model per job and the jobs that use a fallback model.",
        "operationId": "get_model_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelPreset"
                }
              }
            }
          },
          "404": {
            "description": "Model preset not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "models"
        ],
        "summary": "Delete a custom model preset",
        "description": "Delete a custom model preset. Refused while agents take their models from it.",
        "operationId": "delete_model_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Model preset not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "models"
        ],
        "summary": "Update a custom model preset",
        "description": "Rename a custom model preset or change its model per job; null returns a job to the organization default.",
        "operationId": "update_model_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelPreset"
                }
              }
            }
          },
          "404": {
            "description": "Model preset not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/model-presets/{id}/apply": {
      "post": {
        "tags": [
          "models"
        ],
        "summary": "Copy a preset's models into the organization defaults",
        "description": "Copy a preset's models into the organization defaults. Jobs the preset leaves empty keep their current default.",
        "operationId": "apply_model_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplyModelPresetResult"
                }
              }
            }
          },
          "404": {
            "description": "Model preset not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/model-profiles": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "List model profiles",
        "description": "List curated and account-scoped profiles visible to the caller, optionally filtered by service or provider.",
        "operationId": "list_model_profiles",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "description": "Return only profiles for this service.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ServiceKind"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "provider_id",
            "in": "query",
            "description": "Prefixed provider account ID used to restrict available profiles.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized model profiles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_ModelProfileResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/model-profiles/{key}": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "Get model profile",
        "description": "Read a stable model profile visible to the caller. Profiles describe behavior independently from provider authentication.",
        "operationId": "get_model_profile",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Model profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelProfileResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown profile"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "List all models across all providers",
        "operationId": "list_all_models",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "description": "Filter by typed model service.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ServiceKind"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "source",
            "in": "query",
            "description": "Filter by model source (manual, discovered, predefined)",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ModelSource"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "include_stale",
            "in": "query",
            "description": "Include models that are stale (not seen in recent sync). Default: true",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "favorites_only",
            "in": "query",
            "description": "Only return favorite models. Default: false",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of all models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_ModelWithProvider"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models/config": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "Model config",
        "operationId": "model_config",
        "responses": {
          "200": {
            "description": "Resource config for LLM models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models/decision-default": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "Get default decision model",
        "description": "Get the organization decision default. An unavailable selection remains visible for repair; no selection returns null.",
        "operationId": "get_default_decision_model",
        "responses": {
          "200": {
            "description": "Selected decision model",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ModelWithProvider"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "models"
        ],
        "summary": "Set default decision model",
        "description": "Select an enabled, healthy model supporting calibrated noul, choice and score decisions. Omit model_id or set it to null to clear the default.",
        "operationId": "set_default_decision_model",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultDecisionModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Selected decision model",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ModelWithProvider"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models/default": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "Get the default model for a new draft",
        "description": "Resolve the default for empty drafts without persisting a session.",
        "operationId": "get_default_model",
        "responses": {
          "200": {
            "description": "Effective organization default, or null when unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ModelWithProvider"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models/images-default": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "Get default image model",
        "description": "Get the organization's default image model. Agents whose Image Generation capability names no model use it; no selection returns null and agents use GPT Image 2.6 Flare.",
        "operationId": "get_default_image_model",
        "responses": {
          "200": {
            "description": "Selected image model",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ModelWithProvider"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "models"
        ],
        "summary": "Set default image model",
        "description": "Select an enabled image model as the organization default. Omit model_id or set it to null to clear the default.",
        "operationId": "set_default_image_model",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultImageModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Selected image model",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ModelWithProvider"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models/selection": {
      "post": {
        "tags": [
          "models"
        ],
        "summary": "Atomically apply reviewed enablement changes",
        "description": "Atomically apply reviewed enablement changes. Rejects a model whose provider or enabled state changed while the picker was open.",
        "operationId": "apply_model_selection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyModelSelection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModelSelectionReceipt"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models/selection/undo": {
      "post": {
        "tags": [
          "models"
        ],
        "summary": "Atomically undo selected reviewed model enablement changes",
        "description": "Atomically undo selected reviewed model enablement changes. Every model must still have its expected revision.",
        "operationId": "undo_model_selection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UndoModelSelection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModelSelectionReceipt"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/models/{id}": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "Get a specific model with provider info and profile",
        "operationId": "get_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID (prefixed, e.g., mod_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Model found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_ModelWithProvider"
                }
              }
            }
          },
          "400": {
            "description": "Invalid model ID"
          },
          "404": {
            "description": "Model not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "models"
        ],
        "summary": "Delete a model",
        "operationId": "delete_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID (prefixed, e.g., mod_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Model deleted"
          },
          "400": {
            "description": "Invalid model ID"
          },
          "404": {
            "description": "Model not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "models"
        ],
        "summary": "Update a model",
        "operationId": "update_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID (prefixed, e.g., mod_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Model updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Model"
                }
              }
            }
          },
          "400": {
            "description": "Invalid model ID"
          },
          "404": {
            "description": "Model not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/monitoring": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get organization execution monitoring",
        "operationId": "get_monitoring",
        "responses": {
          "200": {
            "description": "Organization execution monitoring",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringSnapshot"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not enrolled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/monitoring/actors": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List organization session actors",
        "operationId": "list_monitoring_actors",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Zero-based offset for fixed 200-actor pages; maximum 1000000.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 0
          },
          {
            "name": "worker_id",
            "in": "query",
            "description": "Filter by a valid current lease holder, up to 256 UTF-8 bytes.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "worker-01"
          },
          {
            "name": "phase",
            "in": "query",
            "description": "Filter by runnable, model, tools, waiting, or setup execution state.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "model"
          }
        ],
        "responses": {
          "200": {
            "description": "Organization actor page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringActorPage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/monitoring/actors/{session_id}": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Inspect an organization actor and its lease history",
        "operationId": "get_monitoring_actor",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization actor diagnostics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringActorDetail"
                }
              }
            }
          },
          "404": {
            "description": "Actor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/monitoring/config": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Resolve organization monitoring read authority",
        "operationId": "monitoring_config",
        "responses": {
          "200": {
            "description": "Monitoring authorization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/monitoring/timeline": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get recorded execution history for the organization",
        "operationId": "get_monitoring_timeline",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "description": "Range ending now: 15m, 1h, 6h, 24h, 7d, or 30d. Ignored when `from` is set. Defaults to 24h.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "24h"
          },
          {
            "name": "from",
            "in": "query",
            "description": "Inclusive UTC start; use with `to` for a custom range of up to 31 days.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Exclusive UTC end; defaults to now.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "bucket",
            "in": "query",
            "description": "Bucket size in seconds: 60, 300, 900, 3600, 21600, or 86400. Chosen from the range when omitted.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 300
          }
        ],
        "responses": {
          "200": {
            "description": "Organization execution history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringTimeline"
                }
              }
            }
          },
          "400": {
            "description": "Invalid range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not enrolled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/monitoring/timeline/window": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Break down a window by agent and failure cause",
        "operationId": "get_monitoring_timeline_window",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Inclusive UTC start of the selected window.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Exclusive UTC end of the selected window; at most 7 days after `from`.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization window breakdown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringTimelineWindow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid window",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not enrolled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/notifications": {
      "get": {
        "tags": [
          "notifications"
        ],
        "summary": "List notifications for the current user",
        "operationId": "list_notifications",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items returned in this page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListNotificationsResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/notifications/{notification_id}/view": {
      "post": {
        "tags": [
          "notifications"
        ],
        "summary": "Mark a notification as viewed",
        "operationId": "mark_notification_viewed",
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            }
          },
          "404": {
            "description": "Notification not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/observers": {
      "get": {
        "tags": [
          "observers"
        ],
        "summary": "List observers",
        "operationId": "list_observers",
        "parameters": [
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived observers.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_Observer"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "observers"
        ],
        "summary": "Create an observer (online scoring)",
        "operationId": "create_observer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateObserverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Observer"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/observers/summary": {
      "get": {
        "tags": [
          "observers"
        ],
        "summary": "Live quality by agent, observer and day",
        "operationId": "get_observer_summary",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Window in days (1–90). Defaults to 7.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "description": "Only scores of this agent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "observer_id",
            "in": "query",
            "description": "Only scores of this observer.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualitySummary"
                }
              }
            }
          },
          "404": {
            "description": "Observer not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/observers/{observer_id}": {
      "get": {
        "tags": [
          "observers"
        ],
        "summary": "Get a single observer",
        "operationId": "get_observer",
        "parameters": [
          {
            "name": "observer_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Observer"
                }
              }
            }
          },
          "404": {
            "description": "Observer not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "observers"
        ],
        "summary": "Archive an observer",
        "operationId": "delete_observer",
        "parameters": [
          {
            "name": "observer_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Observer not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "observers"
        ],
        "summary": "Update an observer",
        "operationId": "update_observer",
        "parameters": [
          {
            "name": "observer_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateObserverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Observer"
                }
              }
            }
          },
          "404": {
            "description": "Observer not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/observers/{observer_id}/backfill": {
      "post": {
        "tags": [
          "observers"
        ],
        "summary": "Score past production traffic with an observer",
        "operationId": "backfill_observer",
        "parameters": [
          {
            "name": "observer_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackfillObserverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackfillResult"
                }
              }
            }
          },
          "404": {
            "description": "Observer not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/observers/{observer_id}/scores": {
      "get": {
        "tags": [
          "observers"
        ],
        "summary": "List trace scores produced by an observer",
        "operationId": "list_observer_scores",
        "parameters": [
          {
            "name": "observer_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "description": "Filter to one session.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of scores returned (default 100).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Zero-based offset into the result set.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "review_queue",
            "in": "query",
            "description": "Only completed scores nobody has reviewed yet, failures first, then a\nrandom sample of the rest (the review queue).",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_TraceScore"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/observers/{observer_id}/scores/{score_id}/review": {
      "post": {
        "tags": [
          "observers"
        ],
        "summary": "Record whether an observer's score was right",
        "operationId": "review_observer_score",
        "parameters": [
          {
            "name": "observer_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "score_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewScoreRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceScore"
                }
              }
            }
          },
          "404": {
            "description": "Observer or completed score not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "evaluation-reporting",
          "support": "preview"
        }
      }
    },
    "/v1/organization-accounts/{id}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization account name",
        "description": "Read an organization account's editable name. Credentials are never returned.",
        "operationId": "get_organization_account",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationAccountMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Rename organization account",
        "description": "Rename an organization account while preserving its current credentials.",
        "operationId": "update_organization_account_name",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationAccountNameRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationAccountMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List organizations the current user belongs to",
        "operationId": "list_organizations",
        "responses": {
          "200": {
            "description": "List of organizations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_OrganizationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Create a new organization",
        "operationId": "create_organization",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Organization created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization details",
        "operationId": "get_organization",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update organization",
        "operationId": "update_organization",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Organization updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/audit-logs": {
      "get": {
        "tags": [
          "audit_logs"
        ],
        "summary": "List audit logs for the caller's organization",
        "description": "List audit logs for the caller's organization. Supports domain, action, actor, and event-type filters.",
        "operationId": "list_audit_logs",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max entries to return (default 50, max 200).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Cursor: return entries created before this timestamp.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "description": "Filter by event type prefix (e.g. \"auth.login\") — legacy.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actor_id",
            "in": "query",
            "description": "Filter by actor UUID.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "description": "Filter by audit domain (\"management\" or \"agent\").",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "Filter by action string (e.g. \"management.member.invited\").",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_AuditLogEntry"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/decision-settings": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization decision settings",
        "description": "Read the active organization's decision-model selection without model credentials.",
        "operationId": "get_org_decision_settings",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgDecisionSettings"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/egress-allowlist": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get the organization's outbound allowlist extension",
        "description": "Get the organization's outbound allowlist extension: whether a platform administrator granted it, its host patterns, and the deployment's egress policy mode.",
        "operationId": "get_org_egress_allowlist",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgEgressAllowlistResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "Replace the organization's outbound allowlist extension",
        "description": "Replace the organization's outbound allowlist extension. Requires an organization admin and a grant from a platform administrator. Patterns must name public hosts: `example.com`, `*.example.com`, or an `https://example.com/path/` prefix.",
        "operationId": "set_org_egress_allowlist",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgEgressAllowlistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgEgressAllowlistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pattern or too many patterns"
          },
          "403": {
            "description": "Not an organization admin, or the organization is not granted"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/egress-allowlist/grant": {
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "Grant or revoke an organization's egress extension",
        "description": "Platform administrators only: allow or stop an organization extending the outbound allowlist (revoking keeps its patterns but stops enforcing them), and give or take back open egress (any public host the deny list allows, reads and writes). Omitted fields keep their value.",
        "operationId": "set_org_egress_allowlist_grant",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgEgressAllowlistGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgEgressAllowlistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Neither granted nor open given"
          },
          "403": {
            "description": "Platform user access required"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/feature-flags": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Effective flags for the organization",
        "description": "effective flags for the organization.",
        "operationId": "get_org_feature_flags",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Effective feature flags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlagMap"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update org opt-in (admin only)",
        "description": "update org opt-in (admin only).",
        "operationId": "update_org_feature_flags",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgFeatureFlagsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated effective flags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlagMap"
                }
              }
            }
          },
          "400": {
            "description": "Invalid flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/feature-flags/platform": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List every feature flag for the operator console",
        "description": "GET /v1/orgs/{org}/feature-flags/platform — every flag, including the\nplatform-managed ones, for the operator console.\n\nPlatform users only. The tenant-facing settings route deliberately omits\nthese rows, so this is where an operator sees what a tenant is enrolled in.",
        "operationId": "get_platform_feature_flag_settings",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Feature flag settings, platform view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgFeatureFlagsSettingsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Platform user access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Enrol an organization in a\nplatform-managed feature",
        "description": "Platform users may enroll internal and adoption features. Tenant admins retain\nadoption authority; production preferences and deployment availability stay\noutside this route. Omitted overrides are unchanged.",
        "operationId": "update_platform_feature_flags",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgFeatureFlagsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated effective flags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlagMap"
                }
              }
            }
          },
          "400": {
            "description": "Not a platform-managed flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Platform user access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/feature-flags/settings": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Catalog with system/org/effective state",
        "description": "catalog with system/org/effective state.",
        "operationId": "get_org_feature_flag_settings",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Feature flag settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgFeatureFlagsSettingsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/github/everruns-app": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List the org's Everruns GitHub App links",
        "description": "List the organization's links to the shared Everruns GitHub App.",
        "operationId": "list_links",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EverrunsAppLinks"
                }
              }
            }
          },
          "403": {
            "description": "Admin access required"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/github/everruns-app/authorize": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Link an Everruns GitHub App installation",
        "description": "Start linking a shared Everruns GitHub App installation to the organization.",
        "operationId": "authorize_link",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "return_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "popup",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Redirect to GitHub"
          },
          "403": {
            "description": "Admin access required"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/github/everruns-app/{connection_id}": {
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Unlink an Everruns GitHub App installation",
        "description": "Unlink a shared Everruns GitHub App installation and remove every agent's choice of it.",
        "operationId": "unlink",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Unlinked"
          },
          "403": {
            "description": "Admin access required"
          },
          "404": {
            "description": "Link not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/onboarding/complete": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Mark the org's onboarding wizard as\nfinished (or skipped)",
        "description": "Authz mirrors the org-scoped mutations above (admin+), but resolves\nmembership/role from the DB rather than the auth token — a brand-new org may\nnot yet appear in the caller's token, and onboarding completion is exactly\nthat just-created case.",
        "operationId": "complete_org_onboarding",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization public ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Onboarding marked complete",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not an admin of the organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/organization-connections": {
      "get": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "List connections",
        "description": "List non-secret metadata for organization-owned provider accounts: sandbox provider accounts and web search accounts.",
        "operationId": "list_connections",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationConnectionResponse"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/organization-connections/providers/{provider}": {
      "post": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Create connection",
        "description": "Create and validate an encrypted organization-owned account for a connector that declares sandbox_provisioning or web_search.",
        "operationId": "create_connection",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveOrganizationConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationConnectionResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/organization-connections/{connection_id}": {
      "put": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Update connection",
        "description": "Replace the name and credential for an organization-owned provider account.",
        "operationId": "update_connection",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveOrganizationConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationConnectionResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Delete connection",
        "description": "Delete an organization-owned provider account when no active sandbox configuration or lease references it.",
        "operationId": "delete_connection",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {}
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Rename connection",
        "description": "Rename an organization account without replacing credentials.",
        "operationId": "rename_connection",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameOrganizationConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationConnectionResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/organization-connections/{connection_id}/verify": {
      "post": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Verify connection",
        "description": "Revalidate an organization-owned provider credential without returning the secret.",
        "operationId": "verify_connection",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyConnectionResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/quality-monitoring": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get compaction monitoring",
        "description": "Read organization compaction monitoring policy, coverage and budget reservations.",
        "operationId": "get_org_quality_monitoring",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityMonitoringReport"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/quality-monitoring/scores": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List compaction findings",
        "description": "Read the newest fifty compaction monitoring findings with source trace references.",
        "operationId": "list_org_quality_monitoring_scores",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TraceScore"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/orgs/{org}/quality-monitoring/scores/{score}/review": {
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "Review a compaction finding",
        "description": "Record a person's agreement with a compaction assessment, without starting model work.",
        "operationId": "review_org_quality_monitoring_score",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "score",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TraceScore"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/payments/accounts": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "List payment accounts",
        "description": "List payment accounts.",
        "operationId": "list_payment_accounts",
        "parameters": [
          {
            "name": "owner_type",
            "in": "query",
            "description": "Filter to a single owner class (user, virtual user, or organization).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "description": "Filter to a specific owner principal id.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List payment accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentAccount"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      },
      "post": {
        "tags": [
          "payments"
        ],
        "summary": "Create payment account",
        "description": "Create a new payment account.",
        "operationId": "create_payment_account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Payment account created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAccount"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      }
    },
    "/v1/payments/accounts/{payment_account_id}": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "Get payment account",
        "description": "Get a payment account by ID.",
        "operationId": "get_payment_account",
        "parameters": [
          {
            "name": "payment_account_id",
            "in": "path",
            "description": "Payment account ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAccount"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      },
      "delete": {
        "tags": [
          "payments"
        ],
        "summary": "Disable payment account",
        "description": "Disable a payment account without deleting it.",
        "operationId": "disable_payment_account",
        "parameters": [
          {
            "name": "payment_account_id",
            "in": "path",
            "description": "Payment account ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Payment account disabled"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      },
      "patch": {
        "tags": [
          "payments"
        ],
        "summary": "Update payment account",
        "description": "Update a payment account. Only provided fields are modified.",
        "operationId": "update_payment_account",
        "parameters": [
          {
            "name": "payment_account_id",
            "in": "path",
            "description": "Payment account ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePaymentAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment account updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentAccount"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      }
    },
    "/v1/payments/attempts": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "List payment attempts",
        "description": "List recent payment attempts (operator audit view).",
        "operationId": "list_payment_attempts",
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "description": "Filter to attempts originating from a specific session.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of attempts returned. Defaults to 50.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List payment attempts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentAttempt"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      }
    },
    "/v1/payments/policies": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "List payment policies",
        "description": "List payment policies.",
        "operationId": "list_payment_policies",
        "parameters": [
          {
            "name": "payment_account_id",
            "in": "query",
            "description": "Filter to policies that authorize a specific payment account.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "subject_type",
            "in": "query",
            "description": "Filter to a single subject class.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "subject_id",
            "in": "query",
            "description": "Filter to a specific subject principal id.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List payment policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentPolicy"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      },
      "post": {
        "tags": [
          "payments"
        ],
        "summary": "Create payment policy",
        "description": "Create a new payment policy.",
        "operationId": "create_payment_policy",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Payment policy created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentPolicy"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      }
    },
    "/v1/payments/policies/{payment_policy_id}": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "Get payment policy",
        "description": "Get a payment policy by ID.",
        "operationId": "get_payment_policy",
        "parameters": [
          {
            "name": "payment_policy_id",
            "in": "path",
            "description": "Payment policy ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentPolicy"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      },
      "delete": {
        "tags": [
          "payments"
        ],
        "summary": "Disable payment policy",
        "description": "Disable a payment policy without deleting it.",
        "operationId": "disable_payment_policy",
        "parameters": [
          {
            "name": "payment_policy_id",
            "in": "path",
            "description": "Payment policy ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Payment policy disabled"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      },
      "patch": {
        "tags": [
          "payments"
        ],
        "summary": "Update payment policy",
        "description": "Update a payment policy. Only provided fields are modified.",
        "operationId": "update_payment_policy",
        "parameters": [
          {
            "name": "payment_policy_id",
            "in": "path",
            "description": "Payment policy ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePaymentPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment policy updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentPolicy"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires machine_payments; disabled by default",
          "group": "operations-billing",
          "support": "experimental"
        }
      }
    },
    "/v1/plugin_marketplaces": {
      "get": {
        "tags": [
          "plugins"
        ],
        "summary": "List plugin marketplaces",
        "operationId": "list_plugin_marketplaces",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name (case-insensitive substring match).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of plugin marketplaces"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "plugins"
        ],
        "summary": "Create plugin marketplace",
        "operationId": "create_plugin_marketplace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePluginMarketplaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Marketplace created"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/plugin_marketplaces/{id}": {
      "get": {
        "tags": [
          "plugins"
        ],
        "summary": "Get plugin marketplace",
        "operationId": "get_plugin_marketplace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Marketplace ID (plgmkt_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Marketplace found"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "plugins"
        ],
        "summary": "Delete plugin marketplace",
        "operationId": "delete_plugin_marketplace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Marketplace ID (plgmkt_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Marketplace deleted"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "plugins"
        ],
        "summary": "Update plugin marketplace",
        "operationId": "update_plugin_marketplace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Marketplace ID (plgmkt_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePluginMarketplaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Marketplace updated"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/plugin_marketplaces/{id}/plugins": {
      "get": {
        "tags": [
          "plugins"
        ],
        "summary": "Get marketplace catalog",
        "operationId": "get_marketplace_catalog",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Marketplace ID (plgmkt_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog entries"
          },
          "400": {
            "description": "Marketplace not yet synced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/plugin_marketplaces/{id}/sync": {
      "post": {
        "tags": [
          "plugins"
        ],
        "summary": "Sync plugin marketplace",
        "operationId": "sync_plugin_marketplace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Marketplace ID (plgmkt_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Marketplace synced"
          },
          "400": {
            "description": "Sync not supported or source error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/plugins": {
      "get": {
        "tags": [
          "plugins"
        ],
        "summary": "List plugins",
        "operationId": "list_plugins",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name (case-insensitive substring match).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of installed plugins"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "plugins"
        ],
        "summary": "Install plugin",
        "operationId": "install_plugin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstallPluginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Plugin installed"
          },
          "400": {
            "description": "Compilation or source error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Plugin already installed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/plugins/{id}": {
      "get": {
        "tags": [
          "plugins"
        ],
        "summary": "Get plugin",
        "operationId": "get_plugin",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Plugin install ID (plugin_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Installed plugin"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "plugins"
        ],
        "summary": "Uninstall plugin",
        "operationId": "uninstall_plugin",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Plugin install ID (plugin_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Plugin uninstalled"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "plugins"
        ],
        "summary": "Patch installed plugin",
        "operationId": "patch_installed_plugin",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Plugin install ID (plugin_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInstalledPluginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Plugin updated"
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/plugins/{id}/update": {
      "post": {
        "tags": [
          "plugins"
        ],
        "summary": "Update plugin",
        "operationId": "update_plugin",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Plugin install ID (plugin_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Plugin updated"
          },
          "400": {
            "description": "No marketplace or source error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers": {
      "get": {
        "tags": [
          "providers"
        ],
        "summary": "List all LLM providers",
        "operationId": "list_providers",
        "responses": {
          "200": {
            "description": "List of providers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_Provider"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "providers"
        ],
        "summary": "Create a new LLM provider",
        "operationId": "create_provider",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Provider created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Provider"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "500": {
            "description": "Internal error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/check-credentials": {
      "post": {
        "tags": [
          "providers"
        ],
        "summary": "Check a provider API key without storing it",
        "description": "Check whether a provider accepts an API key, without storing it\n\nUsed by org setup so a key the provider will reject is caught at entry\ninstead of at the first agent run. Nothing is persisted.",
        "operationId": "check_credentials",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckCredentialsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Check completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialCheckResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "500": {
            "description": "Internal error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/config": {
      "get": {
        "tags": [
          "providers"
        ],
        "summary": "Provider config",
        "operationId": "provider_config",
        "responses": {
          "200": {
            "description": "Resource config for providers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvidersConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/{id}": {
      "get": {
        "tags": [
          "providers"
        ],
        "summary": "Get a specific LLM provider",
        "operationId": "get_provider",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Provider ID (prefixed, e.g., prov_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provider found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Provider"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider ID"
          },
          "404": {
            "description": "Provider not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "providers"
        ],
        "summary": "Delete an LLM provider",
        "operationId": "delete_provider",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Provider ID (prefixed, e.g., prov_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Provider deleted"
          },
          "400": {
            "description": "Invalid provider ID"
          },
          "404": {
            "description": "Provider not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "providers"
        ],
        "summary": "Update an LLM provider",
        "operationId": "update_provider",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Provider ID (prefixed, e.g., prov_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provider updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Provider"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider ID"
          },
          "404": {
            "description": "Provider not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/{id}/models/review": {
      "post": {
        "tags": [
          "providers"
        ],
        "summary": "Mark a provider's discovered models as reviewed",
        "description": "Clears the `is_new` flag on the provider's discovered models: only models\ndiscovered after this call, and still disabled, read back as new.",
        "operationId": "review_models",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Provider ID (prefixed, e.g., prov_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provider with its review time updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider ID"
          },
          "403": {
            "description": "Caller cannot manage providers"
          },
          "404": {
            "description": "Provider not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/{id}/sync-models": {
      "post": {
        "tags": [
          "providers"
        ],
        "summary": "Sync models from an LLM provider",
        "description": "Fetches the list of available models from the provider's API and updates\nthe database. Only works for providers with standard base URLs (not custom).",
        "operationId": "sync_models",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Provider ID (prefixed, e.g., prov_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Models synced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncModelsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider ID"
          },
          "404": {
            "description": "Provider not found"
          },
          "422": {
            "description": "Provider rejected or could not serve the model list (code `provider_sync_failed`)"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/{provider_id}/chatgpt": {
      "get": {
        "tags": [
          "providers"
        ],
        "summary": "Read the owner's personal ChatGPT connection",
        "description": "Returns connection state and non-secret installation metadata. Another user's\nprovider is hidden even from organization administrators.",
        "operationId": "status",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "Personal provider ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Personal connection status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionStatus"
                }
              }
            }
          },
          "400": {
            "description": "Invalid connection request"
          },
          "404": {
            "description": "Provider not found or owned by another user"
          },
          "502": {
            "description": "Provider exchange or revocation failed"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "providers"
        ],
        "summary": "Disconnect the owner's ChatGPT account",
        "description": "Cancels pending sign-in and revokes a stored grant before clearing credentials.\nA failed revocation retains credentials so the owner can retry.",
        "operationId": "disconnect",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "Personal provider ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Personal connection disconnect",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid connection request"
          },
          "404": {
            "description": "Provider not found or owned by another user"
          },
          "502": {
            "description": "Provider exchange or revocation failed"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/{provider_id}/chatgpt/import": {
      "post": {
        "tags": [
          "providers"
        ],
        "summary": "Import a private login-helper document",
        "description": "Verifies installation, signed identity, nonce, issuing client, and account binding\nbefore persisting credentials. Only the provider's owner may import the document.",
        "operationId": "import",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "Personal provider ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportedConnection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Personal connection import",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid connection request"
          },
          "404": {
            "description": "Provider not found or owned by another user"
          },
          "502": {
            "description": "Provider exchange or revocation failed"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/{provider_id}/chatgpt/login": {
      "post": {
        "tags": [
          "providers"
        ],
        "summary": "Start a personal ChatGPT sign-in",
        "description": "Creates a bounded loopback callback listener and returns the authorization URL.\nRequires deployment enablement, organization opt-in, encryption, and exact ownership.",
        "operationId": "login",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "Personal provider ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Personal connection login",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid connection request"
          },
          "404": {
            "description": "Provider not found or owned by another user"
          },
          "502": {
            "description": "Provider exchange or revocation failed"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/providers/{provider_id}/models": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "List models for a specific provider",
        "operationId": "list_provider_models",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "Provider ID (prefixed, e.g., prov_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_Model"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider ID"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "models"
        ],
        "summary": "Create a new model for a provider",
        "operationId": "create_model",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "Provider ID (prefixed, e.g., prov_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Model created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Model"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider ID"
          },
          "404": {
            "description": "Provider not found"
          },
          "500": {
            "description": "Internal error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/resolve-org": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "Resolve the owning org for a resource id",
        "description": "Returns the owning organization only when it is one the authenticated\ncaller already belongs to. For every other case (unknown id, unknown\nprefix, resource belongs to a non-member org) the endpoint returns 404 —\nthis preserves the org-enumeration guarantee: callers cannot use this\nendpoint to probe for the existence of resources outside their own orgs.",
        "operationId": "resolve_org",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Prefixed public ID of the resource",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owning org resolved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveOrgResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Unknown id, unknown prefix, or caller is not a member of the owning org"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/resources/{id}/grants": {
      "get": {
        "tags": [
          "credentials"
        ],
        "summary": "Grants",
        "operationId": "grants",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Explicit access grants",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManagedResourceGrant"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "credentials"
        ],
        "summary": "Grant",
        "operationId": "grant",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantCredential"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Access granted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedResource"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/resources/{id}/grants/{grant_id}": {
      "delete": {
        "tags": [
          "credentials"
        ],
        "summary": "Revoke grant",
        "operationId": "revoke_grant",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Resource ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grant_id",
            "in": "path",
            "description": "Grant ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Grant revoked"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/rooms": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "List the org's rooms, most recently active first",
        "operationId": "list_rooms",
        "parameters": [
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived rooms.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "mine",
            "in": "query",
            "description": "Only rooms the caller is a member of.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "external_ref",
            "in": "query",
            "description": "The room with this external_ref.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Create a room where people and agents talk",
        "description": "Create a room where people and agents talk. The caller becomes its first owner; members can be added in the same call.",
        "operationId": "create_room",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Room"
                }
              }
            }
          },
          "409": {
            "description": "external_ref is already used by another room"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/events": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Read the change feed of every room in the org, in order",
        "description": "Read the change feed of every room in the org, in order. Poll with after=next_after.",
        "operationId": "list_org_room_events",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "description": "Read events after this position (`next_after` of the last page).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomEventListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Get a room",
        "operationId": "get_room",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Room"
                }
              }
            }
          },
          "404": {
            "description": "Room not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "rooms"
        ],
        "summary": "Change a room's name, topic or settings",
        "description": "Change a room's name, topic, metadata, link template or loop limits. Owners and org admins only.",
        "operationId": "update_room",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Room"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/archive": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Archive a room (or bring it back with archived=false)",
        "description": "Archive a room (or bring it back with archived=false). An archived room keeps everything but takes no posts and wakes no agents.",
        "operationId": "archive_room",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Room"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/events": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Read a room's change feed",
        "description": "Read a room's change feed in order. It covers posts, edits, reactions, members and agent wakes; poll with after=next_after.",
        "operationId": "list_room_events",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Read events after this position (`next_after` of the last page).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomEventListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/files": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "List a room's shared files",
        "description": "List the files in a room's shared folder, with each file's current version and who made it.",
        "operationId": "list_room_files",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "description": "Only files under this folder, such as `/plans`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "rooms"
        ],
        "summary": "Write a room file",
        "description": "Create a file in a room's shared folder, or replace its whole content. The earlier version is kept.",
        "operationId": "write_room_file",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileVersion"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "rooms"
        ],
        "summary": "Delete a room file",
        "description": "Delete a file from a room's shared folder. Its versions stay: it can be read at an earlier version or restored.",
        "operationId": "delete_room_file",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "The file to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "if_version",
            "in": "query",
            "description": "The version you read; the delete fails when the file changed since.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "as_member",
            "in": "query",
            "description": "Delete as this member (org admins).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileVersion"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/files/content": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Read a room file",
        "description": "Read a file in a room's shared folder, as it is now or at an earlier version.",
        "operationId": "read_room_file",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "The file, such as `/plans/launch.md`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "An earlier version to read; the current one when absent. Works for a\ndeleted file too.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileContent"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/files/edit": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Edit part of a room file",
        "description": "Change part of a text file in a room's shared folder by replacing exact text, without rewriting the rest. Fails, and changes nothing, when the file changed under you.",
        "operationId": "edit_room_file",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileVersion"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/files/history": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Read a room file's history",
        "description": "List every version of a room file, newest first: who changed it, how, and when. Follows the file across moves.",
        "operationId": "list_room_file_history",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "The file, as it is now or was when deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileHistoryResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/files/move": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Move or rename a room file",
        "description": "Move or rename a file in a room's shared folder. The file keeps its history.",
        "operationId": "move_room_file",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileVersion"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/files/restore": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Restore an earlier version of a room file",
        "description": "Bring back an earlier version of a room file, also after it was deleted. The restore is a new version, so nothing is lost.",
        "operationId": "restore_room_file",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFileVersion"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/members": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "List a room's members",
        "operationId": "list_room_members",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_left",
            "in": "query",
            "description": "Include members who left.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMemberListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Add a member to a room",
        "description": "Add a person, an Everruns agent, an outside agent or a guest to a room. Owners and org admins only.",
        "operationId": "add_room_member",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMember"
                }
              }
            }
          },
          "409": {
            "description": "Handle taken, or already a member"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/members/{member_id}": {
      "delete": {
        "tags": [
          "rooms"
        ],
        "summary": "Remove a member from a room",
        "description": "Remove a member from a room. Their messages stay. Owners and org admins can remove anyone; a person can leave on their own.",
        "operationId": "remove_room_member",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMember"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "rooms"
        ],
        "summary": "Change a room member's settings",
        "description": "Change a room member's settings. Name, role, wake setting, session scope or instructions; owners and org admins only.",
        "operationId": "update_room_member",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMember"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/messages": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Read a room's top-level messages, oldest first",
        "description": "Read a room's top-level messages, oldest first. Without a position, the newest page.",
        "operationId": "list_room_messages",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Messages before this time (page backwards).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Messages after this time (read forward).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessageListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Post a message in a room, at the top level or as a reply",
        "description": "Post a message in a room, at the top level or as a reply. Returns the message and the agents it woke.",
        "operationId": "post_room_message",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostRoomMessageResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/messages/{message_id}": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Get one message",
        "operationId": "get_room_message",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "rooms"
        ],
        "summary": "Delete a message",
        "description": "Delete a message. Its author, or a room owner. A marker stays in its place and replies stay.",
        "operationId": "delete_room_message",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "as_member",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "rooms"
        ],
        "summary": "Change a message's text",
        "description": "Change a message's text. Its author, or a room owner. Editing never wakes agents again.",
        "operationId": "edit_room_message",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/messages/{message_id}/pin": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Pin a message to the room, or unpin it with pinned=false",
        "description": "Pin a message to the room, or unpin it with pinned=false. Any member can pin.",
        "operationId": "pin_room_message",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/messages/{message_id}/reactions": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Add a reaction to a message, or remove it with add=false",
        "description": "Add a reaction to a message, or remove it with add=false. Reactions never wake agents.",
        "operationId": "react_to_room_message",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/messages/{message_id}/readers": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Who has read a message, and who has not",
        "operationId": "list_room_message_readers",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomReadersResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/messages/{message_id}/replies": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Read the replies in a message's thread, oldest first",
        "operationId": "list_room_replies",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessageListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/pins": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "List a room's pinned messages, most recently pinned first",
        "operationId": "list_room_pins",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessageListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/read": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Mark a room's top level, or a thread, read up to a message",
        "description": "Mark a room's top level, or a thread, read up to a message. Marks only move forward.",
        "operationId": "mark_room_read",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomReadMark"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/search": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Find messages in a room by text, newest first",
        "operationId": "search_room_messages",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Text to find, case-insensitive.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomMessageListResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/rooms/{room_id}/unread": {
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Read and mark a room's unread messages",
        "description": "Read what the caller has not read yet, and mark it read. Returns new top-level messages and new replies in threads they are in, with each thread's root for context.",
        "operationId": "read_room_unread",
        "parameters": [
          {
            "name": "room_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomUnreadResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-targets": {
      "get": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "List sandbox targets",
        "description": "List the Sandbox targets this deployment can offer, with the capabilities each one actually has.",
        "operationId": "list_sandbox_targets",
        "responses": {
          "200": {
            "description": "Available Sandbox targets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTargetsResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-template-builds/{id}": {
      "get": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Get Sandbox Template build",
        "description": "Inspect a build attempt in the authenticated organization.",
        "operationId": "get_sandbox_template_build",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplateBuild"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-template-builds/{id}/apply": {
      "post": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Save built snapshot as new revision",
        "description": "Atomically apply a ready snapshot to its unchanged source template. Existing Agent and Session pins do not move.",
        "operationId": "apply_sandbox_template_build",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplate"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-template-builds/{id}/cancel": {
      "post": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Cancel Sandbox Template build",
        "description": "Cancel queued or running build work and clean up its disposable resources.",
        "operationId": "cancel_sandbox_template_build",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplateBuild"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-template-builds/{id}/discard": {
      "post": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Discard unused build artifact",
        "description": "Remove an unused build artifact. Applied artifacts remain pinned and cannot be discarded.",
        "operationId": "discard_sandbox_template_build",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplateBuild"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-template-metadata/{id}": {
      "get": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Get sandbox template metadata",
        "description": "Read editable Sandbox Template metadata, excluding execution configuration and environment values.",
        "operationId": "get_sandbox_template_metadata",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Update sandbox template metadata",
        "description": "Update Sandbox Template metadata while preserving its current execution specification.",
        "operationId": "update_sandbox_template_metadata",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxTemplateMetadataRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-templates": {
      "get": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "List sandbox templates",
        "description": "List active reusable Sandbox Templates available to the organization.",
        "operationId": "list_sandbox_templates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SandboxTemplate"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Create sandbox template",
        "description": "Create a reusable Sandbox Template and its first immutable revision.",
        "operationId": "create_sandbox_template",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSandboxTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplate"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-templates/{id}/builds": {
      "get": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "List Sandbox Template builds",
        "description": "List twenty build attempts at an optional offset, bounded logs, and captured software notes.",
        "operationId": "list_sandbox_template_builds",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SandboxTemplateBuild"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Build a Sandbox Template snapshot",
        "description": "Run an install script in fresh isolated compute and bake a reusable provider snapshot. Does not revise the template.",
        "operationId": "start_sandbox_template_build",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxBuildRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplateBuild"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandbox-templates/{sandbox_template_id}": {
      "get": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Get sandbox template",
        "description": "Get one reusable Sandbox Template and its current immutable revision.",
        "operationId": "get_sandbox_template",
        "parameters": [
          {
            "name": "sandbox_template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplate"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Revise sandbox template",
        "description": "Create the next immutable revision of a reusable Sandbox Template.",
        "operationId": "revise_sandbox_template",
        "parameters": [
          {
            "name": "sandbox_template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviseSandboxTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTemplate"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "sandbox-templates"
        ],
        "summary": "Archive sandbox template",
        "description": "Archive a user-managed Sandbox Template without changing pinned Sessions.",
        "operationId": "archive_sandbox_template",
        "parameters": [
          {
            "name": "sandbox_template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandboxes": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "List the organization's Sandboxes across providers",
        "description": "List the organization's Sandboxes across providers: running, paused, lost and deleted, with filters.",
        "operationId": "list_sandboxes",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "Comma-separated states: `running`, `paused`, `lost`, `starting`,\n`failed`, `not_started`, `deleted`, or `live` for the first five.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "description": "Comma-separated provider ids, such as `daytona,modal`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "description": "Only Sandboxes of Sessions that ran this Agent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sandbox_template_id",
            "in": "query",
            "description": "Only Sandboxes created from this Sandbox Template.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needs_attention",
            "in": "query",
            "description": "Only Sandboxes with at least one attention reason.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Case-insensitive match on Session title, Agent, provider or provider resource id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_in_process",
            "in": "query",
            "description": "Include in-process targets (virtual filesystem, host), which have no provider resource.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 1 to 200. Defaults to 50.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Rows to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxFleetPage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandboxes/stats": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "Summarize the organization's Sandboxes",
        "description": "Summarize the organization's Sandboxes: counts by state and provider, recent creations, running time, recoveries and how many need attention.",
        "operationId": "get_sandbox_fleet_stats",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "Comma-separated states: `running`, `paused`, `lost`, `starting`,\n`failed`, `not_started`, `deleted`, or `live` for the first five.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "description": "Comma-separated provider ids, such as `daytona,modal`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "description": "Only Sandboxes of Sessions that ran this Agent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sandbox_template_id",
            "in": "query",
            "description": "Only Sandboxes created from this Sandbox Template.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needs_attention",
            "in": "query",
            "description": "Only Sandboxes with at least one attention reason.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Case-insensitive match on Session title, Agent, provider or provider resource id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_in_process",
            "in": "query",
            "description": "Include in-process targets (virtual filesystem, host), which have no provider resource.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxFleetStats"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandboxes/timeline": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "Show Sandbox activity over a time window",
        "description": "Show when each Sandbox was running, paused or lost over a time window, with how many ran at once.",
        "operationId": "get_sandbox_timeline",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "Comma-separated states: `running`, `paused`, `lost`, `starting`,\n`failed`, `not_started`, `deleted`, or `live` for the first five.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "description": "Comma-separated provider ids, such as `daytona,modal`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "description": "Only Sandboxes of Sessions that ran this Agent.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sandbox_template_id",
            "in": "query",
            "description": "Only Sandboxes created from this Sandbox Template.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needs_attention",
            "in": "query",
            "description": "Only Sandboxes with at least one attention reason.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Case-insensitive match on Session title, Agent, provider or provider resource id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_in_process",
            "in": "query",
            "description": "Include in-process targets (virtual filesystem, host), which have no provider resource.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start (RFC 3339). Defaults to 24 hours before `to`.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end (RFC 3339). Defaults to now.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Lanes to return, 1 to 200. Defaults to 50.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxTimeline"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandboxes/{id}": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "Get a Sandbox with its resources and state history",
        "description": "Get one Sandbox with its provider resources, full state history and pinned lifecycle policy with its deadlines.",
        "operationId": "get_sandbox",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxFleetDetail"
                }
              }
            }
          },
          "404": {
            "description": "Sandbox not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandboxes/{id}/diagnosis": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "Explain why a Sandbox is in its state",
        "description": "Explain why a Sandbox is in its state: its record against what the provider reports, the pinned lifecycle policy and its deadlines, whether its session is running or stuck in a turn, the latest lifecycle decisions and failures, as findings with what to do. Deterministic. The provider is asked only for organization admins.",
        "operationId": "diagnose_sandbox",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxDiagnosis"
                }
              }
            }
          },
          "404": {
            "description": "Sandbox not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandboxes/{id}/events": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "List the decisions behind a Sandbox's states",
        "description": "List why a Sandbox changed state, or did not: each pause, resume and delete by the idle timer, idle sweep, retention sweep or a person, each decision to skip, and each failure, beside the state history.",
        "operationId": "list_sandbox_events",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start (RFC 3339). Defaults to the Sandbox's creation.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end (RFC 3339). Defaults to now.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Most events, 1 to 500 (the newest when there are more). Defaults to 200.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxEventList"
                }
              }
            }
          },
          "404": {
            "description": "Sandbox not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sandboxes/{id}/provider": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "Ask the provider about a Sandbox now",
        "description": "Ask the Sandbox's provider (Daytona, E2B, Modal, boxd, Kubernetes) what it reports now: its state, errors, last activity and its own idle stop and delete settings. Read-only; organization admins only. Secrets in the provider's record are never returned.",
        "operationId": "get_sandbox_provider_state",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderSandboxState"
                }
              }
            }
          },
          "404": {
            "description": "Sandbox not found"
          },
          "503": {
            "description": "The provider could not be asked"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/search-providers": {
      "get": {
        "tags": [
          "web-search"
        ],
        "summary": "List search providers",
        "description": "List the web search providers of the active organization: built-in free and model provider search, connected model providers that search natively, connectors that hold search accounts, connected search accounts with status, and the organization's web search defaults.",
        "operationId": "list_search_providers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchProviderCatalog"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/search-providers/preview": {
      "post": {
        "tags": [
          "web-search"
        ],
        "summary": "Preview search plan",
        "description": "Resolve an agent's web search setting and model to the ordered plan its searches follow, with the organization's current defaults. Optionally run a test query against one provider (`free` or `account:<id>`; organization admins only).",
        "operationId": "preview_search_plan",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchPlanPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchPlanPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid config, unknown model, or unknown test provider",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Test queries need an organization admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "models-integrations",
          "support": "preview"
        }
      }
    },
    "/v1/sessions": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "List sessions in organization",
        "operationId": "list_platform_sessions",
        "parameters": [
          {
            "name": "side_chats_only",
            "in": "query",
            "description": "Exclude the permanent Chat from side-conversation pages.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "playground_user_id",
            "in": "query",
            "description": "Filter by the fixed Playground end-user identity.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "archived_only",
            "in": "query",
            "description": "Return only archived sessions.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "description": "Filter sessions by agent ID.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "example": "agent_01933b5a00007000800000000000001"
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by title (case-insensitive substring match) or exact public session ID.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "source",
            "in": "query",
            "description": "Comma-separated session sources: `chat`, `api`, `slack`, `ag_ui`,\n`fcp`, `schedule`, `webhook`, `a2a`, `eval`, `subagent`, `unknown`.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "example": "chat"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Comma-separated derived statuses: `running`, `paused`, `failed`,\n`completed`, `idle`.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "example": "running,failed"
          },
          {
            "name": "mine",
            "in": "query",
            "description": "Restrict to sessions owned by the calling user.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "example": true
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived sessions. Defaults to false.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "example": true
          },
          {
            "name": "created_after",
            "in": "query",
            "description": "Inclusive lower bound on creation time (RFC 3339).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "example": "2026-08-01T00:00:00Z"
          },
          {
            "name": "created_before",
            "in": "query",
            "description": "Exclusive upper bound on creation time (RFC 3339).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "example": "2026-08-09T00:00:00Z"
          },
          {
            "name": "order",
            "in": "query",
            "description": "`created_at` (default) or `last_activity`.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "example": "last_activity"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of items to skip (for pagination).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return (for pagination).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of sessions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_WithUrls_Session"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Create a new session",
        "operationId": "create_session",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSessionRequest"
              },
              "example": {
                "harness_name": "generic",
                "tags": [
                  "debugging",
                  "urgent"
                ],
                "title": "Debug login issue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Session created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Session"
                },
                "example": {
                  "created_at": "2026-05-27T15:24:00Z",
                  "harness_id": "harness_01933b5a00007000800000000000001",
                  "id": "session_01933b5a00007000800000000000001",
                  "organization_id": "org_00000000000000000000000000000001",
                  "owner_principal_id": "principal_01933b5a000070008000000000000001",
                  "self_url": "https://app.everruns.com/api/v1/sessions/session_01933b5a00007000800000000000001",
                  "status": "started",
                  "tags": [
                    "debugging",
                    "urgent"
                  ],
                  "title": "Debug login issue",
                  "ui_link": "https://app.everruns.com/sessions/session_01933b5a00007000800000000000001/chat",
                  "updated_at": "2026-05-27T15:24:00Z",
                  "view_url": "https://app.everruns.com/sessions/session_01933b5a00007000800000000000001/chat"
                }
              }
            }
          },
          "404": {
            "description": "Harness, Agent, or Model not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "code": "harness_not_found",
                  "detail": "Harness 'generic' not found in org org_00000000000000000000000000000001.",
                  "status": 404,
                  "title": "Not Found",
                  "type": "https://everruns.com/docs/errors/harness_not_found"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/facets": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Facet counts and masthead metrics",
        "operationId": "get_session_facets",
        "parameters": [
          {
            "name": "side_chats_only",
            "in": "query",
            "description": "Exclude the permanent Chat from side-conversation pages.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "playground_user_id",
            "in": "query",
            "description": "Filter by the fixed Playground end-user identity.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "archived_only",
            "in": "query",
            "description": "Return only archived sessions.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "agent_01933b5a00007000800000000000001"
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by title (case-insensitive substring match) or exact public session ID.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mine",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Facet counts over the applied filters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFacetsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unknown filter value"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/platform-chat": {
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Open the current user's platform conversation",
        "description": "Open the current user's permanent platform conversation, creating it only when absent.",
        "operationId": "ensure_platform_chat",
        "responses": {
          "200": {
            "description": "Permanent platform conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Session"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/stats": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Get session counts by status",
        "operationId": "get_session_stats",
        "responses": {
          "200": {
            "description": "Session statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionStatsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Get session",
        "operationId": "get_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Session"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "sessions"
        ],
        "summary": "Delete session",
        "operationId": "delete_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session deleted successfully"
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        },
        "x-side-effect": "reversible"
      },
      "patch": {
        "tags": [
          "sessions"
        ],
        "summary": "Update session",
        "operationId": "update_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Session updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Session"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/agent-view": {
      "get": {
        "tags": [
          "agent_views"
        ],
        "summary": "Read a published view from Platform Chat",
        "description": "Read the published Agent view for a visible session or an authorized Agent reference.",
        "operationId": "get_session_agent_view",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "view_agent",
            "in": "query",
            "description": "An explicit Agent view opened in Platform Chat.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/agentId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PublishedAgentView"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "agent_views"
        ],
        "summary": "Save a private layout for your view of this Agent",
        "operationId": "set_session_agent_view_preference",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "view_agent",
            "in": "query",
            "description": "An explicit Agent view opened in Platform Chat.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/agentId"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentViewPreference"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PublishedAgentView"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Requires organization adoption of the agent_views feature flag",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/approval-mode": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Get a session's tool approval mode",
        "operationId": "get_session_approval_mode",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionApprovalMode"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "sessions"
        ],
        "summary": "Set or clear a session's tool approval mode",
        "operationId": "set_session_approval_mode",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionApprovalMode"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/archive": {
      "put": {
        "tags": [
          "sessions"
        ],
        "summary": "Archive session",
        "operationId": "archive_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session archived successfully"
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "sessions"
        ],
        "summary": "Restore an archived session",
        "operationId": "unarchive_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session unarchived successfully"
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/budget-check": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "Check all budgets for a session",
        "operationId": "check_session_budgets",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetCheckResult"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/budgets": {
      "get": {
        "tags": [
          "budgets"
        ],
        "summary": "List all budgets for a session",
        "operationId": "list_session_budgets",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WithUrls_Budget"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/cancel": {
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Cancel current turn",
        "description": "Cancels the currently running turn in the session. If no turn is running,\nthis is a no-op and returns success (idempotent). When a turn is active:\nCancellation targets the current turn, not later input. A live lease holder\nrecords the terminal events after observing the request; if no holder is\nrunning the turn, the control plane records cancellation and idles the session.\nCancellation cannot undo external effects that already happened.",
        "operationId": "cancel_turn",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Turn cancelled, or no-op (status: no_op) if no turn was running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelTurnResponse"
                },
                "example": {
                  "message": "Turn cancelled successfully",
                  "status": "cancelled"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "code": "session_not_found",
                  "detail": "Session session_01933b5a000070008000000000000001 not found in org org_00000000000000000000000000000001.",
                  "status": 404,
                  "title": "Not Found",
                  "type": "https://everruns.com/docs/errors/session_not_found"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/context-report": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Latest context breakdown",
        "operationId": "get_session_context_report",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session context report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionContextReport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/cost": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Show what a session spent",
        "description": "Show what a session spent: totals by cost category (uncached prompt, cache read, cache write, output), spend per hour and per turn, what started the turns, tool calls, and sandbox running time.",
        "operationId": "get_session_cost",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionCost"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/databases": {
      "get": {
        "tags": [
          "session-databases"
        ],
        "summary": "List databases",
        "operationId": "list_databases",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of databases",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_DatabaseInfoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "session-databases"
        ],
        "summary": "Create database",
        "operationId": "create_database",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatabaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Database created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseInfoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or session ID"
          },
          "409": {
            "description": "Database already exists"
          },
          "422": {
            "description": "Session database limit exceeded"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/databases/{name}": {
      "get": {
        "tags": [
          "session-databases"
        ],
        "summary": "Get database",
        "operationId": "get_database",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Database name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseInfoResponse"
                }
              }
            }
          },
          "404": {
            "description": "Database not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "session-databases"
        ],
        "summary": "Delete database",
        "operationId": "delete_database",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Database name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Database deleted"
          },
          "404": {
            "description": "Database not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/databases/{name}/schema": {
      "get": {
        "tags": [
          "session-databases"
        ],
        "summary": "Get schema",
        "operationId": "get_schema",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Database name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Database schema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaResponse"
                }
              }
            }
          },
          "404": {
            "description": "Database not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/events": {
      "get": {
        "tags": [
          "events"
        ],
        "summary": "List events (JSON)",
        "description": "Returns events for a session as a JSON array. Supports filtering by event type\nvia `types` (positive: only these types) and `exclude` (negative: remove these types).\nWhen both are provided, `types` narrows first, then `exclude` removes from that set.\nBoth accept only known event types (max 25 per parameter). Unknown types return 400.\n\n## Pagination\n\nSupports backward pagination via `limit` and `before_sequence`:\n- `limit=200` returns the last 200 events (oldest→newest)\n- `limit=200&before_sequence=4500` returns 200 events before sequence 4500\n- When `limit` is provided, the response includes an `X-Total-Count` header\n  with the count of non-delta events for the session\n- Turn boundary snapping: when fetching older pages, the batch boundary\n  snaps to the nearest `turn.started` event to avoid splitting turns\n- Without `limit`, all events are returned (backward compatible)",
        "operationId": "list_events",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., sess_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since_id",
            "in": "query",
            "description": "Filter events with ID greater than this event ID (prefixed format: event_{32-hex})",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/eventId"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "types",
            "in": "query",
            "description": "Positive type filter (repeat key). Empty = all types.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "exclude",
            "in": "query",
            "description": "Event types to exclude (repeat key); applied after `types`.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max events to return (backward pagination). When set, returns the last N events\n(or last N before `before_sequence`). Results are ordered oldest→newest.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "maximum": 1000,
              "minimum": 1
            }
          },
          {
            "name": "before_sequence",
            "in": "query",
            "description": "Cursor for backward pagination: only return events with sequence < this value.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "description": "Forward cursor: only return events with sequence > this value.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          },
          {
            "name": "around",
            "in": "query",
            "description": "Anchor event id: returns up to `window` events on each side (default 50, max 500).\nMutually exclusive with `since_id`, `after_sequence`, and `before_sequence` — 400 if combined.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/eventId"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "window",
            "in": "query",
            "description": "Window size for `around` (events on each side). Defaults to 50, max 500.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          },
          {
            "name": "from_ts",
            "in": "query",
            "description": "Lower bound on `created_at` (RFC 3339, e.g. `2025-05-07T00:00:00Z`).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            }
          },
          {
            "name": "to_ts",
            "in": "query",
            "description": "Upper bound on `created_at`.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            }
          },
          {
            "name": "turn_id",
            "in": "query",
            "description": "Filter by `context.turn_id` (prefixed id, e.g. `turn_...`).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "exec_id",
            "in": "query",
            "description": "Filter by `context.exec_id` (prefixed id, e.g. `exec_...`).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "trace_id",
            "in": "query",
            "description": "Filter by `context.trace_id`.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Tag any-match against `events.tags` (repeat key for multiple values).",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "tool_name",
            "in": "query",
            "description": "Filter by `data.tool_name` — useful for narrowing `tool.*` events.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Full-text search (Postgres tsvector; substring fallback for in-memory mode).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "order_desc",
            "in": "query",
            "description": "When true, return newest first; default oldest first.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events list",
            "headers": {
              "X-Total-Count": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                },
                "description": "Total non-delta event count for the session (only present when limit is used)"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_Event"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID or invalid event type filter"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/events/summary": {
      "get": {
        "tags": [
          "events"
        ],
        "summary": "One-shot debug summary",
        "description": "one-shot debug summary",
        "operationId": "events_summary",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., sess_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Per-type counts and time span for the session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsSummaryResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/export": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Export session messages as JSONL or ATIF",
        "description": "Export session messages as a JSONL file (default) or as an ATIF trajectory\n\nDefault (`format=jsonl`): all materialized messages (user, agent) as\nnewline-delimited JSON, one complete JSON object per line; delta events are\nexcluded. `format=atif` returns a single ATIF-v1.7 trajectory JSON document\nfolded from the session's event log; image\ncontent parts are exported as ATIF multimodal ContentParts. When an image\ncannot be materialized (an inline image with neither a URL nor bytes) it is\nflattened to an `\"[image]\"` marker and the response carries an\n`X-Atif-Images-Omitted` header with that count (usually 0 and absent).\nDocuments over the 50 MiB `ATIF_EXPORT_MAX_BYTES` cap are rejected with 413.\nThe response includes `Content-Disposition: attachment` for browser\ndownload.",
        "operationId": "export_session_jsonl",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Output format: jsonl (default) or atif",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "segmented",
            "in": "query",
            "description": "ATIF only: return byte-bounded segments linked by continued_trajectory_ref instead of one document",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "ATIF segmented export: opaque continuation cursor from the previous segment",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSONL file with one message per line, or one ATIF trajectory JSON document (images export as multimodal ContentParts; X-Atif-Images-Omitted header only when an image could not be materialized). With segmented=true, one ATIF segment linked forward by continued_trajectory_ref.",
            "content": {
              "application/x-ndjson": {}
            }
          },
          "400": {
            "description": "Invalid ID format, or malformed/foreign segmented-export cursor"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Session not found"
          },
          "413": {
            "description": "ATIF document exceeds the 50 MiB export cap; retry with segmented=true for a recoverable chunked export",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/feedback": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "List your message ratings in a session",
        "description": "List your good and bad ratings of the messages in a session.",
        "operationId": "list_message_feedback",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MessageFeedback"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/fork": {
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Fork a session into an independent copy",
        "operationId": "fork_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session to fork",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForkSessionRequest"
              },
              "example": {
                "tags": [
                  "experiment"
                ],
                "title": "Branch: try the async rewrite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Fork created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Session"
                }
              }
            }
          },
          "404": {
            "description": "Parent session, agent, or harness not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Parent session is mid-turn and cannot be forked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/git/branches": {
      "post": {
        "tags": [
          "Session Git"
        ],
        "summary": "Create branch",
        "operationId": "create_branch",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBranchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Branch created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/git/branches/{name}": {
      "delete": {
        "tags": [
          "Session Git"
        ],
        "summary": "Delete branch",
        "operationId": "delete_branch",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Branch name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branch deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Branch not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/git/commit": {
      "post": {
        "tags": [
          "Session Git"
        ],
        "summary": "Commit",
        "operationId": "commit",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Commit created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommitResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/git/diff": {
      "get": {
        "tags": [
          "Session Git"
        ],
        "summary": "Diff",
        "operationId": "diff",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "oid",
            "in": "query",
            "description": "Commit OID to diff",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "description": "Base commit OID (default: parent)",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Diff result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitDiff"
                }
              }
            }
          },
          "400": {
            "description": "Invalid commit OID"
          },
          "404": {
            "description": "Commit not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/git/log": {
      "get": {
        "tags": [
          "Session Git"
        ],
        "summary": "Log",
        "operationId": "log",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "Ref to start from (default: HEAD)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max commits (default: 50)",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commit log",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GitCommitInfo"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session or ref not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/git/refs": {
      "get": {
        "tags": [
          "Session Git"
        ],
        "summary": "List refs",
        "operationId": "list_refs",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of refs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GitRefInfo"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/mcp-elicitation-consent": {
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Submit elicitation consent",
        "description": "Records a user's decision about a URL an MCP server asked them to open, and\nresumes the paused turn.",
        "operationId": "submit_elicitation_consent",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ElicitationConsentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Decision recorded and turn made runnable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElicitationConsentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID or request"
          },
          "403": {
            "description": "Caller may not manage this session"
          },
          "404": {
            "description": "Session or pending elicitation not found"
          },
          "409": {
            "description": "Session is not waiting for tool results"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/mcp-servers": {
      "get": {
        "tags": [
          "session-resources"
        ],
        "summary": "List the MCP servers added to this chat only",
        "description": "Servers a person added with \"this chat only\" join every later turn of this\nsession and no other. Sign-in state is the viewer's own.",
        "operationId": "list_chat_mcp_servers",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chat-only MCP servers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatMcpServer"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/mcp-servers/{name}": {
      "delete": {
        "tags": [
          "session-resources"
        ],
        "summary": "Remove an MCP server added to this chat only",
        "description": "Remove an MCP server added to this chat only. Its tools leave from the next turn.",
        "operationId": "remove_chat_mcp_server",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Server name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Server removed"
          },
          "404": {
            "description": "Session or chat-only server not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/messages": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "List messages (PRIMARY data)",
        "operationId": "list_messages",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., sess_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of messages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID format"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Create message (user message makes the session runnable)",
        "operationId": "create_message",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., sess_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "wait",
            "in": "query",
            "description": "Wait for turn completion and return the turn result.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "timeout_ms",
            "in": "query",
            "description": "Max wait budget in milliseconds (default 120000, capped at 600000).\nOnly used with `wait=true`. On expiry the endpoint returns `202`\nwith the messages produced so far.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Waited turn reached a terminal state (?wait=true)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMessageResult"
                }
              }
            }
          },
          "201": {
            "description": "Message accepted; turn runs in background",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMessageResult"
                }
              }
            }
          },
          "202": {
            "description": "Wait deadline expired; turn still running (?wait=true)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMessageResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID format"
          },
          "404": {
            "description": "Session not found"
          },
          "429": {
            "description": "Long-lived response concurrency limit reached"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/messages/{message_id}/feedback": {
      "put": {
        "tags": [
          "messages"
        ],
        "summary": "Rate a message in a session",
        "description": "Rate one message in a session good or bad, with an optional comment. A null rating clears your rating.",
        "operationId": "set_message_feedback",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageFeedback"
                }
              }
            }
          },
          "404": {
            "description": "Session or message not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/messages/{message_id}/reactions/{emoji}": {
      "put": {
        "tags": [
          "messages"
        ],
        "summary": "React to a message",
        "description": "Put an emoji reaction on a user or agent message. Adding one you already put there changes nothing. Reactions on the agent's replies reach the agent as a short note, by default with its next turn.",
        "operationId": "add_message_reaction",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionChange"
                }
              }
            }
          },
          "404": {
            "description": "Session or message not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "messages"
        ],
        "summary": "Remove your reaction from a message",
        "description": "Take your emoji reaction off a message. Removing one that is not there changes nothing. The history is kept in the session's events.",
        "operationId": "remove_message_reaction",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionChange"
                }
              }
            }
          },
          "404": {
            "description": "Session or message not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/participants": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "List session participants",
        "operationId": "list_session_participants",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session participant history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionParticipant"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Add a session participant",
        "operationId": "add_session_participant",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSessionParticipantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Participant added successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionParticipant"
                }
              }
            }
          },
          "400": {
            "description": "Invalid participant request"
          },
          "404": {
            "description": "Session or agent not found"
          },
          "409": {
            "description": "Participant conflicts with current membership"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/participants/{participant_id}": {
      "delete": {
        "tags": [
          "sessions"
        ],
        "summary": "Leave a participant",
        "operationId": "leave_session_participant",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "participant_id",
            "in": "path",
            "description": "Participant ID (prefixed, e.g., part_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Participant left successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionParticipant"
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID"
          },
          "404": {
            "description": "Session or participant not found"
          },
          "409": {
            "description": "Host participant cannot leave through this endpoint"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/pin": {
      "put": {
        "tags": [
          "sessions"
        ],
        "summary": "Pin session for current user",
        "operationId": "pin_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session pinned successfully"
          },
          "400": {
            "description": "Invalid session ID"
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "sessions"
        ],
        "summary": "Unpin session for current user",
        "operationId": "unpin_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session unpinned successfully"
          },
          "400": {
            "description": "Invalid session ID"
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/question-answers": {
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Submit question answers",
        "description": "Answers the question set an agent raised with `ask_user`, and resumes the\npaused turn.",
        "operationId": "submit_question_answers",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionAnswersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Answer recorded and turn made runnable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionAnswersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID, or answers that do not match what was asked"
          },
          "404": {
            "description": "Session or pending question set not found"
          },
          "409": {
            "description": "Session is not waiting for tool results, or the question set was already answered"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/reactions": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "List reactions in a session",
        "description": "List the emoji reactions on the messages of a session, from people and from the agent, with who reacted and whether you did.",
        "operationId": "list_message_reactions",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MessageReactions"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/repositories": {
      "get": {
        "tags": [
          "session-sandbox"
        ],
        "summary": "Get session repositories",
        "description": "List the repositories checked out in the session's sandbox and what the session changed in each. Reads a running sandbox only; it never starts or resumes one.",
        "operationId": "get_session_repositories",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repositories and their changes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionRepositoriesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/resolved-model": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Resolve the session's active model",
        "operationId": "get_session_resolved_model",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved model for turns without a model override",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResolvedModelResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/resources": {
      "get": {
        "tags": [
          "session-resources"
        ],
        "summary": "List the session's registered resources",
        "description": "List all resources registered in the session resource registry.",
        "operationId": "list_resources",
        "responses": {
          "200": {
            "description": "Session resources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionResourceEntry"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/resume": {
      "post": {
        "tags": [
          "budgets"
        ],
        "summary": "Continue a session past a usage policy's ask step",
        "operationId": "resume_session_budgets",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumeSessionResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/run": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Show a session's whole run",
        "description": "Show the run a session belongs to: the first session and every agent session started under it, with status, turns and spend.",
        "operationId": "get_session_run",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionRun"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/run-requests": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Get run requests",
        "description": "Questions and approvals that the agents this session handed work to wait\non. Empty unless the session is a run's first session.",
        "operationId": "get_run_requests",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Requests from the other agents in the run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunRequestsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/sandbox": {
      "get": {
        "tags": [
          "sandboxes"
        ],
        "summary": "Get session sandbox",
        "description": "Get the primary Sandbox a Session runs in: template, target, containment, and capabilities.",
        "operationId": "get_session_sandbox",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved primary Session Sandbox",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionSandboxResponse"
                },
                "example": {
                  "capabilities": {
                    "native_processes": false,
                    "network_enforced": true,
                    "packages": false,
                    "portable_checkpoint": true,
                    "ports": false,
                    "pty": false
                  },
                  "containment": {
                    "level": "isolated",
                    "network": "deny"
                  },
                  "durability": "checkpointed",
                  "resolved_from": "capabilities",
                  "source_capability": "bashkit_shell",
                  "target": {
                    "kind": "vfs",
                    "provider": "bashkit"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "session-sandbox"
        ],
        "summary": "Manage sandbox",
        "description": "Manage the session sandbox lifecycle (start, stop, reset).",
        "operationId": "manage_sandbox",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageSessionSandboxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Managed sandbox lifecycle updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageSessionSandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid action or sandbox not configured"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/sse": {
      "get": {
        "tags": [
          "events"
        ],
        "summary": "Stream events (SSE notifications)",
        "description": "Establishes a Server-Sent Events (SSE) connection for real-time event streaming.\n\n## Connection Lifecycle Events\n\n- **connected**: Sent immediately when the stream is established.\n  Data: `{\"status\":\"connected\"}`\n\n- **disconnecting**: Sent before the server closes the connection for graceful cycling.\n  Data: `{\"reason\":\"connection_cycle\",\"retry_ms\":100}`\n  Clients should reconnect immediately using the `since_id` of the last received event.\n\n## Connection Cycling\n\nConnections are automatically cycled every 5 minutes to prevent stale connections\nthrough proxies and load balancers. Before closing, the server sends a `disconnecting`\nevent so clients can reconnect without missing events.\n\n## Retry Hints\n\nEach SSE event includes a `retry:` field (in milliseconds) that hints how long\nclients should wait before reconnecting if the connection is lost:\n- During active streaming: 100ms (fast reconnect)\n- During idle periods: increases with backoff up to 500ms\n- After `disconnecting` event: 100ms (immediate reconnect)\n\n## Resuming Streams\n\nUse the `since_id` query parameter to resume from a specific event. The server\nresolves the event ID to its sequence number and returns all subsequent events\nordered by sequence, ensuring reliable ordering even under concurrent writes.\n\n## Event Type Filtering\n\nUse `types` for positive filtering (only return these types) and `exclude` for\nnegative filtering (remove these types). When both are provided, `types` narrows\nfirst, then `exclude` removes from that set. Both accept only known event types\n(max 25 per parameter). Unknown types return 400.",
        "operationId": "stream_sse",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., sess_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since_id",
            "in": "query",
            "description": "Filter events with ID greater than this event ID (prefixed format: event_{32-hex})",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/eventId"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "description": "Forward cursor: replay durable events with `sequence` greater than this\nvalue before switching to live streaming. `after_sequence=0` replays the\nsession from its first event — that is what a client with an empty\nsnapshot must send, otherwise events written between its snapshot and\nthis subscription are never delivered. Mutually exclusive with `since_id`.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          },
          {
            "name": "types",
            "in": "query",
            "description": "Positive type filter: only return events matching these types (can be specified multiple times).\nWhen empty, all types are returned. Example: ?types=turn.started&types=turn.completed",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "exclude",
            "in": "query",
            "description": "Event types to exclude from the response (can be specified multiple times).\nApplied after `types` filter. Common delta events to exclude: output.message.delta, reason.thinking.delta",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each SSE message has the wire shape `event: <type>\\nid: <event_id>\\ndata: <json>\\n\\n`, where `<type>` is one of the event types in the `EventData` catalog (`turn.started`, `tool.completed`, `reason.thinking.delta`, …), `<event_id>` is the event cursor (`event_{32-hex}` format, usable as `since_id` on reconnect), and `<json>` is the body schema below — a serialized `Event` whose `data` field carries the event-type-specific payload defined in `EventData`. Lifecycle framing events (`connected`, `disconnecting`) use the same SSE shape but carry a minimal JSON object in `data` rather than a full `Event`.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/storage/keys": {
      "get": {
        "tags": [
          "session-storage"
        ],
        "summary": "List all key-value pairs",
        "operationId": "list_keys",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of key-value pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_KeyValueInfo"
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/storage/secrets": {
      "get": {
        "tags": [
          "session-storage"
        ],
        "summary": "List all secrets (names only)",
        "operationId": "list_secrets",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of secrets (names only, no values)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_SecretInfo"
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "session-storage"
        ],
        "summary": "Batch set secrets",
        "description": "Encrypts and stores multiple secrets in a single request.\nExisting secrets with the same name are overwritten.",
        "operationId": "batch_set_secrets",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchSetSecretsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Secrets stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchSetSecretsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request (encryption not configured or invalid input)"
          },
          "404": {
            "description": "Session not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/storage/secrets/{name}": {
      "delete": {
        "tags": [
          "session-storage"
        ],
        "summary": "Delete secret",
        "description": "Delete a user-managed encrypted secret from one session.",
        "operationId": "delete_secret",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Secret name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session secret deleted"
          },
          "404": {
            "description": "Session secret not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tasks": {
      "get": {
        "tags": [
          "session-tasks"
        ],
        "summary": "List background tasks owned by a session",
        "operationId": "list_tasks",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Filter by state",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Filter by kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session tasks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionTask"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tasks/{task_id}": {
      "get": {
        "tags": [
          "session-tasks"
        ],
        "summary": "Get one session task with its recent message thread",
        "operationId": "get_task",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "description": "Return only messages after this message ID (exclusive cursor)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max messages to return (default 50, max 500)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session task detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTaskDetail"
                }
              }
            }
          },
          "404": {
            "description": "Session or task not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tasks/{task_id}/cancel": {
      "post": {
        "tags": [
          "session-tasks"
        ],
        "summary": "Request cooperative cancellation of a session task",
        "operationId": "cancel_task",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task with cancel intent recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTask"
                }
              }
            }
          },
          "404": {
            "description": "Session or task not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tasks/{task_id}/messages": {
      "post": {
        "tags": [
          "session-tasks"
        ],
        "summary": "Send an inbound message to a session task",
        "operationId": "post_task_message",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostTaskMessageBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Recorded task message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskMessage"
                }
              }
            }
          },
          "400": {
            "description": "Empty message"
          },
          "404": {
            "description": "Session or task not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tasks/{task_id}/push-configs": {
      "get": {
        "tags": [
          "session-tasks"
        ],
        "summary": "List per-task push-notification configs",
        "operationId": "list_push_configs",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Push configs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskPushConfig"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session or task not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "session-tasks"
        ],
        "summary": "Create a per-task push-notification config",
        "operationId": "create_push_config",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePushConfigBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Created push config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPushConfig"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (bad URL or event_filter)"
          },
          "404": {
            "description": "Session or task not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tasks/{task_id}/push-configs/{config_id}": {
      "delete": {
        "tags": [
          "session-tasks"
        ],
        "summary": "Delete a per-task push-notification config",
        "operationId": "delete_push_config",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "config_id",
            "in": "path",
            "description": "Push config ID (tpc_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Push config deleted"
          },
          "404": {
            "description": "Session, task, or push config not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tool-approvals": {
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Submit tool approvals",
        "description": "Records a person's decisions about tool calls an agent's `tool_approval`\ngate held back, and resumes the paused turn.",
        "operationId": "submit_tool_approvals",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitToolApprovalsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Decisions recorded and turn made runnable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitToolApprovalsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID or decisions"
          },
          "403": {
            "description": "Caller may not manage this session"
          },
          "404": {
            "description": "Session or pending approval request not found"
          },
          "409": {
            "description": "Session is not waiting, the request expired, or it was already answered"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/tool-results": {
      "post": {
        "tags": [
          "sessions"
        ],
        "summary": "Submit client-side tool results",
        "description": "Accepts tool results executed by the client and resumes the agent turn.\nSession must be in `waiting_for_tool_results` status.",
        "operationId": "submit_tool_results",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (prefixed, e.g., session_...)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitToolResultsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Tool results accepted and turn made runnable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitToolResultsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid session ID or request"
          },
          "404": {
            "description": "Session not found"
          },
          "409": {
            "description": "Session not in waiting_for_tool_results state"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/trace": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Summarize a session's trace",
        "description": "Summarize a session's trace: turn, step and error totals, a minimap of turn buckets, and the turns that failed.",
        "operationId": "get_session_trace",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buckets",
            "in": "query",
            "description": "Minimap buckets wanted, 1 to 500. Defaults to 120.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceOverview"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/trace/turns": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "List a page of a session's trace turns",
        "description": "List a page of a session's turns with their steps: model calls, tool calls, approvals, sub-agents and messages, with repeated calls folded into batches.",
        "operationId": "list_session_trace_turns",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Turns before this turn number. Without a cursor, the last turns.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Turns after this turn number.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "around",
            "in": "query",
            "description": "Turns centered on this turn number.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sequence",
            "in": "query",
            "description": "Turns centered on the turn holding this event sequence.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Turns per page, 1 to 50. Defaults to 20.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceTurnsPage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/trace/turns/{turn}/events": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "List the raw events of one trace turn",
        "description": "List the raw events of one turn of a session's trace, without deltas; small payloads are inlined.",
        "operationId": "list_session_trace_turn_events",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "description": "Only events after this sequence.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Events per page, 1 to 500. Defaults to 500.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceEventsPage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/trace/turns/{turn}/input": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Read the full recorded input of one trace turn",
        "operationId": "get_session_trace_turn_input",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceTurnInput"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/trace/turns/{turn}/steps": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "List the steps of one trace turn",
        "description": "Page through the steps of one turn of a session's trace, optionally only the failed ones.",
        "operationId": "list_session_trace_steps",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_step",
            "in": "query",
            "description": "First step of the range, inclusive. Defaults to 1.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "to_step",
            "in": "query",
            "description": "Last step of the range, inclusive. Defaults to the turn's last step.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "errors_only",
            "in": "query",
            "description": "Only failed steps.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Steps per page, 1 to 500. Defaults to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceStepsPage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/trace/turns/{turn}/steps/{step}": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "Get one step of a session's trace in full",
        "description": "Read one step of a session's trace in full: tool input and output, the model request and response, and its raw events.",
        "operationId": "get_session_trace_step",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "step",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "full",
            "in": "query",
            "description": "Return payloads whole, however large.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceStepDetail"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/trace/turns/{turn}/steps/{step}/request": {
      "get": {
        "tags": [
          "sessions"
        ],
        "summary": "List the messages sent in one model call",
        "description": "Page through the messages a model call in a session's trace was sent, with each message's full content.",
        "operationId": "list_session_trace_request",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "step",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "description": "Only messages of this role: `system`, `user`, `assistant` or `tool`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "First message index. Defaults to 0.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Messages per page, 1 to 200. Defaults to 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "full",
            "in": "query",
            "description": "Return every message's content whole, however large.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "native",
            "in": "query",
            "description": "Also return the provider request body as the driver sent it.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceRequestPage"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/voice/calls": {
      "post": {
        "tags": [
          "voice"
        ],
        "summary": "Create call",
        "description": "Start a voice call on a session (the chat microphone). Uses the settings of a voice channel of the session's agent.",
        "operationId": "create_call",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceCallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Realtime WebRTC call started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceCallResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/voice/{voice_connection_id}/end": {
      "post": {
        "tags": [
          "voice"
        ],
        "summary": "End call",
        "description": "End a voice call.",
        "operationId": "end_call",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "voice_connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceEndRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Voice call ended",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceEndResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/sessions/{session_id}/work": {
      "get": {
        "tags": [
          "events"
        ],
        "summary": "Show what a session's turn is doing or got done",
        "operationId": "get_session_work",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionWorkResult"
                }
              }
            }
          },
          "404": {
            "description": "Session or turn not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/skills": {
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "List all active skills",
        "description": "List all active skills. Use search for name search, include_archived=true to include archived.",
        "operationId": "list_skills",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or description (case-insensitive substring match).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "description": "Include archived skills. Deleted skills never appear in lists.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_WithUrls_Skill"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "skills"
        ],
        "summary": "Create a new skill from SKILL.md content",
        "operationId": "create_skill",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSkillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Skill"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate skill name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid SKILL.md",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/skills/config": {
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "Skill config",
        "operationId": "skill_config",
        "responses": {
          "200": {
            "description": "Resource config for skills",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceConfigResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/skills/upload": {
      "post": {
        "tags": [
          "skills"
        ],
        "summary": "Create skill from ZIP archive",
        "operationId": "upload_skill",
        "responses": {
          "201": {
            "description": "Skill created from archive",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Skill"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate skill name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Archive too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid archive or SKILL.md",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/skills/usage": {
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "Count agents and harnesses using each skill",
        "description": "Count agents and harnesses referencing each skill capability.",
        "operationId": "list_skills_usage",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/SkillUsage"
                  },
                  "propertyNames": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/skills/validate": {
      "post": {
        "tags": [
          "skills"
        ],
        "summary": "Validate SKILL.md content",
        "operationId": "validate_skill",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateSkillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Validation result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillValidationResult"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/skills/{id}": {
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "Get a single skill by ID",
        "operationId": "get_skill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Skill"
                }
              }
            }
          },
          "404": {
            "description": "Skill not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "skills"
        ],
        "summary": "Archive a skill (soft delete)",
        "description": "Archive a skill (soft delete). Can be restored.",
        "operationId": "delete_skill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Skill not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "skills"
        ],
        "summary": "Update a skill",
        "description": "Update a skill. Only provided fields are changed.",
        "operationId": "update_skill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSkillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithUrls_Skill"
                }
              }
            }
          },
          "404": {
            "description": "Skill not found"
          },
          "409": {
            "description": "Duplicate skill name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid SKILL.md",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/skills/{id}/content": {
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "Get full skill content (SKILL.md + files)",
        "operationId": "get_skill_content",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillContent"
                }
              }
            }
          },
          "404": {
            "description": "Skill not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/skills/{id}/delete": {
      "post": {
        "tags": [
          "skills"
        ],
        "summary": "Permanently delete an archived skill",
        "operationId": "destroy_skill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "description": "Skill is not archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Skill not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agents-authoring",
          "support": "preview"
        }
      }
    },
    "/v1/system/detections": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Open abuse detections in every organization",
        "operationId": "list_platform_detections",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "description": "Number of detections to skip",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size from 1 through 100; defaults to 20",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Open detections, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformDetectionList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Platform user access is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/system/doctor": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Check the whole install",
        "operationId": "run_system_doctor",
        "parameters": [
          {
            "name": "refresh",
            "in": "query",
            "description": "Run every check now instead of returning the report from the last minute",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Health of every part of the install",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoctorReport"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Platform user access is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The system doctor is not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/task-webhooks": {
      "get": {
        "tags": [
          "task-webhooks"
        ],
        "summary": "List all task webhooks configured for the organization",
        "operationId": "list_webhooks",
        "responses": {
          "200": {
            "description": "Webhook list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_TaskWebhookResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — requires admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "task-webhooks"
        ],
        "summary": "Create a new task webhook for the organization",
        "operationId": "create_webhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Webhook created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — requires admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/task-webhooks/{webhook_id}": {
      "get": {
        "tags": [
          "task-webhooks"
        ],
        "summary": "Get a single task webhook",
        "operationId": "get_webhook",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook public ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskWebhookResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — requires admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "task-webhooks"
        ],
        "summary": "Delete a task webhook",
        "operationId": "delete_webhook",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook public ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Webhook deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — requires admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "task-webhooks"
        ],
        "summary": "Update a task webhook",
        "operationId": "update_webhook",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook public ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated webhook",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — requires admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/tasks": {
      "get": {
        "tags": [
          "session-tasks"
        ],
        "summary": "List background tasks across the organization",
        "description": "List background tasks across every session in the caller's org.",
        "operationId": "list_org_tasks",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "Filter by state",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Filter by kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "description": "Only tasks created at/after this RFC3339 timestamp",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "root_session_id",
            "in": "query",
            "description": "Only tasks whose owning session's delegation-tree root is this session",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max tasks, newest first (default 100, max 500)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Org tasks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionTask"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/tracing/defaults": {
      "get": {
        "tags": [
          "tracing"
        ],
        "summary": "Get defaults",
        "operationId": "get_defaults",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingPolicyView"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "tracing"
        ],
        "summary": "Save defaults",
        "operationId": "save_defaults",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveRoutingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingPolicyView"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/tracing/destination-metadata/{id}": {
      "get": {
        "tags": [
          "tracing"
        ],
        "summary": "Read safe destination metadata",
        "description": "Read safe destination metadata. Never returns receiver authentication.",
        "operationId": "get_tracing_destination_metadata",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Tracing resource ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingDestinationMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "tracing"
        ],
        "summary": "Update tracing destination metadata",
        "description": "Update safe destination metadata while preserving its receiver and current authentication.",
        "operationId": "update_tracing_destination_metadata",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Tracing resource ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingDestinationMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/tracing/destinations": {
      "get": {
        "tags": [
          "tracing"
        ],
        "summary": "List destinations",
        "operationId": "list_destinations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DestinationView"
                  }
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "tracing"
        ],
        "summary": "Create destination",
        "operationId": "create_destination",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDestinationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationView"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/tracing/destinations/{id}": {
      "put": {
        "tags": [
          "tracing"
        ],
        "summary": "Update destination",
        "operationId": "update_destination",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Destination ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDestinationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationView"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "tracing"
        ],
        "summary": "Delete destination",
        "operationId": "delete_destination",
        "parameters": [
          {
            "name": "revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Destination ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {}
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/tracing/destinations/{id}/test": {
      "post": {
        "tags": [
          "tracing"
        ],
        "summary": "Test destination",
        "operationId": "test_destination",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Destination ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestTraceResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/tracing/policies/{id}": {
      "get": {
        "tags": [
          "tracing"
        ],
        "summary": "Get tracing policy",
        "description": "Read organization or agent trace routing without credentials.",
        "operationId": "get_tracing_policy",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Tracing resource ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingPolicyMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "tracing"
        ],
        "summary": "Set organization or agent destinations for future turns",
        "description": "Set organization or agent destinations for future turns. Requires organization settings authority; never accepts credentials.",
        "operationId": "update_tracing_policy",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Tracing resource ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TracingPolicyMetadata"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "operations-billing",
          "support": "preview"
        }
      }
    },
    "/v1/user/connected-clients": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "List the AI clients you connected to Everruns MCP",
        "description": "External MCP clients (Claude, ChatGPT, Cursor, ...) you approved to act as you on `/mcp`, most recently used first.",
        "operationId": "list_connected_clients",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectedClientsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/user/connected-clients/{grant_id}": {
      "delete": {
        "tags": [
          "users"
        ],
        "summary": "Disconnect an AI client",
        "description": "Revokes the grant: the client's refresh tokens are deleted and `/mcp` rejects its access tokens within about 30 seconds. Reconnecting needs a new approval.",
        "operationId": "revoke_connected_client",
        "parameters": [
          {
            "name": "grant_id",
            "in": "path",
            "description": "Connected client (grant) id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/user/connection-migrations": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List legacy credentials awaiting an organization",
        "description": "List legacy credentials requiring an explicit organization destination.",
        "operationId": "list_pending_connection_migrations",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/user/connection-migrations/{connection_id}": {
      "post": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Move a legacy credential into an organization",
        "description": "Move one legacy credential into the selected organization without copying it.",
        "operationId": "migrate_pending_connection",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/user/mcp-connections": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "List mcp connections",
        "description": "List the current user's cursor-paginated MCP OAuth connections in the selected organization.",
        "operationId": "list_mcp_connections",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Continue after this opaque connection cursor.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size (default: 50, max: 100).",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cursor-paginated current user's MCP OAuth connections in the selected organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMcpConnectionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid cursor or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/users": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "List users in current organization",
        "description": "Lists users that belong to the current organization with optional search filtering.\nTM-TENANT-008: Enforces org isolation to prevent cross-tenant user enumeration.",
        "operationId": "list_users",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or email",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of users in organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_User"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/users/me": {
      "delete": {
        "tags": [
          "users"
        ],
        "summary": "Delete current user's account",
        "description": "Hard-deletes the user and all associated data (API keys, memberships, tokens).\nThis action is irreversible.",
        "operationId": "delete_account",
        "responses": {
          "200": {
            "description": "Account deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAccountResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "User not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        },
        "x-side-effect": "irreversible"
      },
      "patch": {
        "tags": [
          "users"
        ],
        "summary": "Update current user's profile",
        "operationId": "update_profile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Profile updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (empty name)"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/users/me/export": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "Export current user's data",
        "description": "Returns all user-owned data in a structured JSON format for GDPR compliance.",
        "operationId": "export_user_data",
        "responses": {
          "200": {
            "description": "User data export",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportUserDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "User not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/users/me/switch-org": {
      "post": {
        "tags": [
          "users"
        ],
        "summary": "Switch current organization",
        "description": "Sets a cookie with the selected organization. This org will be used for all\nsubsequent requests (including SSE connections via EventSource).\nThe user must be a member of the requested organization.",
        "operationId": "switch_org",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchOrgRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Organization switched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwitchOrgResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid organization ID format"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Organization not found or user is not a member"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/users/{id}/profile": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "Get your account profile",
        "description": "Read your own editable profile, without email, tokens or credentials.",
        "operationId": "get_account_profile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountProfile"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List virtual users",
        "operationId": "list_virtual_users",
        "parameters": [
          {
            "name": "usage",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/VirtualUserUsage"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Zero-based page offset.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum results per page.",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_VirtualUser"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Create virtual user",
        "operationId": "create_virtual_user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVirtualUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualUser"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/me": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Read the authenticated consumer runtime account",
        "operationId": "get_me",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualUser"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Update the runtime user's profile",
        "description": "Update the runtime profile without changing management identity or lifecycle.",
        "operationId": "update_me",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVirtualUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualUser"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Get virtual user",
        "operationId": "get_virtual_user",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualUser"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Delete virtual user",
        "operationId": "delete_virtual_user",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Update virtual user",
        "operationId": "update_virtual_user",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVirtualUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualUser"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/bindings": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List verified external identity bindings",
        "operationId": "list_bindings",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/bindings/{binding_id}": {
      "delete": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Revoke an external binding and its runtime self authority",
        "operationId": "revoke_binding",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "binding_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/connections": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List virtual user connections",
        "operationId": "list_virtual_user_connections",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Connection"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Virtual user not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/connections/{provider}": {
      "post": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Create api key connection",
        "operationId": "create_api_key_connection",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Virtual user not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Delete a virtual user connection",
        "operationId": "delete_virtual_user_connection",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Virtual user not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/connections/{provider}/authorize": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Start provider setup bound to the authorized virtual user",
        "operationId": "authorize_target_connection",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Create a target-bound provider setup URL",
        "operationId": "start_target_connection",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthAuthorizeQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Browser setup created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionSetupResponse"
                }
              }
            }
          },
          "403": {
            "description": "Setup not authorized"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/connections/{provider}/verify": {
      "post": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Verify a virtual user connection",
        "operationId": "verify_virtual_user_connection",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyConnectionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Virtual user not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/delete": {
      "post": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Destroy virtual user",
        "operationId": "destroy_virtual_user",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/mcp-servers": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List the person's own MCP servers",
        "operationId": "list_user_mcp_servers",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "description": "`me` or a virtual user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMcpServersResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Add an MCP server for the person",
        "description": "Add an MCP server for the person, from the catalog or by URL.",
        "operationId": "add_user_mcp_server",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "description": "`me` or a virtual user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddUserMcpServerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMcpServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "409": {
            "description": "Name already used"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/mcp-servers/{server_id}": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Read one of the person's MCP servers",
        "operationId": "get_user_mcp_server",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "description": "`me` or a virtual user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMcpServer"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Remove one of the person's MCP servers and its sign-in",
        "operationId": "remove_user_mcp_server",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "description": "`me` or a virtual user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Update one of the person's MCP servers",
        "description": "Rename, enable, disable, set on-demand loading of, or replace the API key of one of the person's MCP servers.",
        "operationId": "update_user_mcp_server",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "description": "`me` or a virtual user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserMcpServerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMcpServer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Not found"
          },
          "409": {
            "description": "Name already used"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/mcp-servers/{server_id}/tools": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List the tools of one of the person's MCP servers",
        "description": "List the tools of one of the person's custom MCP servers, asked live, with their risk labels.",
        "operationId": "list_user_mcp_server_tools",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "description": "`me` or a virtual user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMcpServerToolsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Server was added from the catalog"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/mcp-servers/{server_id}/tools/{tool_name}/label": {
      "put": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Set the person's risk label for an MCP tool",
        "description": "Set or clear the person's risk label for one tool of their custom MCP server.",
        "operationId": "set_user_mcp_tool_label",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "description": "`me` or a virtual user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tool_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetUserMcpToolLabelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerTool"
                }
              }
            }
          },
          "400": {
            "description": "Server was added from the catalog"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          },
          "404": {
            "description": "Server or tool not found"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/preferences": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List agent-facing preferences",
        "operationId": "list_preferences",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/preferences/{key}": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Read one agent-facing preference",
        "operationId": "get_preference",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Set a bounded agent-facing preference",
        "operationId": "set_preference",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPreferenceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Delete an agent-facing preference",
        "operationId": "delete_preference",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{identity_id}/sessions": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "List the virtual user's recent sessions",
        "description": "List recent sessions associated with the authorized virtual user.",
        "operationId": "list_sessions",
        "parameters": [
          {
            "name": "identity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Permission denied"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/virtual-users/{id}/self-profile": {
      "get": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Get your organization profile",
        "description": "Read your own organization profile.",
        "operationId": "get_own_virtual_user_profile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualUser"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "virtual-users"
        ],
        "summary": "Update your organization profile",
        "description": "Update your own organization profile without changing lifecycle.",
        "operationId": "update_own_virtual_user_profile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prefixed public identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVirtualUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VirtualUser"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "identity-access",
          "support": "preview"
        }
      }
    },
    "/v1/work-chat/hosts/{label}": {
      "get": {
        "tags": [
          "agent-execution"
        ],
        "summary": "Get work chat by host",
        "description": "Public bootstrap for the live Work Chat published at this hostname.",
        "operationId": "get_work_chat_by_host",
        "parameters": [
          {
            "name": "label",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "No live Work Chat uses this hostname"
          }
        },
        "security": [],
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "agent-api",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces": {
      "get": {
        "tags": [
          "workspace"
        ],
        "summary": "List workspaces",
        "description": "List Workspaces.",
        "operationId": "list_workspaces",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspaces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_Workspace"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}": {
      "get": {
        "tags": [
          "workspace"
        ],
        "summary": "Get workspace",
        "description": "Get a Workspace by ID.",
        "operationId": "get_workspace",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "workspace"
        ],
        "summary": "Delete workspace",
        "description": "Archive a Workspace.",
        "operationId": "delete_workspace",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Archived"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "patch": {
        "tags": [
          "workspace"
        ],
        "summary": "Update workspace",
        "description": "Update a Workspace.",
        "operationId": "update_workspace",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Name conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs": {
      "get": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Workspace root listing",
        "operationId": "get_root",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recursive",
            "in": "query",
            "description": "List recursively",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Directory listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_FileInfo"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/_/copy": {
      "post": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Copy a file",
        "operationId": "copy_file",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Copied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or cannot copy directories"
          },
          "404": {
            "description": "Source not found"
          },
          "409": {
            "description": "Destination exists"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/_/download/{path}": {
      "get": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Download raw file bytes",
        "operationId": "download_path",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File path. Wildcard route: nested paths are literal `/`-separated segments, not a single URL-encoded value.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Raw file bytes",
            "content": {
              "application/octet-stream": {}
            }
          },
          "206": {
            "description": "The byte range named by the `Range` header",
            "content": {
              "application/octet-stream": {}
            }
          },
          "400": {
            "description": "Path points to a directory"
          },
          "404": {
            "description": "File not found"
          },
          "416": {
            "description": "The `Range` header lies outside the file"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/_/grep": {
      "post": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Search files",
        "operationId": "grep_files",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse_GrepResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid regex pattern"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/_/move": {
      "post": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Move/rename a file or directory",
        "operationId": "move_file",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Moved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Source not found"
          },
          "409": {
            "description": "Destination exists"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/_/preview/{path}": {
      "get": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Sandboxed HTML render",
        "description": "Serves an HTML file as a `text/html` document carrying a strict `sandbox`\nCSP (TM-WEB-010) so the file viewer can render it — with JavaScript — inside\nan iframe without exposing everruns cookies, storage, the parent DOM, or\ntop-frame navigation. Only `.html`/`.htm` files are eligible; everything else\nreturns 415 (use the download endpoint instead).",
        "operationId": "preview_path",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "HTML file path. Wildcard route: nested paths are literal `/`-separated segments, not a single URL-encoded value.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sandboxed HTML document",
            "content": {
              "text/html": {}
            }
          },
          "400": {
            "description": "Path points to a directory"
          },
          "404": {
            "description": "File not found"
          },
          "415": {
            "description": "File is not an HTML document"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/_/stat": {
      "post": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "File metadata",
        "operationId": "stat_file",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "File metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStat"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/_/upload/{path}": {
      "put": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Upload raw file bytes",
        "description": "Creates or replaces the file with the request body, streamed to storage,\nso files larger than the JSON API carries (recordings, media) can be\nuploaded. Parent directories are created as needed.",
        "operationId": "upload_path",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File path. Wildcard route: nested paths are literal `/`-separated segments, not a single URL-encoded value.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Raw file bytes",
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "File written",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid path, or the path is a directory or a mounted folder"
          },
          "403": {
            "description": "File or workspace is read-only"
          },
          "413": {
            "description": "File or session storage limit exceeded"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    },
    "/v1/workspaces/{workspace_id}/fs/{path}": {
      "get": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Read file or list directory",
        "operationId": "get_path",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File or directory path. Wildcard route: nested paths are literal `/`-separated segments, not a single URL-encoded value.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recursive",
            "in": "query",
            "description": "List recursively",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File content or directory listing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "put": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Update file content",
        "operationId": "update_path",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "post": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Create file or directory",
        "operationId": "create_path",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File or directory path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "409": {
            "description": "Already exists"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      },
      "delete": {
        "tags": [
          "workspace-filesystem"
        ],
        "summary": "Delete file or directory",
        "operationId": "delete_path",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "description": "Workspace ID (wsp_<32-hex>)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "File or directory path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recursive",
            "in": "query",
            "description": "Delete recursively",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteFileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Cannot delete readonly content"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "x-docs": {
          "audience": "public",
          "availability": "Everruns Cloud and self-hosted Platform",
          "group": "sessions-workspaces",
          "support": "preview"
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptEvalProposalRequest": {
        "type": "object",
        "description": "Request to add a proposal to a dataset.",
        "required": [
          "eval_id"
        ],
        "properties": {
          "eval_id": {
            "type": "string",
            "description": "Dataset (eval) to add the case to.",
            "example": "eval_01933b5a000070008000000000000001"
          }
        }
      },
      "AcceptInviteResponse": {
        "type": "object",
        "description": "Accept response: where the caller now has membership.",
        "required": [
          "org_id",
          "role"
        ],
        "properties": {
          "org_id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "AccountProfile": {
        "type": "object",
        "description": "The signed-in account editable profile, excluding email and credentials.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ActCompletedData": {
        "type": "object",
        "description": "Data for act.completed event",
        "required": [
          "completed",
          "success_count",
          "error_count"
        ],
        "properties": {
          "completed": {
            "type": "boolean",
            "description": "Whether all tool calls completed"
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Duration of the act phase in milliseconds",
            "minimum": 0
          },
          "error_count": {
            "type": "integer",
            "format": "int32",
            "description": "Number of failed tool calls. Each failure went back to the model as a\ntool result, so these are issues (severity `issue`), not turn errors;\nthe field keeps its historical name.",
            "minimum": 0
          },
          "headline": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable headline for the completed batch"
          },
          "success_count": {
            "type": "integer",
            "format": "int32",
            "description": "Number of successful tool calls",
            "minimum": 0
          }
        }
      },
      "ActStartedData": {
        "type": "object",
        "description": "Data for act.started event",
        "required": [
          "tool_calls"
        ],
        "properties": {
          "headline": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable headline for the batch"
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolCallSummary"
            },
            "description": "Tool calls to be executed"
          }
        }
      },
      "AddSessionParticipantRequest": {
        "type": "object",
        "description": "Request to add a participant to a session.",
        "required": [
          "kind"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent to add when `kind` is `agent`.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "kind": {
            "$ref": "#/components/schemas/SessionParticipantKind",
            "description": "Participant kind to add."
          },
          "role": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SessionParticipantRole",
                "description": "Participant role. Omit for ordinary members. Host assignment is managed by session creation."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AddUserMcpServerRequest": {
        "type": "object",
        "description": "Add a user MCP server. Give `catalog` to add a catalog preset, or `name`\nand `url` to add a custom server.",
        "properties": {
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key for a custom `api_key` server. Never returned."
          },
          "auth_mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerAuthMode",
                "description": "Sign-in for a custom server. Defaults to `api_key` when `api_key` is\ngiven, otherwise `none`."
              },
              {
                "type": "null"
              }
            ]
          },
          "catalog": {
            "type": [
              "string",
              "null"
            ],
            "description": "Catalog preset name to add.",
            "example": "linear"
          },
          "deferred": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Load the server's tools on demand. Defaults to true."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Defaults to true."
          },
          "headers": {
            "type": [
              "object",
              "null"
            ],
            "description": "Literal headers for a custom server. Never returned.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name for a custom server; also the tool prefix agents see.",
            "example": "my-notes"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTPS endpoint of a custom server.",
            "example": "https://mcp.example.com/mcp"
          }
        }
      },
      "Agent": {
        "type": "object",
        "description": "Agent configuration for agentic loop.\nAn agent defines the behavior and capabilities of an AI assistant.",
        "required": [
          "id",
          "name",
          "system_prompt",
          "harness_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the agent was archived.",
            "example": "2026-05-26T00:00:00Z"
          },
          "avatar": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentAvatar",
                "description": "Avatar shown wherever the agent appears: the UI, the A2A Agent Card and\nits Slack app. Set with `PUT /v1/agents/{agent_id}/avatar`."
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capabilities enabled for this agent with per-agent configuration.\nCapabilities add tools and system prompt modifications."
          },
          "communication": {
            "$ref": "#/components/schemas/Communication",
            "description": "How the agent talks to people. `direct` (default): its replies are\nwhat it writes. `explicit`: what it writes is private working notes,\nand people see only the messages it sends with `send_message`. Applies\non every surface: web chat, API, Slack, A2A, AG-UI, MCP."
          },
          "completion_check": {
            "$ref": "#/components/schemas/CompletionCheck",
            "description": "When a turn about to finish is checked for whether it did what was\nasked, and continued automatically when it did not. `unattended`\n(default): sessions started by triggers and schedules, where no person\nis watching. `always`: chat too. `off`: never."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the agent was created.",
            "example": "2026-04-01T10:00:00Z"
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default LLM model ID for this agent.\nCan be overridden at the session level.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the agent was deleted.",
            "example": "2026-05-26T00:00:00Z"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description of what the agent does.",
            "example": "Handles refund and shipping questions; escalates billing disputes."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name shown in UI (e.g. \"Customer Support Agent\").\nFalls back to `name` when absent.",
            "example": "Customer Support Agent"
          },
          "exposed": {
            "type": "boolean",
            "description": "Whether any endpoint on this agent is currently live. Derived from the\nendpoint rows on read and never stored: a stored flag would be a second\nwriter for state the endpoints already own."
          },
          "exposures_suspended": {
            "type": "boolean",
            "description": "Incident switch: when true, no endpoint on this agent accepts traffic\n(EVE-1007). Distinct from archiving — it leaves per-endpoint status\nuntouched so clearing it restores exactly the previously live set."
          },
          "forked_from_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source agent for a forked agent.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "harness_id": {
            "type": "string",
            "description": "Harness that supplies the base execution environment for this agent.",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "id": {
            "type": "string",
            "description": "External identifier (agent_<32-hex>). Shown as \"id\" in API.\nClient-supplied or auto-generated.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Starter files copied into each new session for this agent."
          },
          "intro_markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Markdown intro rendered as an intro box at the top of a fresh\nPlatform Chat thread. Images are allowed. Wins over the harness intro.\nHidden once the user inputs.",
            "example": "Hey, I'm Ava. Ask me anything about your account."
          },
          "is_built_in": {
            "type": "boolean",
            "description": "Built-in agents (Platform Chat) are provisioned by the platform and\nare read-only: they cannot be modified or deleted via the API. Copy\none to get an editable version.",
            "example": false
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
          },
          "max_iterations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum number of LLM iterations per turn for this agent.",
            "example": 50,
            "minimum": 0
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Ceiling on output tokens per model response, sent to the provider as\n`max_tokens`. Unset keeps the provider default. Clamped to the model's\noutput limit when known. Lower it when a provider rejects calls because\nthe balance can only afford fewer tokens.",
            "example": 4096,
            "minimum": 1
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "Remote MCP servers scoped to this agent and inherited by its sessions."
          },
          "model_preset": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model preset the agent takes its job models from (`automatic`,\n`provider:gemini` or a custom preset id). Unset = organization defaults.\nA pinned `default_model_id` still wins for the agent's own turns.",
            "example": "provider:gemini"
          },
          "model_role": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentModelRole",
                "description": "Organization model the agent follows instead of `default_model_id`.\n`research` uses the organization research model."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "Name, unique per org (e.g. \"customer-support\").",
            "example": "customer-support"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list controlling which hosts/URLs agent sessions can reach.\nMerged with harness and session layers (allowed: intersect, blocked: union)."
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent this one was created as part of, shown as \"Created here\" on\nthat agent's Agents tab and bundled into its export.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "parallel_tool_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
            "example": true
          },
          "root_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Root agent lineage identifier for grouping fork families.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "sandbox_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxPolicy",
                "description": "Policy for selecting the primary Sandbox Template for new Sessions."
              },
              {
                "type": "null"
              }
            ]
          },
          "service_virtual_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Org-scoped service account used when a tool acts as the agent."
          },
          "short_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional one-line description in simplified Markdown, shown below the\nchat title once the intro is hidden. Wins over the harness value.",
            "example": "Answers account questions in seconds."
          },
          "starters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationStarter"
            },
            "description": "Conversation starters for a fresh Platform Chat thread. Win over the\nharness starters when non-empty."
          },
          "status": {
            "$ref": "#/components/schemas/AgentStatus",
            "description": "Current lifecycle status of the agent."
          },
          "system_prompt": {
            "type": "string",
            "description": "System prompt that defines the agent's behavior.\nSent as the first message in every conversation.",
            "example": "You are a friendly customer support agent for Acme Corp. Verify orders before issuing refunds. Escalate any billing disputes to a human."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing and filtering agents.",
            "example": [
              "support",
              "production"
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            },
            "description": "Client-side tools registered for this agent.\nThese tools are executed by the client, not the server."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the agent was last updated.",
            "example": "2026-05-20T14:00:00Z"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Cumulative token usage across all sessions for this agent."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AgentActivity": {
        "type": "object",
        "description": "What one agent is doing now and how its last day went.",
        "required": [
          "agent_id",
          "running_sessions",
          "runs",
          "failed",
          "hourly",
          "triggers"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Public agent identifier.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns that failed in the window.",
            "minimum": 0
          },
          "hourly": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunBucket"
            },
            "description": "One bucket per hour, oldest first; the last bucket ends at `generated_at`."
          },
          "last_turn_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the agent's most recent turn ended or started."
          },
          "running_sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions executing a turn right now.",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "format": "int64",
            "description": "Turns started in the window.",
            "minimum": 0
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTriggerSummary"
            },
            "description": "Active triggers, oldest first."
          }
        }
      },
      "AgentActivityOverview": {
        "type": "object",
        "description": "Activity for every agent and channel in the organization.",
        "required": [
          "generated_at",
          "window_start",
          "hours",
          "days",
          "totals",
          "agents",
          "channels"
        ],
        "properties": {
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentActivity"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelActivity"
            }
          },
          "days": {
            "type": "integer",
            "format": "int32",
            "description": "Days covered by `ChannelActivity.daily`.",
            "minimum": 0
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "hours": {
            "type": "integer",
            "format": "int32",
            "description": "Hours covered by `AgentActivity.hourly`.",
            "minimum": 0
          },
          "totals": {
            "$ref": "#/components/schemas/AgentActivityTotals"
          },
          "window_start": {
            "type": "string",
            "format": "date-time",
            "description": "Exact exclusive lower bound of the run and failure window."
          }
        }
      },
      "AgentActivityTotals": {
        "type": "object",
        "description": "Org-wide totals for the page masthead.",
        "required": [
          "running_sessions",
          "max_active_turns",
          "runs",
          "failed",
          "channel_sessions",
          "people_reached"
        ],
        "properties": {
          "channel_sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions channels started in the last 7 days.",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns that failed in the last 24 hours.",
            "minimum": 0
          },
          "max_active_turns": {
            "type": "integer",
            "format": "int64",
            "description": "The organization's active-turn limit (`ORG_MAX_ACTIVE_TURNS`).",
            "minimum": 0
          },
          "people_reached": {
            "type": "integer",
            "format": "int64",
            "description": "Distinct end users across every channel in the last 7 days.",
            "minimum": 0
          },
          "running_sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions executing a turn right now, across every agent.",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "format": "int64",
            "description": "Turns started in the last 24 hours.",
            "minimum": 0
          }
        }
      },
      "AgentAnalysisResponse": {
        "type": "object",
        "description": "Response from on-demand agent analysis (built-in rules + LLM checkers)",
        "required": [
          "findings"
        ],
        "properties": {
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "description": "Advisory findings, built-in and LLM-sourced"
          }
        }
      },
      "AgentAvatar": {
        "type": "object",
        "description": "An agent's avatar, pre-rendered as square and circular PNG presets.\n\nURLs are relative to the API base URL, public, and immutable: a new upload\ngets a new `id`, so they can be cached forever. Any size in `sizes` can be\nsubstituted into a URL, e.g. `/v1/avatars/{id}/circle-64.png`; the uploaded\nsquare crop is at `/v1/avatars/{id}/source.png`.",
        "required": [
          "id",
          "url",
          "circle_url",
          "sizes"
        ],
        "properties": {
          "circle_url": {
            "type": "string",
            "description": "Circular avatar (transparent corners), 256 px.",
            "example": "/v1/avatars/avatar_01933b5a000070008000000000000001/circle-256.png"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "avatar_01933b5a000070008000000000000001"
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "description": "Edge lengths, in pixels, available for both shapes.",
            "example": [
              32,
              64,
              128,
              256,
              512
            ]
          },
          "url": {
            "type": "string",
            "description": "Square avatar, 256 px.",
            "example": "/v1/avatars/avatar_01933b5a000070008000000000000001/square-256.png"
          }
        }
      },
      "AgentCapabilityConfig": {
        "type": "object",
        "description": "Per-agent capability configuration\n\nAssociates a capability with an agent, including optional per-agent configuration.\nThe config field allows the same capability to behave differently per-agent.",
        "required": [
          "ref"
        ],
        "properties": {
          "config": {
            "description": "Per-agent configuration for this capability (capability-specific)"
          },
          "ref": {
            "type": "string",
            "description": "Reference to the capability ID"
          }
        }
      },
      "AgentCard": {
        "type": "object",
        "description": "What a caller learns from `GET {agent base URL}`.",
        "required": [
          "name",
          "streaming",
          "input",
          "links"
        ],
        "properties": {
          "auth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCardAuth"
            },
            "description": "Credentials the agent base URL accepts. Empty means anonymous."
          },
          "conversation_starters": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Prompts a client may offer to start a conversation."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the agent is for."
          },
          "input": {
            "$ref": "#/components/schemas/AgentCardInput",
            "description": "Which message content the agent accepts."
          },
          "links": {
            "$ref": "#/components/schemas/AgentCardLinks",
            "description": "Where to go next."
          },
          "name": {
            "type": "string",
            "description": "Display name of the agent.",
            "example": "Support agent"
          },
          "streaming": {
            "type": "boolean",
            "description": "Session events can be followed live over SSE."
          }
        }
      },
      "AgentCardAuth": {
        "oneOf": [
          {
            "type": "object",
            "description": "`Authorization: Bearer <agent key>`.",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "agent_key"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "`Authorization: Bearer <JWT>` issued by an OpenID Connect provider.",
            "required": [
              "issuer",
              "type"
            ],
            "properties": {
              "issuer": {
                "type": "string",
                "description": "Issuer the token must come from."
              },
              "type": {
                "type": "string",
                "enum": [
                  "oidc"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "`Authorization: Bearer <opaque token>` checked by OAuth 2.0\nintrospection (RFC 7662).",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "o_auth2"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "A short-lived runtime token from the agent's `/runtime-auth` exchange.",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "runtime_token"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "`Authorization: Bearer <personal access token>` of a member of the\norganization that owns the agent.",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "personal_access_token"
                ]
              }
            }
          }
        ],
        "description": "One accepted credential kind. Mirrors the HTTP auth scheme a client sends."
      },
      "AgentCardInput": {
        "type": "object",
        "description": "Message content an agent accepts.",
        "required": [
          "text",
          "images",
          "files"
        ],
        "properties": {
          "files": {
            "type": "boolean"
          },
          "images": {
            "type": "boolean"
          },
          "text": {
            "type": "boolean"
          }
        }
      },
      "AgentCardLinks": {
        "type": "object",
        "description": "Links from an agent card.",
        "required": [
          "sessions"
        ],
        "properties": {
          "a2a": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same agent's A2A Agent Card, when one is live."
          },
          "ag_ui": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same agent's AG-UI endpoint, when one is live."
          },
          "sessions": {
            "type": "string",
            "description": "The session collection: create with `POST`, list yours with `GET`."
          }
        }
      },
      "AgentChannel": {
        "type": "object",
        "description": "An independently published communication channel owned by an Agent.\nEach channel has its own type, config, and lifecycle status.",
        "required": [
          "id",
          "channel_type",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent that owns this channel. Also what lets responses carry a\n`view_url` to the channel's page (`/agents/{agent_id}/channels/{id}`),\nso a caller can hand out a direct link.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "auth": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChannelAuthConfig",
                "description": "Authentication policy for this channel."
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_config": {
            "description": "Channel-specific configuration (validated per channel type)."
          },
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType",
            "description": "Channel type (e.g. slack)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this channel was created."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether this channel is enabled."
          },
          "id": {
            "type": "string",
            "description": "External identifier (appchan_<32-hex>). Shown as \"id\" in API.",
            "example": "appchan_01933b5a000070008000000000000001"
          },
          "status": {
            "$ref": "#/components/schemas/ChannelStatus",
            "description": "Per-channel lifecycle. Authoritative for ingress (EVE-1007); `enabled`\nis retained for the App API's existing shape."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this channel was last updated."
          }
        }
      },
      "AgentChannelSummary": {
        "type": "object",
        "description": "Non-secret metadata for an agent's inbound channels. Schedules are triggers.",
        "required": [
          "id",
          "channel_type",
          "enabled",
          "status"
        ],
        "properties": {
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ChannelStatus"
          }
        }
      },
      "AgentCost": {
        "type": "object",
        "description": "An agent's cost this month, for the agent page.",
        "required": [
          "agent_id",
          "from",
          "cost_usd",
          "unpriced_records"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Agent's prefixed public identifier."
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Priced cost in USD since `from`."
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Start of this month in the org's timezone."
          },
          "unpriced_records": {
            "type": "integer",
            "format": "int64",
            "description": "Usage records since `from` with no price."
          }
        }
      },
      "AgentCostPlan": {
        "type": "object",
        "description": "Three representative workload hypotheses; prices and usage frequency are set separately.",
        "required": [
          "tasks"
        ],
        "properties": {
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostPlanTask"
            },
            "description": "Exactly three suggested tasks that users can edit before projecting costs."
          }
        },
        "additionalProperties": false
      },
      "AgentCredentialBinding": {
        "type": "object",
        "description": "Metadata for a write-only credential bound to one agent: either an MCP\ntool parameter or an HTTP API the agent's shell calls.",
        "required": [
          "id",
          "agent_id",
          "kind",
          "label",
          "configured",
          "created_at",
          "updated_at",
          "setup_url"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Agent that exclusively owns and may use this credential.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "binding": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SecretBinding",
                "description": "URL prefix and auth form the value may be sent with (`http`)."
              },
              {
                "type": "null"
              }
            ]
          },
          "configured": {
            "type": "boolean",
            "description": "Whether an encrypted value has been provisioned.",
            "example": true
          },
          "created_at": {
            "type": "string",
            "description": "RFC 3339 creation time.",
            "example": "2026-08-08T16:00:00Z"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional explanation of why the credential is needed.",
            "example": "Delivers scheduled status notifications"
          },
          "env_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Env var the agent's shell uses as a placeholder (`http`).",
            "example": "JEV_API_KEY"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable credential binding identifier.",
            "example": "01933b5a-0000-7000-8000-000000000001"
          },
          "kind": {
            "$ref": "#/components/schemas/AgentCredentialKind",
            "description": "How the credential is injected."
          },
          "label": {
            "type": "string",
            "description": "Human-readable credential label.",
            "example": "Visti channel key"
          },
          "mcp_server_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the attached MCP server (`mcp_parameter`).",
            "example": "visti"
          },
          "mcp_server_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact MCP endpoint authorized to receive the credential (`mcp_parameter`).",
            "example": "https://visti.sh/mcp"
          },
          "parameter_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Top-level tool argument injected by the server (`mcp_parameter`).",
            "example": "channel_key"
          },
          "setup_url": {
            "type": "string",
            "description": "Relative UI route where the user can securely provision the value.",
            "example": "/agents/agent_01933b5a000070008000000000000001?tab=credentials"
          },
          "tool_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP tool whose outbound call receives the credential (`mcp_parameter`).",
            "example": "visti_send"
          },
          "updated_at": {
            "type": "string",
            "description": "RFC 3339 last-update time.",
            "example": "2026-08-08T16:05:00Z"
          }
        }
      },
      "AgentCredentialKind": {
        "type": "string",
        "description": "How a write-only agent credential reaches the outside world.",
        "enum": [
          "mcp_parameter",
          "http"
        ]
      },
      "AgentDraft": {
        "type": "object",
        "description": "The agent the builder is shaping. Nothing is created from it until the\nuser confirms.",
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Capability ids to attach."
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Channel kinds to create as drafts: `public_chat`, `ag_ui`, `webhook`, `slack`."
          },
          "description": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "github_trigger": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DraftGitHubTrigger",
                "description": "GitHub events that start the agent."
              },
              {
                "type": "null"
              }
            ]
          },
          "mcp_servers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DraftMcpServer"
            },
            "description": "Org catalog MCP servers to attach."
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model to pin, set only when the org default has no working key."
          },
          "name": {
            "type": "string",
            "description": "Addressable name (lowercase slug)."
          },
          "schedule": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DraftSchedule"
              },
              {
                "type": "null"
              }
            ]
          },
          "system_prompt": {
            "type": "string"
          }
        }
      },
      "AgentDraftResult": {
        "type": "object",
        "required": [
          "reply",
          "draft",
          "suggestions"
        ],
        "properties": {
          "draft": {
            "$ref": "#/components/schemas/AgentDraft"
          },
          "reply": {
            "type": "string",
            "description": "The builder's answer to the last message."
          },
          "suggestions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Short follow-ups the user can send next."
          }
        }
      },
      "AgentExample": {
        "type": "object",
        "description": "A read-only agent example defined in code",
        "required": [
          "localizations",
          "name",
          "display_name",
          "description",
          "harness_name",
          "tags",
          "capabilities",
          "dev_only"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capability IDs this example uses",
            "example": [
              "current_time"
            ]
          },
          "description": {
            "type": "string",
            "description": "Short description",
            "example": "A friendly agent that tells dad jokes and knows what time it is."
          },
          "dev_only": {
            "type": "boolean",
            "description": "Whether this example requires dev/experimental mode",
            "example": false
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable display name (e.g. \"Dad Jokes Agent\")",
            "example": "Dad Jokes Agent"
          },
          "harness_name": {
            "type": "string",
            "description": "Explicit harness selected when importing this example.",
            "example": "conversation"
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display names and descriptions."
          },
          "name": {
            "type": "string",
            "description": "Name (e.g. \"dad-jokes-agent\")",
            "example": "dad-jokes-agent"
          },
          "setup": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentExampleSetup",
                "description": "Guided setup to run after importing, for templates that need one."
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for categorization",
            "example": [
              "humor",
              "demo"
            ]
          }
        }
      },
      "AgentExampleSetting": {
        "type": "object",
        "description": "One setup choice. Turning it on sets `config_key` to `true` in the config\nof the agent's `capability`.",
        "required": [
          "key",
          "label",
          "description",
          "capability",
          "config_key",
          "default"
        ],
        "properties": {
          "capability": {
            "type": "string",
            "description": "Capability whose configuration this option changes.",
            "example": "github"
          },
          "config_key": {
            "type": "string",
            "description": "Boolean configuration property controlled by this option.",
            "example": "allow_pull_requests"
          },
          "default": {
            "type": "boolean",
            "description": "Initial value shown during guided setup.",
            "example": false
          },
          "description": {
            "type": "string",
            "description": "Explains the effect of enabling this option.",
            "example": "Let the scanner open draft pull requests for high-confidence fixes."
          },
          "key": {
            "type": "string",
            "description": "Stable setup option key.",
            "example": "open_fix_pull_requests"
          },
          "label": {
            "type": "string",
            "description": "Human-readable setup option label.",
            "example": "Open fix pull requests"
          }
        }
      },
      "AgentExampleSetup": {
        "type": "object",
        "description": "What the UI walks the user through after importing a template.",
        "required": [
          "connect_github",
          "connections",
          "repository_placeholder",
          "trigger",
          "settings"
        ],
        "properties": {
          "connect_github": {
            "type": "boolean",
            "description": "The agent needs its own GitHub App (`POST /v1/agents/{id}/github/connect`).",
            "example": true
          },
          "connections": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other connection providers the agent's service account needs.",
            "example": [
              "daytona"
            ]
          },
          "repository_placeholder": {
            "type": "string",
            "description": "Text in `trigger` to replace with the picked `owner/repo`.",
            "example": "${repository}"
          },
          "settings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentExampleSetting"
            },
            "description": "Yes/no choices, each stored as one capability config key.",
            "example": []
          },
          "trigger": {
            "type": "object",
            "description": "Body for `POST /v1/agents/{agent_id}/triggers` once the placeholder is\nreplaced."
          }
        }
      },
      "AgentFailedSession": {
        "type": "object",
        "required": [
          "session",
          "failed_turns",
          "failure_sequence",
          "failed_at"
        ],
        "properties": {
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "failed_at": {
            "type": "string",
            "format": "date-time"
          },
          "failed_turns": {
            "type": "integer",
            "format": "int64"
          },
          "failure_sequence": {
            "type": "integer",
            "format": "int32",
            "description": "Sequence of the latest terminal failure in the requested window."
          },
          "session": {
            "$ref": "#/components/schemas/Session"
          }
        }
      },
      "AgentFailureSessions": {
        "type": "object",
        "required": [
          "data",
          "total_sessions",
          "failed_turns",
          "after",
          "before",
          "offset",
          "limit"
        ],
        "properties": {
          "after": {
            "type": "string",
            "format": "date-time"
          },
          "before": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentFailedSession"
            }
          },
          "failed_turns": {
            "type": "integer",
            "format": "int64"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total_sessions": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AgentGitHubDisconnect": {
        "type": "object",
        "description": "Result of disconnecting an agent from GitHub.",
        "required": [
          "outcome"
        ],
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/GitHubDisconnectOutcome"
          }
        }
      },
      "AgentGitHubStatus": {
        "type": "object",
        "description": "GitHub as seen from an agent's page.",
        "required": [
          "connected",
          "app_created",
          "missing_permissions",
          "suggested_owners",
          "everruns_app_installations"
        ],
        "properties": {
          "account": {
            "type": [
              "string",
              "null"
            ],
            "description": "GitHub account the App is installed on."
          },
          "app_created": {
            "type": "boolean",
            "description": "The App exists. Without `connected` it was never installed, or its\ninstallation was removed."
          },
          "app_settings_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The App's settings page on GitHub, where its logo is uploaded\n(GitHub has no API for that). `None` when the owner's account kind is\nnot known, since user and organization Apps live at different paths."
          },
          "app_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "app_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "bot_login": {
            "type": [
              "string",
              "null"
            ],
            "description": "The login GitHub shows for the agent, e.g. `pr-summarizer[bot]`, or the\nshared App's (`everruns[bot]`) when the agent chose it and the\ndeployment names its slug; `None` otherwise.",
            "example": "pr-summarizer[bot]"
          },
          "connected": {
            "type": "boolean",
            "description": "An installation is bound, so tools and triggers work: the agent's own\nApp's, or a shared Everruns App installation the agent chose."
          },
          "everruns_app_installations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EverrunsAppInstallation"
            },
            "description": "Shared Everruns App installations an org admin linked, which this agent\ncan choose instead of an App of its own (D3). Empty when none is linked\nor the deployment has no shared App."
          },
          "identity_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent's identity, once it has one; disconnect goes through it."
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Which GitHub identity the agent acts as: `agent_app` (its own App) or\n`everruns_app` (the shared Everruns App). `None` before either exists.",
            "example": "agent_app"
          },
          "missing_permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Permissions new Apps request that this installation lacks (`name:level`),\ne.g. `actions:read` for CI triggers on an App created before them.\nEmpty when not connected."
          },
          "repository_selection": {
            "type": [
              "string",
              "null"
            ],
            "description": "`all` or `selected`.",
            "example": "selected"
          },
          "suggested_owners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GitHubOwnerSuggestion"
            },
            "description": "GitHub accounts this organization already reached, as candidates for\n`owner_org` when creating the App: installation accounts of its GitHub\nconnections and owners of its other agents' Apps. Organizations first,\nthen users, then accounts of unknown kind; by login within each."
          },
          "view_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent's GitHub page in the console, so a caller can link to it.\nAbsolute in responses; built as a relative path here because the\nconsole's address is known only where links are decorated.",
            "example": "https://app.everruns.com/agents/agent_01933b5a000070008000000000000001/github"
          }
        }
      },
      "AgentHarnessSource": {
        "type": "string",
        "enum": [
          "explicit",
          "organization_default"
        ]
      },
      "AgentHarnessStatus": {
        "type": "string",
        "enum": [
          "active",
          "archived",
          "deleted",
          "unresolved"
        ]
      },
      "AgentHarnessSummary": {
        "type": "object",
        "description": "Harness that a newly created session for this agent will resolve to.",
        "required": [
          "localizations",
          "source",
          "status"
        ],
        "properties": {
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display names and descriptions."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/AgentHarnessSource"
          },
          "status": {
            "$ref": "#/components/schemas/AgentHarnessStatus"
          }
        }
      },
      "AgentKey": {
        "type": "object",
        "description": "An agent key as management sees it. Never carries the secret.",
        "required": [
          "id",
          "channel_id",
          "name",
          "prefix",
          "permissions",
          "created_at"
        ],
        "properties": {
          "channel_id": {
            "type": "string",
            "description": "The api channel the key calls.",
            "example": "appchan_01933b5a000070008000000000000001"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key stops working, if ever."
          },
          "id": {
            "type": "string",
            "description": "Key id (`agentkey_…`). Stable across rotations.",
            "example": "agentkey_01933b5a000070008000000000000001"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last successful use (updated at most once a minute)."
          },
          "name": {
            "type": "string",
            "description": "Display name.",
            "example": "Support backend"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentKeyPermission"
            },
            "description": "What the key may do."
          },
          "prefix": {
            "type": "string",
            "description": "Non-secret display prefix of the current secret.",
            "example": "evr_ak_1a2b3c4d..."
          },
          "previous_valid_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Until when the secret replaced by the last rotation still works."
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key was revoked; a revoked key never works again."
          }
        }
      },
      "AgentKeyPermission": {
        "type": "string",
        "description": "What a key may do.",
        "enum": [
          "sessions",
          "end_user"
        ]
      },
      "AgentKeyWithSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AgentKey"
          },
          {
            "type": "object",
            "required": [
              "secret"
            ],
            "properties": {
              "secret": {
                "type": "string",
                "description": "The secret. Shown only in this response; store it now.",
                "example": "evr_ak_1a2b3c4d5e6f…"
              }
            }
          }
        ],
        "description": "A key with its secret, returned once by create and rotate."
      },
      "AgentMcpAttachment": {
        "type": "object",
        "description": "Effective MCP attachment projected for an agent and the current caller.",
        "required": [
          "name",
          "source",
          "source_label",
          "overridden_sources",
          "acts_as",
          "connect_in_chat",
          "deferred",
          "header_names",
          "tools_available",
          "tools",
          "state",
          "action",
          "can_revoke",
          "editable"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/AgentMcpAttachmentAction",
            "description": "Connection action available to the current caller."
          },
          "acts_as": {
            "$ref": "#/components/schemas/McpServerActsAs",
            "description": "Identity whose connection is used when the attachment calls the MCP server."
          },
          "can_revoke": {
            "type": "boolean",
            "description": "Whether the current caller can revoke the active connection."
          },
          "connect_in_chat": {
            "$ref": "#/components/schemas/McpConnectInChat",
            "description": "Whether a missing sign-in pauses the turn with an in-chat card (`ask`)\nor fails the call with a settings link (`never`)."
          },
          "connected_as": {
            "type": [
              "string",
              "null"
            ],
            "description": "Connected account name, or the preset name when the provider did not supply one."
          },
          "connection_provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth provider key used to create or revoke the attachment connection."
          },
          "contributor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentMcpAttachmentContributor",
                "description": "Capability that contributed the attachment, when the winning source is a capability."
              },
              {
                "type": "null"
              }
            ]
          },
          "deferred": {
            "type": "boolean",
            "description": "Whether the attachment's tools are listed only when the model reveals\nthe server through tool search (`false` lists them at turn start)."
          },
          "editable": {
            "type": "boolean",
            "description": "Whether the attachment is defined directly on the agent and can be removed there."
          },
          "header_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Header names configured for the endpoint; secret header values are omitted."
          },
          "name": {
            "type": "string",
            "description": "Logical attachment name used in the agent's MCP configuration."
          },
          "overridden_sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentMcpAttachmentSourceInfo"
            },
            "description": "Lower-precedence configuration layers overridden by this attachment."
          },
          "preset_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the active catalog preset when the reference resolves."
          },
          "preset_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Catalog preset name referenced by the attachment, including a missing preset."
          },
          "service_connection_provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Connection provider (e.g. `github`) whose connection on the agent\nsupplies the service credential, when the preset names one. The agent's\nservice login is then set up on the agent's integrations, not by an MCP\nsign-in."
          },
          "sign_in": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentMcpSignIn",
                "description": "The agent's own sign-in to this catalog server and what it can still\ndo. Absent when the attachment does not sign in as the agent, or the\nagent never signed in."
              },
              {
                "type": "null"
              }
            ]
          },
          "sign_in_href": {
            "type": [
              "string",
              "null"
            ],
            "description": "Console path where a person signs in (again), when a sign-in is\nmissing, stopped working or will stop."
          },
          "source": {
            "$ref": "#/components/schemas/AgentMcpAttachmentSource",
            "description": "Highest-precedence configuration layer that supplied this attachment."
          },
          "source_label": {
            "type": "string",
            "description": "Human-readable name of the winning capability, harness, or agent layer."
          },
          "state": {
            "$ref": "#/components/schemas/AgentMcpAttachmentState",
            "description": "Current preset and connection availability."
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Cached names of tools exposed by the MCP server."
          },
          "tools_available": {
            "type": "boolean",
            "description": "Whether at least one cached tool name is available."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Effective MCP endpoint URL from the catalog preset or inline configuration."
          }
        }
      },
      "AgentMcpAttachmentAction": {
        "type": "string",
        "description": "Action the current caller can take to make an MCP attachment usable.",
        "enum": [
          "none",
          "connect",
          "authorize",
          "ask_admin"
        ]
      },
      "AgentMcpAttachmentContributor": {
        "type": "object",
        "description": "Capability that contributed an effective MCP attachment.",
        "required": [
          "id",
          "name",
          "href"
        ],
        "properties": {
          "href": {
            "type": "string",
            "description": "UI path for the capability detail page."
          },
          "id": {
            "type": "string",
            "description": "Canonical capability ID."
          },
          "name": {
            "type": "string",
            "description": "Human-readable capability name."
          }
        }
      },
      "AgentMcpAttachmentSource": {
        "type": "string",
        "description": "Configuration layer that supplied an effective MCP attachment.",
        "enum": [
          "capability",
          "harness",
          "agent"
        ]
      },
      "AgentMcpAttachmentSourceInfo": {
        "type": "object",
        "description": "Configuration layer that was overridden by the effective MCP attachment.",
        "required": [
          "source",
          "source_label"
        ],
        "properties": {
          "source": {
            "$ref": "#/components/schemas/AgentMcpAttachmentSource",
            "description": "Overridden configuration layer."
          },
          "source_label": {
            "type": "string",
            "description": "Human-readable name of the overridden capability, harness, or agent layer."
          }
        }
      },
      "AgentMcpAttachmentState": {
        "type": "string",
        "description": "Availability state of an effective MCP attachment.",
        "enum": [
          "ready",
          "connection_missing",
          "preset_missing",
          "reconnect_required"
        ]
      },
      "AgentMcpSignIn": {
        "type": "object",
        "description": "The agent's own (service) sign-in to an OAuth catalog server.",
        "required": [
          "state"
        ],
        "properties": {
          "detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reason in plain words."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it stops working, for `expires_soon`."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it cannot renew or stopped working: `unbound`, `settings_changed`,\n`no_refresh_token`, `refused` or `rejected`."
          },
          "since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it stopped working, for `needs_sign_in`, when known."
          },
          "state": {
            "$ref": "#/components/schemas/AgentMcpSignInState",
            "description": "What the sign-in can still do."
          }
        }
      },
      "AgentMcpSignInState": {
        "type": "string",
        "description": "What the agent's own sign-in to a catalog server can still do.",
        "enum": [
          "working",
          "expires_soon",
          "needs_sign_in"
        ]
      },
      "AgentModelRole": {
        "type": "string",
        "description": "An organization model an agent follows instead of pinning a model.",
        "enum": [
          "research"
        ]
      },
      "AgentPreviewResponse": {
        "type": "object",
        "description": "Response showing the final agent shape after applying capabilities",
        "required": [
          "features",
          "initial_files",
          "system_prompt",
          "tools",
          "findings"
        ],
        "properties": {
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Session features from effective capabilities and their dependencies."
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "description": "Advisory findings from built-in checks"
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Effective starter files after merging the harness and agent."
          },
          "system_prompt": {
            "type": "string",
            "description": "The full system prompt with capability additions prepended"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "All tool definitions from capabilities"
          }
        }
      },
      "AgentScript": {
        "type": "object",
        "description": "A saved shell script an agent owns.",
        "required": [
          "id",
          "agent_id",
          "name",
          "description",
          "body",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Agent that owns this script.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Archive timestamp."
          },
          "body": {
            "type": "string",
            "description": "Shell script source."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Delete timestamp."
          },
          "description": {
            "type": "string",
            "description": "One-line description of what the script does."
          },
          "id": {
            "type": "string",
            "description": "External identifier (scr_<32-hex>). Shown as `id` in API.",
            "example": "scr_01933b5a000070008000000000000001"
          },
          "input_schema": {
            "type": [
              "object",
              "null"
            ],
            "description": "JSON Schema (`type: object`) of the input the script reads on stdin."
          },
          "name": {
            "type": "string",
            "description": "Unique name among the agent's active scripts.",
            "example": "daily-digest"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp."
          }
        }
      },
      "AgentSessionView": {
        "type": "object",
        "description": "A session as an execution caller sees it: no instructions, tools, owners\nor costs, which are management's.",
        "required": [
          "archived",
          "pinned",
          "id",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "example": "session_01933b5a000070008000000000000001"
          },
          "last_turn_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Outcome of the last finished turn: `completed`, `failed` or `cancelled`."
          },
          "parent_session_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "pending_approvals": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PendingApprovalView"
            },
            "description": "Held-back tool calls the session waits on. Same rule as\n`pending_questions`."
          },
          "pending_questions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PendingQuestionView"
            },
            "description": "Question sets the session waits on. Only `GET …/sessions/{id}` reads\nthem; a list leaves them out."
          },
          "pinned": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "description": "`started`, `active`, `idle`, `waitingforinput` or `failed`.",
            "example": "idle"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "work": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkReport",
                "description": "What the latest turn is doing or got done. Only `GET …/sessions/{id}`\nreads it. Under `full` visibility it is the whole report; otherwise\nthe public view: state, plan counts, facts, the agent's own summary\nand links, never step labels or approval prompts."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AgentSourceAccounts": {
        "type": "object",
        "description": "Development GitHub accounts available to an Agent's source sync.",
        "required": [
          "available",
          "personal",
          "organization"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "The deployment has the shared Everruns GitHub App configured."
          },
          "install_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where a person installs the shared Everruns App on another GitHub account."
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationSourceAccount"
          },
          "personal": {
            "$ref": "#/components/schemas/PersonalSourceAccount"
          }
        }
      },
      "AgentSourceStatus": {
        "type": "object",
        "description": "Continuous GitHub source binding, applied revision and reconciliation status.",
        "required": [
          "mode",
          "github_account",
          "local_dirty",
          "generation",
          "repository",
          "branch",
          "path",
          "managed_channels",
          "status"
        ],
        "properties": {
          "applied_commit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last successfully applied commit; retained when a later revision fails.",
            "example": "0123456789abcdef0123456789abcdef01234567"
          },
          "branch": {
            "type": "string",
            "description": "Branch monitored for source updates.",
            "example": "main"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Safe diagnostic for the latest failed check, without upstream credentials.",
            "example": "Source package validation failed: missing capability"
          },
          "generation": {
            "type": "string",
            "format": "uuid",
            "description": "Binding generation used to detect a concurrent reconnect or disconnect.",
            "example": "018f30c8-c970-7cb5-a8c9-9348aa71ba8c"
          },
          "github_account": {
            "type": "string",
            "description": "GitHub account the source reads through: personal, organization, or\nagent for a binding made before sync stopped using the Agent's identity.",
            "example": "organization"
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "UTC time when the source was last checked.",
            "example": "2026-10-23T12:00:00Z"
          },
          "last_synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "UTC time when a source revision was last applied successfully.",
            "example": "2026-10-23T12:00:00Z"
          },
          "local_dirty": {
            "type": "boolean",
            "description": "Local edits are waiting for GitHub synchronization.",
            "example": false
          },
          "managed_channels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Package channel names whose configuration is managed by the source.",
            "example": [
              "chat"
            ]
          },
          "mode": {
            "type": "string",
            "description": "Direction of synchronization: pull or two_way.",
            "example": "two_way"
          },
          "path": {
            "type": "string",
            "description": "Repository-relative package folder or manifest; empty means the root.",
            "example": "agents/support"
          },
          "repository": {
            "type": "string",
            "description": "Selected GitHub repository in owner/name form.",
            "example": "acme/agents"
          },
          "status": {
            "type": "string",
            "description": "Current reconciliation state, including conflict when both sides changed.",
            "example": "synced"
          }
        }
      },
      "AgentStatus": {
        "type": "string",
        "description": "Agent lifecycle status.\n- `active`: Agent is available for use\n- `archived`: Agent is hidden from listings and cannot be modified or assigned\n- `deleted`: Agent is a tombstone kept only for historical references",
        "enum": [
          "active",
          "archived",
          "deleted"
        ],
        "example": "active"
      },
      "AgentTrigger": {
        "type": "object",
        "description": "AgentTrigger is a durable, agent-owned invocation trigger.",
        "required": [
          "id",
          "agent_id",
          "trigger_type",
          "config",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Agent that owns this trigger.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Archive timestamp."
          },
          "config": {
            "description": "Type-specific configuration (parsed via typed accessors)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Delete timestamp."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the trigger is currently active."
          },
          "id": {
            "type": "string",
            "description": "External identifier (trg_<32-hex>). Shown as `id` in API.",
            "example": "trg_01933b5a000070008000000000000001"
          },
          "ingress_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable HTTP ingress identifier for trigger types that accept requests."
          },
          "trigger_type": {
            "$ref": "#/components/schemas/AgentTriggerType",
            "description": "The kind of event that fires this trigger."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp."
          }
        }
      },
      "AgentTriggerDelivery": {
        "type": "object",
        "description": "One recorded event delivery for an agent trigger.",
        "required": [
          "id",
          "source",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the event was received."
          },
          "event_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source event identifier used for deduplication, when the source has one."
          },
          "event_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source event type, when the source has one."
          },
          "id": {
            "type": "string",
            "description": "Delivery identifier."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the event was filtered or failed."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session that handled the event."
          },
          "source": {
            "type": "string",
            "description": "Where the event came from (`schedule`, `webhook`, ...)."
          },
          "status": {
            "$ref": "#/components/schemas/TriggerDeliveryStatus",
            "description": "Outcome."
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "Subject the event is about (for example `owner/repo#12`)."
          }
        }
      },
      "AgentTriggerRun": {
        "type": "object",
        "description": "One recent durable execution of an agent schedule trigger.",
        "required": [
          "id",
          "status",
          "scheduled_at"
        ],
        "properties": {
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the execution completed, when terminal."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Failure message for an unsuccessful execution."
          },
          "id": {
            "type": "string",
            "description": "Durable execution identifier."
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the execution was scheduled."
          },
          "status": {
            "type": "string",
            "description": "Outcome of the run's task: completed, failed, skipped, cancelled, or queued, running or retrying while it is outstanding."
          }
        }
      },
      "AgentTriggerSummary": {
        "type": "object",
        "description": "A trigger: a run the agent starts itself (schedule, webhook, GitHub, MCP event).",
        "required": [
          "trigger_type",
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "trigger_type": {
            "type": "string",
            "example": "github"
          }
        }
      },
      "AgentTriggerType": {
        "type": "string",
        "description": "The kind of event that fires an agent trigger.",
        "enum": [
          "schedule",
          "webhook",
          "github",
          "mcp_event"
        ]
      },
      "AgentViewDefinition": {
        "type": "object",
        "description": "An Agent author's default layout and publication permissions.",
        "required": [
          "title",
          "layout"
        ],
        "properties": {
          "allow_agent_layout": {
            "type": "boolean",
            "description": "Whether a successful run may also publish a replacement layout.",
            "example": false
          },
          "allow_personalization": {
            "type": "boolean",
            "description": "Whether viewers may use a personal layout for this view.",
            "example": true
          },
          "data_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Top-level keys that an agent is allowed to publish for this layout.",
            "example": [
              "status",
              "changes"
            ]
          },
          "layout": {
            "$ref": "#/components/schemas/AgentViewLayout",
            "description": "Default layout used until a run publishes a replacement."
          },
          "title": {
            "type": "string",
            "description": "Display name used in the chat and full-page placements.",
            "example": "Repository activity"
          }
        },
        "additionalProperties": false
      },
      "AgentViewLayout": {
        "oneOf": [
          {
            "type": "object",
            "description": "A2UI 1.0 operations for one surface using the standard catalog.",
            "required": [
              "operations",
              "format"
            ],
            "properties": {
              "format": {
                "type": "string",
                "enum": [
                  "a2ui"
                ]
              },
              "operations": {
                "type": "array",
                "items": {}
              }
            }
          },
          {
            "type": "object",
            "description": "Static markup rendered in a sandbox without scripts or network access.",
            "required": [
              "source",
              "format"
            ],
            "properties": {
              "format": {
                "type": "string",
                "enum": [
                  "html"
                ]
              },
              "source": {
                "type": "string",
                "example": "<h2>Repository activity</h2>"
              }
            }
          }
        ],
        "description": "A fixed or generated layout used to render an Agent view."
      },
      "AgentViewPreference": {
        "type": "object",
        "description": "Saves or resets the current viewer's personal layout at a given revision.",
        "required": [
          "revision",
          "layout"
        ],
        "properties": {
          "layout": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentViewLayout",
                "description": "Pass null to restore the published layout."
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "The revision returned by the most recent read of the published view.",
            "example": 1
          }
        }
      },
      "AgentViewSettings": {
        "type": "object",
        "description": "The current revision and optional view definition for an Agent.",
        "required": [
          "revision"
        ],
        "properties": {
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Revision zero represents an Agent with no saved view settings.",
            "example": 1
          },
          "view": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentViewDefinition",
                "description": "Configured view, if enabled for this Agent."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AgentWithCounts": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Agent"
          },
          {
            "type": "object",
            "required": [
              "session_count",
              "app_count",
              "effective_harness",
              "channels"
            ],
            "properties": {
              "app_count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "channels": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AgentChannelSummary"
                }
              },
              "effective_harness": {
                "$ref": "#/components/schemas/AgentHarnessSummary"
              },
              "session_count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              }
            }
          }
        ],
        "description": "Agent list/detail payload with relationship counts and resolved harness metadata."
      },
      "AllowedAction": {
        "type": "object",
        "description": "Agent-actionable link describing a follow-up the caller can take. Used in\ntwo contexts:\n\n* **Error recovery** — `ErrorResponse.allowed_actions` carries `rel`s like\n  `retry`, `retry-later`, `unarchive`, `get-existing` so the agent knows\n  the right next call after a 4xx/429.\n* **Entity hypermedia** — `WithUrls<T>.allowed_actions` carries state-aware\n  `rel`s like `cancel`, `events`, `self`, `update` on the entity itself\n  so the agent can follow links instead of reconstructing routes from\n  prose.\n\nThe shape is intentionally identical across both contexts; the closed\n`rel` vocabulary distinguishes them.",
        "required": [
          "rel"
        ],
        "properties": {
          "hint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short, agent-readable hint (e.g. \"Shorten 'name' to <= 200 chars.\",\n\"Cancel the active turn for this session.\")."
          },
          "href": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute (preferred) or relative URL the caller may invoke\ndirectly. **Always present on entity hypermedia actions**\n(`WithUrls<T>.allowed_actions`); **optional on error-recovery\nactions** (`ErrorResponse.allowed_actions`) where the matching\n`operation_id` is enough and the URI is implicit from the failed\ncall."
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTP method to use against `href`. Required for entity hypermedia\nactions; usually omitted on error-recovery actions where the same\noperation is retried with its original method.",
            "example": "POST"
          },
          "operation_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "OpenAPI `operationId` the caller should invoke. Lets an MCP client\nresolve the call without parsing `href`."
          },
          "rel": {
            "type": "string",
            "description": "Link relation describing the action. Examples: `self`, `cancel`, `pause`,\n`resume`, `events`, `retry`, `retry-later`, `unarchive`,\n`get-existing`, `delete`, `update`."
          },
          "schema_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "OpenAPI `$ref` to the request-body schema, when the action takes one\n(e.g. `#/components/schemas/UpdateSessionRequest`). Lets a tool-calling\nagent fetch the input shape without scanning the whole spec."
          }
        }
      },
      "AnnotationSource": {
        "type": "object",
        "description": "The source a [`TextAnnotation`] points to.",
        "required": [
          "uri"
        ],
        "properties": {
          "location": {
            "description": "Provenance within the document (line / char / page / block ranges),\nreusing the retrieval `location` JSONB shape."
          },
          "snippet": {
            "type": [
              "string",
              "null"
            ],
            "description": "Trimmed passage that backs the claim. Display-only; never relied on for\nprompt reconstruction.",
            "example": "The control plane owns durable state."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable source title, when known.",
            "example": "Architecture Overview"
          },
          "uri": {
            "type": "string",
            "description": "Stable, linkable locator (e.g. `github://owner/repo@main/docs/x.md` or an\n`https://` URL).",
            "example": "github://owner/repo@main/docs/x.md"
          }
        }
      },
      "ApiKeyConnectionRequest": {
        "type": "object",
        "description": "Request body for API-key-based connections (e.g., Brave Search)",
        "required": [
          "api_key"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Provider API key, encrypted before storage.",
            "example": "example-api-key"
          }
        }
      },
      "App": {
        "type": "object",
        "description": "App configuration for deploying agents to channels.\nAn app binds a harness and optional agent to distribution channels with a\npublish lifecycle.",
        "required": [
          "id",
          "name",
          "harness_id",
          "owner_principal_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional ID of the agent to use (format: agent_{32-hex}).",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the app was archived."
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentChannel"
            },
            "description": "Distribution channels attached to this app."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the app was created."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the app was deleted."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description of what the app does."
          },
          "effective_owner": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PrincipalSummary",
                "description": "Effective human owner summary."
              },
              {
                "type": "null"
              }
            ]
          },
          "harness_id": {
            "type": "string",
            "description": "ID of the harness to use (format: harness_{32-hex}).",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "id": {
            "type": "string",
            "description": "External identifier (app_<32-hex>). Shown as \"id\" in API.",
            "example": "app_01933b5a000070008000000000000001"
          },
          "name": {
            "type": "string",
            "description": "Display name of the app."
          },
          "owner": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PrincipalSummary",
                "description": "Owning principal summary."
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_principal_id": {
            "type": "string",
            "description": "Owning principal for this app.",
            "example": "principal_01933b5a000070008000000000000001"
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the app was last published."
          },
          "resolved_owner_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Denormalized effective human owner of the owning principal lineage."
          },
          "status": {
            "$ref": "#/components/schemas/AppStatus",
            "description": "Current lifecycle status."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the app was last updated."
          },
          "virtual_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional virtual identity that represents the app in unattended/channel execution.",
            "example": "identity_01933b5a00007000800000000000001"
          }
        }
      },
      "AppChannel": {
        "type": "object",
        "description": "An independently published communication channel owned by an Agent.\nEach channel has its own type, config, and lifecycle status.",
        "required": [
          "id",
          "channel_type",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent that owns this channel. Also what lets responses carry a\n`view_url` to the channel's page (`/agents/{agent_id}/channels/{id}`),\nso a caller can hand out a direct link.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "auth": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChannelAuthConfig",
                "description": "Authentication policy for this channel."
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_config": {
            "description": "Channel-specific configuration (validated per channel type)."
          },
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType",
            "description": "Channel type (e.g. slack)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this channel was created."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether this channel is enabled."
          },
          "id": {
            "type": "string",
            "description": "External identifier (appchan_<32-hex>). Shown as \"id\" in API.",
            "example": "appchan_01933b5a000070008000000000000001"
          },
          "status": {
            "$ref": "#/components/schemas/ChannelStatus",
            "description": "Per-channel lifecycle. Authoritative for ingress (EVE-1007); `enabled`\nis retained for the App API's existing shape."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this channel was last updated."
          }
        }
      },
      "AppEndpointAuthConfig": {
        "type": "object",
        "description": "Authentication config for one channel/channel.",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/ChannelAuthMode"
          },
          "provider": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChannelAuthProviderConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "requirements": {
            "$ref": "#/components/schemas/ChannelAuthRequirements"
          }
        },
        "example": {
          "mode": "api_key",
          "requirements": {
            "audiences": [
              "everruns-api"
            ],
            "scopes": [
              "app:invoke"
            ]
          }
        }
      },
      "AppEndpointAuthMode": {
        "type": "string",
        "description": "Agent channel authentication mode.\n\nStored on `AgentChannel.auth` so users can protect one endpoint without first\ncreating org-level identity-provider state.",
        "enum": [
          "anonymous",
          "shared_secret",
          "api_key",
          "google_oidc",
          "oidc",
          "oauth2_introspection",
          "http_basic",
          "mtls"
        ]
      },
      "AppEndpointAuthProviderConfig": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "client_id",
              "type"
            ],
            "properties": {
              "allowed_domains": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "client_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "google_oidc"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "issuer",
              "type"
            ],
            "properties": {
              "issuer": {
                "type": "string"
              },
              "jwks_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "oidc"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "introspection_url",
              "type"
            ],
            "properties": {
              "client_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "client_secret": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "client_secret_configured": {
                "type": "boolean"
              },
              "introspection_url": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "oauth2_introspection"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "username",
              "type"
            ],
            "properties": {
              "password": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "password_configured": {
                "type": "boolean"
              },
              "password_hash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "http_basic"
                ]
              },
              "username": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "header_name",
              "type"
            ],
            "properties": {
              "allowed_values": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "header_name": {
                "type": "string"
              },
              "proxy_secret": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Shared secret the trusted proxy includes in `proxy_secret_header`.\nWrite-only: redacted in GET responses. See TM-AUTH-021."
              },
              "proxy_secret_configured": {
                "type": "boolean"
              },
              "proxy_secret_header": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Header the trusted reverse proxy uses to prove its identity.\nRequired. Configs without this field fail closed at verification time."
              },
              "type": {
                "type": "string",
                "enum": [
                  "mtls"
                ]
              }
            }
          }
        ],
        "description": "OIDC/OAuth/basic/mTLS provider details for one channel."
      },
      "AppEndpointAuthRequirements": {
        "type": "object",
        "description": "Claim and credential requirements common to channel auth providers.",
        "properties": {
          "audiences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JWT `aud` values to require on inbound tokens. Empty list disables audience checking."
          },
          "claims": {
            "type": "object",
            "description": "Arbitrary claim equality predicates. Empty map disables claim filtering.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowlist of email/identifier domains. Empty list disables domain filtering."
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowlist of group memberships (from `groups` claim). Empty list disables group filtering."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "OAuth scope strings to require (space-delimited per scope entry). Empty list disables scope checking."
          },
          "subjects": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowlist of `sub` claim values. Empty list disables subject filtering."
          }
        }
      },
      "AppStatus": {
        "type": "string",
        "description": "App lifecycle status.\n- `draft`: App is configured but not accepting requests\n- `published`: App is live, accepting incoming requests\n- `archived`: App is hidden from listings and cannot be modified or assigned\n- `deleted`: App is a tombstone kept only for historical references",
        "enum": [
          "draft",
          "published",
          "archived",
          "deleted"
        ],
        "example": "published"
      },
      "AppendManagerContextRequest": {
        "type": "object",
        "description": "Add a paragraph to an entity's manager context.",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "description": "The paragraph to add, markdown."
          }
        }
      },
      "ApplyModelPresetResult": {
        "type": "object",
        "description": "What copying a preset into the organization defaults changed.",
        "required": [
          "applied_jobs",
          "skipped_jobs",
          "organization"
        ],
        "properties": {
          "applied_jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelJob"
            },
            "description": "Jobs whose organization default now uses the preset's model."
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationResponse",
            "description": "The organization after the copy."
          },
          "skipped_jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelJob"
            },
            "description": "Jobs left as they were: the preset has no model for them, or the\nmodel cannot serve that default (decision defaults need a calibrated\ndecision model)."
          }
        }
      },
      "ApplyModelSelection": {
        "type": "object",
        "description": "Apply a set of reviewed model enablement changes in one transaction.",
        "required": [
          "changes"
        ],
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelSelectionChange"
            }
          }
        }
      },
      "ArtifactSpec": {
        "type": "object",
        "description": "Named session file to collect after an eval case completes.",
        "required": [
          "name",
          "path"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Export key for this artifact (for example `patch` or `log`).",
            "example": "patch"
          },
          "path": {
            "type": "string",
            "description": "Absolute path in the session filesystem.",
            "example": "/workspace/fix.patch"
          }
        }
      },
      "AtifImportReport": {
        "type": "object",
        "description": "Result of an ATIF trajectory import: eval cases\ncreated/updated from imported trajectories, upserted by case name.",
        "required": [
          "created",
          "updated",
          "case_ids"
        ],
        "properties": {
          "case_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Public ids of the affected cases, in import order.",
            "example": [
              "evalcase_01933b5a000070008000000000000001"
            ]
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Number of eval cases created.",
            "example": 3,
            "minimum": 0
          },
          "updated": {
            "type": "integer",
            "format": "int64",
            "description": "Number of existing eval cases updated (matched by name).",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "AuditLogEntry": {
        "type": "object",
        "description": "Domain-level audit log view. Mirrors `AuditLogRow` but omits `org_id`\n(derived from the caller) and formats IDs as strings, matching the\nshape returned by the HTTP and MCP adapters.",
        "required": [
          "id",
          "domain",
          "action",
          "event_type",
          "metadata",
          "created_at"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "What happened, as `<domain>.<resource>.<verb>`.",
            "example": "management.member.invited"
          },
          "actor_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "UUID of the user who acted, when a user did.",
            "example": "01933b5a-0000-7000-8000-000000000001"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "domain": {
            "type": "string",
            "description": "Audit domain: `management` for org administration, `agent` for agent activity.",
            "example": "management"
          },
          "event_type": {
            "type": "string",
            "description": "Legacy event type, kept for older filters.",
            "example": "auth.login"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Client IP address of the request, when known."
          },
          "metadata": {
            "description": "Free-form metadata attached to this resource."
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Identifier of the resource the entry is about."
          },
          "target_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Kind of resource the entry is about.",
            "example": "member"
          }
        }
      },
      "AvailableFindingAction": {
        "type": "object",
        "description": "An action a person can take on a finding now.",
        "required": [
          "kind",
          "target_id"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "What it would do: `pause_schedule`."
          },
          "target_id": {
            "type": "string",
            "description": "What it would act on, by public id."
          }
        }
      },
      "AvatarPreset": {
        "type": "object",
        "description": "Presentation and search metadata for one curated agent avatar.",
        "required": [
          "id",
          "name",
          "family",
          "role",
          "description",
          "keywords"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Short description of the preset's appearance."
          },
          "family": {
            "type": "string",
            "description": "Visual family used to filter the catalog.",
            "example": "Familiars"
          },
          "id": {
            "type": "string",
            "description": "Stable catalog ID used to select this preset.",
            "example": "familiars-patch"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Search terms covering the preset's appearance and suggested uses."
          },
          "name": {
            "type": "string",
            "description": "Display name of the character or design.",
            "example": "Patch"
          },
          "role": {
            "type": "string",
            "description": "Suggested agent role for this design.",
            "example": "Developer"
          }
        }
      },
      "AvatarPresetSelection": {
        "type": "object",
        "description": "The curated preset currently assigned to an agent, if any.",
        "properties": {
          "preset_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Catalog ID, or null when the agent has an upload or no avatar.",
            "example": "familiars-patch"
          }
        }
      },
      "BTreeMap": {
        "type": "object",
        "additionalProperties": {
          "type": "object",
          "description": "Session-, agent-, or harness-scoped remote MCP server configuration.\n\nThis intentionally mirrors the `mcpServers` object shape used by common MCP\nclient config files while staying within Everruns' current remote-HTTP-only\nsupport.",
          "properties": {
            "actsAs": {
              "$ref": "#/components/schemas/McpServerActsAs",
              "description": "Identity whose grant this attachment requests."
            },
            "args": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Arguments passed to the stdio `command`."
            },
            "auth_mode": {
              "$ref": "#/components/schemas/McpServerAuthMode",
              "description": "Authentication mode used when executing tools from this scoped server."
            },
            "command": {
              "type": [
                "string",
                "null"
              ],
              "description": "Executable to spawn for a stdio transport server."
            },
            "connectInChat": {
              "$ref": "#/components/schemas/McpConnectInChat",
              "description": "Whether a missing sign-in may pause the turn with an in-chat Connect\ncard (`ask`, the default) or fails the call with a settings link\n(`never`)."
            },
            "deferred": {
              "type": "boolean",
              "description": "Whether the server's tools are listed only when the model asks for\nthem through tool search (`false`, the default, lists them at turn\nstart)."
            },
            "description": {
              "type": [
                "string",
                "null"
              ],
              "description": "Searchable server context supplied by its attachment or catalog. It is\nmetadata, not an instruction or a credential."
            },
            "elicitation_policy": {
              "$ref": "#/components/schemas/McpElicitationPolicy",
              "description": "Which elicitation modes this server may use (`url` by default)."
            },
            "env": {
              "type": "object",
              "description": "Environment variables set for the stdio `command`.",
              "additionalProperties": {
                "type": "string"
              },
              "propertyNames": {
                "type": "string"
              }
            },
            "headers": {
              "type": "object",
              "description": "Additional HTTP headers sent on MCP requests (HTTP transport only).",
              "additionalProperties": {
                "type": "string"
              },
              "propertyNames": {
                "type": "string"
              }
            },
            "oauth_provider_id": {
              "type": [
                "string",
                "null"
              ],
              "description": "Provider id used to resolve a user-scoped bearer token."
            },
            "protocol_mode": {
              "$ref": "#/components/schemas/McpProtocolMode",
              "description": "Protocol-era adoption policy for the MCP client (`auto` negotiates)."
            },
            "tool_discovery": {
              "type": "boolean",
              "description": "Whether to discover tool definitions live from this server."
            },
            "tool_labels": {
              "type": "object",
              "description": "Risk labels for this server's tools, by the tool's own name:\n`read_only` never asks for approval in the normal mode, `changes`\nalways asks. They win over the tool's annotations and over a catalog\npreset's saved labels. Honored on harness, agent and person-owned\nservers; dropped from session-scoped servers.",
              "additionalProperties": {
                "$ref": "#/components/schemas/McpToolLabel"
              },
              "propertyNames": {
                "type": "string"
              }
            },
            "tool_timeout_ms": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "description": "How long one `tools/call` to this server may take, in milliseconds.\nUnset means [`MCP_TOOL_TIMEOUT_DEFAULT_MS`] (60 s); accepted range is\n[`MCP_TOOL_TIMEOUT_MIN_MS`]..=[`MCP_TOOL_TIMEOUT_MAX_MS`]. `timeout`\nis accepted as an alias, matching common `mcpServers` config files.",
              "minimum": 0
            },
            "type": {
              "$ref": "#/components/schemas/McpServerTransportType",
              "description": "MCP transport type. Only remote HTTP is supported today."
            },
            "url": {
              "type": "string",
              "description": "URL of the remote MCP server endpoint. Required for HTTP transport;\nempty/ignored for stdio."
            },
            "use": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/McpServerPresetRef",
                  "description": "Organization catalog preset that supplies transport and authentication policy."
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "propertyNames": {
          "type": "string"
        }
      },
      "BackfillObserverRequest": {
        "type": "object",
        "description": "Score past production traffic with an observer.",
        "properties": {
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Most past events to read, newest first (1–5000). Defaults to 500.",
            "example": 500,
            "minimum": 0
          },
          "sample": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Apply the observer's sampling rate. Defaults to true; false scores\nevery matching slice read."
          },
          "since_hours": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How far back to read, in hours (1–720). Defaults to 24.",
            "example": 24,
            "minimum": 0
          }
        }
      },
      "BackfillResult": {
        "type": "object",
        "description": "What a backfill read and queued.",
        "required": [
          "events_read",
          "enqueued"
        ],
        "properties": {
          "enqueued": {
            "type": "integer",
            "format": "int64",
            "description": "Scores queued. Turns and tool calls already scored are not queued\nagain; a conversation's score is refreshed.",
            "minimum": 0
          },
          "events_read": {
            "type": "integer",
            "format": "int64",
            "description": "Past turn, tool and idle events read.",
            "minimum": 0
          }
        }
      },
      "BackgroundLimits": {
        "type": "object",
        "description": "Limits on background work an org can tune in Settings → Limits.\n\nDefaults are code constants rather than environment variables, so every\ndeployment starts safe. The lifetime and run limits can only be lowered:\n[`BackgroundLimits::validate`] rejects values above the agent ceilings.",
        "properties": {
          "org_unattended_daily_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Daily cap on unattended work across the org, in USD. `None` is no cap.",
            "default": 20
          },
          "schedule_budget_usd": {
            "type": "number",
            "format": "double",
            "description": "Budget a schedule gets when the agent does not pass one, in USD.",
            "default": 2
          },
          "schedule_max_budget_usd": {
            "type": "number",
            "format": "double",
            "description": "Largest budget an agent may give a schedule, in USD.",
            "default": 10
          },
          "schedule_max_lifetime_days": {
            "type": "integer",
            "format": "int32",
            "description": "Longest an agent-created recurring schedule may run, in days (1-7).",
            "default": 7,
            "minimum": 0
          },
          "schedule_max_runs": {
            "type": "integer",
            "format": "int32",
            "description": "Most runs an agent-created recurring schedule may have (1-96).",
            "default": 96,
            "minimum": 0
          }
        }
      },
      "BackgroundProgress": {
        "type": "object",
        "description": "Structured progress reported by background tools.",
        "properties": {
          "current": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProgressStep"
            },
            "description": "Ordered checklist, for work that plans its steps up front (a thread's\nassignment). Empty for plain counters."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BatchSetSecretsRequest": {
        "type": "object",
        "description": "Batch secret set request",
        "required": [
          "secrets"
        ],
        "properties": {
          "bindings": {
            "type": "object",
            "description": "Optional bindings keyed by secret name. A bound secret is write-only:\nthe agent's shell sees `$NAME` as a placeholder, and the platform puts\nthe value on requests to the bound URL only. A name set without a\nbinding becomes an ordinary secret again.",
            "additionalProperties": {
              "$ref": "#/components/schemas/SecretBinding"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "secrets": {
            "type": "object",
            "description": "Map of secret names to values. Names are case-sensitive; values are stored encrypted\nand never returned by list/read endpoints. Existing keys are overwritten.\nExample: `{\"OPENAI_API_KEY\": \"sk-...\", \"GITHUB_TOKEN\": \"ghp_...\"}`.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "BatchSetSecretsResponse": {
        "type": "object",
        "description": "Batch secret set response",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of secrets stored",
            "minimum": 0
          }
        }
      },
      "BeginConnectRequest": {
        "type": "object",
        "description": "Where a new App is created and where the browser lands afterwards.",
        "properties": {
          "owner_org": {
            "type": [
              "string",
              "null"
            ],
            "description": "GitHub organization that should own a new App. Omit for the personal\naccount of whoever confirms it on GitHub. A private App can only be\ninstalled on the account that owns it."
          },
          "return_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "UI path to return to when the flow ends."
          }
        }
      },
      "BeginConnectResponse": {
        "oneOf": [
          {
            "type": "object",
            "description": "GitHub must create the App first. A browser posts `manifest` as the\n`manifest` form field to `action` (a top-level navigation, so GitHub's\nconfirmation page is shown). Outside a browser, follow `next_step`.",
            "required": [
              "action",
              "manifest",
              "next_step",
              "kind"
            ],
            "properties": {
              "action": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "create_app"
                ]
              },
              "manifest": {
                "type": "string"
              },
              "next_step": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "description": "The App exists; open `url` in a browser to install it or change which\nrepositories it can reach.",
            "required": [
              "url",
              "app_slug",
              "kind"
            ],
            "properties": {
              "app_slug": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "install"
                ]
              },
              "url": {
                "type": "string"
              }
            }
          }
        ],
        "description": "What happens next."
      },
      "Budget": {
        "type": "object",
        "description": "Budget — a stored spending cap for a platform subject.",
        "required": [
          "id",
          "organization_id",
          "subject_type",
          "subject_id",
          "currency",
          "limit",
          "balance",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "balance": {
            "type": "number",
            "format": "double",
            "description": "Current remaining balance (limit minus consumed)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string",
            "description": "What the limit is measured in: \"usd\" (cost from the org's price\nlist) or \"tokens\"."
          },
          "id": {
            "type": "string",
            "example": "bdgt_01933b5a00007000800000000000001"
          },
          "limit": {
            "type": "number",
            "format": "double",
            "description": "Hard limit — budget ceiling."
          },
          "metadata": {
            "description": "Arbitrary metadata."
          },
          "organization_id": {
            "type": "string"
          },
          "period": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BudgetPeriod",
                "description": "Optional period for recurring budgets."
              },
              {
                "type": "null"
              }
            ]
          },
          "period_started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the current period started (used to detect period rollover for\n`Duration` / `Rolling` periods, and to display \"resets at\" in the UI).\n`None` for budgets without a period."
          },
          "policy": {
            "$ref": "#/components/schemas/UsagePolicy",
            "description": "Name, steps (notify, ask to continue, stop) and which usage counts.\nEmpty steps mean the legacy shape: notify at 80%, ask at the soft\nlimit, stop at the limit."
          },
          "soft_limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Soft limit — triggers pause/warn when balance drops below this."
          },
          "status": {
            "$ref": "#/components/schemas/BudgetStatus"
          },
          "subject_id": {
            "type": "string",
            "description": "Public ID of the subject entity."
          },
          "subject_type": {
            "$ref": "#/components/schemas/BudgetSubjectType"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BudgetCheckResult": {
        "type": "object",
        "description": "Result of checking all budgets for a session.",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "Most restrictive action across all budgets."
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Remaining balance on the most restrictive budget."
          },
          "budget_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Budget that triggered the action."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency of the most restrictive budget."
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable error code for user-facing budget failures."
          },
          "error_fields": {
            "type": [
              "object",
              "null"
            ],
            "description": "Structured interpolation fields for localized error rendering."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable message (set when action != \"continue\")."
          }
        }
      },
      "BudgetEventData": {
        "type": "object",
        "description": "Data for budget lifecycle events (warning, paused, exhausted, resumed).",
        "required": [
          "budget_id",
          "balance",
          "limit",
          "currency"
        ],
        "properties": {
          "balance": {
            "type": "number",
            "format": "double",
            "description": "Current remaining balance."
          },
          "budget_id": {
            "type": "string",
            "description": "Budget that triggered this event."
          },
          "currency": {
            "type": "string",
            "description": "Budget currency (e.g. \"usd\", \"tokens\")."
          },
          "limit": {
            "type": "number",
            "format": "double",
            "description": "Budget limit."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable message."
          },
          "soft_limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Soft limit threshold (present for warning/paused events)."
          }
        }
      },
      "BudgetPeriod": {
        "oneOf": [
          {
            "type": "object",
            "description": "Sliding window of a configurable number of seconds.",
            "required": [
              "seconds",
              "type"
            ],
            "properties": {
              "seconds": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "type": {
                "type": "string",
                "enum": [
                  "duration"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Rolling window described as a humanized string (\"5h\", \"24h\", \"30d\").",
            "required": [
              "window",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "rolling"
                ]
              },
              "window": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "description": "Calendar-aligned (`hour`, `day`, `week`, `month`, `year`).",
            "required": [
              "unit",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "calendar"
                ]
              },
              "unit": {
                "type": "string"
              }
            }
          }
        ],
        "description": "Budget period configuration for recurring budgets.\n\nPeriods drive automatic balance reset:\n- `Duration` is a fixed-length sliding window (e.g. last 5 hours, last 30 days)\n  measured from `Budget::period_started_at`. When the window elapses the\n  balance is reset to `limit` and the window restarts.\n- `Calendar` aligns to a calendar boundary (`hour | day | week | month | year`)\n  in UTC. The balance resets when the next boundary is crossed.\n- `Rolling` is preserved for backwards compatibility and parses common\n  shorthand (`24h`, `5h`, `7d`, `30d`) into a `Duration`-equivalent reset\n  policy."
      },
      "BudgetStatus": {
        "type": "string",
        "description": "Budget status.",
        "enum": [
          "active",
          "paused",
          "exhausted",
          "disabled"
        ]
      },
      "BudgetSubjectType": {
        "type": "string",
        "description": "Subject type: what entity this budget constrains.",
        "enum": [
          "session",
          "agent",
          "user",
          "organization",
          "agent_trigger",
          "agent_channel",
          "session_schedule",
          "org_unattended"
        ]
      },
      "BuiltInSearchProvider": {
        "type": "object",
        "description": "A provider that needs no setup.",
        "required": [
          "id",
          "name",
          "description"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "description": "`free`, `native`, or `hosted` (the deployment's own search, when it\noffers one).",
            "example": "free"
          },
          "name": {
            "type": "string"
          },
          "price_note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Plain-words cost, when the provider bills per search."
          }
        }
      },
      "BuiltinTool": {
        "type": "object",
        "description": "Built-in tool configuration\n\nNote: The `kind` field has been removed. Tools are now identified\nsolely by their `name` field, and execution happens via the ToolRegistry\nwhich looks up tools by name.",
        "required": [
          "name",
          "description",
          "parameters"
        ],
        "properties": {
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category for tool_search namespace grouping (from parent capability)"
          },
          "deferrable": {
            "$ref": "#/components/schemas/DeferrablePolicy",
            "description": "Whether this tool's schema can be deferred via tool_search"
          },
          "description": {
            "type": "string",
            "description": "Tool description for LLM"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for UI rendering (e.g., \"Get Current Time\" for `get_current_time`)"
          },
          "full_parameters": {
            "description": "Original full parameter schema saved by `DeferSchemaHook` before stripping.\nSerialized only when present so durable reason-to-act scheduling can\npreserve deferred schemas for `tool_search` in the act phase."
          },
          "hints": {
            "$ref": "#/components/schemas/ToolHints",
            "description": "Semantic hints describing the tool's behavioral properties"
          },
          "name": {
            "type": "string",
            "description": "Tool name (used by LLM and for registry lookup)"
          },
          "parameters": {
            "description": "JSON schema for tool parameters"
          },
          "policy": {
            "$ref": "#/components/schemas/ToolPolicy",
            "description": "Tool policy (auto or requires_approval)"
          }
        }
      },
      "BulkUpdateEvalResultScoresItem": {
        "type": "object",
        "description": "Score update for one eval case result.",
        "required": [
          "result_id",
          "scores"
        ],
        "properties": {
          "result_id": {
            "type": "string",
            "description": "Eval case result to update.",
            "example": "evalresult_01933b5a000070008000000000000001"
          },
          "scores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Score"
            },
            "description": "Externally computed scores to store on the result."
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExternalScoreStatus",
                "description": "Current lifecycle status."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "BulkUpdateEvalRunScoresRequest": {
        "type": "object",
        "description": "Request to write external scores to several results of an eval run.",
        "required": [
          "results"
        ],
        "properties": {
          "metadata": {
            "description": "Free-form metadata attached to this resource."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkUpdateEvalResultScoresItem"
            },
            "description": "Per-result score updates applied together."
          }
        }
      },
      "CalendarStep": {
        "type": "string",
        "description": "Calendar resolution for an estimate or forecast with date bounds.",
        "enum": [
          "month",
          "year"
        ]
      },
      "CancelStatus": {
        "type": "string",
        "description": "Status of the cancel operation",
        "enum": [
          "cancelled",
          "no_op"
        ]
      },
      "CancelTurnResponse": {
        "type": "object",
        "description": "Response from cancel turn endpoint",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable message",
            "example": "Turn cancelled successfully"
          },
          "status": {
            "$ref": "#/components/schemas/CancelStatus",
            "description": "Whether the cancellation was performed or was a no-op"
          }
        }
      },
      "CapabilityInfo": {
        "type": "object",
        "description": "Public capability information (without internal details)\nThis is what gets returned from the API\nNamed CapabilityInfo to distinguish from the Capability trait",
        "required": [
          "id",
          "name",
          "description",
          "status"
        ],
        "properties": {
          "agent_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of active agents referencing this capability in the org.",
            "example": 42,
            "minimum": 0
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category for grouping in UI",
            "example": "filesystem"
          },
          "config_schema": {
            "type": "object",
            "description": "JSON Schema for capability-specific per-agent config."
          },
          "config_ui_schema": {
            "type": "object",
            "description": "react-jsonschema-form uiSchema hints for rendering config_schema."
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of capabilities that this capability depends on.\nWhen this capability is selected, its dependencies are automatically included.",
            "example": [
              "approval"
            ]
          },
          "description": {
            "type": "string",
            "description": "Description of what this capability provides",
            "example": "Read, write, edit, list, grep, delete, and stat files in the session workspace."
          },
          "docs_slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Slug under the [capability documentation](https://everruns.com/docs/capabilities/) when public docs exist.",
            "example": "session_file_system"
          },
          "feature_flag": {
            "type": [
              "string",
              "null"
            ],
            "description": "Rollout flag that gates this capability, when one is required.\nPresent whether or not the flag is on, so a management screen can name\nan attached capability and avoid offering it for new selection.",
            "example": "skills"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "UI feature strings this capability contributes to.\nMultiple capabilities can contribute the same feature.",
            "example": [
              "file_browser"
            ]
          },
          "harness_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of active harnesses referencing this capability in the org.",
            "example": 7,
            "minimum": 0
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon name (for UI rendering)",
            "example": "Folder"
          },
          "id": {
            "type": "string",
            "description": "Unique capability identifier",
            "example": "session_file_system"
          },
          "is_guardrail": {
            "type": "boolean",
            "description": "Whether this capability is a guardrail (constrains agent behavior\nrather than granting abilities). Used for UI grouping and filtering.",
            "example": false
          },
          "is_mcp": {
            "type": "boolean",
            "description": "Whether this is an MCP server capability (for UI badge)",
            "example": false
          },
          "is_skill": {
            "type": "boolean",
            "description": "Whether this is an Agent Skill capability (for UI badge)",
            "example": false
          },
          "localizations": {
            "type": "object",
            "description": "Localized display strings keyed by lowercase language tag (e.g. \"uk\").\nThe \"en\" entry carries only `config_description`, since the base\nname/description/config_schema strings are already English.",
            "additionalProperties": {
              "$ref": "#/components/schemas/CapabilityLocalizationInfo"
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "uk": {
                "description": "Монтує спільні файли пам'яті в сесії.",
                "name": "Пам'ять"
              }
            }
          },
          "name": {
            "type": "string",
            "description": "Display name",
            "example": "Session File System"
          },
          "risk_level": {
            "$ref": "#/components/schemas/RiskLevel",
            "description": "TM-AGENT-005: Risk level. High-risk capabilities require admin approval."
          },
          "status": {
            "type": "string",
            "description": "Current status",
            "example": "active"
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "System prompt addition contributed by this capability",
            "example": "You can read and write files in /workspace via the session_file_system tools."
          },
          "tool_definitions": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Tool definitions provided by this capability",
            "example": [
              {
                "description": "Read a file from the session workspace.",
                "name": "read_file"
              },
              {
                "description": "Write or overwrite a file in the session workspace.",
                "name": "write_file"
              }
            ]
          }
        }
      },
      "CapabilityLocalizationInfo": {
        "type": "object",
        "description": "Localized display strings for one locale of a capability.",
        "properties": {
          "config_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "One-line summary of what this capability's config controls."
          },
          "config_overlay": {
            "type": "object",
            "description": "Overlay merged into `config_schema` before rendering: mirrors the\nschema property tree with `title`/`description`/`enum_labels` leaves."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Localized description; absent means fall back to `description`."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Localized display name; absent means fall back to `name`."
          }
        }
      },
      "CapabilityUsageData": {
        "type": "object",
        "description": "Data for capability.usage events.",
        "required": [
          "records"
        ],
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapabilityUsageRecord"
            }
          }
        }
      },
      "CapabilityUsageKind": {
        "type": "string",
        "description": "Reporting-only capability usage kinds.",
        "enum": [
          "configured",
          "resolved",
          "exposed",
          "invoked",
          "effect_ran"
        ]
      },
      "CapabilityUsageRecord": {
        "type": "object",
        "description": "Single capability usage record. This intentionally carries only stable IDs\nand small snapshots; prompts, messages, tool arguments, and results are not\nallowed in reporting facts.",
        "required": [
          "capability_id",
          "usage_kind"
        ],
        "properties": {
          "capability_id": {
            "type": "string",
            "description": "Capability id (prefixed or namespaced) attributing this usage."
          },
          "capability_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capability display name for UI. `None` when the capability is unnamed."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Total wall-clock duration of the usage in milliseconds (duration-style records). `None` for count-style records.",
            "minimum": 0
          },
          "tool_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Concrete tool name when `usage_kind` is `tool_call`. `None` for non-tool usage kinds."
          },
          "usage_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Number of distinct usages recorded in this record (count-style records). `None` for duration-style records.",
            "minimum": 0
          },
          "usage_kind": {
            "$ref": "#/components/schemas/CapabilityUsageKind",
            "description": "Discriminator for the kind of usage being recorded (e.g. `tool_call`, `subagent_spawn`)."
          }
        }
      },
      "CaseCell": {
        "type": "object",
        "description": "One case under one variant.",
        "required": [
          "label",
          "passed",
          "trials",
          "cost_usd"
        ],
        "properties": {
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "What the case cost, all its trials together.",
            "example": 0.05
          },
          "label": {
            "type": "string",
            "example": "candidate"
          },
          "passed": {
            "type": "integer",
            "format": "int32",
            "description": "Trials that passed, of `trials` that finished.",
            "example": 3,
            "minimum": 0
          },
          "trials": {
            "type": "integer",
            "format": "int32",
            "example": 3,
            "minimum": 0
          }
        }
      },
      "CaseComparison": {
        "type": "object",
        "description": "One case across the variants.",
        "required": [
          "case_id",
          "case_name",
          "changed",
          "cells"
        ],
        "properties": {
          "case_id": {
            "type": "string",
            "example": "evalcase_01933b5a000070008000000000000001"
          },
          "case_name": {
            "type": "string",
            "example": "Refund request, angry customer"
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseCell"
            },
            "description": "One cell per variant, in variant order."
          },
          "changed": {
            "type": "boolean",
            "description": "Some variant's pass rate on this case differs from the baseline's."
          }
        }
      },
      "CaseResultStatus": {
        "type": "string",
        "description": "Status of an individual eval case result.",
        "enum": [
          "pending",
          "running",
          "passed",
          "failed",
          "errored",
          "timeout",
          "skipped"
        ]
      },
      "Channel": {
        "type": "object",
        "description": "Portable channel intent. Authentication and installation are host bindings.\nChannels default to disabled; enabled intent still requires host publication.",
        "required": [
          "type"
        ],
        "properties": {
          "config": {
            "description": "Declarative transport settings, excluding credentials and destination resource IDs."
          },
          "enabled": {
            "type": "boolean",
            "description": "Request an enabled draft; false by default. Publication remains a host operation."
          },
          "type": {
            "type": "string",
            "description": "Ingress transport type, such as ag_ui, public_chat, fcp or slack."
          }
        },
        "additionalProperties": false
      },
      "ChannelActivity": {
        "type": "object",
        "description": "Traffic one channel brought in over the last week.",
        "required": [
          "channel_id",
          "sessions",
          "daily",
          "people",
          "identified_sessions"
        ],
        "properties": {
          "channel_id": {
            "type": "string",
            "description": "Public channel identifier.",
            "example": "appchan_01933b5a000070008000000000000001"
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Sessions per day, oldest first; the last day ends at `generated_at`."
          },
          "identified_sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions that carried an end-user identity. Zero means the channel\ncannot tell people apart (webhook, API, anonymous callers), so\n`people` says nothing about its audience.",
            "minimum": 0
          },
          "last_session_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the channel last started a session inside the window."
          },
          "median_first_reply_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Median milliseconds from a session's first user message to the agent's\nfirst completed reply, over sessions that got one.",
            "minimum": 0
          },
          "people": {
            "type": "integer",
            "format": "int64",
            "description": "Distinct end users behind the channel's sessions in the window.",
            "minimum": 0
          },
          "sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions the channel started in the window.",
            "minimum": 0
          }
        }
      },
      "ChannelAuthConfig": {
        "type": "object",
        "description": "Authentication config for one channel/channel.",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/ChannelAuthMode"
          },
          "provider": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChannelAuthProviderConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "requirements": {
            "$ref": "#/components/schemas/ChannelAuthRequirements"
          }
        },
        "example": {
          "mode": "api_key",
          "requirements": {
            "audiences": [
              "everruns-api"
            ],
            "scopes": [
              "app:invoke"
            ]
          }
        }
      },
      "ChannelAuthMode": {
        "type": "string",
        "description": "Agent channel authentication mode.\n\nStored on `AgentChannel.auth` so users can protect one endpoint without first\ncreating org-level identity-provider state.",
        "enum": [
          "anonymous",
          "shared_secret",
          "api_key",
          "google_oidc",
          "oidc",
          "oauth2_introspection",
          "http_basic",
          "mtls"
        ]
      },
      "ChannelAuthProviderConfig": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "client_id",
              "type"
            ],
            "properties": {
              "allowed_domains": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "client_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "google_oidc"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "issuer",
              "type"
            ],
            "properties": {
              "issuer": {
                "type": "string"
              },
              "jwks_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "oidc"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "introspection_url",
              "type"
            ],
            "properties": {
              "client_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "client_secret": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "client_secret_configured": {
                "type": "boolean"
              },
              "introspection_url": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "oauth2_introspection"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "username",
              "type"
            ],
            "properties": {
              "password": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "password_configured": {
                "type": "boolean"
              },
              "password_hash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "http_basic"
                ]
              },
              "username": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "header_name",
              "type"
            ],
            "properties": {
              "allowed_values": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "header_name": {
                "type": "string"
              },
              "proxy_secret": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Shared secret the trusted proxy includes in `proxy_secret_header`.\nWrite-only: redacted in GET responses. See TM-AUTH-021."
              },
              "proxy_secret_configured": {
                "type": "boolean"
              },
              "proxy_secret_header": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Header the trusted reverse proxy uses to prove its identity.\nRequired. Configs without this field fail closed at verification time."
              },
              "type": {
                "type": "string",
                "enum": [
                  "mtls"
                ]
              }
            }
          }
        ],
        "description": "OIDC/OAuth/basic/mTLS provider details for one channel."
      },
      "ChannelAuthRequirements": {
        "type": "object",
        "description": "Claim and credential requirements common to channel auth providers.",
        "properties": {
          "audiences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JWT `aud` values to require on inbound tokens. Empty list disables audience checking."
          },
          "claims": {
            "type": "object",
            "description": "Arbitrary claim equality predicates. Empty map disables claim filtering.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowlist of email/identifier domains. Empty list disables domain filtering."
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowlist of group memberships (from `groups` claim). Empty list disables group filtering."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "OAuth scope strings to require (space-delimited per scope entry). Empty list disables scope checking."
          },
          "subjects": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowlist of `sub` claim values. Empty list disables subject filtering."
          }
        }
      },
      "ChannelStatus": {
        "type": "string",
        "description": "Per-channel lifecycle (EVE-1007).\n\nThis is the authority for whether an exposure accepts traffic. It replaced\nthe two-dimensional `App.status × AppChannel.enabled` matrix, which could\nexpress \"published App, disabled channel\" and forced publishing a whole App —\nand therefore every sibling channel on it — to make one endpoint reachable.\n\nLiveness also depends on agent-level conditions, which are folded in at\nresolution time rather than stored here.",
        "enum": [
          "draft",
          "live",
          "disabled"
        ],
        "example": "live"
      },
      "ChannelType": {
        "type": "string",
        "description": "Supported channel types for app distribution.",
        "enum": [
          "slack",
          "ag_ui",
          "schedule",
          "webhook",
          "a2a",
          "fcp",
          "public_chat",
          "voice",
          "api",
          "poppy",
          "work_chat"
        ],
        "example": "webhook"
      },
      "ChannelVoiceCallRequest": {
        "type": "object",
        "description": "Request body for a call to an agent's voice channel.",
        "required": [
          "sdp"
        ],
        "properties": {
          "provider_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Realtime provider binding, as in `VoiceCallRequest`."
          },
          "sdp": {
            "type": "string",
            "description": "The browser's WebRTC SDP offer."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Continue an existing session of the channel's agent (for example a text\nconversation). When omitted, the call starts a new session."
          }
        }
      },
      "ChatFeatures": {
        "type": "object",
        "description": "This contract is shared by publication and runtime bootstrap. A worker-role\ncoordination capability has no thread tools and must never qualify.",
        "required": [
          "threads",
          "files"
        ],
        "properties": {
          "files": {
            "type": "boolean",
            "description": "Effective Agent exposes a session filesystem.",
            "example": true
          },
          "threads": {
            "type": "boolean",
            "description": "Effective coordinator tools support child work threads.",
            "example": true
          }
        }
      },
      "ChatMcpServer": {
        "type": "object",
        "description": "An MCP server added to one chat only.",
        "required": [
          "name",
          "url",
          "connection"
        ],
        "properties": {
          "catalog_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Catalog preset name, for servers added from the catalog."
          },
          "connection": {
            "$ref": "#/components/schemas/UserMcpConnectionStatus",
            "description": "Whether the person viewing has signed in to it."
          },
          "discovery": {
            "type": [
              "string",
              "null"
            ],
            "description": "Discovery state observed when preparing the most recent turn."
          },
          "name": {
            "type": "string",
            "description": "Server name; also the tool prefix the agent sees."
          },
          "url": {
            "type": "string",
            "description": "Endpoint URL, for display."
          }
        }
      },
      "CheckAgentNameResponse": {
        "type": "object",
        "description": "Response for agent name availability check.",
        "required": [
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether the name is available for use."
          }
        }
      },
      "CheckArea": {
        "type": "string",
        "description": "The part of the install a check covers. The order is the display order.",
        "enum": [
          "control_plane",
          "database",
          "workers",
          "security",
          "messaging",
          "storage",
          "observability",
          "models",
          "integrations"
        ]
      },
      "CheckCredentialsRequest": {
        "type": "object",
        "description": "Request to check a provider credential without storing it.",
        "required": [
          "provider_type"
        ],
        "properties": {
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Single-field credential. Mutually exclusive with `credentials`.",
            "example": "sk-proj-..."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL for the provider's API, when not the driver default.",
            "example": "https://api.openai.com/v1"
          },
          "credentials": {
            "type": [
              "object",
              "null"
            ],
            "description": "Typed multi-field credential, validated against the driver's schema\nexactly as on create.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "provider_type": {
            "$ref": "#/components/schemas/DriverId",
            "description": "The type of LLM provider (e.g., openai, anthropic)."
          }
        }
      },
      "CheckFindingFixRequest": {
        "type": "object",
        "description": "Options for checking a fix.",
        "properties": {
          "eval_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent's eval to check against. Default: the one with most cases."
          },
          "max_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Spending cap in USD for the whole check."
          },
          "trials": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Trials per case and side, 1 to 20 (default 2).",
            "minimum": 0
          }
        }
      },
      "CheckNameResponse": {
        "type": "object",
        "description": "Response for name availability check.",
        "required": [
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether the name is available for use."
          }
        }
      },
      "CheckStatus": {
        "type": "string",
        "description": "How a check came out. Ordered from best to worst so the report's verdict\nis the maximum.",
        "enum": [
          "ok",
          "info",
          "warning",
          "problem"
        ]
      },
      "CircuitBreakerResponse": {
        "type": "object",
        "description": "Circuit breaker response",
        "required": [
          "key",
          "state",
          "failure_count",
          "success_count",
          "updated_at"
        ],
        "properties": {
          "failure_count": {
            "type": "integer",
            "format": "int32",
            "description": "Count of consecutive failures observed within the current rolling window.",
            "example": 12,
            "minimum": 0
          },
          "half_open_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp the breaker is eligible to transition to `half_open` and probe again (RFC 3339).",
            "example": "2026-05-27T15:30:01Z"
          },
          "key": {
            "type": "string",
            "description": "Stable key identifying the dependency the breaker guards (e.g. provider URL or activity type).",
            "example": "anthropic_api"
          },
          "last_failure_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the most recent failure recorded against this breaker (RFC 3339).",
            "example": "2026-05-27T15:25:00Z"
          },
          "opened_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp the breaker last transitioned to `open` (RFC 3339).",
            "example": "2026-05-27T15:25:01Z"
          },
          "state": {
            "type": "string",
            "description": "Current breaker state (`closed`, `open`, or `half_open`).",
            "example": "open"
          },
          "success_count": {
            "type": "integer",
            "format": "int32",
            "description": "Count of consecutive successes observed within the current rolling window.",
            "example": 0,
            "minimum": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this breaker state was last updated (RFC 3339).",
            "example": "2026-05-27T15:25:01Z"
          }
        }
      },
      "CircuitBreakersListResponse": {
        "type": "object",
        "description": "Circuit breakers list response",
        "required": [
          "data",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CircuitBreakerResponse"
            },
            "description": "Page of items returned by this query."
          },
          "total": {
            "type": "integer",
            "description": "Total number of items matching the query, across all pages.",
            "minimum": 0
          }
        }
      },
      "ClientSideTool": {
        "type": "object",
        "description": "Client-side tool - executed by the client, not the server\nThe server pauses execution and waits for the client to submit results.",
        "required": [
          "name",
          "description",
          "parameters"
        ],
        "properties": {
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category for tool_search namespace grouping (from parent capability)"
          },
          "deferrable": {
            "$ref": "#/components/schemas/DeferrablePolicy",
            "description": "Whether this tool's schema can be deferred via tool_search"
          },
          "description": {
            "type": "string",
            "description": "Tool description for LLM"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for UI rendering"
          },
          "full_parameters": {
            "description": "Original full parameter schema saved by `DeferSchemaHook` before stripping.\nSerialized only when present so durable reason-to-act scheduling can\npreserve deferred schemas for `tool_search` in the act phase."
          },
          "hints": {
            "$ref": "#/components/schemas/ToolHints",
            "description": "Semantic hints describing the tool's behavioral properties"
          },
          "name": {
            "type": "string",
            "description": "Tool name (used by LLM and for correlation)"
          },
          "parameters": {
            "description": "JSON schema for tool parameters"
          }
        }
      },
      "ClientToolResult": {
        "type": "object",
        "description": "A single tool result from the client",
        "required": [
          "tool_call_id"
        ],
        "properties": {
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if the tool failed",
            "example": "Refund failed: order is outside refund window"
          },
          "result": {
            "description": "Result value (any JSON — object, array, string, number, etc.). Null if the tool failed.\nExample: `{\"url\": \"https://example.com/orders/42\"}`."
          },
          "tool_call_id": {
            "type": "string",
            "description": "Tool call ID (correlates with the tool call from tool.call_requested event)",
            "example": "toolu_01933b5a00007000800000000000001"
          }
        }
      },
      "CollectionInput": {
        "type": "object",
        "description": "A file collection with optional indexing, provider selection and path exclusions.",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Human-readable purpose of the collection, available during progressive disclosure."
          },
          "embedding_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Organization embedding model; required when hybrid indexing is enabled."
          },
          "indexer_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional organization search account. Omit to use the local index backend."
          },
          "indexing": {
            "$ref": "#/components/schemas/IndexMode",
            "description": "Whether files remain unindexed, use keyword search, or also use embedding retrieval."
          },
          "name": {
            "type": "string",
            "description": "Collection name; `everruns-docs` is reserved for the predefined documentation snapshot."
          },
          "rules": {
            "description": "Path-glob arrays named `ingest_exclude`, `index_exclude` and `read_exclude`."
          }
        },
        "additionalProperties": false
      },
      "CommandCatalog": {
        "type": "object",
        "description": "The command contract available to the caller.",
        "required": [
          "api_version",
          "commands"
        ],
        "properties": {
          "api_version": {
            "type": "string",
            "description": "Contract version; a client built for another version should not guess.",
            "example": "v1"
          },
          "commands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommandEntry"
            },
            "description": "Every command the caller can dispatch."
          }
        }
      },
      "CommandEntry": {
        "allOf": [
          {
            "type": "object",
            "description": "The `everruns-cli-contract` shape: wire name, noun path, verb,\narguments, examples."
          },
          {
            "type": "object",
            "required": [
              "api_version",
              "schema_hash",
              "read_only"
            ],
            "properties": {
              "api_version": {
                "type": "string",
                "description": "Contract version this command is served under.",
                "example": "v1"
              },
              "read_only": {
                "type": "boolean",
                "description": "Whether the command only reads."
              },
              "schema_hash": {
                "type": "string",
                "description": "Fingerprint of the command's contract and parameter schema. A client\nechoes it on dispatch to learn when the command changed under it.",
                "example": "3f1c9a0b5d2e4f6a"
              }
            }
          }
        ],
        "description": "One command in the catalog: its command-line contract plus what a client\nneeds to call it safely."
      },
      "CommandOutcome": {
        "type": "object",
        "description": "Exit of a shell command. A command with a nonzero exit code can still\nhave a successful tool invocation that faithfully reports its output.",
        "required": [
          "exit_code",
          "success"
        ],
        "properties": {
          "exit_code": {
            "type": "integer",
            "format": "int32"
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "CommandRequest": {
        "type": "object",
        "description": "A command invocation.",
        "properties": {
          "api_version": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contract version the client was built for. Defaults to the current one.",
            "example": "v1"
          },
          "context_revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The changed entity's manager context revision the caller read\n(`get_manager_context`). A newer one refuses the change with\n`manager_context_changed`; omitting it while the entity has context\nadds a warning."
          },
          "metadata": {
            "type": "object",
            "description": "Opaque client annotations (for example the client name and version),\nrecorded on the request trace. Never interpreted by the command.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "params": {
            "type": "object",
            "description": "The command's params, keyed by field name as the contract lists it."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the caller is making this change, recorded in the changed entity's\nhistory. 1 to 1000 characters; rejected if it looks like a credential.\nRead-only commands ignore it. Not part of the idempotency fingerprint:\na retry may word it differently, and the first reason is kept.",
            "example": "Make the support agent kid friendly, as requested in the product review"
          },
          "schema_hash": {
            "type": [
              "string",
              "null"
            ],
            "description": "`schema_hash` from the catalog the client was built against. A mismatch\nadds a warning to the response; it does not fail the call."
          }
        },
        "additionalProperties": false
      },
      "CommandResponse": {
        "type": "object",
        "description": "A command's result.",
        "required": [
          "command",
          "api_version",
          "schema_hash",
          "output",
          "warnings"
        ],
        "properties": {
          "api_version": {
            "type": "string",
            "description": "Contract version the command ran under.",
            "example": "v1"
          },
          "command": {
            "type": "string",
            "description": "Wire name of the command that ran.",
            "example": "create_agent"
          },
          "output": {
            "type": "object",
            "description": "The command's output."
          },
          "schema_hash": {
            "type": "string",
            "description": "The command's current `schema_hash`."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Non-fatal notices, such as a stale `schema_hash`."
          }
        }
      },
      "CommitRequest": {
        "type": "object",
        "description": "Request to create a commit",
        "required": [
          "message"
        ],
        "properties": {
          "author_email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Author email (defaults to \"agent@everruns.local\")",
            "example": "support-agent@example.com"
          },
          "author_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Author name (defaults to \"Agent\")",
            "example": "Support Agent"
          },
          "branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "Branch name (defaults to \"refs/heads/main\"); short names like \"main\" are normalized",
            "example": "main"
          },
          "message": {
            "type": "string",
            "description": "Commit message",
            "example": "feat: draft migration plan"
          }
        }
      },
      "CommitResult": {
        "type": "object",
        "description": "Result of a commit operation",
        "required": [
          "oid",
          "tree_oid",
          "objects_created"
        ],
        "properties": {
          "objects_created": {
            "type": "integer",
            "minimum": 0
          },
          "oid": {
            "type": "string"
          },
          "tree_oid": {
            "type": "string"
          }
        }
      },
      "Communication": {
        "type": "string",
        "description": "How an agent talks to the people in its conversations. The agent owns this\nsetting; every surface (web chat, API, Slack, A2A, AG-UI, MCP) honors it.",
        "enum": [
          "direct",
          "explicit"
        ]
      },
      "CompactionCheck": {
        "type": "string",
        "enum": [
          "execution",
          "continuity"
        ]
      },
      "CompactionEventSummary": {
        "type": "object",
        "description": "Content-free lifecycle information suitable for chat and API inspection.",
        "required": [
          "state",
          "strategy"
        ],
        "properties": {
          "checkpoint_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Whether this observation installed a checkpoint rather than only masking a request."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Recorded elapsed reduction time.",
            "minimum": 0
          },
          "source_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Replaced journal boundary when available."
          },
          "state": {
            "type": "string",
            "description": "compacting, completed, skipped, or failed."
          },
          "strategy": {
            "type": "string",
            "description": "Strategy recorded by the runtime, not a forecast of the next provider call."
          },
          "tokens_after": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Output token estimate or native provider measurement, when available.",
            "minimum": 0
          },
          "tokens_before": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Input token estimate or native provider measurement, when available.",
            "minimum": 0
          }
        }
      },
      "CompactionFailStage": {
        "type": "string",
        "description": "Which stage of a compaction attempt failed.",
        "enum": [
          "native_compaction",
          "checkpoint_install",
          "summarization"
        ]
      },
      "CompactionReason": {
        "type": "string",
        "description": "Reason why compaction was triggered.",
        "enum": [
          "proactive_budget",
          "request_too_large",
          "manual"
        ]
      },
      "CompactionSkipReason": {
        "type": "string",
        "description": "Why a pressured compaction evaluation did not install compacted context.",
        "enum": [
          "strategy_excludes_native",
          "driver_unsupported",
          "checkpoint_store_unavailable",
          "cooldown_active",
          "native_returned_none",
          "no_material_reduction",
          "guard_rejected"
        ]
      },
      "CompactionStatus": {
        "type": "object",
        "description": "Effective configured policy and the last compatible saved checkpoint.",
        "required": [
          "enabled",
          "proactive",
          "history_retrieval_available"
        ],
        "properties": {
          "budget_percent": {
            "type": [
              "number",
              "null"
            ],
            "format": "float",
            "description": "Native request pressure threshold as a fraction of the model window."
          },
          "checkpoint": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContextCheckpoint",
                "description": "Saved checkpoint metadata only; never summary text or provider wire state."
              },
              {
                "type": "null"
              }
            ]
          },
          "checkpoint_store_available": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Store availability, not a promise about the backend's crash durability.\nNone when a remote host has not reported its store."
          },
          "context_budget_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Soft working-history target, distinct from the provider hard window.",
            "minimum": 0
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether a compaction policy is configured after inheritance and dependencies."
          },
          "history_retrieval_available": {
            "type": "boolean",
            "description": "Whether raw history retrieval is allowed by the configured prompt hooks."
          },
          "last_event": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CompactionEventSummary",
                "description": "Latest reported lifecycle outcome, when a host provides event observations."
              },
              {
                "type": "null"
              }
            ]
          },
          "proactive": {
            "type": "boolean",
            "description": "Whether proactive reduction is enabled."
          },
          "strategy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Configured strategy; runtime/provider eligibility still controls execution."
          }
        }
      },
      "CompactionStepData": {
        "type": "object",
        "description": "A single step in a compaction cascade.",
        "required": [
          "strategy",
          "messages_after",
          "duration_ms"
        ],
        "properties": {
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Duration of this step in milliseconds.",
            "minimum": 0
          },
          "messages_after": {
            "type": "integer",
            "description": "Number of messages after this step.",
            "minimum": 0
          },
          "strategy": {
            "type": "string",
            "description": "Strategy used in this step."
          }
        }
      },
      "CompactionTrigger": {
        "type": "string",
        "description": "What triggered a compaction lifecycle: the context-window budget or cost pressure.",
        "enum": [
          "context_budget",
          "cost_pressure"
        ]
      },
      "CompletionCheck": {
        "type": "string",
        "description": "When a turn that is about to finish gets a completion check, and an\nautomatic continuation when the check finds the work unfinished.",
        "enum": [
          "off",
          "unattended",
          "always"
        ]
      },
      "CompletionCheckAction": {
        "type": "string",
        "description": "What the runtime did after a completion check.",
        "enum": [
          "finished",
          "continued",
          "budget_exhausted",
          "review_failed"
        ]
      },
      "CompletionVerdict": {
        "type": "string",
        "description": "What a completion check found: the review's verdict on whether the turn\ndid what was asked.",
        "enum": [
          "achieved",
          "in_progress",
          "blocked"
        ]
      },
      "ConnectSourceRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SourceLocation",
            "description": "Repository, branch and package path that were previewed."
          },
          {
            "type": "object",
            "required": [
              "commit",
              "agent_digest"
            ],
            "properties": {
              "agent_digest": {
                "type": "string",
                "description": "Agent package digest returned by preview, protecting concurrent local edits.",
                "example": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
              },
              "commit": {
                "type": "string",
                "description": "Exact source commit returned by preview; a changed branch requires another preview.",
                "example": "0123456789abcdef0123456789abcdef01234567"
              },
              "expected_generation": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Current binding generation when replacing a source; omit for an unbound Agent.",
                "example": "018f30c8-c970-7cb5-a8c9-9348aa71ba8c"
              },
              "github_account": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SourceGitHubAccount",
                    "description": "Development GitHub account the source reads and writes through; omitted\nprefers the caller's own GitHub, then the organization's link."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "mode": {
                "$ref": "#/components/schemas/SourceMode",
                "description": "Synchronization direction; two_way requires repository Contents write access."
              }
            }
          }
        ],
        "description": "Reviewed package location and concurrency tokens required to enable source sync."
      },
      "ConnectedClient": {
        "type": "object",
        "description": "An external MCP client the person approved.",
        "required": [
          "id",
          "client_name",
          "redirect_hosts",
          "access",
          "all_organizations",
          "created_at"
        ],
        "properties": {
          "access": {
            "$ref": "#/components/schemas/ConnectedClientAccess"
          },
          "all_organizations": {
            "type": "boolean",
            "description": "True when the client may act in every organization the person belongs to."
          },
          "client_name": {
            "type": "string",
            "description": "Name the client registered with. Self-declared: show it with the\nredirect hosts, which tell a real client apart from a lookalike."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the person approved the client."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Grant id. Pass it to the revoke endpoint."
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last request the client made on `/mcp`. Updated at most every few\nminutes."
          },
          "redirect_hosts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Hosts the client's registered redirect URIs point at."
          }
        }
      },
      "ConnectedClientAccess": {
        "type": "string",
        "description": "What a connected client may do.",
        "enum": [
          "read_only",
          "read_and_run"
        ]
      },
      "ConnectedClientsResponse": {
        "type": "object",
        "description": "List response for connected clients.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectedClient"
            }
          }
        }
      },
      "Connection": {
        "type": "object",
        "description": "Connection info returned in API responses (never includes token)",
        "required": [
          "provider",
          "connection_type",
          "connected_at"
        ],
        "properties": {
          "connected_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the grant was created.",
            "example": "2026-09-29T12:00:00Z"
          },
          "connection_type": {
            "type": "string",
            "description": "Credential mechanism used by this connection.",
            "example": "oauth"
          },
          "provider": {
            "type": "string",
            "description": "Stable provider identifier.",
            "example": "github"
          },
          "provider_username": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name on the provider.",
            "example": "octocat"
          },
          "scopes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider scopes granted to this account.",
            "example": "read:user"
          }
        }
      },
      "ConnectionCredentialSource": {
        "type": "object",
        "description": "Reference an eligible native GitHub App connection while preserving its installation selection.",
        "required": [
          "connection_id",
          "github_access"
        ],
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Native connection identifier; ownership and use authorization remain enforced."
          },
          "github_access": {
            "$ref": "#/components/schemas/GitHubAccess",
            "description": "Explicit repository and permission bounds for each minted installation token."
          }
        },
        "additionalProperties": false
      },
      "ConnectionSetupResponse": {
        "type": "object",
        "description": "Browser URL returned to a bearer-authenticated consumer before navigation.",
        "required": [
          "authorization_url"
        ],
        "properties": {
          "authorization_url": {
            "type": "string",
            "description": "Navigate the browser to this provider authorization URL.",
            "example": "https://provider.example/authorize?state=opaque"
          }
        }
      },
      "ConnectionStatus": {
        "type": "object",
        "description": "Personal ChatGPT connection state, without access or refresh credentials.",
        "required": [
          "status",
          "host_id"
        ],
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Verified account email, present after a successful sign-in.",
            "example": "user@example.com"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Safe connection error or reconnect guidance, when applicable.",
            "example": "ChatGPT sign-in did not complete. Retry sign-in."
          },
          "host_id": {
            "type": "string",
            "description": "Installation identifier to pass unchanged to the local login helper.",
            "example": "urn:uuid:00000000-0000-0000-0000-000000000001"
          },
          "owner_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Everruns user who owns and may manage this personal connection.",
            "example": "00000000-0000-0000-0000-000000000001"
          },
          "registration": {
            "type": [
              "object",
              "null"
            ],
            "description": "Non-secret host registration, containing the issuing client and verified subject."
          },
          "status": {
            "type": "string",
            "description": "Connection state: disconnected, connecting, connected, scope_required, or error.",
            "example": "disconnected"
          }
        }
      },
      "ConsentAction": {
        "type": "string",
        "description": "What the user decided about opening the URL.",
        "enum": [
          "accept",
          "decline"
        ]
      },
      "ContentPart": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TextContentPart",
                "description": "Text content"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  }
                }
              }
            ],
            "description": "Text content"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageContentPart",
                "description": "Image content (base64 or URL)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "image"
                    ]
                  }
                }
              }
            ],
            "description": "Image content (base64 or URL)"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageFileContentPart",
                "description": "Image file content (reference to uploaded image by ID)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "image_file"
                    ]
                  }
                }
              }
            ],
            "description": "Image file content (reference to uploaded image by ID)"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileContentPart",
                "description": "File content (reference to uploaded file, e.g. PDF, by ID)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "file"
                    ]
                  }
                }
              }
            ],
            "description": "File content (reference to uploaded file, e.g. PDF, by ID)"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolCallContentPart",
                "description": "Tool call content (assistant requesting tool execution)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "tool_call"
                    ]
                  }
                }
              }
            ],
            "description": "Tool call content (assistant requesting tool execution)"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolResultContentPart",
                "description": "Tool result content (result of tool execution)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "tool_result"
                    ]
                  }
                }
              }
            ],
            "description": "Tool result content (result of tool execution)"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReasoningContentPart",
                "description": "Provider reasoning artifact, ordered against the text and tool calls it\nwas interleaved with."
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "reasoning"
                    ]
                  }
                }
              }
            ],
            "description": "Provider reasoning artifact, ordered against the text and tool calls it\nwas interleaved with."
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProviderOpaqueContent",
                "description": "Provider-native assistant content retained only for internal replay."
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "provider_opaque"
                    ]
                  }
                }
              }
            ],
            "description": "Provider-native assistant content retained only for internal replay."
          }
        ],
        "description": "A part of message content - can be text, image, image_file, tool_call, or tool_result\n\nThis is the canonical content part type used across the system.\nAPI layer enables the \"openapi\" feature to add ToSchema derive."
      },
      "ContextCheckpoint": {
        "type": "object",
        "description": "Credential-free metadata for an installed checkpoint.",
        "required": [
          "id",
          "kind",
          "source_sequence"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Public-safe identifier for correlating the checkpoint with trace events."
          },
          "kind": {
            "type": "string",
            "description": "portable_summary, provider_native, legacy_summary, or legacy_trim."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model scope for native checkpoints; portable notes have no model scope."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider scope for native checkpoints; portable notes have no provider scope."
          },
          "source_sequence": {
            "type": "integer",
            "format": "int64",
            "description": "Exact journal boundary replaced by this checkpoint."
          }
        }
      },
      "ContextCompactedData": {
        "type": "object",
        "description": "Data for context.compacted event (compaction completed).",
        "required": [
          "strategy_used",
          "messages_before",
          "messages_after",
          "duration_ms"
        ],
        "properties": {
          "budget_remaining_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tokens of headroom remaining when the install completed, when measurable.",
            "example": 8192,
            "minimum": 0
          },
          "bytes_after": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Serialized compact output bytes, when measurable.",
            "minimum": 0
          },
          "bytes_before": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Serialized request-context bytes before compaction, when measurable.",
            "minimum": 0
          },
          "cache_creation_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Cache-creation tokens written after compaction, when reported.",
            "example": 1024,
            "minimum": 0
          },
          "cache_read_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Cached input tokens read after compaction, when reported.",
            "example": 90210,
            "minimum": 0
          },
          "checkpoint_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Serialized provider checkpoint size in bytes, when measured.",
            "minimum": 0
          },
          "checkpoint_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Durable checkpoint installed by this compaction, when applicable.",
            "example": "01934c2f-9f2e-7c1b-8d3e-4f5a6b7c8d9e"
          },
          "driver": {
            "type": [
              "string",
              "null"
            ],
            "description": "Local driver identifier, when known.",
            "example": "openai-chat"
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Total duration of all compaction steps in milliseconds.",
            "minimum": 0
          },
          "history_evidence_allowed": {
            "type": "boolean",
            "description": "Runtime permission to inspect raw journal evidence. This is independent\nof monitoring consent; absent on older events means disallowed."
          },
          "messages_after": {
            "type": "integer",
            "description": "Number of messages after compaction.",
            "minimum": 0
          },
          "messages_before": {
            "type": "integer",
            "description": "Number of messages before compaction.",
            "example": 120,
            "minimum": 0
          },
          "model": {
            "type": "string",
            "description": "Model that performed the compaction.",
            "example": "gpt-5-mini"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider backend (e.g. \"openai\"), when known.",
            "example": "openai"
          },
          "replay_source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source used to reconstruct the provider prefix (`checkpoint` or `raw`)."
          },
          "source_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Source message sequence the compaction ran at, when known.",
            "example": 481
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompactionStepData"
            },
            "description": "Individual steps in the cascade."
          },
          "strategy_used": {
            "type": "string",
            "description": "Combined strategy description (e.g., \"observation_masking+native\")."
          },
          "tokens_after": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Provider-reported output tokens after compaction, when available.",
            "minimum": 0
          },
          "tokens_before": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Estimated or provider-reported input tokens before compaction.",
            "example": 184320,
            "minimum": 0
          },
          "trigger": {
            "$ref": "#/components/schemas/CompactionTrigger",
            "description": "What triggered this compaction: context-window budget or cost pressure."
          }
        }
      },
      "ContextCompactingData": {
        "type": "object",
        "description": "Data for context.compacting event (compaction starting).",
        "required": [
          "reason",
          "strategy",
          "messages_before"
        ],
        "properties": {
          "budget_remaining_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tokens of headroom remaining when the attempt started, when measurable.",
            "example": 8192,
            "minimum": 0
          },
          "bytes_before": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Serialized request-context bytes before compaction, when measurable.",
            "minimum": 0
          },
          "cache_creation_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Cache-creation tokens written before compaction, when reported.",
            "example": 1024,
            "minimum": 0
          },
          "cache_read_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Cached input tokens read before compaction, when reported.",
            "example": 90210,
            "minimum": 0
          },
          "driver": {
            "type": [
              "string",
              "null"
            ],
            "description": "Local driver identifier, when known.",
            "example": "openai-chat"
          },
          "messages_before": {
            "type": "integer",
            "description": "Number of messages before compaction.",
            "example": 120,
            "minimum": 0
          },
          "model": {
            "type": "string",
            "description": "Model performing the compaction.",
            "example": "gpt-5-mini"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider backend (e.g. \"openai\"), when known.",
            "example": "openai"
          },
          "reason": {
            "$ref": "#/components/schemas/CompactionReason",
            "description": "Why compaction was triggered."
          },
          "source_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Source message sequence the attempt ran at, when known.",
            "example": 481
          },
          "strategy": {
            "type": "string",
            "description": "Strategy requested (may differ from strategy_used in the completed event).",
            "example": "summary_then_trim"
          },
          "tokens_before": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Estimated or provider-reported input tokens before compaction.",
            "example": 184320,
            "minimum": 0
          },
          "trigger": {
            "$ref": "#/components/schemas/CompactionTrigger",
            "description": "What triggered this attempt: context-window budget or cost pressure."
          }
        }
      },
      "ContextCompactionFailedData": {
        "type": "object",
        "description": "Data for context.compaction.failed: an attempt errored before installing.\n\nTerminal event for an emitted context.compacting attempt that did not\ninstall. The envelope timestamp records when the failure surfaced.",
        "required": [
          "reason",
          "trigger",
          "stage",
          "error",
          "strategy",
          "model",
          "tokens_before",
          "messages_before"
        ],
        "properties": {
          "budget_remaining_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tokens of headroom remaining, when measurable.",
            "example": 8192,
            "minimum": 0
          },
          "checkpoint_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Durable checkpoint being installed when the failure hit, if any.",
            "example": "01934c2f-9f2e-7c1b-8d3e-4f5a6b7c8d9e"
          },
          "driver": {
            "type": [
              "string",
              "null"
            ],
            "description": "Local driver identifier, when known.",
            "example": "openai-chat"
          },
          "error": {
            "type": "string",
            "description": "Human-readable failure.",
            "example": "summarizer request failed: upstream timed out"
          },
          "messages_before": {
            "type": "integer",
            "description": "Number of messages before the attempt.",
            "example": 120,
            "minimum": 0
          },
          "model": {
            "type": "string",
            "description": "Model the attempt ran under.",
            "example": "gpt-5-mini"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider backend (e.g. \"openai\"), when known.",
            "example": "openai"
          },
          "reason": {
            "$ref": "#/components/schemas/CompactionReason",
            "description": "Why compaction was attempted."
          },
          "source_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Source message sequence the attempt ran at, when known.",
            "example": 481
          },
          "stage": {
            "$ref": "#/components/schemas/CompactionFailStage",
            "description": "Which stage failed."
          },
          "strategy": {
            "type": "string",
            "description": "Strategy requested.",
            "example": "summary_then_trim"
          },
          "tokens_before": {
            "type": "integer",
            "format": "int64",
            "description": "Estimated or provider-reported input tokens before the attempt.",
            "example": 184320,
            "minimum": 0
          },
          "trigger": {
            "$ref": "#/components/schemas/CompactionTrigger",
            "description": "Whether window/budget or cost pressure triggered the attempt."
          }
        }
      },
      "ContextCompactionSkippedData": {
        "type": "object",
        "description": "Data for context.compaction.skipped: pressure observed, nothing installed.\n\nEmitted when context-budget or cost pressure is present but the evaluation\ndoes not install compacted context. The envelope timestamp records when the\ndecision was made; every pressured evaluation closes with exactly one of\nskipped, installed (context.compacted), or failed.",
        "required": [
          "reason",
          "trigger",
          "skip_reason",
          "strategy",
          "model",
          "tokens_observed",
          "messages_observed"
        ],
        "properties": {
          "budget_remaining_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Tokens of headroom remaining, when measurable.",
            "example": 8192,
            "minimum": 0
          },
          "driver": {
            "type": [
              "string",
              "null"
            ],
            "description": "Local driver identifier, when known.",
            "example": "openai-chat"
          },
          "messages_observed": {
            "type": "integer",
            "description": "Number of messages observed.",
            "example": 120,
            "minimum": 0
          },
          "model": {
            "type": "string",
            "description": "Model the evaluation ran under.",
            "example": "gpt-5-mini"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider backend (e.g. \"openai\"), when known.",
            "example": "openai"
          },
          "reason": {
            "$ref": "#/components/schemas/CompactionReason",
            "description": "Why compaction was evaluated."
          },
          "skip_reason": {
            "$ref": "#/components/schemas/CompactionSkipReason",
            "description": "Why nothing was installed."
          },
          "source_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Source message sequence the evaluation ran at, when known.",
            "example": 481
          },
          "strategy": {
            "type": "string",
            "description": "Strategy requested.",
            "example": "summary_then_trim"
          },
          "tokens_observed": {
            "type": "integer",
            "format": "int64",
            "description": "Estimated input tokens observed at evaluation time.",
            "example": 184320,
            "minimum": 0
          },
          "trigger": {
            "$ref": "#/components/schemas/CompactionTrigger",
            "description": "Whether window/budget or cost pressure triggered the evaluation."
          }
        }
      },
      "ContextReportContribution": {
        "type": "object",
        "description": "Single-source token contribution within a `ContextReportSection` — the\nper-tool / per-capability / per-message attribution that lets operators\nsee which source is eating the context window.",
        "required": [
          "section_key",
          "source_id",
          "label",
          "tokens"
        ],
        "properties": {
          "label": {
            "type": "string",
            "description": "Human-readable label suitable for UI display."
          },
          "section_key": {
            "type": "string",
            "description": "Section this contribution rolls up into; matches `ContextReportSection.key`."
          },
          "source_id": {
            "type": "string",
            "description": "Stable id of the contributing source (capability id, tool name, message id, etc.)."
          },
          "tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Tokens this single source contributes to the assembled context.",
            "minimum": 0
          }
        }
      },
      "ContextReportSection": {
        "type": "object",
        "description": "One logical section of the assembled LLM context (system prompt, tool\ndefinitions, message history, etc.) with its rolled-up token budget.",
        "required": [
          "key",
          "label",
          "tokens",
          "items"
        ],
        "properties": {
          "items": {
            "type": "integer",
            "format": "int32",
            "description": "Number of items this section comprises (messages, tool defs, etc.).",
            "minimum": 0
          },
          "key": {
            "type": "string",
            "description": "Stable section key (e.g. `system_prompt`, `tools`, `history`). Used as a join key for contributions."
          },
          "label": {
            "type": "string",
            "description": "Human-readable section label suitable for UI display."
          },
          "tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Total tokens this section contributes to the assembled context.",
            "minimum": 0
          }
        }
      },
      "Controls": {
        "type": "object",
        "description": "Runtime controls for message processing",
        "properties": {
          "error_disclosure": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error disclosure override for this turn: \"generic\", \"standard\", or\n\"detailed\". Clamped to at most the mode allowed by the agent's\n`error_disclosure` capability (capability absent => \"standard\"), so a\nclient can narrow but never widen disclosure."
          },
          "hints": {
            "type": [
              "object",
              "null"
            ],
            "description": "Generic client hints — arbitrary key-value pairs declared by the client.\nSession-level defaults are set at session creation; per-message values\noverride session hints key-by-key (shallow merge).\n\nExamples: `{\"setup_connection\": true, \"rich_media\": true}`"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Locale override for this message turn (BCP 47, e.g. `uk-UA`).\nOverrides the session locale for backend-authored strings and prompts."
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model ID to use for this message (format: model_{32-hex}).\nOverrides session and agent model settings.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "reasoning": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReasoningConfig",
                "description": "Reasoning configuration"
              },
              {
                "type": "null"
              }
            ]
          },
          "speed": {
            "type": [
              "string",
              "null"
            ],
            "description": "Speed (service tier) for this message turn: \"flex\", \"default\",\n\"priority\", \"fast\" (OpenAI's newer name for priority) or \"ultrafast\".\nOnly sent when the model's profile lists the tier (OpenAI\n`service_tier`); otherwise the runtime drops it."
          },
          "verbosity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Verbosity for this message turn: \"low\", \"medium\", or \"high\". Only sent\nto providers whose model profile advertises a verbosity config (OpenAI\n`verbosity`)."
          }
        }
      },
      "ConversationDelivery": {
        "type": "object",
        "description": "An external platform's acceptance of a sent message.",
        "required": [
          "platform",
          "channel",
          "message_ref"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "description": "Platform channel or conversation identifier."
          },
          "message_ref": {
            "type": "string",
            "description": "Platform message identifier, usable by platform-specific editing tools."
          },
          "platform": {
            "type": "string",
            "description": "Destination platform, such as `slack`."
          }
        }
      },
      "ConversationMessageData": {
        "type": "object",
        "description": "Data for `conversation.message`: a message the agent sent to the\nconversation with `send_message`.\n\nFor an agent that talks explicitly this is the whole of what people see;\nits assistant text is working notes. Every surface reads it through\n[`crate::runtime::conversation`], never directly.",
        "required": [
          "message_id",
          "text",
          "tool_call_id"
        ],
        "properties": {
          "delivery": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConversationDelivery",
                "description": "Where an external platform accepted it, when the conversation lives on\none (a Slack thread). Absent when the conversation is the session\nitself (web chat, API, A2A, AG-UI, MCP)."
              },
              {
                "type": "null"
              }
            ]
          },
          "files": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Session paths of the files delivered with the message, in order."
          },
          "message_id": {
            "type": "string",
            "description": "Identifier of this sent message, for later references (edits, replies).",
            "example": "message_550e8400e29b41d4a716446655440000"
          },
          "text": {
            "type": "string",
            "description": "The message as the agent wrote it. Markdown."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The `send_message` call that sent it."
          }
        }
      },
      "ConversationStarter": {
        "type": "object",
        "description": "A conversation starter shown on a fresh Platform Chat thread.\nSelecting one inserts its text into the composer. `icon` reuses the\nharness icon name set (`HarnessIcon`); unknown names fall back to the\ndefault glyph.",
        "required": [
          "text"
        ],
        "properties": {
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional icon name from the harness icon set.",
            "example": "zap"
          },
          "text": {
            "type": "string",
            "description": "Prompt text inserted into the composer when selected.",
            "example": "Triage the newest P1"
          }
        }
      },
      "CopyFileRequest": {
        "type": "object",
        "description": "Request to copy a file",
        "required": [
          "src_path",
          "dst_path"
        ],
        "properties": {
          "dst_path": {
            "type": "string",
            "description": "Destination path (relative to the workspace filesystem root).",
            "example": "docs/runbooks/refund-30-days.md"
          },
          "src_path": {
            "type": "string",
            "description": "Source path (relative to the workspace filesystem root).",
            "example": "templates/runbook.md"
          }
        }
      },
      "CostCategory": {
        "type": "object",
        "description": "Spend and tokens of one cost category.",
        "required": [
          "key",
          "tokens",
          "usd"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "`uncached_input`, `cache_read`, `cache_write` or `output`.",
            "example": "uncached_input"
          },
          "tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Tokens in this category across every model call.",
            "example": 1060877013
          },
          "usd": {
            "type": "number",
            "format": "double",
            "description": "USD, from each call's cost split by the model's price table.",
            "example": 106.09
          }
        }
      },
      "CostHour": {
        "type": "object",
        "description": "Spend in one UTC hour, by category.",
        "required": [
          "hour",
          "uncached_input_usd",
          "cache_read_usd",
          "cache_write_usd",
          "output_usd",
          "unattributed_usd",
          "model_calls"
        ],
        "properties": {
          "cache_read_usd": {
            "type": "number",
            "format": "double",
            "description": "USD of prompt tokens read from cache."
          },
          "cache_write_usd": {
            "type": "number",
            "format": "double",
            "description": "USD of prompt tokens written to cache."
          },
          "hour": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the hour (UTC)."
          },
          "model_calls": {
            "type": "integer",
            "format": "int64",
            "description": "Model calls made in the hour."
          },
          "output_usd": {
            "type": "number",
            "format": "double",
            "description": "USD of output tokens."
          },
          "unattributed_usd": {
            "type": "number",
            "format": "double",
            "description": "Spend with no category split (see `SessionCost.unattributed_usd`)."
          },
          "uncached_input_usd": {
            "type": "number",
            "format": "double",
            "description": "USD of prompt tokens not read from cache."
          }
        }
      },
      "CostModel": {
        "type": "object",
        "description": "Spend of one model.",
        "required": [
          "model",
          "calls",
          "usd"
        ],
        "properties": {
          "calls": {
            "type": "integer",
            "format": "int64",
            "description": "Model calls made with this model.",
            "example": 3811
          },
          "model": {
            "type": "string",
            "description": "Model id as the provider reported it.",
            "example": "meta/muse-spark-1.3-contributor"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider driver that served the model, when known.",
            "example": "openrouter"
          },
          "usd": {
            "type": "number",
            "format": "double",
            "description": "Spend in USD on this model.",
            "example": 106.26
          }
        }
      },
      "CostPlanTask": {
        "type": "object",
        "description": "One illustrative task and its editable token and model-call assumptions.",
        "required": [
          "name",
          "description",
          "assumption",
          "calls",
          "message_tokens",
          "output_tokens",
          "tool_result_tokens"
        ],
        "properties": {
          "assumption": {
            "type": "string",
            "description": "Expected steps and the main uncertainty behind the workload estimate."
          },
          "calls": {
            "type": "integer",
            "format": "int32",
            "description": "Model calls per task, including follow-ups after tools; between 1 and 100.",
            "minimum": 0
          },
          "description": {
            "type": "string",
            "description": "Example user request that this task represents."
          },
          "message_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Initial user-input tokens, excluding system instructions and tool schemas.",
            "minimum": 0
          },
          "name": {
            "type": "string",
            "description": "Short name of the representative task."
          },
          "output_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Output tokens per model call, including reasoning and tool arguments.",
            "minimum": 0
          },
          "tool_result_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "New tool-result tokens added at each step of the task.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CostRate": {
        "type": "object",
        "description": "One row of the org's price list.",
        "required": [
          "id",
          "meter",
          "match",
          "unit",
          "effective_from",
          "retired",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the rate was added."
          },
          "effective_from": {
            "type": "string",
            "format": "date-time",
            "description": "When the rate starts to apply."
          },
          "id": {
            "type": "string",
            "description": "Rate id (`rate_...`)."
          },
          "list_price_multiplier": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Multiple of the provider's or catalog's price (0.8 is a 20%\ndiscount, 0 counts usage at no cost)."
          },
          "match": {
            "type": "object",
            "description": "Which usage it applies to. Model tokens: `provider`, `model`,\n`source` (`managed` or `own_keys`). Sandbox time: `provider`, `size`.\nEmpty applies to the whole meter."
          },
          "meter": {
            "type": "string",
            "description": "What it prices: `model.tokens` or `sandbox.time`."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the rate was added: the change reason given with it."
          },
          "retired": {
            "type": "boolean",
            "description": "This row ends the rates it matches from `effective_from`."
          },
          "unit": {
            "type": "string",
            "description": "Unit of `unit_price_usd`: `1m_tokens` or `hour`."
          },
          "unit_price_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Fixed price per unit, in USD."
          }
        }
      },
      "CostSandbox": {
        "type": "object",
        "description": "A sandbox the session ran and how long it ran.",
        "required": [
          "sandbox_id",
          "provider",
          "created_at",
          "running_seconds",
          "paused_seconds",
          "spans"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the sandbox was created."
          },
          "paused_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds the sandbox spent paused.",
            "example": 1860
          },
          "profile_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sandbox template profile, when one was used."
          },
          "provider": {
            "type": "string",
            "description": "Sandbox provider, e.g. `daytona` or `e2b`.",
            "example": "daytona"
          },
          "running_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds the sandbox spent running.",
            "example": 4320
          },
          "sandbox_id": {
            "type": "string",
            "description": "Sandbox's prefixed public identifier.",
            "example": "sandbox_01a1510c99c8714eabb22a463e7c1fa1"
          },
          "spans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxStateSpan"
            },
            "description": "Lifecycle spans, oldest first."
          }
        }
      },
      "CostSettings": {
        "type": "object",
        "description": "The org's cost settings.",
        "properties": {
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "IANA timezone (e.g. `America/Chicago`) for calendar windows: daily,\nweekly and monthly usage policies reset at midnight there. `null` is\nUTC."
          }
        }
      },
      "CostSource": {
        "type": "object",
        "description": "Turns and spend of one origin.",
        "required": [
          "kind",
          "turns",
          "usd"
        ],
        "properties": {
          "active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The schedule still fires: enabled and not deleted."
          },
          "cron": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cron expression of a recurring schedule.",
            "example": "*/5 * * * *"
          },
          "kind": {
            "type": "string",
            "description": "`user`, `schedule`, `agent_trigger`, `channel`, ...",
            "example": "schedule"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The schedule's description, when it is a session schedule.",
            "example": "Shipmail claim poll"
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The schedule, trigger or channel, when there is one.",
            "example": "sched_01a1510ebffc7370a495ed68cc7f9ab3"
          },
          "turns": {
            "type": "integer",
            "format": "int64",
            "description": "Turns this origin started.",
            "example": 1845
          },
          "usd": {
            "type": "number",
            "format": "double",
            "description": "Spend in USD on those turns.",
            "example": 106.11
          }
        }
      },
      "CostSummary": {
        "type": "object",
        "description": "Org cost over a window, grouped several ways.",
        "required": [
          "from",
          "to",
          "timezone",
          "cost_usd",
          "unpriced_records",
          "by_basis",
          "by_source",
          "by_agent",
          "by_user",
          "by_started_by",
          "by_day",
          "runs_with_agents"
        ],
        "properties": {
          "by_agent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSummaryLine"
            },
            "description": "Totals by agent."
          },
          "by_basis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSummaryLine"
            },
            "description": "Totals by where the amount came from."
          },
          "by_day": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSummaryLine"
            },
            "description": "Totals by day, in the org's timezone."
          },
          "by_source": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSummaryLine"
            },
            "description": "Totals by what was used, such as a provider and model."
          },
          "by_started_by": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSummaryLine"
            },
            "description": "Totals by who started the work: `person`, or `unattended` (schedules\nand other runs nobody watches)."
          },
          "by_user": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSummaryLine"
            },
            "description": "Totals by the person the usage counts for."
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Priced cost in USD over the window. Unpriced usage is not in it."
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Window start (inclusive)."
          },
          "runs_with_agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunsWithAgentsLine"
            },
            "description": "Runs where an agent handed work to other agents: their whole cost by\nthe agent the run started with, split by the agent that spent it.\nEvery amount is also in `by_agent`, under the agent that spent it."
          },
          "timezone": {
            "type": "string",
            "description": "The org's timezone; calendar windows and days use it."
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "Window end (exclusive)."
          },
          "unpriced_records": {
            "type": "integer",
            "format": "int64",
            "description": "Usage records over the window with no price."
          }
        }
      },
      "CostSummaryLine": {
        "type": "object",
        "description": "One line of the costs summary.",
        "required": [
          "basis",
          "cost_usd",
          "unpriced_records",
          "records",
          "quantity"
        ],
        "properties": {
          "basis": {
            "type": "string",
            "description": "Where the amounts came from: host, rate, provider, list_price,\nunpriced, or mixed."
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Priced cost in USD. Unpriced usage is not in it."
          },
          "key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group key: an agent id, a user id, a source key, a basis, a day."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name for the key, such as the agent's name."
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "description": "Tokens for models, hours for sandboxes, summed as recorded."
          },
          "records": {
            "type": "integer",
            "format": "int64",
            "description": "Usage records in the group, priced or not."
          },
          "unpriced_records": {
            "type": "integer",
            "format": "int64",
            "description": "Usage records with no price."
          }
        }
      },
      "CostTier": {
        "type": "object",
        "description": "A pricing tier that activates above a context token threshold.\nFor example, OpenAI charges higher rates for prompts exceeding 200K tokens.",
        "required": [
          "above_tokens",
          "input",
          "output"
        ],
        "properties": {
          "above_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Context token threshold above which this tier applies"
          },
          "cache_read": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Cached read cost per million tokens (USD) for this tier, if supported"
          },
          "cache_write": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Cache write cost per million tokens (USD); absent falls back to input."
          },
          "input": {
            "type": "number",
            "format": "double",
            "description": "Input cost per million tokens (USD) for this tier"
          },
          "output": {
            "type": "number",
            "format": "double",
            "description": "Output cost per million tokens (USD) for this tier"
          }
        }
      },
      "CostTool": {
        "type": "object",
        "description": "Calls, failures and running time of one tool.",
        "required": [
          "name",
          "calls",
          "failed",
          "duration_ms"
        ],
        "properties": {
          "calls": {
            "type": "integer",
            "format": "int64",
            "description": "Calls of this tool.",
            "example": 1180
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Summed running time of its calls.",
            "example": 627000
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "description": "Calls of this tool that ended in an error.",
            "example": 13
          },
          "name": {
            "type": "string",
            "description": "Tool name.",
            "example": "web_fetch"
          }
        }
      },
      "CostTools": {
        "type": "object",
        "description": "Tool calls across the session, from the trace index.",
        "required": [
          "calls",
          "failed",
          "duration_ms",
          "items"
        ],
        "properties": {
          "calls": {
            "type": "integer",
            "format": "int64",
            "description": "Tool calls across the session.",
            "example": 1977
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Summed running time of every call.",
            "example": 645000
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "description": "Tool calls that ended in an error.",
            "example": 14
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostTool"
            },
            "description": "Per tool, most calls first."
          }
        }
      },
      "CostTurn": {
        "type": "object",
        "description": "Spend of one turn.",
        "required": [
          "turn",
          "turn_id",
          "started_at",
          "status",
          "usd",
          "prompt_tokens",
          "source_kind"
        ],
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Prompt tokens of the turn, cached and uncached.",
            "example": 2034790
          },
          "source_kind": {
            "type": "string",
            "description": "What started the turn: `user`, `schedule`, `agent_trigger`, `channel`, ...",
            "example": "schedule"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the turn started."
          },
          "status": {
            "type": "string",
            "description": "`running`, `completed`, `failed`, `cancelled` or `sealed`.",
            "example": "completed"
          },
          "turn": {
            "type": "integer",
            "format": "int32",
            "description": "Per-session turn number, 1-based.",
            "example": 1162
          },
          "turn_id": {
            "type": "string",
            "description": "Turn's prefixed public identifier.",
            "example": "turn_01a124cd7e9571ac95c312b3c6d0cd82"
          },
          "usd": {
            "type": "number",
            "format": "double",
            "description": "Spend in USD on the model calls of the turn.",
            "example": 0.2
          }
        }
      },
      "CreateAgentChannelRequest": {
        "type": "object",
        "description": "Request to create an ingress channel owned by an Agent.",
        "required": [
          "channel_type"
        ],
        "properties": {
          "channel_config": {
            "description": "Transport-specific channel configuration."
          },
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType",
            "description": "Transport used by the channel."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the channel can accept ingress traffic."
          }
        }
      },
      "CreateAgentCredentialBinding": {
        "type": "object",
        "description": "Declare a credential requirement for an agent: an attached MCP tool's\nparameter (`mcp_server_name`, `tool_name`, `parameter_name`), or an HTTP\nAPI the agent's shell calls (`env_name`, `url`, `auth`).",
        "required": [
          "label"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Agent ID, populated from the request path by the HTTP API.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "auth": {
            "type": [
              "string",
              "null"
            ],
            "description": "`bearer` (default) sends `Authorization: Bearer <value>`; `header`\nsends the value in `header_name` (HTTP API).",
            "example": "bearer"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional explanation of how the credential will be used.",
            "example": "Delivers scheduled status notifications"
          },
          "env_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Env var name the agent's shell uses as a placeholder (HTTP API).",
            "example": "JEV_API_KEY"
          },
          "header_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Header that carries the value when `auth` is `header` (HTTP API).",
            "example": "X-Api-Key"
          },
          "label": {
            "type": "string",
            "description": "Human-readable label shown in the secure setup UI.",
            "example": "Visti channel key"
          },
          "mcp_server_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of an MCP server attached to the agent (MCP tool parameter).",
            "example": "visti"
          },
          "parameter_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Top-level tool argument to inject outside model context (MCP tool parameter).",
            "example": "channel_key"
          },
          "tool_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP tool whose outbound call requires the credential (MCP tool parameter).",
            "example": "visti_send"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTPS URL prefix the value may be sent to (HTTP API).",
            "example": "https://api.typesafe.ai"
          }
        }
      },
      "CreateAgentEndpointRequest": {
        "type": "object",
        "description": "Request to create an ingress channel owned by an Agent.",
        "required": [
          "channel_type"
        ],
        "properties": {
          "channel_config": {
            "description": "Transport-specific channel configuration."
          },
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType",
            "description": "Transport used by the channel."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the channel can accept ingress traffic."
          }
        }
      },
      "CreateAgentKeyRequest": {
        "type": "object",
        "description": "Request to create an agent key.",
        "required": [
          "name"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key stops working. Omit for no expiry."
          },
          "name": {
            "type": "string",
            "description": "Display name, e.g. the application that holds the key.",
            "example": "Support backend"
          },
          "permissions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AgentKeyPermission"
            },
            "description": "What the key may do. Default `[\"sessions\"]`; add `end_user` to let the\nkey act for the application's users with the `End-User` header."
          }
        }
      },
      "CreateAgentRequest": {
        "type": "object",
        "description": "Request to create a new agent",
        "required": [
          "name",
          "system_prompt"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capabilities to enable for this agent with per-agent configuration.\nEach capability has a `ref` (capability ID) and optional `config`.",
            "example": [
              {
                "config": {},
                "ref": "current_time"
              },
              {
                "config": {},
                "ref": "web_fetch"
              }
            ]
          },
          "communication": {
            "$ref": "#/components/schemas/Communication",
            "description": "How the agent talks to people. `direct` (default): its replies are\nwhat it writes. `explicit`: what it writes is private working notes,\nand people see only the messages it sends with `send_message`."
          },
          "completion_check": {
            "$ref": "#/components/schemas/CompletionCheck",
            "description": "When a turn about to finish is checked for whether it did what was\nasked, and continued automatically when it did not. `unattended`\n(default): sessions started by triggers and schedules, where no person\nis watching. `always`: chat too. `off`: never."
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The ID of the default LLM model to use for this agent.\nIf not specified, the system default model will be used.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "A human-readable description of what the agent does.",
            "example": "Handles customer inquiries and support tickets"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name shown in UI.\nFalls back to `name` when absent.",
            "example": "Customer Support Agent"
          },
          "harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Harness ID used as this agent's base execution environment. If omitted,\nthe organization default is used (Conversation for new organizations).",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "harness_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Addressable harness name. Alternative to `harness_id`.",
            "example": "conversation"
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Client-supplied agent ID (format: agent_{32-hex}).\nIf not provided, one is auto-generated.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Starter files copied into each new session for this agent.",
            "example": [
              {
                "content": "Always respond in formal English.\n",
                "path": "INSTRUCTIONS.md"
              }
            ]
          },
          "intro_markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Markdown intro shown as an intro box on a fresh Platform Chat thread.\nImages are allowed. Wins over the harness intro. Hidden once the user\ninputs.",
            "example": "Hey, I'm Ava. Ask me anything about your account."
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
          },
          "max_iterations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum number of LLM iterations per turn for this agent.",
            "example": 20,
            "minimum": 0
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Ceiling on output tokens per model response (sent as `max_tokens`).\nOmit to use the provider default. Must be at least 1; clamped to the\nmodel's output limit when known.",
            "example": 4096,
            "minimum": 1
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "Remote MCP servers scoped to this agent."
          },
          "model_preset": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model preset the agent takes its job models from (`automatic`,\n`provider:gemini` or a custom preset id). Omit for the organization\ndefaults.",
            "example": "provider:gemini"
          },
          "model_role": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentModelRole",
                "description": "Follow an organization model instead of pinning one: `research` uses\nthe organization research model. Cannot be combined with\n`default_model_id`."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "Name, unique per org. Lowercase alphanumeric and hyphens.\nFormat: lowercase alphanumeric and hyphens (e.g. \"customer-support\").",
            "example": "customer-support"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list controlling which hosts/URLs this agent's sessions can reach.\nIf set, merged with harness and session layers (allowed: intersect, blocked: union).\nExample shape is defined on `NetworkAccessList`."
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent this one is created as part of (\"Created here\" on that agent's\nAgents tab). It groups under that agent on Agents home and is bundled\ninto its export.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "parallel_tool_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Request-level parallel tool calling preference (EVE-598). `true` signals\nthe provider that parallel tool calls are wanted; `false` requests at\nmost one tool call per turn and forces serial execution. Omit to use the\nprovider default.",
            "example": true
          },
          "sandbox_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxPolicy",
                "description": "Policy for selecting the primary Sandbox Template for new Sessions."
              },
              {
                "type": "null"
              }
            ]
          },
          "service_virtual_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "short_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "One-line description in simplified Markdown, shown below the chat title\nonce the intro is hidden. Wins over the harness value.",
            "example": "Answers account questions in seconds."
          },
          "starters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationStarter"
            },
            "description": "Conversation starters for a fresh Platform Chat thread. Win over the\nharness starters when non-empty. `icon` reuses the harness icon set."
          },
          "system_prompt": {
            "type": "string",
            "description": "The system prompt that defines the agent's behavior and capabilities.\nThis is sent as the first message in every conversation.",
            "example": "You are a helpful customer support agent. Be polite and professional."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing and filtering agents.",
            "example": [
              "support",
              "customer-facing"
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            },
            "description": "Client-side tools for this agent.\nThese tools are sent to the LLM but executed by the client, not the server.",
            "example": [
              {
                "description": "Open URL in the user's browser",
                "name": "open_url",
                "parameters": {
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "type": "object"
                },
                "type": "client_side"
              }
            ]
          }
        }
      },
      "CreateAgentScriptRequest": {
        "type": "object",
        "description": "Request to create a saved script on an agent.",
        "required": [
          "name",
          "description",
          "body"
        ],
        "properties": {
          "body": {
            "type": "string",
            "description": "Shell script source, 1 to 65536 bytes.",
            "example": "echo hello"
          },
          "description": {
            "type": "string",
            "description": "One-line description, 1 to 300 characters.",
            "example": "Summarize yesterday's open issues"
          },
          "input_schema": {
            "type": [
              "object",
              "null"
            ],
            "description": "JSON Schema of the input; must be an object schema (`\"type\": \"object\"`)."
          },
          "name": {
            "type": "string",
            "description": "Script name: lowercase letters, digits, `_` and `-`, starting with a\nletter, at most 64 characters. Unique among the agent's active scripts.",
            "example": "daily-digest"
          }
        }
      },
      "CreateAgentSessionRequest": {
        "type": "object",
        "description": "`POST {agent base URL}/sessions`. The URL names the agent, so there is no\nagent or harness field.",
        "properties": {
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Caller-owned key/value data kept with the session."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional title for the session."
          }
        }
      },
      "CreateAgentTriggerRequest": {
        "type": "object",
        "description": "Request to create a trigger on an agent.",
        "required": [
          "message"
        ],
        "properties": {
          "auth": {
            "description": "Shared endpoint auth is not supported by webhook triggers."
          },
          "cron_expression": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cron expression that drives the durable schedule. Accepts 5-field\n(min hour day month weekday) or 7-field (sec … year) form.",
            "example": "0 9 * * *"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the trigger is active on creation (default `true`).",
            "example": true
          },
          "event_id_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook only: template for the delivery idempotency key.",
            "example": "{{webhook.headers.x-github-delivery}}"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TriggerEventFilter",
                "description": "Webhook, GitHub and MCP event: conditions an event must meet to start a run."
              },
              {
                "type": "null"
              }
            ]
          },
          "github_events": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "GitHub only: subscribed events (`pull_request` or\n`pull_request.opened`). Defaults to pull request open/update events.",
            "example": [
              "pull_request.opened"
            ]
          },
          "mcp_event": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP event only: event name from the server's `events/list`.",
            "example": "issue.created"
          },
          "mcp_event_arguments": {
            "type": [
              "object",
              "null"
            ],
            "description": "MCP event only: subscription arguments object (the event's `inputSchema`)."
          },
          "mcp_server": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP event only: name of the agent's MCP server attachment to subscribe to.",
            "example": "tracker"
          },
          "message": {
            "type": "string",
            "description": "Message content or `{{template}}` sent when the trigger fires.",
            "example": "Run the daily digest"
          },
          "rate_limit_per_minute": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Optional per-ingress, per-IP webhook request limit.",
            "example": 60,
            "minimum": 0
          },
          "repositories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "GitHub only: repositories (`owner/name`) to accept; empty accepts all.",
            "example": [
              "everruns/everruns"
            ]
          },
          "script": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScriptRun",
                "description": "Schedule and webhook only: a saved script the trigger runs instead of\nasking the model. The run is recorded under `message`."
              },
              {
                "type": "null"
              }
            ]
          },
          "session_mode": {
            "$ref": "#/components/schemas/SessionBinding",
            "description": "Whether invocations reuse a stable session or create a new one."
          },
          "subject_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook and MCP event: template for the event subject. Required for\n`session_mode: per_thread`, which keeps one session per subject.",
            "example": "{{webhook.json.action}}"
          },
          "target_binding_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Schedule only: the conversation on `target_channel_id`, keyed the way\nthe channel binds sessions: `slack:user:{user_id}` (a direct message)\nor `slack:channel:{channel_id}` (top-level posts).",
            "example": "slack:user:U0123ABCD"
          },
          "target_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Schedule only: the agent's channel whose conversation each run speaks\nin, instead of a session of the trigger's own. Needs\n`target_binding_key`.",
            "example": "appchan_01933b5a000070008000000000000001"
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone identifier for cron evaluation (default `UTC`).",
            "example": "UTC"
          },
          "token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shared secret for webhook triggers."
          },
          "trigger_type": {
            "$ref": "#/components/schemas/AgentTriggerType",
            "description": "Trigger kind. Omitted values retain the schedule API default."
          }
        }
      },
      "CreateBranchRequest": {
        "type": "object",
        "description": "Request to create a branch",
        "required": [
          "name",
          "commit_oid"
        ],
        "properties": {
          "commit_oid": {
            "type": "string",
            "description": "Commit OID (hex) to point to",
            "example": "a1b2c3d4e5f60718293a4b5c6d7e8f9012345678"
          },
          "name": {
            "type": "string",
            "description": "Branch name (e.g., \"feature-xyz\")",
            "example": "feature/refund-flow"
          }
        }
      },
      "CreateBudgetRequest": {
        "type": "object",
        "description": "Request body for creating a spending budget.",
        "required": [
          "subject_type",
          "subject_id",
          "currency",
          "limit"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "description": "What the limit measures: \"usd\" (cost from the org's price list) or\n\"tokens\".",
            "example": "usd"
          },
          "limit": {
            "type": "number",
            "format": "double",
            "description": "Hard spending ceiling for the budget.",
            "example": 100
          },
          "metadata": {
            "description": "Free-form metadata attached to this resource."
          },
          "period": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BudgetPeriod",
                "description": "Optional recurring reset period for the budget balance."
              },
              {
                "type": "null"
              }
            ]
          },
          "policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UsagePolicy",
                "description": "Name, steps (notify, ask to continue, stop) and which usage counts.\nAbsent: notify at 80%, ask at the soft limit, stop at the limit."
              },
              {
                "type": "null"
              }
            ]
          },
          "soft_limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional threshold that triggers a warning or pause before exhaustion.",
            "example": 20
          },
          "subject_id": {
            "type": "string",
            "description": "Public identifier of the constrained resource.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "subject_type": {
            "type": "string",
            "description": "Kind of resource constrained by the budget.",
            "example": "agent"
          }
        }
      },
      "CreateConnectionRequest": {
        "type": "object",
        "description": "Request body for API-key connection creation (plugin-based providers).\nAccepts api_key plus any additional form fields as extra_fields.",
        "required": [
          "api_key"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Provider API key, encrypted before storage.",
            "example": "example-api-key"
          }
        },
        "additionalProperties": {
          "description": "Additional provider-specific form fields (e.g. org_slug for provider personal tokens)."
        }
      },
      "CreateCostRate": {
        "type": "object",
        "description": "Add a rate to the org's price list. Rates are never edited: a change is\na new rate from a later date.",
        "required": [
          "meter"
        ],
        "properties": {
          "effective_from": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it starts; now when absent."
          },
          "list_price_multiplier": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Multiple of the provider's or catalog price. Model tokens only."
          },
          "match": {
            "type": [
              "object",
              "null"
            ],
            "description": "Which usage it applies to (see `CostRate.match`)."
          },
          "meter": {
            "type": "string",
            "description": "`model.tokens` or `sandbox.time`."
          },
          "unit_price_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Fixed USD per million tokens (model tokens) or per hour (sandboxes)."
          }
        }
      },
      "CreateDatabaseRequest": {
        "type": "object",
        "description": "Request body for creating a database.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Database name (alphanumeric + underscores, max 64 chars).",
            "example": "refund_history"
          }
        }
      },
      "CreateDeclarativeCapabilityRequest": {
        "type": "object",
        "description": "Request body for the `create_declarative_capability` operation.",
        "required": [
          "definition"
        ],
        "properties": {
          "definition": {
            "type": "object",
            "description": "Definition for the new declarative capability. `name` must be unique per org and becomes the canonical `declarative:<name>` capability ref."
          }
        }
      },
      "CreateEvalCaseRequest": {
        "type": "object",
        "description": "Request to create an eval case",
        "required": [
          "name",
          "scorers"
        ],
        "properties": {
          "artifacts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ArtifactSpec"
            },
            "description": "Session files to capture after scoring completes.",
            "example": [
              {
                "name": "patch",
                "path": "/workspace/fix.patch"
              }
            ]
          },
          "conversation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalInputMessage"
            },
            "description": "Input messages sent to the agent sequentially. May be empty when a\nsimulated user opens the conversation.",
            "example": [
              {
                "content": "Fix the failing test in src/lib.rs"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Agent fixes a failing unit test"
          },
          "max_turns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum agent turns before the case stops.",
            "example": 10,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "fix-failing-test"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Display order within the eval.",
            "example": 0
          },
          "post": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EvalInputMessage"
            },
            "description": "Verification messages sent after conversation completes and session idles.",
            "example": [
              {
                "content": "Run the tests again and report the result"
              }
            ]
          },
          "scorers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scorer"
            },
            "description": "Scoring rules applied to the case output.",
            "example": [
              {
                "text": "tests pass",
                "type": "contains"
              }
            ]
          },
          "simulated_user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SimulatedUser",
                "description": "A model that plays the user after the scripted messages, until it is\ndone or reaches its turn limit. Not combined with `post`."
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Free-form tags attached to this resource.",
            "example": [
              "regression",
              "nightly"
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Optional per-case target override."
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Per-case timeout in seconds.",
            "example": 120,
            "minimum": 0
          },
          "tool_fixtures": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ToolFixture"
            },
            "description": "Tools the case gives the agent, each answered with a canned response."
          }
        }
      },
      "CreateEvalExperimentRequest": {
        "type": "object",
        "description": "Request to start an experiment.",
        "required": [
          "variants"
        ],
        "properties": {
          "max_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Spending cap in USD for the whole experiment, split evenly between\nthe variants' runs.",
            "example": 10
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name. Defaults to the variant labels joined with \"vs\".",
            "example": "Luna vs Sol"
          },
          "trials": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Trials per case and variant, 1 to 20 (default 3).",
            "example": 3,
            "maximum": 20,
            "minimum": 1
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExperimentVariantSpec"
            },
            "description": "One to four variants. The first is the baseline the others are\ncompared against."
          }
        }
      },
      "CreateEvalRequest": {
        "type": "object",
        "description": "Request to create a new eval",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Regression suite for the support agent"
          },
          "model_override": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default model override applied to runs of this eval.",
            "example": "gpt-5.1"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Support agent regression"
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Free-form tags attached to this resource.",
            "example": [
              "regression",
              "nightly"
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Session setup target (harness+agent, app, or full session params)."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CreateEvalRunRequest": {
        "type": "object",
        "description": "Request to create an eval run",
        "properties": {
          "case_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Run only these cases of the eval, by public id (\"Try once\" on a case\npage). Omitted runs every case.",
            "example": [
              "evalcase_01933b5a00007000800000000000001"
            ]
          },
          "max_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Spending cap in USD for the whole run, agents and grading together.\nOnce spent, running turns stop and remaining cases are skipped.",
            "example": 5
          },
          "model_override": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model override for this run.",
            "example": "gpt-6-luna"
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Optional per-run target override."
              },
              {
                "type": "null"
              }
            ]
          },
          "trials": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How many times to run each case, 1 to 20 (default 1). Repeated trials\nreport pass@k and pass^k in the run summary.",
            "example": 3,
            "maximum": 20,
            "minimum": 1
          }
        }
      },
      "CreateFileRequest": {
        "type": "object",
        "description": "Request to create a file",
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "File content (text or base64-encoded). Must match `encoding`.",
            "example": "# Project notes\n\nDraft outline of the migration plan.\n"
          },
          "encoding": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content encoding: \"text\" or \"base64\". Defaults to text.",
            "example": "text"
          },
          "is_directory": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to create a directory instead of a file (ignores `content`/`encoding`).",
            "example": false
          },
          "is_readonly": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether file is read-only",
            "example": false
          }
        }
      },
      "CreateHarnessRequest": {
        "type": "object",
        "description": "Request to create a new harness",
        "required": [
          "name"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capabilities to enable with per-harness configuration.",
            "example": [
              {
                "config": {},
                "ref": "current_time"
              },
              {
                "config": {},
                "ref": "web_fetch"
              }
            ]
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default LLM model ID for this harness. Lowest priority in model chain.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of what the harness does.",
            "example": "Research harness with planning and web capabilities"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name shown in UI.",
            "example": "Deep Research"
          },
          "embedder_metadata": {
            "type": "object",
            "description": "Arbitrary key-value metadata injected into LLM requests for observability.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Starter files copied into each new session for this harness."
          },
          "intro_markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Deprecated: configure conversation presentation on the Agent instead.",
            "deprecated": true,
            "example": "I triage incidents, dig through logs, and draft the update."
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "Remote MCP servers scoped to this harness."
          },
          "name": {
            "type": "string",
            "description": "Name, unique per org. Lowercase alphanumeric and hyphens.",
            "example": "deep-research"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list controlling which hosts/URLs sessions can reach."
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional parent harness to inherit from.",
            "example": "harness_01933b5a000070008000000000000602"
          },
          "short_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Deprecated: configure conversation presentation on the Agent instead.",
            "deprecated": true,
            "example": "Triage incidents, dig through logs, draft the update."
          },
          "starters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationStarter"
            },
            "description": "Deprecated: configure conversation presentation on the Agent instead.",
            "deprecated": true
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base system prompt defining the harness's behavior. Optional: omit (or\nsend an empty string) to contribute no base prompt, in which case the\neffective prompt comes from the parent harness, agent, session, and\ncapability layers.",
            "example": "You are a research assistant with deep analytical capabilities."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing harnesses.",
            "example": [
              "research",
              "planning"
            ]
          }
        }
      },
      "CreateMcpServerRequest": {
        "type": "object",
        "description": "Request to create a new MCP server",
        "required": [
          "name",
          "url"
        ],
        "properties": {
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key for authentication (optional). Sent with each request; never echoed in responses.",
            "example": "mcp-api-key-redacted-1234567890abcdef"
          },
          "auth_mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerAuthMode",
                "description": "Authentication mode. Defaults to `api_key` when `api_key` is provided, otherwise `none`.\nExample shape is defined on `McpServerAuthMode`."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "A human-readable description of what the MCP server provides.",
            "example": "Atlassian MCP Server for Jira and Confluence"
          },
          "elicitation_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpElicitationPolicy",
                "description": "Elicitation modes the server may use. Defaults to `url`; `url_and_form`\nlets it ask structured questions, `none` stops it eliciting at all."
              },
              {
                "type": "null"
              }
            ]
          },
          "headers": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional HTTP headers for authentication.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "X-Atlassian-Cloud-Id": "00000000-0000-0000-0000-000000000000"
            }
          },
          "interactive_views": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpInteractiveViews",
                "description": "Where the server's MCP App views are shown (`on`, `console_only`,\n`off`). Defaults to `on`."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "The name of the MCP server. Must be unique.",
            "example": "atlassian-mcp-server"
          },
          "protocol_mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpProtocolMode",
                "description": "Protocol-era policy. Defaults to `auto` (negotiates every protocol era)."
              },
              {
                "type": "null"
              }
            ]
          },
          "service_connection_provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Connection provider whose connection on an agent's service virtual user\nsupplies the service credential (currently `github`: the agent's GitHub\nApp installation). Only allowed for MCP hosts that accept that\nprovider's tokens.",
            "example": "github"
          },
          "tool_timeout_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How long one tool call may take, in milliseconds (1000 to 1800000).\nDefaults to 60000.",
            "example": 300000,
            "minimum": 0
          },
          "transport_type": {
            "$ref": "#/components/schemas/McpServerTransportType",
            "description": "Transport type. Currently only \"http\" is supported.\nExample shape is defined on `McpServerTransportType`."
          },
          "url": {
            "type": "string",
            "description": "The URL of the MCP server endpoint.",
            "example": "https://mcp.atlassian.com/v1/mcp"
          }
        }
      },
      "CreateMemoryFileRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "File content (text or base64). Default empty."
          },
          "encoding": {
            "type": [
              "string",
              "null"
            ],
            "description": "\"text\" or \"base64\". Defaults to \"text\"."
          },
          "is_directory": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "If true, create a directory instead of a file."
          }
        }
      },
      "CreateMemoryRequest": {
        "type": "object",
        "description": "Request body for the `create_memory` operation.",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Living design documents synced from GitHub"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "design-docs"
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CreateMemorySourceRequest",
                "description": "Source configuration. Example shape is defined on `CreateMemorySourceRequest`."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CreateMemorySourceRequest": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/GitHubMemorySourceRequest"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "github"
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/GitMemorySourceRequest"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "git"
                    ]
                  }
                }
              }
            ]
          }
        ],
        "description": "Request body for the `create_memory_source` operation.",
        "example": {
          "branch": "main",
          "repository": "acme/design-docs",
          "root_folder": "docs/",
          "type": "github"
        }
      },
      "CreateMessageRequest": {
        "type": "object",
        "description": "Request to create a message",
        "required": [
          "message"
        ],
        "properties": {
          "addressed_participant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional active agent participant to address for this turn. When omitted,\nthe session host remains the responder.",
            "example": "part_01933b5a00007000800000000000001"
          },
          "client_message_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Client-minted id for this send (a UUID). A repeat of the same id in the\nsame session returns the stored message instead of starting another\nturn, so a client can retry a send whose response it never saw. The\nstored message echoes it as `everruns_client_message_id` metadata.",
            "example": "0199d0f2-6c1e-7a3b-9f00-1a2b3c4d5e6f"
          },
          "controls": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Controls",
                "description": "Runtime controls (model, reasoning, etc.)"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_actor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExternalActor",
                "description": "External actor identity (for messages from external channels like Slack)"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "$ref": "#/components/schemas/InputMessage",
            "description": "The message to create. Example shape is defined on `InputMessage`."
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Request-level metadata. Arbitrary key/value pairs persisted with the message\nfor downstream filtering and analytics. Not interpreted by the agent.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "source": "slack",
              "thread_ts": "1715000000.123456"
            }
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Tags for the message. Free-form labels used for grouping and filtering.",
            "example": [
              "bug-report",
              "from-slack"
            ]
          }
        }
      },
      "CreateMessageResult": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Message"
          },
          {
            "$ref": "#/components/schemas/TurnWaitResponse"
          }
        ]
      },
      "CreateModelPresetRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelPresetJobs",
            "description": "The model for each job."
          },
          {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the preset is for."
              },
              "from": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Preset to copy jobs from (`automatic`, `provider:gemini` or a custom\nid). Jobs given in this request override the copied ones.",
                "example": "provider:gemini"
              },
              "name": {
                "type": "string",
                "description": "Display name, 1 to 100 characters.",
                "example": "Cheap council"
              }
            }
          }
        ],
        "description": "Create a custom preset, blank or as a copy of another preset."
      },
      "CreateModelRequest": {
        "type": "object",
        "description": "Request to create a new LLM model for a provider",
        "required": [
          "model_id",
          "display_name"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of capabilities this model supports (e.g., \"chat\", \"vision\", \"tools\").",
            "example": [
              "chat",
              "vision",
              "tools"
            ]
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable display name for the model.",
            "example": "GPT-4o"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether this model should be enabled (visible in UI model pickers).",
            "example": false
          },
          "is_favorite": {
            "type": "boolean",
            "description": "Whether this model should be marked as a favorite for quick access.",
            "example": false
          },
          "model_id": {
            "type": "string",
            "description": "The model identifier used by the provider's API (e.g., \"gpt-5.6-sol\", \"claude-opus-5\").",
            "example": "gpt-5.2"
          },
          "profile_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable curated profile key; omitted values infer a provider-specific binding."
          },
          "service": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ServiceKind",
                "description": "Selected service; omitted values infer it from the profile or capabilities."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CreateObserverRequest": {
        "type": "object",
        "description": "Request to create a new observer.",
        "required": [
          "name",
          "scorers"
        ],
        "properties": {
          "alert": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ObserverAlert",
                "description": "Pass-rate alert: opens a health issue and notifies the agent's owners\nwhen the observer's pass rate falls under a threshold."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Score replies from the support agent"
          },
          "match": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ObserverMatch",
                "description": "Which production sessions to score. Empty matches all org traffic."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Support quality"
          },
          "sampling_rate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Fraction of matching turns to score (0.0–1.0). Defaults to 0.1.",
            "example": 0.25
          },
          "scorers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ObserverScorerConfig"
            },
            "description": "Scoring rules. Must contain at least one."
          }
        }
      },
      "CreateOrganizationRequest": {
        "type": "object",
        "description": "Request to create a new organization",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The display name of the organization.",
            "example": "Acme Corp"
          }
        }
      },
      "CreatePaymentAccountRequest": {
        "type": "object",
        "description": "Request body for the `create_payment_account` operation.",
        "required": [
          "owner_type",
          "owner_id",
          "rail",
          "label"
        ],
        "properties": {
          "label": {
            "type": "string",
            "description": "Human-readable label. Safe to render in user-facing messages.",
            "example": "Refund agent · USDC on Base"
          },
          "metadata": {
            "description": "Free-form metadata attached to this account (caller-defined; opaque to the platform).\nExample: `{\"team\": \"support\", \"cost_center\": \"ops\"}`."
          },
          "owner_id": {
            "type": "string",
            "description": "Prefixed identifier of the owning principal. Must use the prefix that matches `owner_type`\n(see above). Example below pairs with `owner_type = \"virtual_user\"`.",
            "example": "identity_01933b5a00007000800000000000001"
          },
          "owner_type": {
            "type": "string",
            "description": "Principal class that owns the account. One of: `user`, `virtual_user`, `organization`.\nThe prefix on `owner_id` must match this: `user` → `user_…`, `virtual_user` → `identity_…`,\n`organization` → `org_…`.",
            "example": "virtual_user"
          },
          "private_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Private key material for the rail. Stored encrypted; never returned in responses.\nExample shown as an obvious placeholder — supply a real 32-byte hex value at create time.",
            "example": "0x<your-32-byte-hex-private-key>"
          },
          "public_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public address on the rail (chain address, account number, etc.). Optional; can be filled in later.",
            "example": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
          },
          "rail": {
            "type": "string",
            "description": "Settlement rail this account operates on. One of: `mpp_tempo`, `x402_base`.",
            "example": "x402_base"
          }
        }
      },
      "CreatePaymentPolicyRequest": {
        "type": "object",
        "description": "Request body for the `create_payment_policy` operation.",
        "required": [
          "payment_account_id",
          "subject_type",
          "subject_id"
        ],
        "properties": {
          "allowed_capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Capability IDs this policy permits paid calls for. Empty list means no capability gating.",
            "example": [
              "weather.lookup",
              "shipping.quote"
            ]
          },
          "allowed_hosts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "HTTP host allowlist for paid outbound calls. Empty list means no host gating.",
            "example": [
              "api.shippo.com",
              "api.openweathermap.org"
            ]
          },
          "max_amount_usd_per_day": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Maximum cumulative amount (USD) over a rolling 24 hours, enforced before signing by reserving each request's maximum. `None` means no per-day cap.",
            "example": 100
          },
          "max_amount_usd_per_request": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Maximum amount (USD) any single paid request may settle for. **Enforced** by the payment authority at policy selection. `None` means no per-request cap.",
            "example": 5
          },
          "max_amount_usd_per_turn": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Maximum cumulative amount (USD) per agent turn, enforced before signing by reserving each request's maximum against the turn. A request with no turn binding fails closed. `None` means no per-turn cap.",
            "example": 20
          },
          "metadata": {
            "description": "Free-form metadata attached to this policy.\nExample: `{\"owner_team\": \"ops\", \"ticket\": \"OPS-1248\"}`."
          },
          "payment_account_id": {
            "type": "string",
            "description": "Payment account this policy authorizes spending from. Accepts a prefixed `payacct_…`\nidentifier or a bare UUID.",
            "example": "payacct_01933b5a00007000800000000000001"
          },
          "rail_preference": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Preferred settlement rails in priority order; the authority picks the first available.",
            "example": [
              "x402_base",
              "mpp_tempo"
            ]
          },
          "require_approval_above_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Threshold (USD) above which a request would require explicit human approval. **Advisory only — not yet enforced.** Stored for forward compatibility; no approval gate is wired up yet. `None` disables the (future) gate.",
            "example": 10
          },
          "subject_id": {
            "type": "string",
            "description": "Prefixed identifier of the bound subject. Must use the prefix matching `subject_type`\n(see above). Example below pairs with `subject_type = \"virtual_user\"`.",
            "example": "identity_01933b5a00007000800000000000001"
          },
          "subject_type": {
            "type": "string",
            "description": "Class of subject this policy binds to. One of: `user`, `virtual_user`,\n`agent`, `agent_channel`, `session`, `org`.\nThe prefix on `subject_id` must match: `user`→`user_…`, `virtual_user`→`identity_…`,\n`agent`→`agent_…`, `agent_channel`→`appchan_…` (an endpoint kept the\nidentifier it carried as an App channel), `session`→`session_…`,\n`org`→`org_…`. The identifier must be the API-facing one — an internal\nuuid will be stored and then never match (EVE-1130).",
            "example": "virtual_user"
          }
        }
      },
      "CreatePlatformAgentSessionRequest": {
        "type": "object",
        "description": "Start an idle session on an Agent API channel. The body may be empty. Send a message to begin a turn.",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional title for the session.",
            "maxLength": 200
          }
        }
      },
      "CreatePluginMarketplaceRequest": {
        "type": "object",
        "description": "Request body for creating a plugin marketplace.",
        "required": [
          "name",
          "source_type",
          "source"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Unique name within the org (kebab-case, e.g. `my-org-plugins`).",
            "example": "everruns-plugins"
          },
          "source": {
            "type": "string",
            "description": "Source value. For `github`: `\"owner/repo\"`. For `url`: full HTTPS URL.\nFor `local_path` (dev only): absolute filesystem path.",
            "example": "everruns/plugins"
          },
          "source_type": {
            "type": "string",
            "description": "Source type: `github`, `url`, or `local_path` (dev/test only).",
            "example": "github"
          }
        }
      },
      "CreateProviderRequest": {
        "type": "object",
        "description": "Request to create a new LLM provider",
        "required": [
          "name",
          "provider_type"
        ],
        "properties": {
          "api": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chat API declared by the provider driver; \"default\" restores its default."
          },
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key for authenticating with the provider.\nWill be encrypted at rest if encryption is configured.\n\nSingle-field convenience for simple providers and programmatic clients.\nMulti-field drivers (Bedrock, MAI) should send `credentials` instead."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL for the provider's API. Required for custom endpoints.\nFor standard providers, this can be omitted to use the default URL.",
            "example": "https://api.openai.com/v1"
          },
          "credentials": {
            "type": [
              "object",
              "null"
            ],
            "description": "Typed credential fields keyed by the driver's declared credential-schema\nfield names. Validated against the schema and assembled into the stored\ncredential document. Takes precedence over `api_key` when present.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "name": {
            "type": "string",
            "description": "Display name for the provider.",
            "example": "OpenAI Production"
          },
          "provider_type": {
            "$ref": "#/components/schemas/DriverId",
            "description": "The type of LLM provider (e.g., openai, anthropic)."
          },
          "request_options": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderRequestOptions",
                "description": "Extra headers and diagnostics options applied to every request sent to\nthis provider. Omit to configure none."
              },
              {
                "type": "null"
              }
            ]
          },
          "trace": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderTraceConfig",
                "description": "Trace/observability link configuration. Stored as a per-provider override\nof the driver's default templates; omit to keep driver defaults."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CreatePushConfigBody": {
        "type": "object",
        "description": "Request body for creating a per-task push config.",
        "required": [
          "url"
        ],
        "properties": {
          "event_filter": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Events that trigger delivery. Defaults to `[\"terminal\"]`."
          },
          "secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional HMAC-SHA256 signing secret (never returned once set).",
            "example": "whsec_example_signing_secret_placeholder"
          },
          "url": {
            "type": "string",
            "description": "URL to POST task events to.",
            "example": "https://hooks.example.com/everruns/tasks"
          }
        }
      },
      "CreateSandboxTemplateRequest": {
        "type": "object",
        "required": [
          "name",
          "display_name",
          "spec"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional explanation of the Sandbox Template's intended workload.",
            "example": "Recoverable coding workspace managed by Daytona"
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable name shown in management surfaces.",
            "example": "Coding - Daytona"
          },
          "name": {
            "type": "string",
            "description": "Stable addressable name used by Agent Sandbox policies.",
            "example": "coding-daytona"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxTemplateSpec",
            "description": "Initial immutable Sandbox specification revision."
          }
        }
      },
      "CreateScheduleRequest": {
        "type": "object",
        "description": "Create schedule request",
        "required": [
          "name",
          "cron_expression",
          "target"
        ],
        "properties": {
          "catch_up_missed": {
            "type": "boolean",
            "description": "Whether to catch up missed triggers (default: false)",
            "example": false
          },
          "cron_expression": {
            "type": "string",
            "description": "Cron expression (5-field or 7-field). Standard `min hour day-of-month month day-of-week` form.",
            "example": "0 2 * * *"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description",
            "example": "Fires the support-triage agent every night at 02:00 UTC"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether schedule is enabled (default: true)",
            "example": true
          },
          "max_catch_up": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Max catch-up executions when `catch_up_missed` is true. Older missed fires are dropped.",
            "example": 3,
            "minimum": 0
          },
          "max_concurrent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Max concurrent executions. Omit for no limit beyond the worker pool's concurrency.",
            "example": 1,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "description": "Unique name for the schedule",
            "example": "nightly-triage"
          },
          "retry_policy": {
            "description": "Retry policy for failed executions (provider-specific JSON; see the durable engine's `RetryPolicy`).\nExample: `{\"max_attempts\": 3, \"initial_backoff_secs\": 30, \"backoff_multiplier\": 2.0}`."
          },
          "target": {
            "$ref": "#/components/schemas/ScheduleTarget",
            "description": "Target to trigger. Variant shape is defined on `ScheduleTarget`."
          },
          "timezone": {
            "type": "string",
            "description": "Timezone (default: UTC). IANA name (e.g. `UTC`, `America/New_York`).",
            "example": "UTC"
          }
        }
      },
      "CreateScopedCredential": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CredentialOwnerInput",
            "description": "Authorized owner and required invocation identity."
          },
          {
            "type": "object",
            "required": [
              "label"
            ],
            "properties": {
              "binding": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SecretBinding",
                    "description": "Exact HTTPS destination and injection placement; supply this or `mcp`, exclusively."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "label": {
                "type": "string",
                "description": "Human-readable label, between 1 and 128 bytes."
              },
              "mcp": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/McpCredentialTarget",
                    "description": "Exact MCP endpoint, tool, and parameter; supply this or `binding`, exclusively."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "HTTP reference name; required for HTTP bindings."
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ConnectionCredentialSource",
                    "description": "Optional native GitHub connection and bounded access request instead of a stored value."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        ],
        "description": "Declare binding metadata. Provision its value separately through secure entry or approved capture."
      },
      "CreateSessionRequest": {
        "type": "object",
        "description": "Request to create a session",
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the agent to work in this session (optional, format: agent_{32-hex}).\nWhen supplied without a harness, the session inherits the agent's harness.\nMutually exclusive with `agent_name`.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the agent to work in this session (optional).\nAlternative to `agent_id` — looked up by name within the org.\nMutually exclusive with `agent_id`.",
            "example": "support"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Session-level capabilities (additive to agent capabilities).\nApplied after agent capabilities when building TurnAgent.",
            "example": [
              {
                "config": {},
                "ref": "current_time"
              },
              {
                "config": {},
                "ref": "web_fetch"
              }
            ]
          },
          "goal": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional objective for the session. Visible to the agent at system-prompt level.",
            "example": "Investigate the queue latency regression and propose a fix"
          },
          "harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the harness for this session (format: harness_{32-hex}).\nIf omitted, the harness is derived from the agent (when one is supplied),\nelse the org default harness, else the built-in fallback. New orgs default\nthat to Conversation. Mutually exclusive with `harness_name`.",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "harness_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Harness name (e.g. \"conversation\", \"deep-research\").\nAlternative to `harness_id` — looked up by name within the org.\nMutually exclusive with `harness_id`.",
            "example": "conversation"
          },
          "hints": {
            "type": [
              "object",
              "null"
            ],
            "description": "Session-level client hints — arbitrary key-value pairs that tell the\nserver what the client can handle. These are defaults for every turn;\nper-message `controls.hints` override these key-by-key (shallow merge).\n\nThree hints decide whether a turn may pause rather than talk past the\nuser: `setup_connection`, `url_elicitation`, and `ask_user` (each names\nthe card the client renders). A pause whose hint is absent does not park\n— an unhinted `ask_user` resolves with the model's defaults (EVE-1057).",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "ask_user": true,
              "rich_media": true,
              "setup_connection": true,
              "url_elicitation": true
            }
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Starting files for a new file tree (additive to agent/harness files).\nMatching paths override earlier layers. Rejected when attaching workspace_id.",
            "example": [
              {
                "content": "# Project notes\n",
                "path": "README.md"
              }
            ]
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session locale (BCP 47, e.g. `uk-UA`).",
            "example": "uk-UA"
          },
          "max_iterations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum number of LLM iterations per turn for this session.",
            "example": 20,
            "minimum": 0
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "Remote MCP servers scoped to this session only."
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The ID of the LLM model to use for this session.\nOverrides the agent's default model if specified.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list controlling which hosts/URLs this session can reach.\nMerged with harness and agent layers (allowed: intersect, blocked: union).\nExample shape is defined on `NetworkAccessList`."
              },
              {
                "type": "null"
              }
            ]
          },
          "parallel_tool_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Request-level parallel tool calling preference (EVE-598). `true` signals\nthe provider that parallel tool calls are wanted; `false` requests at\nmost one tool call per turn and forces serial execution. Omit to inherit\nthe agent/harness preference or the provider default.",
            "example": true
          },
          "playground_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fixed Playground end user. Defaults to the caller's linked virtual user. Only valid with source=playground."
          },
          "sandbox": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxSelection",
                "description": "Primary Sandbox for this Session. Omit to inherit the Agent's default\nSandbox Template, use `{ \"use\": \"name\" }` to select a declared binding,\nor inline a specification when the Agent policy permits one-offs."
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "How this session was started. Clients may declare `chat`, `playground`, or `api`\n(the default); every other source is\nserver-owned so the sessions facet rail stays trustworthy.",
            "example": "chat"
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional session-level system prompt override.\nPrepended to the agent's system prompt when building TurnAgent.",
            "example": "You are debugging a production incident. Be concise and cite log lines verbatim."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing and filtering sessions.",
            "example": [
              "debugging",
              "urgent"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable title for the session.",
            "example": "Debug login issue"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            },
            "description": "Client-side tools for this session (additive to agent tools).\nThese tools are sent to the LLM but executed by the client.",
            "example": [
              {
                "description": "Open URL in the user's browser",
                "name": "open_url",
                "parameters": {
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "type": "object"
                },
                "type": "client_side"
              }
            ]
          },
          "virtual_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional resident virtual user used for unattended/background execution.",
            "example": "identity_01933b5a00007000800000000000001"
          }
        }
      },
      "CreateSkillRequest": {
        "type": "object",
        "description": "Request to create a skill from SKILL.md content",
        "required": [
          "skill_md"
        ],
        "properties": {
          "skill_md": {
            "type": "string",
            "description": "Full SKILL.md content (YAML frontmatter + markdown body)",
            "example": "---\nname: pdf-processing\ndescription: Extract text from PDFs.\n---\n\n# PDF Processing\n\nUse pdfplumber..."
          }
        }
      },
      "CreateTaskWebhookRequest": {
        "type": "object",
        "description": "Request body for creating a task webhook.",
        "required": [
          "url"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the webhook starts enabled. Defaults to true."
          },
          "secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional HMAC-SHA256 signing secret. When set, every delivery includes\nan `X-Everruns-Signature: sha256=<hex>` header."
          },
          "url": {
            "type": "string",
            "description": "The URL to POST task terminal-state events to."
          }
        }
      },
      "CreateVirtualUserRequest": {
        "type": "object",
        "description": "Create an organization-scoped runtime account.",
        "required": [
          "name"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Profile image URL.",
            "example": "https://example.com/avatar.png"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages."
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Locale used for agent-facing defaults.",
            "example": "en-US"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Ops Bot"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "IANA time zone used for agent-facing defaults.",
            "example": "America/Los_Angeles"
          },
          "usage": {
            "$ref": "#/components/schemas/VirtualUserUsage",
            "description": "Runtime purpose; service accounts may be attached to agents."
          }
        }
      },
      "CreatedResource": {
        "type": "object",
        "description": "Identifier of the newly declared binding or explicit access grant.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable identifier used by subsequent metadata and management requests."
          }
        }
      },
      "CredentialCheckResult": {
        "oneOf": [
          {
            "type": "object",
            "description": "The provider accepted the credential.",
            "required": [
              "models",
              "status"
            ],
            "properties": {
              "models": {
                "type": "integer",
                "description": "Number of models the provider listed for this credential.",
                "example": 42,
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "valid"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The provider rejected the credential (401/403). Hard stop.",
            "required": [
              "message",
              "status"
            ],
            "properties": {
              "message": {
                "type": "string",
                "description": "User-facing reason. Never carries the provider's response body.",
                "example": "The provider rejected this API key."
              },
              "status": {
                "type": "string",
                "enum": [
                  "rejected"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "This driver has no credential-checking endpoint (custom base URL,\nsimulator, or a driver without model discovery).",
            "required": [
              "status"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "unsupported"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The provider could not be reached, so the credential is unproven.",
            "required": [
              "message",
              "status"
            ],
            "properties": {
              "message": {
                "type": "string",
                "description": "User-facing reason. Never carries the provider's response body.",
                "example": "Could not reach the provider to verify this API key."
              },
              "status": {
                "type": "string",
                "enum": [
                  "unreachable"
                ]
              }
            }
          }
        ],
        "description": "Outcome of checking a candidate provider credential."
      },
      "CredentialFormSchema": {
        "type": "object",
        "description": "Describes the form fields and instructions for entering a credential.",
        "required": [
          "fields",
          "instructions_markdown"
        ],
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormField"
            },
            "description": "Input fields to render."
          },
          "instructions_markdown": {
            "type": "string",
            "description": "Markdown instructions shown above the form (how to get the key, etc.)."
          }
        }
      },
      "CredentialOwnerInput": {
        "type": "object",
        "description": "Authorized owner and usage of a credential. Ownership does not grant access to other consumers.",
        "required": [
          "scope",
          "usage"
        ],
        "properties": {
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent or session ID, or virtual-user ID (`me` by default); omit for organization scope."
          },
          "scope": {
            "$ref": "#/components/schemas/ResourceScope",
            "description": "Ownership and lifetime scope within the current organization."
          },
          "usage": {
            "$ref": "#/components/schemas/CredentialUsage",
            "description": "Required invocation identity; agent and organization owners require service usage."
          }
        }
      },
      "CredentialUsage": {
        "type": "string",
        "description": "Invocation identity under which a credential may be used; identities never fall back to each other.",
        "enum": [
          "user",
          "service"
        ]
      },
      "CreditShortfallAction": {
        "type": "string",
        "description": "What the runtime did about a provider's \"not enough credits\" refusal.",
        "enum": [
          "shrunk",
          "wait_started",
          "still_waiting",
          "resumed",
          "gave_up"
        ]
      },
      "DatabaseInfoResponse": {
        "type": "object",
        "description": "Database info response.",
        "required": [
          "name",
          "size_bytes",
          "page_count",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages."
          },
          "page_count": {
            "type": "integer",
            "format": "int32"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp when this resource was last updated (RFC 3339)."
          }
        }
      },
      "DatasetFilters": {
        "type": "object",
        "description": "Selection filters applied per case. `org_id` is never part of this — it is\ninjected by the command from the authenticated caller, so a filter can never\nwiden the org scope.",
        "properties": {
          "min_score": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Keep only cases whose mean scorer value is >= this (0.0–1.0).",
            "example": 0.8
          },
          "pass": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Keep only cases whose pass/fail equals this.",
            "example": true
          }
        }
      },
      "DatasetFormat": {
        "type": "string",
        "description": "Output schema for the exported dataset.",
        "enum": [
          "trajectory",
          "sft",
          "atif"
        ]
      },
      "DecisionModelProfile": {
        "type": "object",
        "description": "Typed decision semantics and serving-independent limits.",
        "required": [
          "primitives",
          "calibrated"
        ],
        "properties": {
          "calibrated": {
            "type": "boolean",
            "description": "Whether returned probabilities are calibrated native decision measurements."
          },
          "max_choice_options": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum options in one choice question, when known.",
            "minimum": 0
          },
          "max_score_levels": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum levels in one score question, when known.",
            "minimum": 0
          },
          "primitives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Native primitive names supported by this profile (noul, choice or score)."
          },
          "request_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum token count for the complete request, when known.",
            "minimum": 0
          },
          "state_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum token count for the evaluated state, when known.",
            "minimum": 0
          }
        }
      },
      "DeclarativeCapability": {
        "type": "object",
        "description": "Persisted, org-scoped declarative capability — a YAML/JSON-defined\nbundle of skills, files, and tool defs that an agent or harness can\nreference by `capability_id` or name.",
        "required": [
          "id",
          "capability_id",
          "name",
          "description",
          "status",
          "definition",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this resource was archived, if any (RFC 3339)."
          },
          "capability_id": {
            "type": "string",
            "description": "Runtime capability reference. Agents and harnesses may use this or the plain unique name.",
            "example": "declarative:research_pack"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "definition": {
            "type": "object",
            "description": "Declarative capability payload: system prompt, skills, starter files, MCP servers, and metadata."
          },
          "definition_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the stored definition could not be parsed, when it could not be.\n\nPresent only for a corrupt row. The capability keeps its identity\ncolumns so a surface can name what is broken, but `definition` is the\ninert default and `definition.status` reports `retired`, so nothing\nreads it as a usable capability.",
            "example": "missing field `acts_as` at line 1 column 84"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this resource was soft-deleted, if any (RFC 3339)."
          },
          "description": {
            "type": "string",
            "description": "Short summary shown in pickers, search results, and API listings.",
            "example": "Adds research instructions, starter files, and MCP tools."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-facing label shown in the UI. Defaults to `name` when omitted.",
            "example": "Research Pack"
          },
          "id": {
            "type": "string",
            "description": "Public resource ID for this persisted declarative capability.",
            "example": "cap_01933b5a000070008000000000000001"
          },
          "name": {
            "type": "string",
            "description": "Stable unique name used in capability refs. Lowercase letters, numbers, and underscores.",
            "example": "research_pack"
          },
          "status": {
            "type": "string",
            "description": "Lifecycle state for the resource: active, disabled, archived, or deleted.",
            "example": "active"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was last updated (RFC 3339)."
          }
        }
      },
      "DeferrablePolicy": {
        "type": "string",
        "description": "Controls whether a tool's full schema can be deferred (tool_search).\n\nWhen tool_search is active and a model supports it, tools marked as\n`Automatic` or `Always` will have `defer_loading: true` set, meaning\nonly the name+description are sent upfront and full parameter schemas\nare loaded on-demand by the model.",
        "enum": [
          "never",
          "automatic",
          "always"
        ]
      },
      "DeleteAccountResponse": {
        "type": "object",
        "description": "Response for account deletion",
        "required": [
          "deleted"
        ],
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DeleteFileResponse": {
        "type": "object",
        "description": "Response for delete operation",
        "required": [
          "deleted"
        ],
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DeleteQuery": {
        "type": "object",
        "properties": {
          "recursive": {
            "type": "boolean"
          }
        }
      },
      "DestinationConfig": {
        "type": "object",
        "description": "Non-secret receiver settings and explicit content capture consent.",
        "required": [
          "name",
          "provider",
          "endpoint"
        ],
        "properties": {
          "capture_content": {
            "type": "boolean",
            "description": "Explicit consent to export message and tool content; defaults to metadata only.",
            "example": false
          },
          "capture_reasoning": {
            "type": "boolean",
            "description": "Explicit consent to export reasoning; also requires content capture.",
            "example": false
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether customer exports may be sent to this receiver; false pauses delivery.",
            "example": true
          },
          "endpoint": {
            "type": "string",
            "description": "HTTPS receiver endpoint without embedded credentials, query parameters, or fragments.",
            "example": "https://collector.example.com/v1/traces"
          },
          "langsmith_agent_environment": {
            "type": [
              "string",
              "null"
            ],
            "description": "LangSmith agent environment: local, development, staging, or production."
          },
          "langsmith_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Registered LangSmith agent identifier, mutually exclusive with project_name."
          },
          "name": {
            "type": "string",
            "description": "Human-readable destination name, from 1 to 128 characters.",
            "example": "Production traces"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Braintrust project identifier; required for Braintrust receivers.",
            "example": "00000000-0000-0000-0000-000000000002"
          },
          "project_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "LangSmith project name for project-based workspaces."
          },
          "provider": {
            "$ref": "#/components/schemas/TraceProvider",
            "description": "Native Braintrust, Langfuse, LangSmith, or generic OTLP over HTTPS."
          }
        },
        "additionalProperties": false
      },
      "DestinationView": {
        "type": "object",
        "description": "Destination settings, safe delivery health, and routing usage; excludes credentials.",
        "required": [
          "id",
          "config",
          "revision",
          "dropped_events",
          "organization_default",
          "agent_selections"
        ],
        "properties": {
          "agent_selections": {
            "type": "integer",
            "format": "int64",
            "description": "Number of agent policies that explicitly select this destination.",
            "example": 0
          },
          "config": {
            "$ref": "#/components/schemas/DestinationConfig",
            "description": "Non-secret destination settings, including capture consent and pause state."
          },
          "dropped_events": {
            "type": "integer",
            "format": "int64",
            "description": "Number of events omitted by bounded customer export delivery.",
            "example": 0
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Destination identifier owned by the current organization.",
            "example": "00000000-0000-0000-0000-000000000001"
          },
          "last_accepted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the receiver last accepted an export, or null before any acceptance.",
            "example": "2026-10-28T00:00:00Z"
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of the latest delivery attempt, or null before the first attempt.",
            "example": "2026-10-28T00:00:00Z"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sanitized delivery failure; never includes receiver credentials or response bodies.",
            "example": "Receiver unavailable"
          },
          "organization_default": {
            "type": "boolean",
            "description": "Whether this destination is selected in organization defaults.",
            "example": false
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Current revision used to reject stale saves and deletes.",
            "example": 1
          }
        }
      },
      "DiffQuery": {
        "type": "object",
        "description": "Query for diff endpoint",
        "required": [
          "oid"
        ],
        "properties": {
          "base": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base commit OID (optional, defaults to parent)",
            "example": "9876543210fedcba9876543210fedcba98765432"
          },
          "oid": {
            "type": "string",
            "description": "Commit OID to diff (required). 40-char hex SHA-1.",
            "example": "a1b2c3d4e5f60718293a4b5c6d7e8f9012345678"
          }
        }
      },
      "DismissEvalProposalRequest": {
        "type": "object",
        "description": "Request to turn a proposal down.",
        "properties": {
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it is not wanted, kept so the builder does not offer it again.",
            "example": "We do not support refunds over the limit at all."
          }
        }
      },
      "DismissHealthIssueRequest": {
        "type": "object",
        "description": "Why a finding needs nothing.",
        "required": [
          "note"
        ],
        "properties": {
          "note": {
            "type": "string",
            "description": "A false alarm, expected work, or already handled. Kept so detectors\ncan be calibrated against it.\n(Named `note` because `reason` is the change-intent flag every\ncommand takes.)",
            "example": "Expected: this is our nightly load test"
          }
        }
      },
      "DlqEntryResponse": {
        "type": "object",
        "description": "DLQ entry response",
        "required": [
          "id",
          "original_task_id",
          "activity_id",
          "activity_type",
          "input",
          "attempts",
          "last_error",
          "error_history",
          "dead_at"
        ],
        "properties": {
          "activity_id": {
            "type": "string",
            "description": "Per-workflow activity ID of the failed task.",
            "example": "tool_call_0042"
          },
          "activity_type": {
            "type": "string",
            "description": "Activity type name of the failed task.",
            "example": "tool_call"
          },
          "attempts": {
            "type": "integer",
            "format": "int32",
            "description": "Number of attempts made before the task was sent to the DLQ.",
            "example": 5,
            "minimum": 0
          },
          "dead_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the task was moved to the DLQ (RFC 3339).",
            "example": "2026-05-27T15:26:11Z"
          },
          "error_history": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Full ordered history of error messages, one per attempt.",
            "example": [
              "connection reset",
              "503 Service Unavailable",
              "upstream gateway timeout",
              "upstream gateway timeout",
              "upstream gateway timeout"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the DLQ entry.",
            "example": "dead0000-0000-0000-0000-000000000001"
          },
          "input": {
            "type": "object",
            "description": "Task input payload at the time of failure (used for inspection and replay)."
          },
          "last_error": {
            "type": "string",
            "description": "Most recent error message (the one that pushed the task to the DLQ).",
            "example": "upstream gateway timeout"
          },
          "original_task_id": {
            "type": "string",
            "format": "uuid",
            "description": "Task ID that was originally retried and ultimately failed (matches the `tasks` record before its move to the DLQ).",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "workflow_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Owning workflow's identifier, if the task was part of one.",
            "example": "9a1b2c3d-4e5f-6789-abcd-ef0123456789"
          }
        }
      },
      "DlqListResponse": {
        "type": "object",
        "description": "DLQ list response",
        "required": [
          "data",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DlqEntryResponse"
            },
            "description": "Page of items returned by this query."
          },
          "total": {
            "type": "integer",
            "description": "Total number of items matching the query, across all pages.",
            "minimum": 0
          }
        }
      },
      "DoctorCheck": {
        "type": "object",
        "description": "One check's outcome, written for an operator: what is true, why it\nmatters, and what to do.",
        "required": [
          "id",
          "area",
          "title",
          "status",
          "summary",
          "observed_at"
        ],
        "properties": {
          "area": {
            "$ref": "#/components/schemas/CheckArea"
          },
          "fix": {
            "type": [
              "string",
              "null"
            ],
            "description": "How to fix it."
          },
          "id": {
            "type": "string",
            "description": "Stable identifier, `area.name`.",
            "example": "database.migrations"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the check observed this."
          },
          "status": {
            "$ref": "#/components/schemas/CheckStatus"
          },
          "summary": {
            "type": "string",
            "description": "What the check found, in one sentence.",
            "example": "All 14 migrations are applied."
          },
          "title": {
            "type": "string",
            "description": "Short name of what is checked.",
            "example": "Migrations applied"
          },
          "why": {
            "type": [
              "string",
              "null"
            ],
            "description": "What goes wrong if this is not fixed."
          }
        }
      },
      "DoctorReport": {
        "type": "object",
        "description": "The whole install's health.",
        "required": [
          "status",
          "checked_at",
          "version",
          "grade",
          "auth_mode",
          "setup",
          "checks"
        ],
        "properties": {
          "auth_mode": {
            "type": "string",
            "description": "Authentication mode.",
            "example": "full"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the checks ran."
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DoctorCheck"
            },
            "description": "Every check, problems first."
          },
          "grade": {
            "type": "string",
            "description": "Deployment grade (`dev`, `poc`, `preview`, `prod`). Decides how strict\nthe security checks are.",
            "example": "prod"
          },
          "setup": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the doctor found this install is made of, one fact per entry.",
            "example": [
              "Postgres 16.4",
              "3 workers",
              "NATS",
              "S3 blob storage"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CheckStatus",
            "description": "The worst status of any check."
          },
          "version": {
            "type": "string",
            "description": "Server build version.",
            "example": "0.50.0"
          }
        }
      },
      "DraftGitHubTrigger": {
        "type": "object",
        "description": "A GitHub trigger to create once GitHub is connected on the agent.",
        "properties": {
          "branches": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "CI events only: branches to accept, e.g. `main`; empty means every branch."
          },
          "changes_only": {
            "type": "boolean",
            "description": "Run only when a CI outcome differs from the previous one for the same\nrepository and branch."
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Events from the builder's fixed list, e.g. `workflow_run.completed`."
          },
          "message": {
            "type": "string",
            "description": "Message the agent receives for each event."
          },
          "repositories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`owner/name` repositories; empty means every repository the App sees."
          },
          "workflows": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "CI events only: workflow (or check suite app) names to accept, e.g. `CI`;\nempty means every workflow."
          }
        }
      },
      "DraftMcpServer": {
        "type": "object",
        "description": "A catalog MCP server to attach.",
        "required": [
          "name",
          "acts_as"
        ],
        "properties": {
          "acts_as": {
            "type": "string",
            "description": "Whose grant the attachment uses, set from the preset's auth.",
            "example": "service"
          },
          "name": {
            "type": "string",
            "description": "Catalog preset name."
          }
        }
      },
      "DraftSchedule": {
        "type": "object",
        "description": "When the agent wakes itself.",
        "required": [
          "cron",
          "message"
        ],
        "properties": {
          "cron": {
            "type": "string",
            "description": "Five-field cron expression (minute hour day month weekday)."
          },
          "message": {
            "type": "string",
            "description": "Message the agent receives on each scheduled run."
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "DreamingActivityData": {
        "type": "object",
        "required": [
          "operation_id",
          "status",
          "note_count"
        ],
        "properties": {
          "cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "note_count": {
            "type": "integer",
            "minimum": 0
          },
          "operation_id": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DriverCredentialInfo": {
        "type": "object",
        "description": "A driver's declared credential schema, so the Settings UI can render\ndiscrete typed inputs (multi-field AWS keys, Entra OAuth fields) instead of\none opaque password field.",
        "required": [
          "driver",
          "credential_schema",
          "supports_oauth",
          "services",
          "apis"
        ],
        "properties": {
          "apis": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Supported explicit chat APIs; \"default\" is also accepted."
          },
          "credential_schema": {
            "$ref": "#/components/schemas/CredentialFormSchema",
            "description": "The fields and instructions to render for this driver's credential."
          },
          "driver": {
            "type": "string",
            "description": "Driver id (e.g. `openai`, `bedrock`, `mai`)."
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceKind"
            }
          },
          "supports_oauth": {
            "type": "boolean",
            "description": "Whether the driver declares an interactive \"Connect with …\" OAuth flow."
          }
        }
      },
      "DriverId": {
        "type": "string",
        "description": "LLM provider type. Built-in: openai, openrouter, azure_openai, openai_completions, anthropic, gemini, llmsim, bedrock, mai, fireworks, meta, mistral, cloudflare, vercel. Any other string is treated as an embedder-defined external provider."
      },
      "ElicitationConsentRequest": {
        "type": "object",
        "description": "Request to answer a pending URL mode elicitation.",
        "required": [
          "tool_call_id",
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ConsentAction",
            "description": "The user's decision."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The `confirm_url_elicitation` tool call being answered.",
            "example": "url_elicitation_01933b5a00007000800000000000001"
          }
        }
      },
      "ElicitationConsentResponse": {
        "type": "object",
        "description": "Result of answering a pending URL mode elicitation.",
        "required": [
          "host",
          "status"
        ],
        "properties": {
          "host": {
            "type": "string",
            "description": "Domain the consent was recorded against, echoed so a client can confirm\nit showed the same one."
          },
          "status": {
            "type": "string",
            "description": "Session status after the decision."
          }
        }
      },
      "EndpointStatus": {
        "type": "string",
        "description": "Per-channel lifecycle (EVE-1007).\n\nThis is the authority for whether an exposure accepts traffic. It replaced\nthe two-dimensional `App.status × AppChannel.enabled` matrix, which could\nexpress \"published App, disabled channel\" and forced publishing a whole App —\nand therefore every sibling channel on it — to make one endpoint reachable.\n\nLiveness also depends on agent-level conditions, which are folded in at\nresolution time rather than stored here.",
        "enum": [
          "draft",
          "live",
          "disabled"
        ],
        "example": "live"
      },
      "EnqueueTaskOptions": {
        "type": "object",
        "description": "Options for enqueuing a standalone task",
        "properties": {
          "max_attempts": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum retry attempts (default: 3)",
            "example": 3,
            "minimum": 0
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Priority (higher = claimed first, default: 0)",
            "example": 10
          }
        }
      },
      "EnqueueTaskRequest": {
        "type": "object",
        "description": "Request body for enqueuing a standalone task (generic queue)",
        "required": [
          "activity_type",
          "input"
        ],
        "properties": {
          "activity_type": {
            "type": "string",
            "description": "Activity type (determines which worker handles this task)",
            "example": "leased_resource_cleanup"
          },
          "input": {
            "description": "Task input payload (activity-specific JSON; any shape — object, array, string, etc.).\nExample for `leased_resource_cleanup`: `{\"batch_size\": 25, \"stale_after_seconds\": 300, \"retry_after_seconds\": 60}`."
          },
          "options": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EnqueueTaskOptions",
                "description": "Retry policy options"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EnqueueTaskResponse": {
        "type": "object",
        "description": "Response for enqueued task",
        "required": [
          "task_id"
        ],
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid",
            "description": "Durable task's identifier."
          }
        }
      },
      "EntityChange": {
        "type": "object",
        "description": "One recorded change to an entity.",
        "required": [
          "id",
          "entity_kind",
          "entity_ref",
          "action",
          "command",
          "changed_fields",
          "actor_kind",
          "surface",
          "created_at"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "What happened: `created`, `updated`, `deleted`, ...",
            "example": "updated"
          },
          "actor_kind": {
            "type": "string",
            "description": "`user`, `api_key`, `agent_session` or `system`.",
            "example": "agent_session"
          },
          "actor_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The user the change was made as (for an agent, the user it acted for)."
          },
          "changed_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Fields the caller asked to change."
          },
          "command": {
            "type": "string",
            "description": "Wire name of the command that made the change.",
            "example": "update_agent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "entity_kind": {
            "type": "string",
            "description": "Kind of entity changed, e.g. `agent`.",
            "example": "agent"
          },
          "entity_ref": {
            "type": "string",
            "description": "The entity's public id.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of this history entry."
          },
          "mcp_client": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpClientAttribution",
                "description": "Registered MCP client of this action; its name is self-declared."
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why, in the caller's words. Caller text, not verified."
          },
          "request_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Correlation id of the HTTP request, when there was one."
          },
          "restored_from_revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "For a restore, the revision it brought back."
          },
          "revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The entity's revision after this change; absent when the change left\nthe entity as it was, or its kind keeps no snapshots."
          },
          "surface": {
            "type": "string",
            "description": "Where the change came in: `api`, `commands`, `mcp`, `platform`,\n`worker` or `internal`.",
            "example": "platform"
          },
          "via_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent of that session."
          },
          "via_session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The session through which an agent made the change."
          }
        }
      },
      "EntityLocalization": {
        "type": "object",
        "description": "Display-only translations shared by portable agent files and platform resources.\nAddresses, tool identifiers and execution instructions never use these values.",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Localized description (1–2000 characters when set)."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Localized display name (1–255 characters when set)."
          }
        },
        "additionalProperties": false
      },
      "EntityLocalizations": {
        "type": "object",
        "description": "Locale-keyed display overlays. Deserialization normalizes tags and bounds input.",
        "additionalProperties": {
          "$ref": "#/components/schemas/EntityLocalization"
        },
        "propertyNames": {
          "type": "string"
        }
      },
      "EntityRevision": {
        "type": "object",
        "description": "One revision of an entity: the entry that made it and the entity as it\nstood after it.",
        "required": [
          "revision",
          "change"
        ],
        "properties": {
          "change": {
            "$ref": "#/components/schemas/EntityChange"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "snapshot": {
            "description": "The entity after the change, secrets as markers under `$secrets`.\n`null` once the revision is older than the snapshots kept."
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Standard error response.\n\nWire shape is [RFC 9457 Problem Details](https://www.rfc-editor.org/rfc/rfc9457):\nevery error response includes `title` and `status`, and may include\n`detail`, `code`, `allowed_actions`, `retry_after_seconds`, `instance`,\nand `type`. The content type is rewritten to `application/problem+json`\nwith the `application/problem+json` content type.",
        "required": [
          "title",
          "status"
        ],
        "properties": {
          "allowed_actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllowedAction"
            },
            "description": "Recovery actions the caller can take next."
          },
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable, machine-readable error code (snake_case).",
            "example": "session_not_found"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable explanation specific to this occurrence.",
            "example": "Session session_01933b5a000070008000000000000001 not found in org org_01933b5a000070008000000000000001."
          },
          "instance": {
            "type": [
              "string",
              "null"
            ],
            "description": "Request URI for this occurrence.",
            "example": "/v1/sessions/session_01933b5a000070008000000000000001"
          },
          "retry_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Seconds the caller should wait before retrying (429 / transient 503).",
            "example": 30,
            "minimum": 0
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code; mirrors the response status line.",
            "example": 404,
            "minimum": 0
          },
          "title": {
            "type": "string",
            "description": "Short, human-readable summary of the problem (e.g. \"Not Found\").",
            "example": "Session not found"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 9457 problem type URI. Optional; identifies the problem class.",
            "example": "https://everruns.com/docs/errors/session_not_found"
          }
        }
      },
      "Eval": {
        "type": "object",
        "description": "An eval: a named collection of test cases for an agent.",
        "required": [
          "id",
          "name",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the eval was archived, if archived.",
            "example": "2026-01-15T10:30:00Z"
          },
          "case_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of cases.",
            "example": 12
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the eval was created.",
            "example": "2026-01-15T10:30:00Z"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the eval was deleted, if deleted.",
            "example": "2026-01-15T10:30:00Z"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description.",
            "example": "Regression suite for the support agent"
          },
          "id": {
            "type": "string",
            "description": "External identifier (eval_<32-hex>). Shown as \"id\" in API.",
            "example": "eval_01933b5a000070008000000000000001"
          },
          "last_run": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalRunSummaryView",
                "description": "Last run summary (if any)."
              },
              {
                "type": "null"
              }
            ]
          },
          "model_override": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional default model override for runs.",
            "example": "gpt-5.1"
          },
          "name": {
            "type": "string",
            "description": "Display name.",
            "example": "Support agent regression"
          },
          "status": {
            "$ref": "#/components/schemas/EvalStatus",
            "description": "Lifecycle status."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Organization tags.",
            "example": [
              "regression",
              "nightly"
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Session setup target. Defines how to create sessions for eval cases."
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the eval was last updated.",
            "example": "2026-01-15T10:30:00Z"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "Version of the cases (the eval's dataset). Every case change bumps it;\nruns and experiments record the version they ran.",
            "example": 7,
            "minimum": 0
          }
        }
      },
      "EvalBuilderRun": {
        "type": "object",
        "description": "One request to the Eval Builder for an agent.",
        "required": [
          "id",
          "status",
          "started_at",
          "sessions_read",
          "proposals"
        ],
        "properties": {
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it finished."
          },
          "cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "What the model call cost, when the provider reported it.",
            "example": 0.012
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed, in words for a person."
          },
          "id": {
            "type": "string",
            "description": "Run identifier.",
            "example": "evalbuild_01933b5a000070008000000000000001"
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model that wrote the proposals.",
            "example": "gpt-6.2-sol"
          },
          "proposals": {
            "type": "integer",
            "format": "int32",
            "description": "Proposals it made.",
            "example": 5
          },
          "sessions_read": {
            "type": "integer",
            "format": "int32",
            "description": "Production sessions it read.",
            "example": 6
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it started."
          },
          "status": {
            "$ref": "#/components/schemas/EvalBuilderStatus",
            "description": "Where the run is."
          }
        }
      },
      "EvalBuilderStatus": {
        "type": "string",
        "description": "Where a request for proposals is.",
        "enum": [
          "running",
          "done",
          "failed",
          "unavailable"
        ]
      },
      "EvalCase": {
        "type": "object",
        "description": "A single test case within an eval.",
        "required": [
          "id",
          "name",
          "conversation",
          "scorers",
          "position",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "artifacts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ArtifactSpec"
            },
            "description": "Session files to collect after scoring completes.",
            "example": [
              {
                "name": "patch",
                "path": "/workspace/fix.patch"
              }
            ]
          },
          "conversation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalInputMessage"
            },
            "description": "Input messages sent sequentially.",
            "example": [
              {
                "content": "Fix the failing test in src/lib.rs"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the case was created.",
            "example": "2026-01-15T10:30:00Z"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description of what the case checks.",
            "example": "Agent fixes a failing unit test"
          },
          "id": {
            "type": "string",
            "description": "External identifier (evalcase_<32-hex>).",
            "example": "evalcase_01933b5a000070008000000000000001"
          },
          "max_turns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Max agent turns (default: 10).",
            "example": 10,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "description": "Case name.",
            "example": "fix-failing-test"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "description": "Display order.",
            "example": 0
          },
          "post": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EvalInputMessage"
            },
            "description": "Verification messages sent after conversation completes and session idles.\nScorers run after post messages complete (not after conversation).",
            "example": [
              {
                "content": "Run the tests again and report the result"
              }
            ]
          },
          "scorers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scorer"
            },
            "description": "Scoring rules.",
            "example": [
              {
                "text": "tests pass",
                "type": "contains"
              }
            ]
          },
          "simulated_user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SimulatedUser",
                "description": "A model that plays the user after the scripted messages."
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags for filtering runs.",
            "example": [
              "regression",
              "nightly"
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Optional per-case target override."
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Per-case timeout in seconds (default: 120).",
            "example": 120,
            "minimum": 0
          },
          "tool_fixtures": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ToolFixture"
            },
            "description": "Tools the case gives the agent, answered with canned responses."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the case was last updated.",
            "example": "2026-01-15T10:30:00Z"
          }
        }
      },
      "EvalCaseProposal": {
        "type": "object",
        "description": "A case the Eval Builder suggests adding to one of the agent's datasets.",
        "required": [
          "id",
          "agent_id",
          "status",
          "name",
          "category",
          "kind",
          "reason",
          "source_session_ids",
          "case",
          "created_at"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Agent the case is for.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "case": {
            "$ref": "#/components/schemas/CreateEvalCaseRequest",
            "description": "The case as it would be created."
          },
          "category": {
            "$ref": "#/components/schemas/ProposalCategory",
            "description": "What part of the job it covers."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was proposed."
          },
          "dismiss_note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Note left when it was dismissed."
          },
          "id": {
            "type": "string",
            "description": "Proposal identifier.",
            "example": "evalprop_01933b5a000070008000000000000001"
          },
          "kind": {
            "type": "string",
            "description": "`simulated` when a model plays the user, otherwise `scripted`.",
            "example": "simulated"
          },
          "name": {
            "type": "string",
            "description": "Short name of the case.",
            "example": "Refund over the approval limit"
          },
          "reason": {
            "type": "string",
            "description": "Why the Eval Builder suggests it, in one or two sentences."
          },
          "source_session_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sessions that inspired it, by public identifier.",
            "example": [
              "session_01933b5a000070008000000000000001"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ProposalStatus",
            "description": "Whether it is decided."
          }
        }
      },
      "EvalCaseResult": {
        "type": "object",
        "description": "Result of a single case within a run.",
        "required": [
          "id",
          "eval_case_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "artifacts": {
            "type": [
              "object",
              "null"
            ],
            "description": "Collected session file contents keyed by artifact name.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "patch": "diff --git a/src/lib.rs b/src/lib.rs"
            }
          },
          "case_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Case name (denormalized for display).",
            "example": "fix-failing-test"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the result was created.",
            "example": "2026-01-15T10:30:00Z"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if errored.",
            "example": "Session timed out"
          },
          "eval_case_id": {
            "type": "string",
            "description": "The case this result is for.",
            "example": "evalcase_01933b5a000070008000000000000001"
          },
          "id": {
            "type": "string",
            "description": "External identifier (evalresult_<32-hex>).",
            "example": "evalresult_01933b5a000070008000000000000001"
          },
          "input_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Token usage.",
            "example": 1200,
            "minimum": 0
          },
          "latency_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Execution time in milliseconds.",
            "example": 8450,
            "minimum": 0
          },
          "metadata": {
            "description": "External scorer metadata captured during deferred write-back."
          },
          "output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Output tokens used.",
            "example": 850,
            "minimum": 0
          },
          "scores": {
            "description": "Per-scorer results."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session created for this case (browsable in UI).",
            "example": "session_01933b5a00007000800000000000001"
          },
          "status": {
            "$ref": "#/components/schemas/CaseResultStatus",
            "description": "Execution status of the case."
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Resolved target used for this result (live reference)."
              },
              {
                "type": "null"
              }
            ]
          },
          "target_snapshot": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Frozen snapshot of the resolved target at execution time."
              },
              {
                "type": "null"
              }
            ]
          },
          "trial": {
            "type": "integer",
            "format": "int32",
            "description": "Which repetition of the case this result is, from 0.",
            "example": 0,
            "minimum": 0
          },
          "turns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Turn count.",
            "example": 3,
            "minimum": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the result was last updated.",
            "example": "2026-01-15T10:30:00Z"
          }
        }
      },
      "EvalDatasetStatus": {
        "type": "string",
        "description": "Status of an async dataset export.",
        "enum": [
          "pending",
          "running",
          "completed",
          "failed"
        ]
      },
      "EvalExperiment": {
        "type": "object",
        "description": "An experiment: one dataset version against several variants.",
        "required": [
          "id",
          "eval_id",
          "name",
          "dataset_version",
          "trials",
          "baseline",
          "status",
          "variants",
          "created_at"
        ],
        "properties": {
          "baseline": {
            "type": "string",
            "description": "Label of the variant the others are compared against.",
            "example": "baseline"
          },
          "comparison": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExperimentComparison",
                "description": "Paired comparison by case (detail view)."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "dataset_version": {
            "type": "integer",
            "format": "int32",
            "description": "The eval's `version` the experiment ran.",
            "example": 7,
            "minimum": 0
          },
          "eval_id": {
            "type": "string",
            "description": "The eval whose cases are the dataset.",
            "example": "eval_01933b5a000070008000000000000001"
          },
          "id": {
            "type": "string",
            "example": "evalexp_01933b5a000070008000000000000001"
          },
          "max_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "example": 10
          },
          "name": {
            "type": "string",
            "example": "Luna vs Sol"
          },
          "status": {
            "$ref": "#/components/schemas/ExperimentStatus"
          },
          "trials": {
            "type": "integer",
            "format": "int32",
            "example": 3,
            "minimum": 0
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExperimentVariant"
            }
          }
        }
      },
      "EvalImportPreflight": {
        "type": "object",
        "description": "Preflight capability report so optional-feature clients (e.g. Mira) can\ncheck before publishing instead of failing mid-import.",
        "required": [
          "evals_enabled",
          "can_import"
        ],
        "properties": {
          "can_import": {
            "type": "boolean",
            "description": "Whether the caller may import (holds eval-management permission).",
            "example": true
          },
          "evals_enabled": {
            "type": "boolean",
            "description": "Whether the `evals` feature is enabled for this org.",
            "example": true
          }
        }
      },
      "EvalInputMessage": {
        "type": "object",
        "description": "A message to send to the agent during an eval case.",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "The text content to send.",
            "example": "Fix the failing test in src/lib.rs"
          }
        }
      },
      "EvalProposalList": {
        "type": "object",
        "description": "An agent's open proposals and its latest Eval Builder run.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalCaseProposal"
            },
            "description": "Open proposals, newest first."
          },
          "latest_run": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalBuilderRun",
                "description": "The most recent run, when there was one."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EvalRun": {
        "type": "object",
        "description": "An eval run: one execution of all/some cases.",
        "required": [
          "id",
          "status",
          "triggered_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "attribution": {
            "description": "Provenance for external runs: which system produced them, version, link\nback, and any environment labels. `None` for internal runs. Open-vocab\nJSON so new attribution fields need no schema change."
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run finished.",
            "example": "2026-01-15T10:30:00Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the run was created.",
            "example": "2026-01-15T10:30:00Z"
          },
          "dataset_version": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Dataset version (the eval's `version`) the run was created from.",
            "example": 7,
            "minimum": 0
          },
          "experiment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The experiment this run is a variant of.",
            "example": "evalexp_01933b5a000070008000000000000001"
          },
          "filter_tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Only run cases matching these tags.",
            "example": [
              "regression",
              "nightly"
            ]
          },
          "id": {
            "type": "string",
            "description": "External identifier (evalrun_<32-hex>).",
            "example": "evalrun_01933b5a000070008000000000000001"
          },
          "max_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Spending cap in USD. Once the run's agents and graders have spent it,\nrunning turns stop and remaining cases are skipped.",
            "example": 5
          },
          "model_override": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model override for this run.",
            "example": "gpt-6-luna"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalCaseResult"
            },
            "description": "Case results (populated on detail view)."
          },
          "source": {
            "$ref": "#/components/schemas/EvalRunSource",
            "description": "Whether everruns executed this run (`internal`) or it was imported from\nan external eval system (`external`)."
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run started executing.",
            "example": "2026-01-15T10:30:00Z"
          },
          "status": {
            "$ref": "#/components/schemas/EvalRunStatus",
            "description": "Run lifecycle status."
          },
          "summary": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunSummary",
                "description": "Aggregate metrics (set on completion)."
              },
              {
                "type": "null"
              }
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Optional per-run target override."
              },
              {
                "type": "null"
              }
            ]
          },
          "trials": {
            "type": "integer",
            "format": "int32",
            "description": "How many times each case runs; results carry their `trial` number.",
            "example": 3,
            "minimum": 0
          },
          "triggered_by": {
            "type": "string",
            "description": "What triggered this run.",
            "example": "manual"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the run was last updated.",
            "example": "2026-01-15T10:30:00Z"
          },
          "variant_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The variant's label within its experiment.",
            "example": "candidate"
          }
        }
      },
      "EvalRunDataset": {
        "type": "object",
        "description": "An async dataset-export handle: the durable result of enqueuing a dataset\nexport from a completed eval run. The `body` (NDJSON) is only populated on\nthe `GET .../dataset/{dataset_id}` detail view once `status` is `completed`.",
        "required": [
          "id",
          "eval_run_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "The produced NDJSON. Only present on the detail view once completed.",
            "example": "{\"source_key\": \"evalrun_a/evalresult_b\"}"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the export was enqueued.",
            "example": "2026-01-15T10:30:00Z"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Failure detail when `status` is `failed`.",
            "example": "Export failed"
          },
          "eval_run_id": {
            "type": "string",
            "description": "The eval run this dataset was exported from.",
            "example": "evalrun_01933b5a000070008000000000000001"
          },
          "id": {
            "type": "string",
            "description": "External identifier (evaldataset_<32-hex>).",
            "example": "evaldataset_01933b5a000070008000000000000001"
          },
          "record_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Number of NDJSON records (surviving cases). Set on completion.",
            "example": 24,
            "minimum": 0
          },
          "status": {
            "$ref": "#/components/schemas/EvalDatasetStatus",
            "description": "Export lifecycle status."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the export was last updated.",
            "example": "2026-01-15T10:30:00Z"
          }
        }
      },
      "EvalRunShareLink": {
        "type": "object",
        "description": "A freshly minted share link. The raw `token` is returned once and never\nstored; build the public URL `/shared/eval-runs/<token>` from it.",
        "required": [
          "token",
          "token_prefix",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the share link was created.",
            "example": "2026-01-15T10:30:00Z"
          },
          "token": {
            "type": "string",
            "description": "Raw share token, returned once and never stored.",
            "example": "evr_share_3f9a1c7e5b2d4086a1f3c9e7b5d2408613579bdf02468ace13579bdf02468ace"
          },
          "token_prefix": {
            "type": "string",
            "description": "Short, non-secret prefix identifying the token.",
            "example": "evr_share_3f9a1c7e..."
          }
        }
      },
      "EvalRunShareStatus": {
        "type": "object",
        "description": "Whether a run currently has an active share link.",
        "required": [
          "active"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Whether an active share link exists for the run.",
            "example": true
          }
        }
      },
      "EvalRunSource": {
        "type": "string",
        "description": "Where an eval run came from.\n\n`Internal` runs are executed by everruns (sessions spawned per case).\n`External` runs are ingested already-complete from an external eval system\n(e.g. Mira) via the import API; everruns hosts and visualizes them but never\nexecutes them.",
        "enum": [
          "internal",
          "external"
        ]
      },
      "EvalRunStatus": {
        "type": "string",
        "description": "Status of an eval run.",
        "enum": [
          "pending",
          "running",
          "completed",
          "failed",
          "cancelled"
        ]
      },
      "EvalRunSummaryView": {
        "type": "object",
        "description": "Compact run summary for listing evals.",
        "required": [
          "id",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the run was created.",
            "example": "2026-01-15T10:30:00Z"
          },
          "id": {
            "type": "string",
            "description": "Eval run identifier."
          },
          "status": {
            "$ref": "#/components/schemas/EvalRunStatus",
            "description": "Run lifecycle status."
          },
          "summary": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunSummary",
                "description": "Aggregate metrics, if the run has completed."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EvalSample": {
        "type": "object",
        "description": "One Mira dataset row (`mira::Sample`).",
        "required": [
          "id",
          "input"
        ],
        "properties": {
          "attachments": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Non-text input. Not imported."
          },
          "expected": {
            "type": [
              "object",
              "null"
            ],
            "description": "Reference answer. Text becomes a `contains` scorer on import."
          },
          "files": {
            "type": "object",
            "description": "Files to seed into the workspace. Not imported."
          },
          "id": {
            "type": "string",
            "description": "Stable id within the dataset: the case name.",
            "example": "refund-over-limit"
          },
          "input": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "User turns, sent in order.",
            "example": [
              "Refund $450 for order 1182"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "Free-form metadata. `everruns` holds the case settings Mira has no\nfield for."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EvalSampleImportReport": {
        "type": "object",
        "description": "What a sample import did.",
        "required": [
          "created",
          "updated",
          "case_ids"
        ],
        "properties": {
          "case_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Public ids of the affected cases, in import order."
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "description": "Cases created.",
            "example": 3,
            "minimum": 0
          },
          "left_behind": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sample fields a case cannot hold, one line per sample that had them.",
            "example": [
              "refund-with-receipt: attachments"
            ]
          },
          "updated": {
            "type": "integer",
            "format": "int64",
            "description": "Existing cases updated, matched by name.",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "EvalSampleList": {
        "type": "object",
        "description": "A dataset as Mira samples.",
        "required": [
          "samples"
        ],
        "properties": {
          "samples": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalSample"
            }
          }
        }
      },
      "EvalStatus": {
        "type": "string",
        "description": "Eval lifecycle status (standard building-block lifecycle).",
        "enum": [
          "active",
          "archived",
          "deleted"
        ]
      },
      "EvalTarget": {
        "oneOf": [
          {
            "type": "object",
            "description": "Session creation parameters (mirrors CreateSessionRequest).",
            "required": [
              "type"
            ],
            "properties": {
              "agent_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Agent to work in this session."
              },
              "harness_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Harness for the session. If omitted, org default harness is used."
              },
              "harness_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Addressable harness name (alternative to harness_id)."
              },
              "max_iterations": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Max LLM iterations per turn.",
                "minimum": 0
              },
              "model_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "LLM model override."
              },
              "system_prompt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "System prompt override (prepended to agent prompt)."
              },
              "type": {
                "type": "string",
                "enum": [
                  "session"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Reference to a deployed app.",
            "required": [
              "app_id",
              "type"
            ],
            "properties": {
              "app_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "app"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Label-only target for externally-executed runs (e.g. imported from Mira).\n\nCarries provider/model labels and opaque params instead of session setup:\nexternal runs are ingested already-complete, so everruns never builds a\nsession from this. Mirrors a provider-agnostic `(provider, model)` pair.",
            "required": [
              "provider",
              "model",
              "type"
            ],
            "properties": {
              "model": {
                "type": "string"
              },
              "params": {},
              "provider": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "external"
                ]
              }
            }
          }
        ],
        "description": "Defines how to instantiate a session for an eval case.\n\nTwo modes:\n- `Session`: mirrors `CreateSessionRequest` — full control over session creation parameters.\n- `App`: references a deployed app by ID.\n\nResolution order: EvalRun.target → EvalCase.target → Eval.target → org default harness."
      },
      "Event": {
        "type": "object",
        "description": "Standard event following the Everruns event protocol.\n\nAll events have a consistent structure:\n- `id`: Unique event identifier (format: event_{32-hex})\n- `type`: Event type in dot notation (e.g., \"input.message\", \"reason.started\")\n- `ts`: ISO 8601 timestamp with millisecond precision\n- `session_id`: Session this event belongs to (format: session_{32-hex})\n- `context`: Correlation context for tracing\n- `data`: Event-specific payload (typed via EventData enum)\n- `metadata`: Optional arbitrary metadata\n- `tags`: Optional list of tags for filtering",
        "required": [
          "id",
          "type",
          "ts",
          "session_id",
          "context",
          "data"
        ],
        "properties": {
          "context": {
            "$ref": "#/components/schemas/EventContext",
            "description": "Correlation context"
          },
          "data": {
            "$ref": "#/components/schemas/EventData",
            "description": "Event-specific payload. The schema depends on the event type.\nSee EventData documentation for the mapping of type to data schema."
          },
          "id": {
            "type": "string",
            "description": "Unique event identifier (format: event_{32-hex})",
            "example": "event_01933b5a00007000800000000000001"
          },
          "metadata": {
            "description": "Arbitrary metadata for the event"
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Sequence number within session (for ordering)"
          },
          "session_id": {
            "type": "string",
            "description": "Session this event belongs to (format: session_{32-hex})",
            "example": "session_01933b5a00007000800000000000001"
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Tags for filtering and categorization"
          },
          "ts": {
            "type": "string",
            "format": "date-time",
            "description": "Event timestamp"
          },
          "type": {
            "type": "string",
            "description": "Event type in dot notation"
          }
        }
      },
      "EventContext": {
        "type": "object",
        "description": "Context for event correlation and tracing\n\nUses OpenTelemetry-style trace/span IDs for observability correlation:\n- `trace_id`: Root of the trace (typically the turn_id string)\n- `span_id`: This event's unique span identifier\n- `parent_span_id`: The parent span's identifier for hierarchical linking",
        "properties": {
          "exec_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Atom execution identifier",
            "example": "exec_01933b5a00007000800000000000001"
          },
          "input_message_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "User message that triggered this turn",
            "example": "message_01933b5a00007000800000000000001"
          },
          "parent_span_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parent span ID for hierarchical linking (OTel-style).\nLinks this span to its parent in the trace hierarchy."
          },
          "span_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "This event's span ID for observability (OTel-style).\nUniquely identifies this span within the trace."
          },
          "trace_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Trace ID for observability (OTel-style). Groups related spans into a single trace.\nFor agent turns, this is typically the turn_id string."
          },
          "turn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Turn identifier (for turn-scoped events)",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "EventData": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InputMessageData"
          },
          {
            "$ref": "#/components/schemas/OutputMessageDeltaData"
          },
          {
            "$ref": "#/components/schemas/OutputMessageStartedData"
          },
          {
            "$ref": "#/components/schemas/OutputMessageReplacedData"
          },
          {
            "$ref": "#/components/schemas/ConversationMessageData"
          },
          {
            "$ref": "#/components/schemas/OutputMessageCompletedData"
          },
          {
            "$ref": "#/components/schemas/MessageReactionData"
          },
          {
            "$ref": "#/components/schemas/MessageReactionData"
          },
          {
            "$ref": "#/components/schemas/TurnStartedData"
          },
          {
            "$ref": "#/components/schemas/TurnCompletedData"
          },
          {
            "$ref": "#/components/schemas/DreamingActivityData"
          },
          {
            "$ref": "#/components/schemas/TurnFailedData"
          },
          {
            "$ref": "#/components/schemas/ReasonStartedData"
          },
          {
            "$ref": "#/components/schemas/ReasonCompletedData"
          },
          {
            "$ref": "#/components/schemas/ReasonRecoveredData"
          },
          {
            "$ref": "#/components/schemas/CapabilityUsageData"
          },
          {
            "$ref": "#/components/schemas/ActStartedData"
          },
          {
            "$ref": "#/components/schemas/ActCompletedData"
          },
          {
            "$ref": "#/components/schemas/ToolStartedData"
          },
          {
            "$ref": "#/components/schemas/ToolCompletedData"
          },
          {
            "$ref": "#/components/schemas/ToolProgressData"
          },
          {
            "$ref": "#/components/schemas/ToolOutputDeltaData"
          },
          {
            "$ref": "#/components/schemas/ToolCallRequestedData"
          },
          {
            "$ref": "#/components/schemas/TranscriptRepairedData"
          },
          {
            "$ref": "#/components/schemas/ToolCallRepairedData"
          },
          {
            "$ref": "#/components/schemas/ToolReviewedData",
            "description": "The auto reviewer decided on a gated call."
          },
          {
            "$ref": "#/components/schemas/HostedToolCallData",
            "description": "A provider-executed (hosted) tool call changed state."
          },
          {
            "$ref": "#/components/schemas/ToolNestedCallData",
            "description": "A tool a shell script called through `tools` finished."
          },
          {
            "$ref": "#/components/schemas/LlmGenerationData"
          },
          {
            "$ref": "#/components/schemas/ReasonThinkingDeltaData"
          },
          {
            "$ref": "#/components/schemas/ReasonItemData"
          },
          {
            "$ref": "#/components/schemas/ReasonThinkingStartedData"
          },
          {
            "$ref": "#/components/schemas/ReasonThinkingCompletedData"
          },
          {
            "$ref": "#/components/schemas/TurnSealedData"
          },
          {
            "$ref": "#/components/schemas/TurnCancelledData"
          },
          {
            "$ref": "#/components/schemas/TurnCompletionCheckedData"
          },
          {
            "$ref": "#/components/schemas/TurnCreditShortfallData"
          },
          {
            "$ref": "#/components/schemas/SessionStartedData"
          },
          {
            "$ref": "#/components/schemas/SessionActivatedData"
          },
          {
            "$ref": "#/components/schemas/SessionIdledData"
          },
          {
            "$ref": "#/components/schemas/SessionTitleUpdatedData"
          },
          {
            "$ref": "#/components/schemas/SessionModelChangedData"
          },
          {
            "$ref": "#/components/schemas/TimerSetData"
          },
          {
            "$ref": "#/components/schemas/TimerFiredData"
          },
          {
            "$ref": "#/components/schemas/TimerCancelledData"
          },
          {
            "$ref": "#/components/schemas/SandboxLifecycleData"
          },
          {
            "$ref": "#/components/schemas/SandboxLifecycleData"
          },
          {
            "$ref": "#/components/schemas/SandboxLifecycleData"
          },
          {
            "$ref": "#/components/schemas/SandboxLifecycleData"
          },
          {
            "$ref": "#/components/schemas/SessionTaskEventData"
          },
          {
            "$ref": "#/components/schemas/SessionTaskEventData"
          },
          {
            "$ref": "#/components/schemas/TaskMessageEventData"
          },
          {
            "$ref": "#/components/schemas/TaskMessageEventData"
          },
          {
            "$ref": "#/components/schemas/ContextCompactingData"
          },
          {
            "$ref": "#/components/schemas/ContextCompactedData"
          },
          {
            "$ref": "#/components/schemas/ContextCompactionSkippedData",
            "description": "Evaluation ran but installed nothing (context.compaction.skipped)."
          },
          {
            "$ref": "#/components/schemas/ContextCompactionFailedData",
            "description": "Attempt errored before installing (context.compaction.failed)."
          },
          {
            "$ref": "#/components/schemas/FileWrittenData"
          },
          {
            "$ref": "#/components/schemas/BudgetEventData"
          },
          {
            "$ref": "#/components/schemas/BudgetEventData"
          },
          {
            "$ref": "#/components/schemas/BudgetEventData"
          },
          {
            "$ref": "#/components/schemas/BudgetEventData"
          },
          {
            "$ref": "#/components/schemas/VoiceSessionStartedData"
          },
          {
            "$ref": "#/components/schemas/VoiceTranscriptData"
          },
          {
            "$ref": "#/components/schemas/VoiceTranscriptData"
          },
          {
            "$ref": "#/components/schemas/VoiceTranscriptData"
          },
          {
            "$ref": "#/components/schemas/VoiceTranscriptData"
          },
          {
            "$ref": "#/components/schemas/VoiceSessionEndedData"
          },
          {
            "$ref": "#/components/schemas/VoiceSessionFailedData"
          },
          {
            "$ref": "#/components/schemas/VoiceOutputInterruptedData"
          }
        ],
        "title": "EventData",
        "description": "Event-specific payload. The schema depends on the event type field.",
        "example": {
          "message": {
            "content": [],
            "id": "...",
            "role": "user"
          }
        }
      },
      "EventTypeCountOut": {
        "type": "object",
        "description": "One row of `EventsSummaryResult.by_type` — the per-event-type count\nproduced by the events summary query.",
        "required": [
          "event_type",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Count of items matching the query."
          },
          "event_type": {
            "type": "string",
            "description": "Event-type discriminator (e.g. `turn.started`, `tool.completed`)."
          }
        }
      },
      "EventsSummaryResult": {
        "type": "object",
        "description": "Aggregate result of the events summary query — total count, per-type\nbreakdown, and a few convenience rollups (turn count, failure count).",
        "required": [
          "total",
          "by_type",
          "turn_count",
          "error_count"
        ],
        "properties": {
          "by_type": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventTypeCountOut"
            },
            "description": "Per-type count, sorted by event_type asc."
          },
          "error_count": {
            "type": "integer",
            "format": "int64",
            "description": "Convenience: count of failure-shaped event types\n(`turn.failed`, `tool.failed`, `*.error`, `subagent.failed`)."
          },
          "first_ts": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Earliest event timestamp, if any."
          },
          "last_ts": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Latest event timestamp, if any."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total event count across all types."
          },
          "turn_count": {
            "type": "integer",
            "format": "int64",
            "description": "Convenience: count of `turn.started` events."
          }
        }
      },
      "EverrunsAppInstallation": {
        "type": "object",
        "description": "A shared Everruns App installation the org links, as an agent can choose it.",
        "required": [
          "connection_id",
          "account"
        ],
        "properties": {
          "account": {
            "type": "string",
            "description": "GitHub account the installation is on."
          },
          "account_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "GitHub's account type: `User` or `Organization`, when known."
          },
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "The org link's connection id; pass it to choose this installation."
          },
          "repository_selection": {
            "type": [
              "string",
              "null"
            ],
            "description": "`all` or `selected`, when known."
          }
        }
      },
      "EverrunsAppLink": {
        "type": "object",
        "description": "One shared App installation linked to the org.",
        "required": [
          "id",
          "installation_id",
          "account",
          "agent_count",
          "linked_at"
        ],
        "properties": {
          "account": {
            "type": "string",
            "description": "GitHub account the installation is on.",
            "example": "acme"
          },
          "account_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "GitHub's account type: `User` or `Organization`."
          },
          "agent_count": {
            "type": "integer",
            "description": "Agents in the org acting through this link.",
            "minimum": 0
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection id agents choose the link by."
          },
          "installation_id": {
            "type": "integer",
            "format": "int64",
            "description": "GitHub installation id.",
            "example": 4242
          },
          "linked_at": {
            "type": "string",
            "format": "date-time"
          },
          "repository_selection": {
            "type": [
              "string",
              "null"
            ],
            "description": "`all` or `selected`."
          }
        }
      },
      "EverrunsAppLinks": {
        "type": "object",
        "description": "The org's links to the shared Everruns GitHub App.",
        "required": [
          "configured",
          "installations"
        ],
        "properties": {
          "app_slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The shared App's slug; agents that choose it show up as `<slug>[bot]`."
          },
          "configured": {
            "type": "boolean",
            "description": "The deployment has a shared App; without one nothing can be linked."
          },
          "installations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EverrunsAppLink"
            }
          }
        }
      },
      "ExecutionPhase": {
        "type": "string",
        "description": "Execution phase for assistant messages in multi-step tool-calling flows.\n\nProviders that natively support phases (OpenAI GPT-5.x) send the phase value\ndirectly in the API request. For providers without native support (Anthropic,\nGemini), the phase is still tracked internally and derived from state in the\nReasonAtom, but is not sent to the provider API.\n\nSerialized as lowercase strings for backward compatibility with existing\npersisted messages: `\"commentary\"` and `\"final_answer\"`.\n\nLegacy values `\"in_progress\"` and `\"completed\"` are accepted during\ndeserialization for backward compatibility.",
        "enum": [
          "commentary",
          "final_answer"
        ]
      },
      "ExperimentComparison": {
        "type": "object",
        "description": "Variants compared case by case against the baseline.",
        "required": [
          "baseline",
          "verdicts",
          "cases"
        ],
        "properties": {
          "baseline": {
            "type": "string",
            "example": "baseline"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseComparison"
            },
            "description": "Cases whose result changed come first."
          },
          "verdicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VariantVerdict"
            },
            "description": "One verdict per variant other than the baseline."
          }
        }
      },
      "ExperimentGateResult": {
        "type": "object",
        "description": "Result of an experiment gate that passed.",
        "required": [
          "passed",
          "variant",
          "pass_rate",
          "passed_every_trial"
        ],
        "properties": {
          "pass_rate": {
            "type": "number",
            "format": "double",
            "example": 0.93
          },
          "passed": {
            "type": "boolean"
          },
          "passed_every_trial": {
            "type": "number",
            "format": "double",
            "description": "Share of cases passed in every trial (pass^k).",
            "example": 0.9
          },
          "variant": {
            "type": "string",
            "description": "The variant the gate judged.",
            "example": "candidate"
          },
          "verdict": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Verdict"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ExperimentStatus": {
        "type": "string",
        "description": "Where an experiment is: running until every variant's run finished.",
        "enum": [
          "running",
          "completed",
          "failed",
          "cancelled"
        ]
      },
      "ExperimentVariant": {
        "type": "object",
        "description": "One variant of an experiment and how its run went.",
        "required": [
          "label",
          "run_id",
          "status"
        ],
        "properties": {
          "cost_per_case_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "What one case cost on average, all its trials together.",
            "example": 0.031
          },
          "label": {
            "type": "string",
            "example": "candidate"
          },
          "model_override": {
            "type": [
              "string",
              "null"
            ],
            "example": "gpt-6.2-sol"
          },
          "run_elsewhere": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when the variant ran outside Everruns and was imported: the system\nthat ran it, such as \"mira\".",
            "example": "mira"
          },
          "run_id": {
            "type": "string",
            "description": "The variant's run.",
            "example": "evalrun_01933b5a000070008000000000000001"
          },
          "status": {
            "$ref": "#/components/schemas/EvalRunStatus"
          },
          "summary": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunSummary",
                "description": "Set once the run finished."
              },
              {
                "type": "null"
              }
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ExperimentVariantSpec": {
        "type": "object",
        "description": "One configuration an experiment runs the dataset against.",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string",
            "description": "Short name shown in comparisons, unique within the experiment.",
            "example": "candidate"
          },
          "model_override": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for this variant, beating the target's model.",
            "example": "gpt-6.2-sol"
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Session setup for this variant. Omitted: the eval's own target."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ExportEvalRunDatasetRequest": {
        "type": "object",
        "description": "Request body for `POST /v1/evals/{eval_id}/runs/{run_id}/dataset`.",
        "properties": {
          "filters": {
            "$ref": "#/components/schemas/DatasetFilters",
            "description": "Per-case selection filters."
          },
          "format": {
            "$ref": "#/components/schemas/DatasetFormat",
            "description": "Output schema (defaults to `trajectory`)."
          },
          "redaction": {
            "$ref": "#/components/schemas/RedactionOptions",
            "description": "Redaction controls."
          }
        }
      },
      "ExportUserDataResponse": {
        "type": "object",
        "description": "Full user data export response (GDPR compliance)",
        "required": [
          "user",
          "organizations",
          "personal_access_tokens",
          "exported_at"
        ],
        "properties": {
          "exported_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp the export was generated (RFC 3339).",
            "example": "2026-05-25T12:00:00Z"
          },
          "organizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedOrganization"
            },
            "description": "All organizations the user is a member of, plus their role in each."
          },
          "personal_access_tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedPersonalAccessToken"
            },
            "description": "Personal access tokens owned by the user (no sensitive secrets — just metadata)."
          },
          "profile_history": {
            "type": "array",
            "items": {},
            "description": "Private profile change records owned by the exporting account."
          },
          "user": {
            "$ref": "#/components/schemas/ExportedUserProfile",
            "description": "Profile data for the exporting user."
          }
        }
      },
      "ExportedOrganization": {
        "type": "object",
        "description": "Exported organization membership",
        "required": [
          "org_id",
          "public_id",
          "name",
          "role"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Acme Corp"
          },
          "org_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning organization's internal numeric id (not part of the public identifier surface).",
            "example": 42
          },
          "public_id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "org_01933b5a000070008000000000000001"
          },
          "role": {
            "type": "string",
            "description": "User's role within this organization (`owner`, `admin`, `member`).",
            "example": "owner"
          }
        }
      },
      "ExportedPersonalAccessToken": {
        "type": "object",
        "description": "Exported personal access token metadata (no sensitive data)",
        "required": [
          "id",
          "name",
          "token_prefix",
          "scopes",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339).",
            "example": "2026-01-15T10:30:00Z"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Expiry timestamp (RFC 3339). `None` for non-expiring tokens.",
            "example": "2027-01-01T00:00:00Z"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "019e8957539a7aa0bb92e0d2b49427b1"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the token's most recent successful use (RFC 3339). `None` if never used.",
            "example": "2026-05-25T09:14:00Z"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "CI/CD deploy token"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Granted scopes as a JSON array of strings.",
            "example": [
              "sessions:read",
              "sessions:write"
            ]
          },
          "token_prefix": {
            "type": "string",
            "description": "First few characters of the token, safe to display for identification.",
            "example": "evr_pat_x4z2..."
          }
        }
      },
      "ExportedUserProfile": {
        "type": "object",
        "description": "Exported user profile data",
        "required": [
          "id",
          "email",
          "name",
          "email_verified",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "auth_provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Auth provider that issued this identity (`google`, `github`, `password`, etc.).",
            "example": "google"
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to the user's avatar image. `None` when the user hasn't set one.",
            "example": "https://cdn.example.com/avatars/alex.png"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339).",
            "example": "2026-01-15T10:30:00Z"
          },
          "email": {
            "type": "string",
            "description": "Email address associated with the user account.",
            "example": "alex@example.com"
          },
          "email_verified": {
            "type": "boolean",
            "description": "Whether the user's email address has been verified via the auth provider.",
            "example": true
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "user_01933b5a000070008000000000000001"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Alex Rivera"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was last updated (RFC 3339).",
            "example": "2026-04-20T14:22:00Z"
          }
        }
      },
      "ExternalActor": {
        "type": "object",
        "description": "External actor identity for messages originating from external channels\n(Slack, Discord, Teams, etc.).\n\nChannel adapters populate this to identify the sender without coupling\ncore logic to any specific channel. The ReasonAtom uses this to prefix\nuser messages so the LLM knows who is speaking.",
        "required": [
          "actor_id",
          "source"
        ],
        "properties": {
          "actor_id": {
            "type": "string",
            "description": "Opaque actor identifier from the source channel (e.g. Slack user ID \"U0123456789\")"
          },
          "actor_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Resolved display name (e.g. \"Alice\"). Falls back to actor_id if absent."
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Channel-specific metadata (e.g. team_id, channel_id)",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "source": {
            "type": "string",
            "description": "Source channel identifier (e.g. \"slack\", \"discord\")"
          }
        }
      },
      "ExternalAgent": {
        "type": "object",
        "description": "Public status of a customer-hosted HTTPS runtime; credentials are never exposed.",
        "required": [
          "endpoint_url",
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether this binding can lease new work. Disabled bindings retain routing."
          },
          "endpoint_url": {
            "type": "string",
            "description": "Verified public HTTPS URL that receives signed invocation requests.",
            "example": "https://sales.example.workers.dev/"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sanitized dispatch error, cleared after a successful invocation or registration."
          },
          "last_invoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of the latest invocation attempt, if any."
          }
        }
      },
      "ExternalAgentStatus": {
        "type": "object",
        "description": "An Agent's external-agent state, plus whether this installation lets it connect one.",
        "required": [
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether a new endpoint can be connected here: the installation sets\n`EXTERNAL_AGENTS_ENABLED=true` and protected worker ingress is off.\nThe UI hides the setup when this is false and no endpoint exists."
          },
          "endpoint": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExternalAgent",
                "description": "The connected (or disconnected) endpoint, if one was ever registered."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ExternalScoreStatus": {
        "type": "string",
        "description": "Result status reported alongside externally computed scores.",
        "enum": [
          "passed",
          "failed",
          "errored"
        ]
      },
      "ExtractRequest": {
        "type": "object",
        "description": "A configured org catalog model and its extraction input. Provider/model selection\ninside `input` is rejected; the catalog identity is authoritative.",
        "required": [
          "model_id",
          "input"
        ],
        "properties": {
          "input": {
            "$ref": "#/components/schemas/ExtractionRequest",
            "description": "Source content and typed fields; nested provider and model selectors must be absent."
          },
          "model_id": {
            "type": "string",
            "description": "Enabled extraction-capable model ID from the current organization's catalog."
          }
        },
        "additionalProperties": false
      },
      "ExtractionAnswer": {
        "type": "object",
        "description": "One typed answer with optional provider-reported evidence and uncertainty.\nMissing probabilities remain unknown; a null value is not replaced by its guess.",
        "required": [
          "type",
          "value"
        ],
        "properties": {
          "confidence": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional provider-reported answer confidence, within 0..=1; absence means unknown, not\ncertainty."
          },
          "confidences": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "number",
                "null"
              ],
              "format": "double"
            },
            "description": "Optional per-list-item confidence values within 0..=1, aligned with value items or a\nretained guess; null entries are unknown."
          },
          "guess": {
            "description": "Optional typed candidate retained even when value is null; not an automatic replacement for\nvalue."
          },
          "mean": {
            "description": "Optional distribution mean for an estimate, or horizon-aligned means for a forecast, using\nthe field value type."
          },
          "median": {
            "description": "Optional distribution median for an estimate, or horizon-aligned medians for a forecast,\nusing the field value type."
          },
          "p10": {
            "description": "Optional tenth percentile for an estimate, or horizon-aligned percentiles for a forecast,\nusing the field value type."
          },
          "p90": {
            "description": "Optional ninetieth percentile for an estimate, or horizon-aligned percentiles for a\nforecast, using the field value type."
          },
          "p_above": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional provider-reported probability above the requested upper bound, within 0..=1."
          },
          "p_below": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional provider-reported probability below the requested lower bound, within 0..=1."
          },
          "p_null": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional provider-reported probability of no answer, within 0..=1."
          },
          "quantiles": {
            "description": "Optional provider-specific quantile data for an estimate or forecast, preserved as JSON."
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExtractionSource",
                "description": "Optional source media category; image and document answers may have no textual span."
              },
              {
                "type": "null"
              }
            ]
          },
          "span": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Optional half-open [start, end] evidence range in Unicode code points of returned state_text\nor the original state."
          },
          "spans": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "integer",
                "minimum": 0
              }
            },
            "description": "Optional per-list-item evidence ranges, aligned with value items or a retained guess; null\nentries indicate missing evidence."
          },
          "spell_confidence": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional provider-reported spelling confidence, within 0..=1."
          },
          "steps": {
            "description": "Optional provider-specific distribution step data for an estimate or forecast, preserved as\nJSON."
          },
          "type": {
            "$ref": "#/components/schemas/ExtractionType",
            "description": "Output shape matching the requested field type."
          },
          "unit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-reported unit of the extracted value."
          },
          "value": {
            "description": "Typed extracted value, or null when absent or suppressed. Forecast arrays match the\nrequested horizon."
          }
        }
      },
      "ExtractionAsset": {
        "type": "object",
        "description": "Inline asset; URLs are deliberately not fetched by the runtime.",
        "required": [
          "format",
          "data_base64"
        ],
        "properties": {
          "data_base64": {
            "type": "string",
            "description": "Nonempty standard base64 content, without a data URL prefix."
          },
          "format": {
            "$ref": "#/components/schemas/ExtractionAssetFormat",
            "description": "Encoding of the supplied bytes; support depends on the selected provider."
          },
          "type": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExtractionAssetType",
                "description": "Optional media category. PDF requires document; other formats require image when specified."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "ExtractionAssetFormat": {
        "type": "string",
        "description": "Supported inline asset encoding; provider support may be narrower.",
        "enum": [
          "png",
          "jpg",
          "jpeg",
          "webp",
          "pdf"
        ]
      },
      "ExtractionAssetType": {
        "type": "string",
        "description": "Media category of an inline extraction asset; must agree with its format.",
        "enum": [
          "image",
          "document"
        ]
      },
      "ExtractionBound": {
        "oneOf": [
          {
            "type": "number",
            "format": "double",
            "description": "A finite numeric endpoint."
          },
          {
            "type": "string",
            "description": "An ISO calendar date endpoint (YYYY-MM-DD)."
          }
        ],
        "description": "A numeric or calendar bound for an estimate."
      },
      "ExtractionField": {
        "type": "object",
        "description": "A typed field specification. Constructors select a shape; validation rejects\noptions which do not apply to it before any provider call.",
        "required": [
          "type"
        ],
        "properties": {
          "decimals": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Requested decimal precision, at most six, for a number, duration or list of numbers.",
            "minimum": 0
          },
          "horizon": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Required number of forecast values, from 1 through 64; invalid for other field types.",
            "minimum": 0
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ],
            "description": "Field-specific extraction guidance, which may reference named assets."
          },
          "integer": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Request integer precision for a number, duration or list of numbers."
          },
          "interval": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ForecastInterval",
                "description": "Required spacing between forecast values; invalid for other field types."
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExtractionItemType",
                "description": "Required element type for lists; invalid for other field types."
              },
              {
                "type": "null"
              }
            ]
          },
          "max": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExtractionBound",
                "description": "Required upper bound for estimates and forecasts; must exceed min and use the same numeric\nor date type."
              },
              {
                "type": "null"
              }
            ]
          },
          "min": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExtractionBound",
                "description": "Required lower bound for estimates and forecasts; must be below max and use the same numeric\nor date type."
              },
              {
                "type": "null"
              }
            ]
          },
          "null_threshold": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Requested null-suppression threshold, finite and within 0..=1. Providers may impose stricter\nlimits."
          },
          "scale": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExtractionScale",
                "description": "Optional estimate or forecast scale. Logarithmic numeric bounds must be positive."
              },
              {
                "type": "null"
              }
            ]
          },
          "step": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExtractionStep",
                "description": "Optional estimate or forecast resolution. Numeric steps must be finite and positive;\ncalendar steps require date bounds."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ExtractionType",
            "description": "Requested output shape; determines which field options are valid."
          },
          "unit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Requested value unit. Duration units are seconds, minutes, hours, days, weeks, months or\nyears."
          }
        },
        "additionalProperties": false
      },
      "ExtractionItemType": {
        "type": "string",
        "description": "A list element type.",
        "enum": [
          "text",
          "number",
          "date"
        ]
      },
      "ExtractionOutcome": {
        "type": "object",
        "description": "Validated extraction results, keyed by the requested field names.",
        "required": [
          "model",
          "answers"
        ],
        "properties": {
          "answers": {
            "type": "object",
            "description": "Exactly one typed answer per requested field, keyed by the original field names.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ExtractionAnswer"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional provider-assigned extraction result identifier."
          },
          "model": {
            "type": "string",
            "description": "Model identifier reported for the extraction."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional provider identifier associated with the result."
          },
          "state_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional returned source text used for evidence offsets; when absent, offsets refer to the\noriginal state."
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether the provider reports that it did not read the whole input; defaults to false if\nomitted."
          },
          "usage": {
            "$ref": "#/components/schemas/ExtractionUsage",
            "description": "Provider usage details; defaults to zero token counts and absent optional metrics when\nomitted."
          }
        }
      },
      "ExtractionRequest": {
        "type": "object",
        "description": "Named typed fields to extract from text or inline assets, with optional provider routing.",
        "required": [
          "fields"
        ],
        "properties": {
          "assets": {
            "type": "object",
            "description": "Defensive runtime ceiling: 32 assets and 32 MiB total encoded data.\nIndividual providers and the HTTP API may impose lower limits.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ExtractionAsset"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "fields": {
            "type": "object",
            "description": "Nonempty map of field names to typed extraction specifications; names must not be blank.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ExtractionField"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional nonempty provider model identifier; the Server selects its model outside this\ninput."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional explicit provider account for Framework routing; the Server rejects this override."
          },
          "provider_options": {
            "type": "object",
            "description": "Provider-specific options, without routing credentials or headers.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "reference_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional ISO calendar date (YYYY-MM-DD) for interpreting relative dates."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional caller-supplied session identifier forwarded by supporting providers."
          },
          "state": {
            "type": "string",
            "description": "Source text and extraction context. May be empty when inline assets are supplied."
          },
          "trace": {
            "description": "Optional trace metadata forwarded by supporting providers."
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional caller-supplied user identifier forwarded by supporting providers."
          }
        },
        "additionalProperties": false
      },
      "ExtractionScale": {
        "type": "string",
        "description": "Scale requested for an estimate or forecast distribution.",
        "enum": [
          "linear",
          "log"
        ]
      },
      "ExtractionSource": {
        "type": "string",
        "description": "Which input supplied an answer. Text evidence indexes the state string.",
        "enum": [
          "text",
          "image",
          "document"
        ]
      },
      "ExtractionStep": {
        "oneOf": [
          {
            "type": "number",
            "format": "double",
            "description": "A finite, positive numeric resolution."
          },
          {
            "$ref": "#/components/schemas/CalendarStep",
            "description": "A month or year resolution, valid only with date bounds."
          }
        ],
        "description": "The resolution of an estimate."
      },
      "ExtractionType": {
        "type": "string",
        "description": "The output shape requested for one field.",
        "enum": [
          "text",
          "number",
          "date",
          "time",
          "datetime",
          "duration",
          "list",
          "estimate",
          "forecast"
        ]
      },
      "ExtractionUsage": {
        "type": "object",
        "description": "Provider-reported token usage, cost and extraction work.\nOptional counters remain absent when the provider does not report them.",
        "properties": {
          "cost": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Optional finite, nonnegative provider-reported cost; no cost is inferred when absent."
          },
          "image_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional token count attributed to image inputs.",
            "minimum": 0
          },
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Provider-reported input token count; defaults to zero if omitted.",
            "minimum": 0
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Provider-reported output token count; defaults to zero if omitted.",
            "minimum": 0
          },
          "passes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional number of extraction passes reported by the provider.",
            "minimum": 0
          },
          "schema_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional token count attributed to field specifications.",
            "minimum": 0
          },
          "state_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional token count attributed to input state text.",
            "minimum": 0
          }
        }
      },
      "FailureSeverity": {
        "type": "string",
        "description": "How bad a recorded failure is, decided by whether work stopped.\n\nThe runtime assigns this, not the client: a failed tool call is reported\nback to the model as a result and the turn keeps going, so it is an\n`issue`. A failure that ends the work (a failed turn, a failed task) is an\n`error`. Clients render issues as warnings and reserve\nerror styling for `error`.",
        "enum": [
          "issue",
          "error"
        ]
      },
      "FeatureFlagGrade": {
        "type": "string",
        "description": "Rollout policy for one feature, independent of the running deployment grade.",
        "enum": [
          "dev",
          "internal",
          "adoption",
          "prod",
          "off"
        ]
      },
      "FeatureFlagMap": {
        "type": "object",
        "description": "Untyped API representation of feature flags: a generic `{ \"<flag>\": bool }` map.\n\nDecision: the public API is intentionally untyped. The set of flags churns\nfrequently; encoding each flag as a named schema property would force a\n`docs/api/openapi.json` change on every add/remove. A generic string→bool map\nkeeps the API spec stable. The frontend layers its own typed view on top.",
        "additionalProperties": {
          "type": "boolean"
        },
        "propertyNames": {
          "type": "string"
        }
      },
      "FieldDiff": {
        "type": "object",
        "description": "One field that differs between two snapshots.",
        "required": [
          "field",
          "from",
          "to"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "Top-level field name; a secret is `$secrets.<name>`."
          },
          "from": {
            "description": "The value before, `null` when absent. A secret shows only its marker."
          },
          "to": {
            "description": "The value after, `null` when absent."
          }
        }
      },
      "FieldType": {
        "type": "string",
        "description": "Input field type for rendering.",
        "enum": [
          "password",
          "text",
          "url"
        ]
      },
      "File": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "$ref": "#/components/schemas/FileSource"
          },
          {
            "$ref": "#/components/schemas/InitialFile"
          }
        ],
        "description": "Embedded files and folder-relative sources share the same manifest field."
      },
      "FileContentPart": {
        "type": "object",
        "description": "File content part (reference to an uploaded file, e.g. a PDF)\n\nThis is used for files uploaded via the /files API.\nThe file data is stored separately and referenced by ID.",
        "required": [
          "file_id"
        ],
        "properties": {
          "file_id": {
            "type": "string",
            "description": "ID of the uploaded file (format: file_{32-hex})",
            "example": "file_01933b5a00007000800000000000001"
          },
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original filename (for display and provider file parts)"
          }
        }
      },
      "FileInfo": {
        "type": "object",
        "description": "Stored file metadata (no binary data).",
        "required": [
          "id",
          "content_type",
          "size_bytes",
          "metadata",
          "created_at"
        ],
        "properties": {
          "content_type": {
            "type": "string",
            "description": "MIME type of the stored file: application/pdf or application/zip.",
            "example": "application/pdf"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Upload timestamp.",
            "example": "2026-01-04T11:23:00Z"
          },
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original filename supplied at upload, if known.",
            "example": "report.pdf"
          },
          "id": {
            "type": "string",
            "example": "file_01933b5a00007000800000000000001"
          },
          "metadata": {
            "type": "object",
            "description": "Caller-supplied metadata captured at upload."
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Size of the stored file in bytes.",
            "example": 1048576
          }
        }
      },
      "FileInput": {
        "type": "object",
        "description": "An inline managed file; use the streaming upload endpoint for files over 8 MiB.",
        "required": [
          "path"
        ],
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTF-8 original content. Supply exactly one of `content` or `content_base64`."
          },
          "content_base64": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base64 original bytes for binary files; mutually exclusive with `content`."
          },
          "indexable": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Optional per-file indexing policy; false retains the original without indexing it."
          },
          "metadata": {
            "description": "User annotations retained separately from parsed source/frontmatter metadata."
          },
          "mime_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional media type used for representation extraction; inferred when omitted."
          },
          "path": {
            "type": "string",
            "description": "Normalized absolute path within the collection, preserving its directory hierarchy."
          },
          "readable": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Optional agent-read policy. Managers can still download retained originals."
          }
        },
        "additionalProperties": false
      },
      "FileMetadataInput": {
        "type": "object",
        "description": "Update managed-file annotations and agent visibility without extracting bytes again.",
        "required": [
          "path"
        ],
        "properties": {
          "indexable": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Optional indexing override. Omit to preserve the current policy."
          },
          "metadata": {
            "description": "Replace user annotations while preserving metadata parsed from the original file."
          },
          "path": {
            "type": "string",
            "description": "Existing collection-relative file path."
          },
          "readable": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Optional agent-read override. Omit to preserve the current policy."
          }
        },
        "additionalProperties": false
      },
      "FileSource": {
        "type": "object",
        "description": "A package-relative file or glob and its working-directory destination.",
        "required": [
          "source"
        ],
        "properties": {
          "is_readonly": {
            "type": "boolean",
            "description": "Whether the initial workspace file is read-only. Defaults to true."
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Working-directory destination; omitted paths preserve the package source."
          },
          "source": {
            "type": "string",
            "description": "Relative file path or glob confined to the package directory."
          }
        },
        "additionalProperties": false
      },
      "FileStat": {
        "type": "object",
        "description": "File stat information",
        "required": [
          "path",
          "name",
          "is_directory",
          "is_readonly",
          "size_bytes",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this entry was created (RFC 3339)."
          },
          "is_directory": {
            "type": "boolean",
            "description": "`true` when this entry represents a directory."
          },
          "is_readonly": {
            "type": "boolean",
            "description": "Whether the entry is read-only."
          },
          "name": {
            "type": "string",
            "description": "File or directory name (last segment of `path`)."
          },
          "path": {
            "type": "string",
            "description": "Absolute path within the session workspace."
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "File size in bytes. `0` for directories."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this entry was last updated (RFC 3339)."
          }
        }
      },
      "FileUploadResponse": {
        "type": "object",
        "description": "File metadata returned after a successful upload (no binary data).",
        "required": [
          "id",
          "content_type",
          "size_bytes",
          "created_at"
        ],
        "properties": {
          "content_type": {
            "type": "string",
            "description": "MIME type of the stored file: application/pdf or application/zip.",
            "example": "application/pdf"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Upload timestamp.",
            "example": "2026-01-04T11:23:00Z"
          },
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original filename supplied at upload, if known.",
            "example": "report.pdf"
          },
          "id": {
            "type": "string",
            "example": "file_01933b5a00007000800000000000001"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Size of the stored file in bytes.",
            "example": 1048576
          }
        }
      },
      "FileWrite": {
        "type": "object",
        "description": "Revision-checked creation or update of one consumer workspace file.",
        "required": [
          "path",
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "UTF-8 text or base64-encoded bytes.",
            "example": "Meeting notes"
          },
          "encoding": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content encoding, either text or base64.",
            "example": "text"
          },
          "expected_revision": {
            "type": [
              "string",
              "null"
            ],
            "description": "Revision returned by the previous read; required when replacing a file.",
            "example": "f6d4cf68d1e6c37f7d24a5a85db31ba4"
          },
          "path": {
            "type": "string",
            "description": "Absolute path within the consumer workspace.",
            "example": "/workspace/notes.md"
          }
        },
        "additionalProperties": false
      },
      "FileWrittenData": {
        "type": "object",
        "description": "Data for file.written events emitted when files are written to the session filesystem.",
        "required": [
          "path",
          "operation",
          "size_bytes",
          "created"
        ],
        "properties": {
          "created": {
            "type": "boolean",
            "description": "Whether this is a new file (true) or an update to an existing file (false)."
          },
          "operation": {
            "type": "string",
            "description": "Operation type (see `FILE_OP_*` constants)."
          },
          "path": {
            "type": "string",
            "description": "File path within the session filesystem (normalized, e.g. \"/reports/summary.md\")."
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "File size in bytes after write."
          }
        }
      },
      "Finding": {
        "type": "object",
        "description": "A single advisory finding about an agent configuration.",
        "required": [
          "rule_id",
          "severity",
          "category",
          "message",
          "source"
        ],
        "properties": {
          "category": {
            "$ref": "#/components/schemas/FindingCategory"
          },
          "fix": {
            "type": [
              "string",
              "null"
            ],
            "description": "Proposed replacement text (phase 2+; always absent for builtin rules)."
          },
          "location": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FindingLocation"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation. Safe to render in user-facing messages."
          },
          "rule_id": {
            "type": "string",
            "description": "Stable rule identifier, e.g. `prompt.duplicate_paragraphs`."
          },
          "severity": {
            "$ref": "#/components/schemas/FindingSeverity"
          },
          "source": {
            "$ref": "#/components/schemas/FindingSource"
          }
        }
      },
      "FindingAction": {
        "type": "object",
        "description": "An action taken on a finding.",
        "required": [
          "id",
          "kind",
          "target_id",
          "automatic",
          "current",
          "created_at"
        ],
        "properties": {
          "automatic": {
            "type": "boolean",
            "description": "Whether Everruns took it on its own under the org's policy."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was taken."
          },
          "current": {
            "type": "boolean",
            "description": "The finding episode it belongs to is the current one."
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier (`fact_…`)."
          },
          "kind": {
            "type": "string",
            "description": "What was done: `pause_schedule`."
          },
          "target_id": {
            "type": "string",
            "description": "What it acted on, by public id (a schedule's `sched_…`)."
          },
          "undone_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was undone, if it was."
          }
        }
      },
      "FindingActions": {
        "type": "object",
        "description": "What has been done about a finding, and what can be.",
        "required": [
          "actions",
          "available"
        ],
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FindingAction"
            },
            "description": "Actions taken, newest first."
          },
          "available": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailableFindingAction"
            },
            "description": "Actions the org's policy offers for a person to take now."
          },
          "mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SelfHealingMode",
                "description": "The org's policy for this kind of finding, when it has one."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "FindingCategory": {
        "type": "string",
        "enum": [
          "structure",
          "completeness",
          "effectiveness",
          "safety",
          "cost"
        ]
      },
      "FindingFix": {
        "type": "object",
        "description": "A suggested change to an agent's instructions, written by the Inspector for\na finding, and where checking and approving it stand.",
        "required": [
          "id",
          "issue_id",
          "agent_id",
          "summary",
          "addition",
          "status",
          "current",
          "created_at"
        ],
        "properties": {
          "addition": {
            "type": "string",
            "description": "The text added to the end of the agent's instructions."
          },
          "agent_id": {
            "type": "string",
            "description": "The agent whose instructions the fix changes.",
            "example": "agent_550e8400e29b41d4a716446655440000"
          },
          "check": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FixCheck",
                "description": "The last check's result."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the Inspector wrote the fix."
          },
          "current": {
            "type": "boolean",
            "description": "False when the agent's instructions changed after the last check, so\nthe fix needs checking again before it can be applied."
          },
          "decided_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When a person applied or rejected the fix."
          },
          "decision_note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it was rejected."
          },
          "eval_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The eval the last check ran, while or after it runs."
          },
          "experiment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The last check's experiment, while or after it runs."
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier of the fix.",
            "example": "fix_0190f3a1b2c37d8e9f00112233445566"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid",
            "description": "The finding the fix is for."
          },
          "status": {
            "type": "string",
            "description": "`proposed` (not checked), `checking`, `verified` (checked, no\nregressions), `regressed`, `check_failed`, `applied` or `rejected`."
          },
          "summary": {
            "type": "string",
            "description": "One line on what the change does."
          }
        }
      },
      "FindingFixList": {
        "type": "object",
        "description": "The fixes list.",
        "required": [
          "fixes"
        ],
        "properties": {
          "fixes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FindingFix"
            },
            "description": "Newest first."
          }
        }
      },
      "FindingInvestigation": {
        "type": "object",
        "description": "The Inspector's write-up of a finding: what happened, how serious it is,\nwhat to do, and the cluster of similar findings it was filed under.",
        "required": [
          "status"
        ],
        "properties": {
          "cluster_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The cluster of similar findings in this organization.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "cluster_open": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Open findings in the cluster, this one included.",
            "example": 3
          },
          "cluster_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of that cluster, naming the problem the findings share.",
            "example": "Schedules polling an expired claim"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the write-up was finished.",
            "example": "2026-10-18T21:40:00Z"
          },
          "dismiss_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The note the person gave when dismissing.",
            "example": "Expected: load test"
          },
          "dismissed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When a person dismissed the finding, and why."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "The model that wrote it.",
            "example": "gpt-6.2-sol"
          },
          "severity": {
            "type": [
              "string",
              "null"
            ],
            "description": "`high`, `medium` or `low`, as the Inspector judged it.",
            "example": "high"
          },
          "status": {
            "type": "string",
            "description": "`running`, `done`, `failed`, or `unavailable` (no model to write it).",
            "example": "done"
          },
          "suggested_action": {
            "type": [
              "string",
              "null"
            ],
            "description": "One concrete next step.",
            "example": "Add a stop rule to the schedule's instructions."
          },
          "what_happened": {
            "type": [
              "string",
              "null"
            ],
            "description": "What happened, in two to four plain sentences.",
            "example": "The schedule polls a sign-in claim that expired; every run since reports the same error."
          }
        }
      },
      "FindingLocation": {
        "type": "object",
        "description": "Pointer to the config field (and optional byte span within it) a finding\nrefers to.",
        "required": [
          "field"
        ],
        "properties": {
          "end": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "field": {
            "type": "string",
            "description": "Config field name, e.g. `system_prompt`, `tools`."
          },
          "start": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Byte offset range into the field's authored text, when applicable.",
            "minimum": 0
          }
        }
      },
      "FindingSeverity": {
        "type": "string",
        "description": "Advisory severity. There is deliberately no `error`: checks never gate\nsave/publish.",
        "enum": [
          "warning",
          "info",
          "suggestion"
        ]
      },
      "FindingSource": {
        "type": "string",
        "description": "Which tier produced the finding.",
        "enum": [
          "builtin",
          "llm",
          "health_check"
        ]
      },
      "FireAgentTriggerRequest": {
        "type": "object",
        "description": "Body of a manual fire. Without `event`, a schedule trigger runs as on a tick.",
        "properties": {
          "event": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ManualTriggerEvent"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "FixCheck": {
        "type": "object",
        "description": "What a check found: the eval's cases with and without the fix.",
        "required": [
          "eval_name",
          "dataset_version",
          "trials",
          "cases",
          "current",
          "with_fix",
          "fixed",
          "broke",
          "verdict"
        ],
        "properties": {
          "broke": {
            "type": "integer",
            "format": "int32",
            "description": "Cases the fix made fail.",
            "minimum": 0
          },
          "cases": {
            "type": "integer",
            "format": "int32",
            "description": "Cases that ran on both sides.",
            "minimum": 0
          },
          "current": {
            "$ref": "#/components/schemas/FixCheckSide",
            "description": "The agent as it is."
          },
          "dataset_version": {
            "type": "integer",
            "format": "int32",
            "description": "The eval's dataset version at the check.",
            "minimum": 0
          },
          "eval_name": {
            "type": "string",
            "description": "Name of the eval the check ran."
          },
          "fixed": {
            "type": "integer",
            "format": "int32",
            "description": "Cases the fix made pass.",
            "minimum": 0
          },
          "trials": {
            "type": "integer",
            "format": "int32",
            "description": "Trials per case and side.",
            "minimum": 0
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict",
            "description": "How the variant with the fix compares, noise taken into account."
          },
          "with_fix": {
            "$ref": "#/components/schemas/FixCheckSide",
            "description": "The agent with the addition."
          }
        }
      },
      "FixCheckSide": {
        "type": "object",
        "required": [
          "passed",
          "pass_rate",
          "cost_usd"
        ],
        "properties": {
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "What the side's trials cost in USD."
          },
          "pass_rate": {
            "type": "number",
            "format": "double",
            "description": "Share of all trials that passed, 0 to 1."
          },
          "passed": {
            "type": "integer",
            "format": "int32",
            "description": "Cases that passed every trial.",
            "minimum": 0
          }
        }
      },
      "FixerUnblock": {
        "type": "object",
        "description": "A link to the step that makes a blocked fixer available.",
        "required": [
          "label",
          "href"
        ],
        "properties": {
          "href": {
            "type": "string",
            "description": "A path inside the Everruns console, never an external URL.",
            "example": "/settings/slack"
          },
          "label": {
            "type": "string",
            "description": "Button text.",
            "example": "Reconnect Slack workspace"
          }
        }
      },
      "ForecastInterval": {
        "type": "string",
        "description": "Spacing between successive forecast values.",
        "enum": [
          "step",
          "minute",
          "hour",
          "day",
          "week",
          "month",
          "quarter",
          "year"
        ]
      },
      "ForkSandbox": {
        "type": "string",
        "description": "How a forked session's sandbox starts.",
        "enum": [
          "fresh",
          "fork"
        ]
      },
      "ForkSessionRequest": {
        "type": "object",
        "description": "Request to fork a session. Every field is\noptional; omitted fields inherit the parent session's value. Title defaults\nto \"{parent title} (fork)\" when omitted.",
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override the agent assigned to the fork.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "goal": {
            "type": [
              "string",
              "null"
            ],
            "description": "Goal for the fork. Omitted inherits the parent's goal.",
            "example": "Try the async rewrite from this state"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override the locale (BCP 47).",
            "example": "uk-UA"
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override the LLM model for the fork.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "sandbox": {
            "$ref": "#/components/schemas/ForkSandbox",
            "description": "How the fork's sandbox starts. `fresh` (default) creates a new sandbox\nfrom the copied workspace files. `fork` copies the parent's running\nsandbox, with installed packages, build output and (on E2B) running\nprocesses, when its first command runs. Where the provider cannot\ncopy that sandbox, the fork starts fresh."
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Override the session-level system prompt."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Tags for the fork. Replaces (does not merge with) the parent's tags.",
            "example": [
              "experiment"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title for the fork. Defaults to \"{parent title} (fork)\".",
            "example": "Branch: try the async rewrite"
          },
          "up_to_message_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Branch from a message: copy history only up to and including the turn\nthat holds this message (a user or agent message id, `msg_...`).\nWorkspace files and session storage are copied as they are now.\nOmitted copies the whole history.",
            "example": "msg_01933b5a00007000800000000000001"
          }
        }
      },
      "FormField": {
        "type": "object",
        "description": "A single form field.",
        "required": [
          "name",
          "label",
          "field_type",
          "required"
        ],
        "properties": {
          "default_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default value the UI pre-fills (e.g. an OAuth scope or AWS region). The\nstored credential omits unfilled optional fields, so drivers still apply\ntheir own defaults; this only seeds the form input."
          },
          "env": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Environment variables this field can be read from in standalone/dev use,\nmost preferred first.\n\nDeclared by the driver, because only the driver knows what its vendor's\nown SDK reads: `AWS_ACCESS_KEY_ID` for Bedrock, `AZURE_TENANT_ID` for\nMAI's Entra group, `ANTHROPIC_API_KEY` for Anthropic. Later entries are\nalternates the vendor also honors (`GOOGLE_API_KEY`,\n`AWS_DEFAULT_REGION`), not a second field.\n\nEmpty means the field cannot be supplied from the environment, so a\ngroup containing a required field with no variable never resolves from\nenv alone. Server credential resolution ignores this entirely."
          },
          "field_type": {
            "$ref": "#/components/schemas/FieldType",
            "description": "Input type."
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "description": "Mutually-exclusive group label this field belongs to. Fields sharing a\nlabel are one alternative credential method (e.g. \"API key\" vs \"OAuth\");\nungrouped fields are always part of the credential. `None` for the\ncommon single-method case."
          },
          "help_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Help text shown below the input."
          },
          "label": {
            "type": "string",
            "description": "Label shown next to the input."
          },
          "name": {
            "type": "string",
            "description": "Field name used as the key when submitting (e.g. \"api_key\")."
          },
          "placeholder": {
            "type": [
              "string",
              "null"
            ],
            "description": "Placeholder text inside the input."
          },
          "required": {
            "type": "boolean",
            "description": "Whether the field is required."
          }
        }
      },
      "FormFieldResponse": {
        "type": "object",
        "description": "Single form field",
        "required": [
          "name",
          "label",
          "field_type",
          "required"
        ],
        "properties": {
          "field_type": {
            "type": "string",
            "description": "Input type used by the form.",
            "example": "password"
          },
          "help_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explanation for this form field.",
            "example": "Your key is stored encrypted."
          },
          "label": {
            "type": "string",
            "description": "Provider form field label.",
            "example": "API key"
          },
          "name": {
            "type": "string",
            "description": "Provider form field name.",
            "example": "api_key"
          },
          "placeholder": {
            "type": [
              "string",
              "null"
            ],
            "description": "Suggested input placeholder.",
            "example": "Enter your API key"
          },
          "required": {
            "type": "boolean",
            "description": "Whether the field must be supplied.",
            "example": true
          }
        }
      },
      "FormSchemaResponse": {
        "type": "object",
        "description": "Form schema for API-key providers",
        "required": [
          "fields",
          "instructions_markdown"
        ],
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormFieldResponse"
            },
            "description": "Provider form fields."
          },
          "instructions_markdown": {
            "type": "string",
            "description": "Instructions shown before connection setup.",
            "example": "Create an API key in provider settings."
          }
        }
      },
      "GenerateAgentAvatarRequest": {
        "type": "object",
        "description": "What to draw.",
        "properties": {
          "prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the avatar shows, at most 2000 characters. Omit to draw one from the agent's name\nand description. Avatar style rules (square, centered, no text) are added either way.",
            "example": "A friendly fox mechanic holding a wrench, flat vector style, teal and orange"
          },
          "quality": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image quality when the model offers levels (`low`, `medium`, `high`, ...). Defaults to\nthe model's usual quality.",
            "example": "high"
          }
        }
      },
      "GeneratedAgentAvatar": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AgentAvatar"
          },
          {
            "type": "object",
            "required": [
              "model",
              "provider_type"
            ],
            "properties": {
              "model": {
                "type": "string",
                "description": "Model id the image came from, as sent to the provider.",
                "example": "gpt-image-2.6-flare"
              },
              "provider_type": {
                "type": "string",
                "description": "Provider type that served it.",
                "example": "openai"
              },
              "revised_prompt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The prompt the model rewrote, when it reports one."
              }
            }
          }
        ],
        "description": "The new avatar and the model that drew it."
      },
      "GetQuery": {
        "type": "object",
        "description": "Query parameters for GET requests",
        "properties": {
          "recursive": {
            "type": "boolean",
            "description": "For directories: whether to list recursively"
          }
        }
      },
      "GetResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/SessionFile"
          },
          {
            "$ref": "#/components/schemas/ListResponse_FileInfo"
          }
        ],
        "description": "Unified response for GET that can be file or directory listing"
      },
      "GifLimits": {
        "type": "object",
        "description": "Animated GIF request limits.",
        "required": [
          "min_frames",
          "max_frames",
          "default_frames",
          "min_frame_ms",
          "max_frame_ms",
          "default_frame_ms"
        ],
        "properties": {
          "default_frame_ms": {
            "type": "integer",
            "format": "int32",
            "description": "Frame duration used when the request does not say.",
            "minimum": 0
          },
          "default_frames": {
            "type": "integer",
            "format": "int32",
            "description": "Frames used when the request does not say.",
            "minimum": 0
          },
          "max_frame_ms": {
            "type": "integer",
            "format": "int32",
            "description": "Longest frame duration in milliseconds.",
            "minimum": 0
          },
          "max_frames": {
            "type": "integer",
            "format": "int32",
            "description": "Most frames per animation.",
            "minimum": 0
          },
          "min_frame_ms": {
            "type": "integer",
            "format": "int32",
            "description": "Shortest frame duration in milliseconds.",
            "minimum": 0
          },
          "min_frames": {
            "type": "integer",
            "format": "int32",
            "description": "Fewest frames per animation.",
            "minimum": 0
          }
        }
      },
      "GitCommitInfo": {
        "type": "object",
        "description": "A commit entry in the log",
        "required": [
          "oid",
          "message",
          "author_name",
          "author_email",
          "timestamp",
          "parent_oids"
        ],
        "properties": {
          "author_email": {
            "type": "string",
            "description": "Author email from the commit."
          },
          "author_name": {
            "type": "string",
            "description": "Author display name from the commit."
          },
          "message": {
            "type": "string",
            "description": "Commit message as authored."
          },
          "oid": {
            "type": "string",
            "description": "Full git object identifier (40-char hex SHA-1)."
          },
          "parent_oids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Parent commit object identifiers. Length 0 for the initial commit, 1 for ordinary commits, 2+ for merge commits."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Commit timestamp (RFC 3339, normalised to UTC)."
          }
        }
      },
      "GitDiff": {
        "type": "object",
        "description": "A diff with full patch output",
        "required": [
          "entries",
          "stats"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GitDiffEntry"
            },
            "description": "Per-file change records. Empty when the two trees are identical."
          },
          "patch": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unified-diff patch text covering all `entries`, truncated to ~64 KiB\n(with a trailing `... (truncated)` marker when the cap is hit).\n`None` when the diff produced no patch text — typically because the\ntwo trees are identical."
          },
          "stats": {
            "$ref": "#/components/schemas/GitDiffStats",
            "description": "Aggregate line/file counts across `entries`."
          }
        }
      },
      "GitDiffEntry": {
        "type": "object",
        "description": "A diff entry between two commits",
        "required": [
          "path",
          "status"
        ],
        "properties": {
          "old_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pre-change path. Only set when `status == \"renamed\"`; otherwise\n`None` (including for `added`/`deleted`/`modified`)."
          },
          "path": {
            "type": "string",
            "description": "File path on the \"new\" side of the diff (the post-change path). For\na rename, the pre-rename path is in `old_path`. Repo-root-relative,\nforward-slash separated."
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle status."
          }
        }
      },
      "GitDiffStats": {
        "type": "object",
        "description": "Diff statistics",
        "required": [
          "files_changed",
          "insertions",
          "deletions"
        ],
        "properties": {
          "deletions": {
            "type": "integer",
            "description": "Total removed lines summed across all files (the `-` count in a\nunified diff).",
            "minimum": 0
          },
          "files_changed": {
            "type": "integer",
            "description": "Number of files with at least one changed line (matches the length\nof `GitDiff.entries`).",
            "minimum": 0
          },
          "insertions": {
            "type": "integer",
            "description": "Total added lines summed across all files (the `+` count in a\nunified diff).",
            "minimum": 0
          }
        }
      },
      "GitHubAccess": {
        "type": "object",
        "description": "What one GitHub use asks for: who it acts as, and the least access it needs.\n\nThe resolver mints an installation token limited to `repositories` and\n`permissions`, so a tool that only reads a diff never holds write access.\nEmpty `repositories` means every repository the installation covers; empty\n`permissions` means everything the installation was granted. A person's own\nlogin cannot be narrowed by GitHub and answers with its full reach.",
        "required": [
          "acts_as"
        ],
        "properties": {
          "acts_as": {
            "$ref": "#/components/schemas/McpServerActsAs",
            "description": "Whose GitHub identity answers. `none` resolves nothing."
          },
          "permissions": {
            "type": "object",
            "description": "GitHub App permission name to level (`read` or `write`).",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "repositories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Repositories as `owner/repo`, all under one owner."
          }
        }
      },
      "GitHubAccountKind": {
        "type": "string",
        "description": "What kind of GitHub account a login is.",
        "enum": [
          "organization",
          "user",
          "unknown"
        ]
      },
      "GitHubDisconnectOutcome": {
        "type": "string",
        "description": "What a disconnect did.",
        "enum": [
          "disconnected",
          "started_over"
        ]
      },
      "GitHubMemorySourceRequest": {
        "type": "object",
        "description": "Request body for GitHub memory source.",
        "required": [
          "repository"
        ],
        "properties": {
          "branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "Branch to sync. Defaults to the repository's default branch when omitted.",
            "example": "main"
          },
          "repository": {
            "type": "string",
            "description": "GitHub repository in `owner/repo` form.",
            "example": "acme/design-docs"
          },
          "root_folder": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sub-directory within the repository to sync. Empty / omitted = whole tree.",
            "example": "docs/"
          },
          "sync_interval_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Automatic resync interval in seconds. Omit or set 0 for manual-only; scheduled sync accepts 300 through 604800.",
            "example": 3600,
            "maximum": 604800,
            "minimum": 0
          }
        }
      },
      "GitHubMemorySourceResponse": {
        "type": "object",
        "description": "Response body for GitHub memory source.",
        "required": [
          "repository",
          "branch"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "repository": {
            "type": "string"
          },
          "root_folder": {
            "type": [
              "string",
              "null"
            ]
          },
          "sync_interval_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Automatic resync interval in seconds. Omit or set 0 for manual-only; scheduled sync accepts 300 through 604800.",
            "maximum": 604800,
            "minimum": 0
          }
        }
      },
      "GitHubOwnerSuggestion": {
        "type": "object",
        "description": "A GitHub account a new App could be created in.",
        "required": [
          "login",
          "kind"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/GitHubAccountKind"
          },
          "login": {
            "type": "string"
          }
        }
      },
      "GitMemorySourceRequest": {
        "type": "object",
        "description": "Request body for git memory source.",
        "required": [
          "url"
        ],
        "properties": {
          "branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "Branch to sync. Defaults to the repository's default branch when omitted.",
            "example": "main"
          },
          "root_folder": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sub-directory within the repository to sync. Empty / omitted = whole tree.",
            "example": "docs/"
          },
          "sync_interval_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Automatic resync interval in seconds. Omit or set 0 for manual-only; scheduled sync accepts 300 through 604800.",
            "example": 3600,
            "maximum": 604800,
            "minimum": 0
          },
          "url": {
            "type": "string",
            "description": "Clonable git URL (SSH or HTTPS).",
            "example": "https://github.com/acme/design-docs.git"
          }
        }
      },
      "GitMemorySourceResponse": {
        "type": "object",
        "description": "Response body for git memory source.",
        "required": [
          "url",
          "branch"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "root_folder": {
            "type": [
              "string",
              "null"
            ]
          },
          "sync_interval_secs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Automatic resync interval in seconds. Omit or set 0 for manual-only; scheduled sync accepts 300 through 604800.",
            "maximum": 604800,
            "minimum": 0
          },
          "url": {
            "type": "string"
          }
        }
      },
      "GitRefInfo": {
        "type": "object",
        "description": "A git ref (branch pointer)",
        "required": [
          "name",
          "target",
          "is_symbolic"
        ],
        "properties": {
          "is_symbolic": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages."
          },
          "target": {
            "type": "string"
          }
        }
      },
      "GrantCredential": {
        "type": "object",
        "description": "Explicit bounded use grant. It does not confer management permission or permission to reshare.",
        "required": [
          "consumer_scope",
          "usage"
        ],
        "properties": {
          "constraints": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceConstraints",
                "description": "Optional access bounds; GitHub grants cannot widen native repository or permission limits."
              },
              {
                "type": "null"
              }
            ]
          },
          "consumer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Consumer agent, session, or virtual-user ID; omit for organization scope."
          },
          "consumer_scope": {
            "$ref": "#/components/schemas/ResourceScope",
            "description": "Consumer scope; organization grants explicitly opt eligible service agents in."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Absolute grant expiry in UTC; omit for a grant that lasts until revoked."
          },
          "usage": {
            "$ref": "#/components/schemas/CredentialUsage",
            "description": "Invocation identity that must match at every use."
          }
        }
      },
      "GrepMatch": {
        "type": "object",
        "description": "Grep match result",
        "required": [
          "path",
          "line_number",
          "line"
        ],
        "properties": {
          "line": {
            "type": "string"
          },
          "line_number": {
            "type": "integer",
            "minimum": 0
          },
          "path": {
            "type": "string"
          }
        }
      },
      "GrepRequest": {
        "type": "object",
        "required": [
          "pattern"
        ],
        "properties": {
          "path_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional path glob (`**/*.rs`, `docs/*.md`)."
          },
          "pattern": {
            "type": "string",
            "description": "Regex pattern to search for."
          }
        }
      },
      "GrepResult": {
        "type": "object",
        "description": "Grep result for a file",
        "required": [
          "path",
          "matches"
        ],
        "properties": {
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrepMatch"
            }
          },
          "path": {
            "type": "string"
          }
        }
      },
      "GuardrailAction": {
        "type": "string",
        "description": "Effective action of a hit after applying the config mode.",
        "enum": [
          "block",
          "log"
        ],
        "example": "block"
      },
      "GuardrailExample": {
        "type": "object",
        "description": "A read-only, adoptable guardrails preset from the gallery. Adopt by\ndropping `config` into an agent's `guardrails` capability config.",
        "required": [
          "name",
          "display_name",
          "description",
          "tags",
          "check_types",
          "stages",
          "data_egress",
          "config"
        ],
        "properties": {
          "check_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Distinct rule types used across the preset's checks\n(`regex`, `blocklist`, `tool_pattern`) — the check-type composition."
          },
          "config": {
            "type": "object",
            "description": "The adoptable `GuardrailsConfig`. Same shape persisted in\n`AgentCapabilityConfig.config` for the `guardrails` capability."
          },
          "data_egress": {
            "type": "string",
            "description": "Where the preset sends data when it runs. `none` for deterministic\npresets (everything runs in-process).",
            "example": "none"
          },
          "description": {
            "type": "string",
            "description": "What the preset protects against and how to tune it."
          },
          "display_name": {
            "type": "string",
            "description": "Human-facing label.",
            "example": "Secret & Credential Detection"
          },
          "name": {
            "type": "string",
            "description": "Stable slug used to reference the preset (e.g. `secret-detection`).",
            "example": "secret-detection"
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Distinct stages the preset's checks run in (`output`, `tool_use`,\n`tool_output`)."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for grouping/filtering in a picker."
          }
        }
      },
      "GuardrailExamplesResponse": {
        "type": "object",
        "description": "Response for the `list_guardrail_examples` operation.",
        "required": [
          "examples"
        ],
        "properties": {
          "examples": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuardrailExample"
            },
            "description": "Adoptable guardrail presets, in display order."
          }
        }
      },
      "GuardrailStage": {
        "type": "string",
        "description": "Pipeline stage a check applies to.",
        "enum": [
          "output",
          "tool_use",
          "tool_output"
        ],
        "example": "output"
      },
      "GuardrailsDryRunHit": {
        "type": "object",
        "description": "One triggered check from a guardrails dry run.",
        "required": [
          "check_index",
          "check_id",
          "stage",
          "rule_type",
          "action",
          "reason_code"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/GuardrailAction",
            "description": "Effective action (advisory mode downgrades block to log)."
          },
          "check_id": {
            "type": "string",
            "description": "The check's `id`, or `\"<type>#<index>\"` when none was set.",
            "example": "profanity"
          },
          "check_index": {
            "type": "integer",
            "format": "int32",
            "description": "Index of the check in the config's `checks` array.",
            "minimum": 0
          },
          "matched": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bounded excerpt of what matched.",
            "example": "darn"
          },
          "reason_code": {
            "type": "string",
            "description": "Stable machine-readable code, `guardrail.<rule_type>`.",
            "example": "guardrail.blocklist"
          },
          "replacement": {
            "type": [
              "string",
              "null"
            ],
            "description": "The check's custom replacement text, if configured."
          },
          "rule_type": {
            "type": "string",
            "description": "Rule type: regex, blocklist, or tool_pattern.",
            "example": "blocklist"
          },
          "stage": {
            "$ref": "#/components/schemas/GuardrailStage",
            "description": "Stage the check ran in."
          }
        }
      },
      "GuardrailsDryRunRequest": {
        "type": "object",
        "description": "Request body for the `dry_run_guardrails` operation: evaluate a\nguardrails capability config against sample content without a session.",
        "required": [
          "config",
          "stage",
          "text"
        ],
        "properties": {
          "config": {
            "type": "object",
            "description": "The `guardrails` capability config to evaluate (same shape persisted\nin `AgentCapabilityConfig.config`)."
          },
          "stage": {
            "$ref": "#/components/schemas/GuardrailStage",
            "description": "Pipeline stage to evaluate."
          },
          "text": {
            "type": "string",
            "description": "Sample content: model output, serialized tool arguments, or tool\noutput, depending on `stage`.",
            "example": "the model said something darn surprising"
          },
          "tool_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tool name for `tool_use` stage checks (`tool_pattern` rules).",
            "example": "bashkit_exec"
          }
        }
      },
      "GuardrailsDryRunResponse": {
        "type": "object",
        "description": "Response for the `dry_run_guardrails` operation.",
        "required": [
          "hits",
          "blocked"
        ],
        "properties": {
          "blocked": {
            "type": "boolean",
            "description": "Whether any hit would block (i.e. the content would be suppressed\nor the tool call refused when this config runs active)."
          },
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuardrailsDryRunHit"
            },
            "description": "All triggered checks, in config order."
          }
        }
      },
      "Harness": {
        "type": "object",
        "description": "Harness configuration for sessions.\nA harness defines the base behavior and capabilities that apply to all sessions.",
        "required": [
          "id",
          "name",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the harness was archived.",
            "example": "2026-05-26T00:00:00Z"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capabilities enabled for this harness with per-harness configuration."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the harness was created.",
            "example": "2026-04-01T10:00:00Z"
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default LLM model ID for this harness.\nLowest priority in chain: controls > session > agent > harness.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the harness was deleted.",
            "example": "2026-05-26T00:00:00Z"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description of what the harness does.",
            "example": "Default harness with file-system + secrets capabilities; safe baseline for new agents."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name shown in UI.",
            "example": "Conversation"
          },
          "embedder_metadata": {
            "type": "object",
            "description": "Arbitrary key-value metadata injected into LLM requests for observability.\nKeys from system context (session_id, org_id, etc.) always take precedence.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "env": "production",
              "team": "platform"
            }
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display glyph name rendered by the UI (e.g. \"message-circle\").\n\nBuilt-in harnesses declare it in their definition; custom harnesses\nleave it unset and fall back to the UI's generic harness glyph.",
            "example": "message-circle"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier for the harness (format: harness_{32-hex}).",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Starter files copied into each new session for this harness."
          },
          "is_built_in": {
            "type": "boolean",
            "description": "Whether this harness is built-in (system-managed, readonly).\nBuilt-in harnesses are provisioned during org initialization and\ncannot be modified or deleted via the API. Users can copy them.",
            "example": false
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "Remote MCP servers scoped to this harness and inherited by descendant layers."
          },
          "name": {
            "type": "string",
            "description": "Name, unique per org (e.g. \"conversation\").",
            "example": "conversation"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list controlling which hosts/URLs sessions can reach.\nMerged with agent and session layers (allowed: intersect, blocked: union)."
              },
              {
                "type": "null"
              }
            ]
          },
          "parallel_tool_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
            "example": true
          },
          "parent_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional parent harness that this harness inherits from.",
            "example": "harness_01933b5a000070008000000000000602"
          },
          "status": {
            "$ref": "#/components/schemas/HarnessStatus",
            "description": "Current lifecycle status of the harness."
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "System prompt that defines the harness's base behavior.\n\nForms the foundation of the prompt stack. Optional: when absent the\nharness contributes no base prompt, so the effective prompt comes\nentirely from the parent harness (if any), the agent, the session, and\ncapability contributions. Empty/whitespace-only values normalize to\n`None`.",
            "example": "You are an Everruns agent. Be concise, cite sources when possible, and decline tasks outside your assigned scope."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing and filtering harnesses.",
            "example": [
              "baseline",
              "production"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the harness was last updated.",
            "example": "2026-05-20T14:00:00Z"
          }
        }
      },
      "HarnessExample": {
        "type": "object",
        "description": "A read-only harness example defined in code, adoptable as an org harness.",
        "required": [
          "localizations",
          "name",
          "display_name",
          "description",
          "tags",
          "capabilities",
          "dev_only"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capabilities the example will assign with their per-harness config."
          },
          "description": {
            "type": "string",
            "description": "Short description."
          },
          "dev_only": {
            "type": "boolean",
            "description": "Whether this example is only available when experimental features are on."
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable display name (e.g. `Coding`).",
            "example": "Coding"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display glyph name rendered by the UI (e.g. `bar-chart`)."
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display names and descriptions."
          },
          "name": {
            "type": "string",
            "description": "Unique slug (e.g. `coding`).",
            "example": "coding"
          },
          "parent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the parent harness this example inherits from when adopted\n(e.g. `sandbox-worker`). Resolved per org at adoption; no UUIDs are\nhardcoded."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for categorization."
          }
        }
      },
      "HarnessPreviewResponse": {
        "type": "object",
        "description": "Preview response showing merged prompt and tools",
        "required": [
          "features",
          "system_prompt",
          "tools"
        ],
        "properties": {
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Session features from effective capabilities and their dependencies."
          },
          "system_prompt": {
            "type": "string"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "HarnessStatus": {
        "type": "string",
        "description": "Harness lifecycle status.\n- `active`: Harness is available for use\n- `archived`: Harness is hidden from listings and cannot be modified or assigned\n- `deleted`: Harness is a tombstone kept only for historical references",
        "enum": [
          "active",
          "archived",
          "deleted"
        ],
        "example": "active"
      },
      "HealthCheckCaseResult": {
        "type": "object",
        "description": "Outcome of a single case after the agent ran and was scored.",
        "required": [
          "name",
          "user_message",
          "rubric",
          "passed",
          "score",
          "judge_reason",
          "deterministic_reason",
          "turns",
          "latency_ms"
        ],
        "properties": {
          "deterministic_reason": {
            "type": "string",
            "description": "Deterministic-check explanation (completion, non-empty, turn bound)."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when the case errored or timed out instead of completing."
          },
          "input_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Input tokens for this case: the agent session turns plus the judge call.",
            "minimum": 0
          },
          "judge_reason": {
            "type": "string",
            "description": "LLM judge explanation."
          },
          "latency_ms": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "output_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Output tokens for this case: the agent session turns plus the judge call.",
            "minimum": 0
          },
          "passed": {
            "type": "boolean",
            "description": "True only when both the deterministic checks and the LLM judge pass."
          },
          "rubric": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "LLM judge score, 0.0–1.0."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public ID of the real session created for this case (browsable in UI)."
          },
          "turns": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "user_message": {
            "type": "string"
          }
        }
      },
      "HealthCheckRun": {
        "type": "object",
        "description": "API view of a health check run.",
        "required": [
          "id",
          "config_hash",
          "status",
          "created_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "config_hash": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "description": "Public ID (`healthcheck_…`)."
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "results": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/HealthCheckCaseResult"
            },
            "description": "Per-case results (present once the run has produced any)."
          },
          "status": {
            "$ref": "#/components/schemas/HealthCheckStatus"
          },
          "summary": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HealthCheckSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "HealthCheckStatus": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "completed",
          "failed"
        ]
      },
      "HealthCheckSummary": {
        "type": "object",
        "description": "Aggregate metrics across all cases in a run.",
        "required": [
          "total",
          "passed",
          "failed",
          "errored",
          "pass_rate",
          "avg_score",
          "avg_turns",
          "total_input_tokens",
          "total_output_tokens"
        ],
        "properties": {
          "avg_score": {
            "type": "number",
            "format": "double"
          },
          "avg_turns": {
            "type": "number",
            "format": "double"
          },
          "errored": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "pass_rate": {
            "type": "number",
            "format": "double"
          },
          "passed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total_input_tokens": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_output_tokens": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "HealthIssue": {
        "type": "object",
        "description": "An organization-scoped operational issue and its current recovery evidence.",
        "required": [
          "id",
          "code",
          "status",
          "title",
          "body",
          "missing_scopes",
          "first_detected_at",
          "last_checked_at",
          "stale",
          "href",
          "fixers"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public identifier of the owning agent; absent for an organization-level issue.",
            "example": "agent_550e8400e29b41d4a716446655440000"
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the owning agent; absent for an organization-level issue.",
            "example": "Support assistant"
          },
          "body": {
            "type": "string",
            "description": "Explanation of the impact and recovery action.",
            "example": "Reconnect Slack to grant the required permissions."
          },
          "channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public identifier of the affected channel; absent for an organization-level issue.",
            "example": "appchan_550e8400e29b41d4a716446655440000"
          },
          "code": {
            "type": "string",
            "description": "Detector code: `slack.permissions` for a channel, `org.active_turn_limit` for the organization.",
            "example": "slack.permissions"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sanitized provider or verification error code, when available.",
            "example": "missing_scope"
          },
          "evidence": {
            "type": [
              "object",
              "null"
            ],
            "description": "The numbers a detector or classifier recorded for a finding: counts,\ncosts, probabilities. Never session content."
          },
          "first_detected_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the current issue episode was first detected.",
            "example": "2026-10-03T12:00:00Z"
          },
          "fixers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IssueFixer"
            },
            "description": "Repairs Everruns can make for the issue now, in the order to offer\nthem. Empty when it has none, or the issue is resolved."
          },
          "href": {
            "type": "string",
            "description": "Application-relative link to the issue details.",
            "example": "/settings/health?issue=550e8400-e29b-41d4-a716-446655440000"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable identifier of the canonical issue.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "investigation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FindingInvestigation",
                "description": "The Inspector's write-up of a finding's current episode, when it has\none."
              },
              {
                "type": "null"
              }
            ]
          },
          "last_checked_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the latest accepted verification evidence was observed.",
            "example": "2026-10-03T12:05:00Z"
          },
          "missing_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Required Slack scopes absent from the verified grant.",
            "example": [
              "reactions:write"
            ]
          },
          "notification_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Current user's announcement identifier, when one was issued.",
            "example": "notification_550e8400e29b41d4a716446655440001"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public identifier of the session the issue points at, when it has one.",
            "example": "session_550e8400e29b41d4a716446655440000"
          },
          "snoozed_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Current user's reminder suppression deadline, if snoozed.",
            "example": "2026-10-04T12:00:00Z"
          },
          "stale": {
            "type": "boolean",
            "description": "Whether the evidence is old, unavailable, or for a previous channel revision.",
            "example": false
          },
          "status": {
            "type": "string",
            "description": "Current issue state: open, needs_check, resolved, or inapplicable.",
            "example": "open"
          },
          "subject_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "What a background-work issue is about: a schedule (`sched_…`), an agent\n(`agent_…`), a session (`session_…`) or the organization (`org_…`).",
            "example": "sched_550e8400e29b41d4a716446655440000"
          },
          "title": {
            "type": "string",
            "description": "Human-readable summary of the required action.",
            "example": "Slack permissions need updating"
          }
        }
      },
      "HealthIssueList": {
        "type": "object",
        "description": "A page of pending operational health issues visible to the current caller.",
        "required": [
          "data",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthIssue"
            },
            "description": "Issues in this page.",
            "example": []
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Effective page size.",
            "example": 20
          },
          "offset": {
            "type": "integer",
            "format": "int64",
            "description": "Effective pagination offset.",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Number of issues matching the current filter.",
            "example": 1
          }
        }
      },
      "HealthResponse": {
        "type": "object",
        "description": "System health response",
        "required": [
          "status",
          "total_workers",
          "active_workers",
          "workers_accepting",
          "total_capacity",
          "current_load",
          "load_percentage",
          "pending_tasks",
          "claimed_tasks",
          "completed_tasks",
          "failed_tasks",
          "started_tasks",
          "running_workflows",
          "pending_workflows",
          "completed_workflows",
          "failed_workflows",
          "started_workflows",
          "dlq_size"
        ],
        "properties": {
          "active_workers": {
            "type": "integer",
            "description": "Number of workers in the `running` state, ready to claim tasks.",
            "example": 4,
            "minimum": 0
          },
          "claimed_tasks": {
            "type": "integer",
            "description": "Tasks currently claimed by a worker (gauge).",
            "example": 7,
            "minimum": 0
          },
          "completed_tasks": {
            "type": "integer",
            "description": "Cumulative count of tasks that completed successfully (monotonic counter).",
            "example": 12041,
            "minimum": 0
          },
          "completed_workflows": {
            "type": "integer",
            "description": "Cumulative count of workflows that completed successfully (monotonic counter).",
            "example": 4128,
            "minimum": 0
          },
          "current_load": {
            "type": "integer",
            "description": "Total tasks currently in flight across all workers.",
            "example": 7,
            "minimum": 0
          },
          "dlq_size": {
            "type": "integer",
            "description": "Size of the dead-letter queue (gauge). High values indicate stuck activities.",
            "example": 0,
            "minimum": 0
          },
          "event_delivery": {
            "type": [
              "string",
              "null"
            ],
            "description": "Event-delivery backend in use: `nats` for distributed deployments, `in_memory` for single-instance. `None` if the field was omitted by an older server.",
            "example": "nats"
          },
          "failed_tasks": {
            "type": "integer",
            "description": "Cumulative count of tasks that failed terminally or were sent to the DLQ (monotonic counter).",
            "example": 34,
            "minimum": 0
          },
          "failed_workflows": {
            "type": "integer",
            "description": "Cumulative count of workflows that ended in failure (monotonic counter).",
            "example": 12,
            "minimum": 0
          },
          "load_percentage": {
            "type": "number",
            "format": "double",
            "description": "`current_load / total_capacity * 100`. 0.0 when no workers are registered.",
            "example": 21.875
          },
          "pending_tasks": {
            "type": "integer",
            "description": "Tasks waiting to be claimed (gauge).",
            "example": 2,
            "minimum": 0
          },
          "pending_workflows": {
            "type": "integer",
            "description": "Workflows waiting to be claimed (gauge).",
            "example": 1,
            "minimum": 0
          },
          "running_workflows": {
            "type": "integer",
            "description": "Workflows currently executing (gauge).",
            "example": 3,
            "minimum": 0
          },
          "started_tasks": {
            "type": "integer",
            "description": "Cumulative count of tasks claimed at least once (monotonic counter).",
            "example": 12082,
            "minimum": 0
          },
          "started_workflows": {
            "type": "integer",
            "description": "Cumulative count of workflows that started (monotonic counter).",
            "example": 4144,
            "minimum": 0
          },
          "status": {
            "type": "string",
            "description": "Aggregate system status: `healthy`, `degraded`, or `unhealthy`. Derived from worker availability, load, and queue depths.",
            "example": "healthy"
          },
          "total_capacity": {
            "type": "integer",
            "description": "Sum of `max_concurrency` across all workers (the upper bound on concurrent task execution).",
            "example": 32,
            "minimum": 0
          },
          "total_workers": {
            "type": "integer",
            "description": "Total number of workers registered (heartbeating in the last window).",
            "example": 4,
            "minimum": 0
          },
          "workers_accepting": {
            "type": "integer",
            "description": "Number of workers currently accepting new task assignments (subset of `active_workers`; drains/backpressure excluded).",
            "example": 4,
            "minimum": 0
          }
        }
      },
      "HostedToolCallData": {
        "type": "object",
        "description": "Data for the `tool.hosted_call` event (EVE-1115).\n\nA provider-executed tool (OpenAI hosted `web_search`) changed state inside\nthe model's response. Informational: nothing was dispatched, and there is\nno matching `tool.started` / `tool.completed` or tool-result message.",
        "required": [
          "turn_id",
          "call_id",
          "tool_name",
          "status"
        ],
        "properties": {
          "call_id": {
            "type": "string",
            "description": "Provider item id; stable across the call's state changes."
          },
          "status": {
            "type": "string",
            "description": "`in_progress`, `completed`, or `failed`."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short detail once known, e.g. the search query."
          },
          "tool_name": {
            "type": "string",
            "description": "Hosted tool name, e.g. `web_search`."
          },
          "turn_id": {
            "type": "string",
            "description": "Turn this call belongs to.",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "ImageContentPart": {
        "type": "object",
        "description": "Image content part (base64 or URL)",
        "properties": {
          "base64": {
            "type": [
              "string",
              "null"
            ]
          },
          "media_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ImageFileContentPart": {
        "type": "object",
        "description": "Image file content part (reference to uploaded image)\n\nThis is used for images uploaded via the /images API.\nThe image data is stored separately and referenced by ID.\nNote: Currently filtered out before sending to LLM.",
        "required": [
          "image_id"
        ],
        "properties": {
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original filename (for display)"
          },
          "image_id": {
            "type": "string",
            "description": "ID of the uploaded image (format: img_{32-hex})",
            "example": "img_01933b5a00007000800000000000001"
          }
        }
      },
      "ImageInfo": {
        "type": "object",
        "description": "Image metadata (without binary data)",
        "required": [
          "id",
          "filename",
          "content_type",
          "size_bytes",
          "metadata",
          "created_at"
        ],
        "properties": {
          "content_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "filename": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "img_01933b5a00007000800000000000001"
          },
          "metadata": {
            "description": "Free-form metadata attached to this resource."
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ImageModelProfile": {
        "type": "object",
        "description": "What an image model can make, so tools and pickers read it instead of\nhard-coding model ids.",
        "required": [
          "formats",
          "qualities",
          "sizes",
          "edits",
          "markup",
          "complexity",
          "max_count"
        ],
        "properties": {
          "complexity": {
            "type": "boolean",
            "description": "Whether the model takes `complexity` (`low`, `medium`, `high`)."
          },
          "edits": {
            "type": "boolean",
            "description": "Whether the model edits existing images."
          },
          "formats": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Output formats: `png`, `jpeg`, `webp`, `gif` (animated), `svg`."
          },
          "gif": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GifLimits",
                "description": "Animated GIF limits, present when `formats` lists `gif`."
              },
              {
                "type": "null"
              }
            ]
          },
          "markup": {
            "type": "boolean",
            "description": "Whether edits accept a `markup` layer (drawn comments on a transparent PNG)."
          },
          "max_count": {
            "type": "integer",
            "format": "int32",
            "description": "Most images one request returns.",
            "minimum": 0
          },
          "qualities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Accepted `quality` values, `auto` included when supported."
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Recommended sizes, `auto` included when supported."
          }
        }
      },
      "ImageUploadResponse": {
        "type": "object",
        "description": "Image upload response",
        "required": [
          "id",
          "filename",
          "content_type",
          "size_bytes",
          "created_at"
        ],
        "properties": {
          "content_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "filename": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "img_01933b5a00007000800000000000001"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ImportCaseStatus": {
        "type": "string",
        "description": "Verdict for an imported case (trusted as-is; not recomputed).",
        "enum": [
          "passed",
          "failed",
          "errored",
          "timeout",
          "skipped"
        ]
      },
      "ImportEvalCaseEntry": {
        "type": "object",
        "description": "One case result. The case is upserted by `name` (identity-only: everruns\nnever re-executes it).",
        "required": [
          "name",
          "target",
          "status"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional case description.",
            "example": "Agent fixes a failing unit test"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error detail when the case errored.",
            "example": "Session timed out"
          },
          "input": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Display-only input turns shown in the UI.",
            "example": [
              "Fix the failing test in src/lib.rs"
            ]
          },
          "input_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Input tokens used.",
            "example": 1200,
            "minimum": 0
          },
          "latency_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Execution time in milliseconds.",
            "example": 8450,
            "minimum": 0
          },
          "metrics": {
            "description": "Open-vocab metrics bag (cost_usd, cache/reasoning tokens, ttft, ...)."
          },
          "name": {
            "type": "string",
            "description": "Case name; the case is upserted by it.",
            "example": "fix-failing-test"
          },
          "output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Output tokens used.",
            "example": 850,
            "minimum": 0
          },
          "scores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportScore"
            },
            "description": "Named, attributed scores. Stored opaque; everruns does not re-grade."
          },
          "status": {
            "$ref": "#/components/schemas/ImportCaseStatus",
            "description": "Verdict for the case, trusted as reported."
          },
          "target": {
            "$ref": "#/components/schemas/ImportEvalTarget",
            "description": "Provider/model labels this result was produced against."
          },
          "transcript": {
            "description": "Normalized transcript (messages, tool calls, events, parts, files)."
          },
          "turns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of agent turns taken.",
            "example": 3,
            "minimum": 0
          }
        }
      },
      "ImportEvalGroup": {
        "type": "object",
        "description": "One eval's worth of results within the run. The eval is upserted by `name`.",
        "required": [
          "name",
          "cases"
        ],
        "properties": {
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportEvalCaseEntry"
            },
            "description": "Case results for this eval."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional eval description.",
            "example": "Regression suite for the support agent"
          },
          "name": {
            "type": "string",
            "description": "Eval name; the eval is upserted by it.",
            "example": "Support agent regression"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tags for the eval.",
            "example": [
              "regression",
              "nightly"
            ]
          }
        }
      },
      "ImportEvalRunRequest": {
        "type": "object",
        "description": "A whole external run group: one external run, one entry per eval. Maps to\none everruns EvalRun per eval, all sharing `source.run_id`.",
        "required": [
          "source",
          "evals"
        ],
        "properties": {
          "evals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportEvalGroup"
            },
            "description": "Evals and their case results in this run."
          },
          "experiment": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ImportExperimentRef",
                "description": "Publish each eval's run as a variant of an experiment, so it is\ncompared with the experiment's other variants."
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "$ref": "#/components/schemas/ImportEvalSource",
            "description": "External system that produced the run."
          }
        }
      },
      "ImportEvalSource": {
        "type": "object",
        "description": "Attribution for the external system that produced the run.",
        "required": [
          "system",
          "run_id"
        ],
        "properties": {
          "metadata": {
            "description": "Optional environment/labels (git commit, host, etc.)."
          },
          "run_id": {
            "type": "string",
            "description": "Stable external run id: cross-eval group key + idempotency key.",
            "example": "run-2026-01-15-001"
          },
          "system": {
            "type": "string",
            "description": "External system name, e.g. \"mira\".",
            "example": "mira"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link back to the run in the external system.",
            "example": "https://ci.example.com/runs/42"
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "Version of the external system.",
            "example": "0.4.0"
          }
        }
      },
      "ImportEvalTarget": {
        "type": "object",
        "description": "Provider/model labels for an externally-executed result.",
        "required": [
          "provider",
          "model"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model name.",
            "example": "gpt-5.1"
          },
          "params": {
            "description": "Opaque provider parameters."
          },
          "provider": {
            "type": "string",
            "description": "Provider name.",
            "example": "openai"
          }
        }
      },
      "ImportExperimentRef": {
        "type": "object",
        "description": "The experiment an import publishes into. Each imported eval's run becomes\nthe variant `variant` of the experiment named `name` on that eval, which\nis created on first use.",
        "required": [
          "name",
          "variant"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Experiment name, matched within each eval.",
            "example": "Luna vs Sol"
          },
          "variant": {
            "type": "string",
            "description": "The variant this import is. A later import with the same label\nreplaces it.",
            "example": "gpt-6.2-sol"
          }
        }
      },
      "ImportScore": {
        "type": "object",
        "description": "A single named score from an external scorer.",
        "required": [
          "scorer",
          "value",
          "pass"
        ],
        "properties": {
          "na": {
            "type": "boolean",
            "description": "Scorer was not applicable (excluded from aggregate).",
            "example": false
          },
          "pass": {
            "type": "boolean",
            "description": "Whether the scorer passed.",
            "example": true
          },
          "reason": {
            "type": "string",
            "description": "Human-readable explanation of the score.",
            "example": "Output contains expected text"
          },
          "scorer": {
            "type": "string",
            "description": "Scorer name.",
            "example": "contains"
          },
          "value": {
            "type": "number",
            "format": "double",
            "description": "Score value from 0.0 to 1.0.",
            "example": 1
          }
        }
      },
      "ImportedConnection": {
        "type": "object",
        "description": "Private credential handoff emitted by the local login helper for this installation.",
        "required": [
          "auth",
          "nonce",
          "host_id"
        ],
        "properties": {
          "auth": {
            "type": "object",
            "description": "Credential document emitted by the local helper; accepted only after ID-token validation."
          },
          "host_id": {
            "type": "string",
            "description": "Installation identifier from the setup document downloaded for this provider.",
            "example": "urn:uuid:00000000-0000-0000-0000-000000000001"
          },
          "nonce": {
            "type": "string",
            "description": "Nonce from the same helper document, bound to its signed ID token.",
            "example": "nonce-from-the-local-helper"
          }
        }
      },
      "IndexMode": {
        "type": "string",
        "description": "Optional collection indexing: no index, keyword retrieval, or keyword plus embeddings.",
        "enum": [
          "off",
          "lexical",
          "hybrid"
        ]
      },
      "IndexerInput": {
        "type": "object",
        "description": "An organization Turbopuffer account referencing an existing service credential.",
        "required": [
          "name",
          "endpoint",
          "credential_binding_id"
        ],
        "properties": {
          "credential_binding_id": {
            "type": "string",
            "format": "uuid",
            "description": "Active organization-service credential binding; never a plaintext API key."
          },
          "endpoint": {
            "type": "string",
            "description": "HTTPS regional Turbopuffer API endpoint; embedded credentials are forbidden."
          },
          "name": {
            "type": "string",
            "description": "Display name for the organization search account."
          }
        },
        "additionalProperties": false
      },
      "InitialFile": {
        "type": "object",
        "description": "Starter file copied into a new session from an agent or harness.",
        "required": [
          "path",
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "File content: plain text or base64-encoded binary."
          },
          "encoding": {
            "type": "string",
            "description": "Content encoding: `text` or `base64`."
          },
          "is_readonly": {
            "type": "boolean",
            "description": "Prevent session-side edits or deletes when true."
          },
          "path": {
            "type": "string",
            "description": "Absolute path within the session workspace. `/workspace` prefix is accepted."
          }
        }
      },
      "InputContentPart": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TextContentPart",
                "description": "Text content"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  }
                }
              }
            ],
            "description": "Text content"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageContentPart",
                "description": "Image content (base64 or URL)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "image"
                    ]
                  }
                }
              }
            ],
            "description": "Image content (base64 or URL)"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageFileContentPart",
                "description": "Image file content (reference to uploaded image by ID)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "image_file"
                    ]
                  }
                }
              }
            ],
            "description": "Image file content (reference to uploaded image by ID)"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileContentPart",
                "description": "File content (reference to uploaded file, e.g. PDF, by ID)"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "file"
                    ]
                  }
                }
              }
            ],
            "description": "File content (reference to uploaded file, e.g. PDF, by ID)"
          }
        ],
        "description": "Input content part - text, image, and image_file (for user input)\n\nThis is a subset of ContentPart that users can send.\nTool calls and results are system-generated."
      },
      "InputMessage": {
        "type": "object",
        "description": "Input message for creating a user message\n\nOnly user messages can be created via the API.\nAgent messages are created internally by the turn runtime.",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InputContentPart"
            },
            "description": "Array of content parts (text and image only)"
          },
          "role": {
            "$ref": "#/components/schemas/MessageRole",
            "description": "Message role (always \"user\" for API-created messages)"
          }
        },
        "example": {
          "content": [
            {
              "text": "Why is the build failing on main?",
              "type": "text"
            }
          ],
          "role": "user"
        }
      },
      "InputMessageData": {
        "type": "object",
        "description": "Data for input.message event",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "$ref": "#/components/schemas/RuntimeMessage",
            "description": "The user message"
          }
        }
      },
      "InstallPluginRequest": {
        "type": "object",
        "description": "Request body for installing a plugin from a marketplace catalog entry.",
        "required": [
          "marketplace_id",
          "plugin_name"
        ],
        "properties": {
          "marketplace_id": {
            "type": "string",
            "description": "Public ID of the marketplace to install from.",
            "example": "plgmkt_01933b5a000070008000000000000001"
          },
          "plugin_name": {
            "type": "string",
            "description": "Name of the plugin entry in the marketplace catalog.",
            "example": "microsoft-docs"
          }
        }
      },
      "IssueFixOutcome": {
        "type": "object",
        "description": "The result of running a fixer.",
        "required": [
          "status",
          "returns_automatically",
          "issue"
        ],
        "properties": {
          "consent_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider page that approves the change. Built by the server on the\nprovider's own origin."
          },
          "issue": {
            "$ref": "#/components/schemas/HealthIssue",
            "description": "The issue after the fix."
          },
          "returns_automatically": {
            "type": "boolean",
            "description": "Whether approving returns the browser to the issue by itself. When\nfalse the person comes back on their own and the page checks again."
          },
          "status": {
            "type": "string",
            "description": "`done` (the change is made and the issue was checked again) or\n`consent` (approve the change at `consent_url`, then come back).",
            "example": "consent"
          }
        }
      },
      "IssueFixer": {
        "type": "object",
        "description": "A repair Everruns can make for an issue.",
        "required": [
          "kind",
          "label",
          "steps",
          "effect",
          "undoable",
          "needs_provider_admin"
        ],
        "properties": {
          "effect": {
            "type": "string",
            "description": "`in_place` when running it is the whole fix; `consent` when the person\nthen approves the change in the provider.",
            "example": "consent"
          },
          "kind": {
            "type": "string",
            "description": "What it does: `slack.add_permissions`, `slack.reconnect` or `schedule.pause`.",
            "example": "slack.add_permissions"
          },
          "label": {
            "type": "string",
            "description": "Button text.",
            "example": "Fix in Slack"
          },
          "needs_provider_admin": {
            "type": "boolean",
            "description": "Whether the provider may ask a workspace administrator to approve."
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What happens when it runs, step by step, in plain words."
          },
          "unavailable_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it cannot run now, and what unlocks it. Absent when it can run."
          },
          "unblock": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FixerUnblock",
                "description": "The page where the person takes the step that unlocks the fix, when\none exists in Everruns. Absent when the fix can run, or when nothing in\nEverruns unlocks it (only the manual steps remain)."
              },
              {
                "type": "null"
              }
            ]
          },
          "undoable": {
            "type": "boolean",
            "description": "Whether the fix can be undone from the finding."
          }
        }
      },
      "KeyValueInfo": {
        "type": "object",
        "description": "Key-value entry info (key and timestamps, no value)",
        "required": [
          "key",
          "value",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "description": "When the key was created"
          },
          "key": {
            "type": "string",
            "description": "The key name"
          },
          "updated_at": {
            "type": "string",
            "description": "When the key was last updated"
          },
          "value": {
            "type": "string",
            "description": "The stored value"
          }
        }
      },
      "KnowledgeQuery": {
        "type": "object",
        "description": "A bounded retrieval query; runtime hosts intersect collections with live session bindings.",
        "required": [
          "query"
        ],
        "properties": {
          "collections": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional collection identifiers. Runtime access remains limited to attached collections."
          },
          "lexical_only": {
            "type": "boolean",
            "description": "Use keyword retrieval without creating a query embedding."
          },
          "limit": {
            "type": "integer",
            "description": "Requested maximum passages; hosts enforce the configured retrieval budget.",
            "minimum": 0
          },
          "metadata": {
            "type": "object",
            "description": "Exact user-annotation predicates applied without granting additional file access.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional source-relative path prefix that narrows retrieval."
          },
          "query": {
            "type": "string",
            "description": "Search text used for keyword retrieval and, when enabled, query embeddings."
          }
        },
        "additionalProperties": false
      },
      "LatestHealthCheckRun": {
        "type": "object",
        "description": "The most recent health-check run for an agent, paired with whether the\nagent's current resolved config differs from the config that run was\nexecuted against. Returned by the latest-run endpoint so the agent editor\ncan show prior results on mount without triggering a new run, and surface a\n\"config changed since last run\" hint.",
        "required": [
          "config_changed"
        ],
        "properties": {
          "config_changed": {
            "type": "boolean",
            "description": "True when `run` exists but was executed against a different resolved\nconfig than the agent currently has (UI shows a re-run hint)."
          },
          "run": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HealthCheckRun",
                "description": "The latest run, or `None` if the agent has never been health-checked."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LeasedResource": {
        "type": "object",
        "description": "A lifecycle-managed external resource owned by a session-capable workflow.",
        "required": [
          "id",
          "provider",
          "resource_type",
          "external_id",
          "status",
          "lease_duration_seconds",
          "last_touched_at",
          "lease_expires_at",
          "cleanup_attempts",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "cleanup_attempts": {
            "type": "integer",
            "format": "int32",
            "description": "Number of cleanup attempts so far.",
            "example": 0,
            "minimum": 0
          },
          "cleanup_completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Cleanup completion time for released resources.",
            "example": "2026-05-25T10:30:04Z"
          },
          "cleanup_started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Cleanup attempt start time when the resource is currently claimed.",
            "example": "2026-05-25T10:30:00Z"
          },
          "connection_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Exact provider connection used to create the resource."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this leased resource was created (RFC 3339).",
            "example": "2026-05-25T10:00:00Z"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional user-facing label.",
            "example": "Customer 42 — Q3 brief"
          },
          "external_id": {
            "type": "string",
            "description": "Stable provider identifier for cleanup calls.",
            "example": "sbx_a3f1c9d2e8"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier (format: resource_{32-hex}).",
            "example": "resource_01933b5a00007000800000000000001"
          },
          "last_cleanup_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last cleanup error message, if any.",
            "example": "daytona.api.timeout: provider call exceeded 10s"
          },
          "last_touched_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last successful touch from tool activity.",
            "example": "2026-05-25T10:14:00Z"
          },
          "lease_duration_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Lease duration used when refreshing the lease.",
            "example": 900,
            "minimum": 0
          },
          "lease_expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Absolute deadline after which cleanup becomes due.",
            "example": "2026-05-25T10:29:00Z"
          },
          "metadata": {
            "type": "object",
            "description": "Provider-specific non-secret metadata for UI/debugging. Free-form JSON\nobject — shape is provider-defined.\nExample: `{\"region\": \"us-west-2\", \"snapshot_id\": \"snap_42\"}`.\nTHREAT[TM-API-015]: This field is returned by the session resources API\nand rendered in the UI, so providers must never persist bearer tokens or\nother secrets here."
          },
          "owner_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "User connection owner used for provider cleanup, if known.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "provider": {
            "type": "string",
            "description": "External provider responsible for the resource (e.g. \"daytona\").",
            "example": "daytona"
          },
          "resource_type": {
            "type": "string",
            "description": "Provider-specific resource type (e.g. \"sandbox\", \"browser_session\").",
            "example": "sandbox"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session that currently owns the resource, if still attached.",
            "example": "session_01933b5a00007000800000000000001"
          },
          "status": {
            "$ref": "#/components/schemas/LeasedResourceStatus",
            "description": "Current lifecycle status."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this leased resource was last updated (RFC 3339).",
            "example": "2026-05-25T10:14:00Z"
          }
        }
      },
      "LeasedResourceStatus": {
        "type": "string",
        "description": "Runtime status for a leased resource.",
        "enum": [
          "active",
          "cleaning",
          "released",
          "cleanup_failed"
        ]
      },
      "LedgerEntry": {
        "type": "object",
        "description": "Immutable platform ledger record for resource consumption or credit.",
        "required": [
          "id",
          "budget_id",
          "amount",
          "meter_source",
          "created_at"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "description": "Positive = debit (consumption), negative = credit (top-up/refund)."
          },
          "budget_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "meter_source": {
            "type": "string",
            "description": "Which meter produced this: \"llm_tokens\", \"tool_calls\", etc."
          },
          "ref_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference entity ID."
          },
          "ref_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference entity type: \"llm_generation\", \"tool_execution\", \"manual\"."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session context for this entry."
          }
        }
      },
      "ListExecutionsQuery": {
        "type": "object",
        "description": "Query parameters for listing executions of a schedule — optional status\nfilter plus offset/limit paging.",
        "properties": {
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Pagination limit (default: 20, max: 100)",
            "example": 20,
            "minimum": 0
          },
          "offset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Pagination offset",
            "example": 0,
            "minimum": 0
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Filter by execution status",
            "example": "completed"
          }
        }
      },
      "ListMemoriesQuery": {
        "type": "object",
        "description": "Query parameters for `GET /v1/memories` — optional name search and a\nflag to include archived memories in the listing.",
        "properties": {
          "include_archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "search": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ListNotificationsResponse": {
        "type": "object",
        "required": [
          "data",
          "unviewed_count"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notification"
            },
            "description": "Page of items returned by this query."
          },
          "unviewed_count": {
            "type": "integer",
            "format": "int32",
            "description": "Number of notifications the current user has not viewed yet.",
            "example": 3,
            "minimum": 0
          }
        }
      },
      "ListResponse_Agent": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Agent configuration for agentic loop.\nAn agent defines the behavior and capabilities of an AI assistant.",
              "required": [
                "id",
                "name",
                "system_prompt",
                "harness_id",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the agent was archived.",
                  "example": "2026-05-26T00:00:00Z"
                },
                "avatar": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AgentAvatar",
                      "description": "Avatar shown wherever the agent appears: the UI, the A2A Agent Card and\nits Slack app. Set with `PUT /v1/agents/{agent_id}/avatar`."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentCapabilityConfig"
                  },
                  "description": "Capabilities enabled for this agent with per-agent configuration.\nCapabilities add tools and system prompt modifications."
                },
                "communication": {
                  "$ref": "#/components/schemas/Communication",
                  "description": "How the agent talks to people. `direct` (default): its replies are\nwhat it writes. `explicit`: what it writes is private working notes,\nand people see only the messages it sends with `send_message`. Applies\non every surface: web chat, API, Slack, A2A, AG-UI, MCP."
                },
                "completion_check": {
                  "$ref": "#/components/schemas/CompletionCheck",
                  "description": "When a turn about to finish is checked for whether it did what was\nasked, and continued automatically when it did not. `unattended`\n(default): sessions started by triggers and schedules, where no person\nis watching. `always`: chat too. `off`: never."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the agent was created.",
                  "example": "2026-04-01T10:00:00Z"
                },
                "default_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default LLM model ID for this agent.\nCan be overridden at the session level.",
                  "example": "model_01933b5a00007000800000000000001"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the agent was deleted.",
                  "example": "2026-05-26T00:00:00Z"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable description of what the agent does.",
                  "example": "Handles refund and shipping questions; escalates billing disputes."
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable display name shown in UI (e.g. \"Customer Support Agent\").\nFalls back to `name` when absent.",
                  "example": "Customer Support Agent"
                },
                "exposed": {
                  "type": "boolean",
                  "description": "Whether any endpoint on this agent is currently live. Derived from the\nendpoint rows on read and never stored: a stored flag would be a second\nwriter for state the endpoints already own."
                },
                "exposures_suspended": {
                  "type": "boolean",
                  "description": "Incident switch: when true, no endpoint on this agent accepts traffic\n(EVE-1007). Distinct from archiving — it leaves per-endpoint status\nuntouched so clearing it restores exactly the previously live set."
                },
                "forked_from_agent_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Source agent for a forked agent.",
                  "example": "agent_01933b5a00007000800000000000001"
                },
                "harness_id": {
                  "type": "string",
                  "description": "Harness that supplies the base execution environment for this agent.",
                  "example": "harness_01933b5a00007000800000000000001"
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (agent_<32-hex>). Shown as \"id\" in API.\nClient-supplied or auto-generated.",
                  "example": "agent_01933b5a000070008000000000000001"
                },
                "initial_files": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InitialFile"
                  },
                  "description": "Starter files copied into each new session for this agent."
                },
                "intro_markdown": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional Markdown intro rendered as an intro box at the top of a fresh\nPlatform Chat thread. Images are allowed. Wins over the harness intro.\nHidden once the user inputs.",
                  "example": "Hey, I'm Ava. Ask me anything about your account."
                },
                "is_built_in": {
                  "type": "boolean",
                  "description": "Built-in agents (Platform Chat) are provisioned by the platform and\nare read-only: they cannot be modified or deleted via the API. Copy\none to get an editable version.",
                  "example": false
                },
                "localizations": {
                  "$ref": "#/components/schemas/EntityLocalizations",
                  "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
                },
                "max_iterations": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Maximum number of LLM iterations per turn for this agent.",
                  "example": 50,
                  "minimum": 0
                },
                "max_output_tokens": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Ceiling on output tokens per model response, sent to the provider as\n`max_tokens`. Unset keeps the provider default. Clamped to the model's\noutput limit when known. Lower it when a provider rejects calls because\nthe balance can only afford fewer tokens.",
                  "example": 4096,
                  "minimum": 1
                },
                "mcpServers": {
                  "$ref": "#/components/schemas/BTreeMap",
                  "description": "Remote MCP servers scoped to this agent and inherited by its sessions."
                },
                "model_preset": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Model preset the agent takes its job models from (`automatic`,\n`provider:gemini` or a custom preset id). Unset = organization defaults.\nA pinned `default_model_id` still wins for the agent's own turns.",
                  "example": "provider:gemini"
                },
                "model_role": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AgentModelRole",
                      "description": "Organization model the agent follows instead of `default_model_id`.\n`research` uses the organization research model."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "type": "string",
                  "description": "Name, unique per org (e.g. \"customer-support\").",
                  "example": "customer-support"
                },
                "network_access": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/NetworkAccessList",
                      "description": "Network access list controlling which hosts/URLs agent sessions can reach.\nMerged with harness and session layers (allowed: intersect, blocked: union)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "owner_agent_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Agent this one was created as part of, shown as \"Created here\" on\nthat agent's Agents tab and bundled into its export.",
                  "example": "agent_01933b5a00007000800000000000001"
                },
                "parallel_tool_calls": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                  "example": true
                },
                "root_agent_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Root agent lineage identifier for grouping fork families.",
                  "example": "agent_01933b5a00007000800000000000001"
                },
                "sandbox_policy": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SandboxPolicy",
                      "description": "Policy for selecting the primary Sandbox Template for new Sessions."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "service_virtual_user_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Org-scoped service account used when a tool acts as the agent."
                },
                "short_description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional one-line description in simplified Markdown, shown below the\nchat title once the intro is hidden. Wins over the harness value.",
                  "example": "Answers account questions in seconds."
                },
                "starters": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConversationStarter"
                  },
                  "description": "Conversation starters for a fresh Platform Chat thread. Win over the\nharness starters when non-empty."
                },
                "status": {
                  "$ref": "#/components/schemas/AgentStatus",
                  "description": "Current lifecycle status of the agent."
                },
                "system_prompt": {
                  "type": "string",
                  "description": "System prompt that defines the agent's behavior.\nSent as the first message in every conversation.",
                  "example": "You are a friendly customer support agent for Acme Corp. Verify orders before issuing refunds. Escalate any billing disputes to a human."
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Tags for organizing and filtering agents.",
                  "example": [
                    "support",
                    "production"
                  ]
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ToolDefinition"
                  },
                  "description": "Client-side tools registered for this agent.\nThese tools are executed by the client, not the server."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the agent was last updated.",
                  "example": "2026-05-20T14:00:00Z"
                },
                "usage": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TokenUsage",
                      "description": "Cumulative token usage across all sessions for this agent."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_AgentCredentialBinding": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Metadata for a write-only credential bound to one agent: either an MCP\ntool parameter or an HTTP API the agent's shell calls.",
              "required": [
                "id",
                "agent_id",
                "kind",
                "label",
                "configured",
                "created_at",
                "updated_at",
                "setup_url"
              ],
              "properties": {
                "agent_id": {
                  "type": "string",
                  "description": "Agent that exclusively owns and may use this credential.",
                  "example": "agent_01933b5a000070008000000000000001"
                },
                "binding": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SecretBinding",
                      "description": "URL prefix and auth form the value may be sent with (`http`)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "configured": {
                  "type": "boolean",
                  "description": "Whether an encrypted value has been provisioned.",
                  "example": true
                },
                "created_at": {
                  "type": "string",
                  "description": "RFC 3339 creation time.",
                  "example": "2026-08-08T16:00:00Z"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional explanation of why the credential is needed.",
                  "example": "Delivers scheduled status notifications"
                },
                "env_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Env var the agent's shell uses as a placeholder (`http`).",
                  "example": "JEV_API_KEY"
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Stable credential binding identifier.",
                  "example": "01933b5a-0000-7000-8000-000000000001"
                },
                "kind": {
                  "$ref": "#/components/schemas/AgentCredentialKind",
                  "description": "How the credential is injected."
                },
                "label": {
                  "type": "string",
                  "description": "Human-readable credential label.",
                  "example": "Visti channel key"
                },
                "mcp_server_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Name of the attached MCP server (`mcp_parameter`).",
                  "example": "visti"
                },
                "mcp_server_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Exact MCP endpoint authorized to receive the credential (`mcp_parameter`).",
                  "example": "https://visti.sh/mcp"
                },
                "parameter_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Top-level tool argument injected by the server (`mcp_parameter`).",
                  "example": "channel_key"
                },
                "setup_url": {
                  "type": "string",
                  "description": "Relative UI route where the user can securely provision the value.",
                  "example": "/agents/agent_01933b5a000070008000000000000001?tab=credentials"
                },
                "tool_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "MCP tool whose outbound call receives the credential (`mcp_parameter`).",
                  "example": "visti_send"
                },
                "updated_at": {
                  "type": "string",
                  "description": "RFC 3339 last-update time.",
                  "example": "2026-08-08T16:05:00Z"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_AuditLogEntry": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Domain-level audit log view. Mirrors `AuditLogRow` but omits `org_id`\n(derived from the caller) and formats IDs as strings, matching the\nshape returned by the HTTP and MCP adapters.",
              "required": [
                "id",
                "domain",
                "action",
                "event_type",
                "metadata",
                "created_at"
              ],
              "properties": {
                "action": {
                  "type": "string",
                  "description": "What happened, as `<domain>.<resource>.<verb>`.",
                  "example": "management.member.invited"
                },
                "actor_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "UUID of the user who acted, when a user did.",
                  "example": "01933b5a-0000-7000-8000-000000000001"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this resource was created (RFC 3339)."
                },
                "domain": {
                  "type": "string",
                  "description": "Audit domain: `management` for org administration, `agent` for agent activity.",
                  "example": "management"
                },
                "event_type": {
                  "type": "string",
                  "description": "Legacy event type, kept for older filters.",
                  "example": "auth.login"
                },
                "id": {
                  "type": "string",
                  "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Client IP address of the request, when known."
                },
                "metadata": {
                  "description": "Free-form metadata attached to this resource."
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Identifier of the resource the entry is about."
                },
                "target_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Kind of resource the entry is about.",
                  "example": "member"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_CapabilityInfo": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Public capability information (without internal details)\nThis is what gets returned from the API\nNamed CapabilityInfo to distinguish from the Capability trait",
              "required": [
                "id",
                "name",
                "description",
                "status"
              ],
              "properties": {
                "agent_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of active agents referencing this capability in the org.",
                  "example": 42,
                  "minimum": 0
                },
                "category": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Category for grouping in UI",
                  "example": "filesystem"
                },
                "config_schema": {
                  "type": "object",
                  "description": "JSON Schema for capability-specific per-agent config."
                },
                "config_ui_schema": {
                  "type": "object",
                  "description": "react-jsonschema-form uiSchema hints for rendering config_schema."
                },
                "dependencies": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "IDs of capabilities that this capability depends on.\nWhen this capability is selected, its dependencies are automatically included.",
                  "example": [
                    "approval"
                  ]
                },
                "description": {
                  "type": "string",
                  "description": "Description of what this capability provides",
                  "example": "Read, write, edit, list, grep, delete, and stat files in the session workspace."
                },
                "docs_slug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Slug under the [capability documentation](https://everruns.com/docs/capabilities/) when public docs exist.",
                  "example": "session_file_system"
                },
                "feature_flag": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Rollout flag that gates this capability, when one is required.\nPresent whether or not the flag is on, so a management screen can name\nan attached capability and avoid offering it for new selection.",
                  "example": "skills"
                },
                "features": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "UI feature strings this capability contributes to.\nMultiple capabilities can contribute the same feature.",
                  "example": [
                    "file_browser"
                  ]
                },
                "harness_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of active harnesses referencing this capability in the org.",
                  "example": 7,
                  "minimum": 0
                },
                "icon": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Icon name (for UI rendering)",
                  "example": "Folder"
                },
                "id": {
                  "type": "string",
                  "description": "Unique capability identifier",
                  "example": "session_file_system"
                },
                "is_guardrail": {
                  "type": "boolean",
                  "description": "Whether this capability is a guardrail (constrains agent behavior\nrather than granting abilities). Used for UI grouping and filtering.",
                  "example": false
                },
                "is_mcp": {
                  "type": "boolean",
                  "description": "Whether this is an MCP server capability (for UI badge)",
                  "example": false
                },
                "is_skill": {
                  "type": "boolean",
                  "description": "Whether this is an Agent Skill capability (for UI badge)",
                  "example": false
                },
                "localizations": {
                  "type": "object",
                  "description": "Localized display strings keyed by lowercase language tag (e.g. \"uk\").\nThe \"en\" entry carries only `config_description`, since the base\nname/description/config_schema strings are already English.",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/CapabilityLocalizationInfo"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "example": {
                    "uk": {
                      "description": "Монтує спільні файли пам'яті в сесії.",
                      "name": "Пам'ять"
                    }
                  }
                },
                "name": {
                  "type": "string",
                  "description": "Display name",
                  "example": "Session File System"
                },
                "risk_level": {
                  "$ref": "#/components/schemas/RiskLevel",
                  "description": "TM-AGENT-005: Risk level. High-risk capabilities require admin approval."
                },
                "status": {
                  "type": "string",
                  "description": "Current status",
                  "example": "active"
                },
                "system_prompt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "System prompt addition contributed by this capability",
                  "example": "You can read and write files in /workspace via the session_file_system tools."
                },
                "tool_definitions": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "description": "Tool definitions provided by this capability",
                  "example": [
                    {
                      "description": "Read a file from the session workspace.",
                      "name": "read_file"
                    },
                    {
                      "description": "Write or overwrite a file in the session workspace.",
                      "name": "write_file"
                    }
                  ]
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_DatabaseInfoResponse": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Database info response.",
              "required": [
                "name",
                "size_bytes",
                "page_count",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "description": "Timestamp when this resource was created (RFC 3339)."
                },
                "name": {
                  "type": "string",
                  "description": "Human-readable name. Safe to render in user-facing messages."
                },
                "page_count": {
                  "type": "integer",
                  "format": "int32"
                },
                "size_bytes": {
                  "type": "integer",
                  "format": "int64"
                },
                "updated_at": {
                  "type": "string",
                  "description": "Timestamp when this resource was last updated (RFC 3339)."
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Eval": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "An eval: a named collection of test cases for an agent.",
              "required": [
                "id",
                "name",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the eval was archived, if archived.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "case_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of cases.",
                  "example": 12
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the eval was created.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the eval was deleted, if deleted.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional description.",
                  "example": "Regression suite for the support agent"
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (eval_<32-hex>). Shown as \"id\" in API.",
                  "example": "eval_01933b5a000070008000000000000001"
                },
                "last_run": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EvalRunSummaryView",
                      "description": "Last run summary (if any)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "model_override": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional default model override for runs.",
                  "example": "gpt-5.1"
                },
                "name": {
                  "type": "string",
                  "description": "Display name.",
                  "example": "Support agent regression"
                },
                "status": {
                  "$ref": "#/components/schemas/EvalStatus",
                  "description": "Lifecycle status."
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Organization tags.",
                  "example": [
                    "regression",
                    "nightly"
                  ]
                },
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EvalTarget",
                      "description": "Session setup target. Defines how to create sessions for eval cases."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the eval was last updated.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "version": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Version of the cases (the eval's dataset). Every case change bumps it;\nruns and experiments record the version they ran.",
                  "example": 7,
                  "minimum": 0
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_EvalCase": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A single test case within an eval.",
              "required": [
                "id",
                "name",
                "conversation",
                "scorers",
                "position",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "artifacts": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/ArtifactSpec"
                  },
                  "description": "Session files to collect after scoring completes.",
                  "example": [
                    {
                      "name": "patch",
                      "path": "/workspace/fix.patch"
                    }
                  ]
                },
                "conversation": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvalInputMessage"
                  },
                  "description": "Input messages sent sequentially.",
                  "example": [
                    {
                      "content": "Fix the failing test in src/lib.rs"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the case was created.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional description of what the case checks.",
                  "example": "Agent fixes a failing unit test"
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (evalcase_<32-hex>).",
                  "example": "evalcase_01933b5a000070008000000000000001"
                },
                "max_turns": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Max agent turns (default: 10).",
                  "example": 10,
                  "minimum": 0
                },
                "name": {
                  "type": "string",
                  "description": "Case name.",
                  "example": "fix-failing-test"
                },
                "position": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Display order.",
                  "example": 0
                },
                "post": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/EvalInputMessage"
                  },
                  "description": "Verification messages sent after conversation completes and session idles.\nScorers run after post messages complete (not after conversation).",
                  "example": [
                    {
                      "content": "Run the tests again and report the result"
                    }
                  ]
                },
                "scorers": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Scorer"
                  },
                  "description": "Scoring rules.",
                  "example": [
                    {
                      "text": "tests pass",
                      "type": "contains"
                    }
                  ]
                },
                "simulated_user": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SimulatedUser",
                      "description": "A model that plays the user after the scripted messages."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Free-form tags for filtering runs.",
                  "example": [
                    "regression",
                    "nightly"
                  ]
                },
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EvalTarget",
                      "description": "Optional per-case target override."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timeout_seconds": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Per-case timeout in seconds (default: 120).",
                  "example": 120,
                  "minimum": 0
                },
                "tool_fixtures": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/ToolFixture"
                  },
                  "description": "Tools the case gives the agent, answered with canned responses."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the case was last updated.",
                  "example": "2026-01-15T10:30:00Z"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_EvalCaseResult": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Result of a single case within a run.",
              "required": [
                "id",
                "eval_case_id",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "artifacts": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Collected session file contents keyed by artifact name.",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "example": {
                    "patch": "diff --git a/src/lib.rs b/src/lib.rs"
                  }
                },
                "case_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Case name (denormalized for display).",
                  "example": "fix-failing-test"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the result was created.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Error message if errored.",
                  "example": "Session timed out"
                },
                "eval_case_id": {
                  "type": "string",
                  "description": "The case this result is for.",
                  "example": "evalcase_01933b5a000070008000000000000001"
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (evalresult_<32-hex>).",
                  "example": "evalresult_01933b5a000070008000000000000001"
                },
                "input_tokens": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Token usage.",
                  "example": 1200,
                  "minimum": 0
                },
                "latency_ms": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Execution time in milliseconds.",
                  "example": 8450,
                  "minimum": 0
                },
                "metadata": {
                  "description": "External scorer metadata captured during deferred write-back."
                },
                "output_tokens": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Output tokens used.",
                  "example": 850,
                  "minimum": 0
                },
                "scores": {
                  "description": "Per-scorer results."
                },
                "session_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Session created for this case (browsable in UI).",
                  "example": "session_01933b5a00007000800000000000001"
                },
                "status": {
                  "$ref": "#/components/schemas/CaseResultStatus",
                  "description": "Execution status of the case."
                },
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EvalTarget",
                      "description": "Resolved target used for this result (live reference)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target_snapshot": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EvalTarget",
                      "description": "Frozen snapshot of the resolved target at execution time."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trial": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Which repetition of the case this result is, from 0.",
                  "example": 0,
                  "minimum": 0
                },
                "turns": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Turn count.",
                  "example": 3,
                  "minimum": 0
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the result was last updated.",
                  "example": "2026-01-15T10:30:00Z"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_EvalExperiment": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "An experiment: one dataset version against several variants.",
              "required": [
                "id",
                "eval_id",
                "name",
                "dataset_version",
                "trials",
                "baseline",
                "status",
                "variants",
                "created_at"
              ],
              "properties": {
                "baseline": {
                  "type": "string",
                  "description": "Label of the variant the others are compared against.",
                  "example": "baseline"
                },
                "comparison": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ExperimentComparison",
                      "description": "Paired comparison by case (detail view)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "dataset_version": {
                  "type": "integer",
                  "format": "int32",
                  "description": "The eval's `version` the experiment ran.",
                  "example": 7,
                  "minimum": 0
                },
                "eval_id": {
                  "type": "string",
                  "description": "The eval whose cases are the dataset.",
                  "example": "eval_01933b5a000070008000000000000001"
                },
                "id": {
                  "type": "string",
                  "example": "evalexp_01933b5a000070008000000000000001"
                },
                "max_cost_usd": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "format": "double",
                  "example": 10
                },
                "name": {
                  "type": "string",
                  "example": "Luna vs Sol"
                },
                "status": {
                  "$ref": "#/components/schemas/ExperimentStatus"
                },
                "trials": {
                  "type": "integer",
                  "format": "int32",
                  "example": 3,
                  "minimum": 0
                },
                "variants": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExperimentVariant"
                  }
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_EvalRun": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "An eval run: one execution of all/some cases.",
              "required": [
                "id",
                "status",
                "triggered_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "attribution": {
                  "description": "Provenance for external runs: which system produced them, version, link\nback, and any environment labels. `None` for internal runs. Open-vocab\nJSON so new attribution fields need no schema change."
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the run finished.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the run was created.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "dataset_version": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Dataset version (the eval's `version`) the run was created from.",
                  "example": 7,
                  "minimum": 0
                },
                "experiment_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The experiment this run is a variant of.",
                  "example": "evalexp_01933b5a000070008000000000000001"
                },
                "filter_tags": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "Only run cases matching these tags.",
                  "example": [
                    "regression",
                    "nightly"
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (evalrun_<32-hex>).",
                  "example": "evalrun_01933b5a000070008000000000000001"
                },
                "max_cost_usd": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "format": "double",
                  "description": "Spending cap in USD. Once the run's agents and graders have spent it,\nrunning turns stop and remaining cases are skipped.",
                  "example": 5
                },
                "model_override": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Model override for this run.",
                  "example": "gpt-6-luna"
                },
                "results": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvalCaseResult"
                  },
                  "description": "Case results (populated on detail view)."
                },
                "source": {
                  "$ref": "#/components/schemas/EvalRunSource",
                  "description": "Whether everruns executed this run (`internal`) or it was imported from\nan external eval system (`external`)."
                },
                "started_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the run started executing.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "status": {
                  "$ref": "#/components/schemas/EvalRunStatus",
                  "description": "Run lifecycle status."
                },
                "summary": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RunSummary",
                      "description": "Aggregate metrics (set on completion)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EvalTarget",
                      "description": "Optional per-run target override."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trials": {
                  "type": "integer",
                  "format": "int32",
                  "description": "How many times each case runs; results carry their `trial` number.",
                  "example": 3,
                  "minimum": 0
                },
                "triggered_by": {
                  "type": "string",
                  "description": "What triggered this run.",
                  "example": "manual"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the run was last updated.",
                  "example": "2026-01-15T10:30:00Z"
                },
                "variant_label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The variant's label within its experiment.",
                  "example": "candidate"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Event": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Standard event following the Everruns event protocol.\n\nAll events have a consistent structure:\n- `id`: Unique event identifier (format: event_{32-hex})\n- `type`: Event type in dot notation (e.g., \"input.message\", \"reason.started\")\n- `ts`: ISO 8601 timestamp with millisecond precision\n- `session_id`: Session this event belongs to (format: session_{32-hex})\n- `context`: Correlation context for tracing\n- `data`: Event-specific payload (typed via EventData enum)\n- `metadata`: Optional arbitrary metadata\n- `tags`: Optional list of tags for filtering",
              "required": [
                "id",
                "type",
                "ts",
                "session_id",
                "context",
                "data"
              ],
              "properties": {
                "context": {
                  "$ref": "#/components/schemas/EventContext",
                  "description": "Correlation context"
                },
                "data": {
                  "$ref": "#/components/schemas/EventData",
                  "description": "Event-specific payload. The schema depends on the event type.\nSee EventData documentation for the mapping of type to data schema."
                },
                "id": {
                  "type": "string",
                  "description": "Unique event identifier (format: event_{32-hex})",
                  "example": "event_01933b5a00007000800000000000001"
                },
                "metadata": {
                  "description": "Arbitrary metadata for the event"
                },
                "sequence": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Sequence number within session (for ordering)"
                },
                "session_id": {
                  "type": "string",
                  "description": "Session this event belongs to (format: session_{32-hex})",
                  "example": "session_01933b5a00007000800000000000001"
                },
                "tags": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "Tags for filtering and categorization"
                },
                "ts": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Event timestamp"
                },
                "type": {
                  "type": "string",
                  "description": "Event type in dot notation"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_FileInfo": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "File metadata without content",
              "required": [
                "id",
                "session_id",
                "path",
                "name",
                "is_directory",
                "is_readonly",
                "size_bytes",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this entry was created (RFC 3339).",
                  "example": "2026-05-25T10:14:00Z"
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Internal database UUID for this file entry.",
                  "example": "550e8400-e29b-41d4-a716-446655440000"
                },
                "is_directory": {
                  "type": "boolean",
                  "description": "`true` when this entry represents a directory; `false` for a regular file.",
                  "example": false
                },
                "is_readonly": {
                  "type": "boolean",
                  "description": "Whether the entry was marked read-only at creation. Read-only entries cannot be edited or deleted by the session.",
                  "example": false
                },
                "name": {
                  "type": "string",
                  "description": "File or directory name (the last segment of `path`).",
                  "example": "notes.md"
                },
                "path": {
                  "type": "string",
                  "description": "Absolute path within the session workspace (e.g. `/notes.md`).",
                  "example": "/notes.md"
                },
                "session_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "UUID of the owning session.",
                  "example": "01933b5a-0000-7000-8000-000000000001"
                },
                "size_bytes": {
                  "type": "integer",
                  "format": "int64",
                  "description": "File size in bytes. `0` for directories.",
                  "example": 4096
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this entry was last updated (RFC 3339).",
                  "example": "2026-05-25T10:15:30Z"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_GrepResult": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Grep result for a file",
              "required": [
                "path",
                "matches"
              ],
              "properties": {
                "matches": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GrepMatch"
                  }
                },
                "path": {
                  "type": "string"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Harness": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Harness configuration for sessions.\nA harness defines the base behavior and capabilities that apply to all sessions.",
              "required": [
                "id",
                "name",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the harness was archived.",
                  "example": "2026-05-26T00:00:00Z"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentCapabilityConfig"
                  },
                  "description": "Capabilities enabled for this harness with per-harness configuration."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the harness was created.",
                  "example": "2026-04-01T10:00:00Z"
                },
                "default_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default LLM model ID for this harness.\nLowest priority in chain: controls > session > agent > harness.",
                  "example": "model_01933b5a00007000800000000000001"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the harness was deleted.",
                  "example": "2026-05-26T00:00:00Z"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable description of what the harness does.",
                  "example": "Default harness with file-system + secrets capabilities; safe baseline for new agents."
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable display name shown in UI.",
                  "example": "Conversation"
                },
                "embedder_metadata": {
                  "type": "object",
                  "description": "Arbitrary key-value metadata injected into LLM requests for observability.\nKeys from system context (session_id, org_id, etc.) always take precedence.",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "example": {
                    "env": "production",
                    "team": "platform"
                  }
                },
                "icon": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Display glyph name rendered by the UI (e.g. \"message-circle\").\n\nBuilt-in harnesses declare it in their definition; custom harnesses\nleave it unset and fall back to the UI's generic harness glyph.",
                  "example": "message-circle"
                },
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the harness (format: harness_{32-hex}).",
                  "example": "harness_01933b5a00007000800000000000001"
                },
                "initial_files": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InitialFile"
                  },
                  "description": "Starter files copied into each new session for this harness."
                },
                "is_built_in": {
                  "type": "boolean",
                  "description": "Whether this harness is built-in (system-managed, readonly).\nBuilt-in harnesses are provisioned during org initialization and\ncannot be modified or deleted via the API. Users can copy them.",
                  "example": false
                },
                "localizations": {
                  "$ref": "#/components/schemas/EntityLocalizations",
                  "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
                },
                "mcpServers": {
                  "$ref": "#/components/schemas/BTreeMap",
                  "description": "Remote MCP servers scoped to this harness and inherited by descendant layers."
                },
                "name": {
                  "type": "string",
                  "description": "Name, unique per org (e.g. \"conversation\").",
                  "example": "conversation"
                },
                "network_access": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/NetworkAccessList",
                      "description": "Network access list controlling which hosts/URLs sessions can reach.\nMerged with agent and session layers (allowed: intersect, blocked: union)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "parallel_tool_calls": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                  "example": true
                },
                "parent_harness_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional parent harness that this harness inherits from.",
                  "example": "harness_01933b5a000070008000000000000602"
                },
                "status": {
                  "$ref": "#/components/schemas/HarnessStatus",
                  "description": "Current lifecycle status of the harness."
                },
                "system_prompt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "System prompt that defines the harness's base behavior.\n\nForms the foundation of the prompt stack. Optional: when absent the\nharness contributes no base prompt, so the effective prompt comes\nentirely from the parent harness (if any), the agent, the session, and\ncapability contributions. Empty/whitespace-only values normalize to\n`None`.",
                  "example": "You are an Everruns agent. Be concise, cite sources when possible, and decline tasks outside your assigned scope."
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Tags for organizing and filtering harnesses.",
                  "example": [
                    "baseline",
                    "production"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the harness was last updated.",
                  "example": "2026-05-20T14:00:00Z"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_KeyValueInfo": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Key-value entry info (key and timestamps, no value)",
              "required": [
                "key",
                "value",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "description": "When the key was created"
                },
                "key": {
                  "type": "string",
                  "description": "The key name"
                },
                "updated_at": {
                  "type": "string",
                  "description": "When the key was last updated"
                },
                "value": {
                  "type": "string",
                  "description": "The stored value"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_McpServer": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "MCP Server configuration.\nRepresents a remote MCP server that can provide tools and resources.",
              "required": [
                "id",
                "name",
                "url",
                "transport_type",
                "status",
                "api_key_set",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "api_key_set": {
                  "type": "boolean",
                  "description": "Whether an API key has been configured."
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the MCP server was archived."
                },
                "auth_mode": {
                  "$ref": "#/components/schemas/McpServerAuthMode",
                  "description": "Authentication mode for this MCP server."
                },
                "connection_check": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/McpConnectionCheck",
                      "description": "Whether this OAuth preset's sign-in service was reachable when it was\nlast checked. Present only on OAuth presets."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the MCP server was created."
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the MCP server was deleted."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable description of the MCP server.",
                  "example": "Atlassian MCP Server for Jira and Confluence"
                },
                "elicitation_policy": {
                  "$ref": "#/components/schemas/McpElicitationPolicy",
                  "description": "Which elicitation modes this server may use (`url` by default)."
                },
                "headers": {
                  "type": "object",
                  "description": "Additional HTTP headers for authentication.\nKeys are header names, values are header values.",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  }
                },
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the MCP server.",
                  "example": "mcp_01933b5a00007000800000000000001"
                },
                "interactive_views": {
                  "$ref": "#/components/schemas/McpInteractiveViews",
                  "description": "Where this server's MCP App views are shown: `on` (console and a\npicture in Slack), `console_only`, or `off`."
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the MCP server.",
                  "example": "atlassian-mcp-server"
                },
                "oauth_provider_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Stable provider id used for user-scoped OAuth connections."
                },
                "presentation": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/McpServerPresentation",
                      "description": "Title, icon, and links published by the remote server.\nThe operator `name` and `description` are unchanged."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "protocol_mode": {
                  "$ref": "#/components/schemas/McpProtocolMode",
                  "description": "Protocol-era adoption policy for the MCP client (`auto` negotiates)."
                },
                "service_connection_provider": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Connection provider whose connection on an agent's service virtual user\nsupplies the service credential instead of an MCP OAuth grant.",
                  "example": "github"
                },
                "status": {
                  "$ref": "#/components/schemas/McpServerStatus",
                  "description": "Current lifecycle status of the MCP server."
                },
                "tool_timeout_ms": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "How long one tool call may take, in milliseconds. Absent means the\n60000 default.",
                  "example": 300000,
                  "minimum": 0
                },
                "transport_type": {
                  "$ref": "#/components/schemas/McpServerTransportType",
                  "description": "Transport type (currently only HTTP supported)."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the MCP server was last updated."
                },
                "url": {
                  "type": "string",
                  "description": "URL of the MCP server endpoint.",
                  "example": "https://mcp.atlassian.com/v1/mcp"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Memory": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response body for memory.",
              "required": [
                "id",
                "name",
                "scope",
                "source_type",
                "source",
                "is_readonly",
                "sync_status",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when this resource was archived, if any (RFC 3339).",
                  "example": "2026-05-26T00:00:00Z"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this resource was created (RFC 3339).",
                  "example": "2026-04-01T10:00:00Z"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when this resource was soft-deleted, if any (RFC 3339).",
                  "example": "2026-05-26T00:00:00Z"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable description. Safe to render in user-facing messages.",
                  "example": "Living design documents synced from GitHub"
                },
                "id": {
                  "type": "string",
                  "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                  "example": "mem_01933b5a000070008000000000000001"
                },
                "is_readonly": {
                  "type": "boolean",
                  "description": "Whether the memory is mounted read-only into sessions. Read-only memories accept no writes from the session sandbox.",
                  "example": false
                },
                "last_sync_error": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Most recent sync error message; cleared on the next successful sync.",
                  "example": "ssh: connect to host github.com port 22: Connection timed out"
                },
                "last_synced_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp of the most recent successful sync (RFC 3339). `None` if never synced.",
                  "example": "2026-05-25T08:00:00Z"
                },
                "name": {
                  "type": "string",
                  "description": "Human-readable name. Safe to render in user-facing messages.",
                  "example": "design-docs"
                },
                "owner_agent_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Owning agent when `scope = agent`.",
                  "example": "agent_01933b5a000070008000000000000001"
                },
                "owner_user_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "Owning user when `scope = user`."
                },
                "scope": {
                  "type": "string",
                  "description": "Ownership scope (`org`, `agent`, or `user`).",
                  "example": "org"
                },
                "source": {
                  "$ref": "#/components/schemas/MemorySourceResponse",
                  "description": "Source-specific configuration (git remote, github repo, manual upload)."
                },
                "source_type": {
                  "type": "string",
                  "description": "Source kind discriminator (`manual`, `git`, `github`). Determines which `source` variant is populated.",
                  "example": "github"
                },
                "status": {
                  "type": "string",
                  "description": "Current lifecycle status.",
                  "example": "active"
                },
                "sync_status": {
                  "type": "string",
                  "description": "Current sync status (`idle`, `syncing`, `succeeded`, `failed`). Only meaningful when `source_type` is `git` or `github`.",
                  "example": "succeeded"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this resource was last updated (RFC 3339).",
                  "example": "2026-05-25T08:00:00Z"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_MemoryFileInfo": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "is_directory",
                "size_bytes",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "content_hash": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "is_directory": {
                  "type": "boolean"
                },
                "path": {
                  "type": "string"
                },
                "size_bytes": {
                  "type": "integer",
                  "format": "int64"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_MemoryGrepResult": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "size_bytes"
              ],
              "properties": {
                "path": {
                  "type": "string"
                },
                "size_bytes": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Message": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Message - primary conversation data (API response)",
              "required": [
                "id",
                "session_id",
                "sequence",
                "role",
                "content",
                "created_at"
              ],
              "properties": {
                "content": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ContentPart"
                  },
                  "description": "Array of content parts.\n\nReasoning artifacts appear here as `reasoning` parts, in the order the\nprovider emitted them, with opaque replay state (signatures, encrypted\npayloads) stripped."
                },
                "controls": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Controls",
                      "description": "Runtime controls (model, reasoning, etc.)"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this resource was created (RFC 3339)."
                },
                "delivery": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MessageDelivery",
                      "description": "How a message just created was delivered. Only set on the response to\ncreating a message; absent when listing."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "external_actor": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ExternalActor",
                      "description": "External actor identity (for messages from external channels like Slack)"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "Unique message ID (format: message_{32-hex})",
                  "example": "message_01933b5a00007000800000000000001"
                },
                "metadata": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Message-level metadata (locale, etc.)",
                  "additionalProperties": {},
                  "propertyNames": {
                    "type": "string"
                  }
                },
                "phase": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ExecutionPhase",
                      "description": "Execution phase for agent messages: whether this is intermediate\n`commentary` or the turn's `final_answer`. Absent on user messages.\n\nWithout this a client cannot tell an intermediate message from the\nanswer, which is the single question most consumers of a session need\nanswered."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phase_source": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PhaseSource",
                      "description": "Whether `phase` was reported by the provider or inferred by the runtime\nfrom tool-call presence.\n\n`derived` is a weak signal: it means only \"this message called tools\",\nso a text-only preamble is reported as `final_answer`. Clients needing a\ndependable classification should treat `derived` accordingly."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "role": {
                  "$ref": "#/components/schemas/MessageRole"
                },
                "sequence": {
                  "type": "integer",
                  "format": "int32"
                },
                "session_id": {
                  "type": "string",
                  "description": "Session ID this message belongs to (format: session_{32-hex})",
                  "example": "session_01933b5a00007000800000000000001"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_ModelPreset": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ModelPresetJobs",
                  "description": "The model for each job."
                },
                {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "kind",
                    "read_only",
                    "agent_count"
                  ],
                  "properties": {
                    "agent_count": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Live agents whose models come from this preset."
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the custom preset was created; absent for built-ins."
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What the preset is for."
                    },
                    "fallback_jobs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ModelJob"
                      },
                      "description": "Jobs of a provider preset whose curated model is not usable in the\norganization and that use the provider's next recommended model."
                    },
                    "id": {
                      "type": "string",
                      "description": "Stable id: `automatic`, `provider:<driver>` or the custom preset's key.",
                      "example": "provider:gemini"
                    },
                    "kind": {
                      "$ref": "#/components/schemas/ModelPresetKind",
                      "description": "Where the preset comes from: automatic, provider or custom."
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name."
                    },
                    "provider_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Driver of a provider preset (`gemini`)."
                    },
                    "read_only": {
                      "type": "boolean",
                      "description": "Built-in presets cannot be changed; duplicate one to customize it."
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the custom preset last changed; absent for built-ins."
                    }
                  }
                }
              ],
              "description": "A named set of models, one per job."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_ModelProfileResponse": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Read-only model behavior, independent from the credentials of a serving account.",
              "required": [
                "key",
                "service",
                "source",
                "profile"
              ],
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Stable profile identity, including a vendor or custom-account namespace."
                },
                "profile": {
                  "$ref": "#/components/schemas/ModelProfile",
                  "description": "Capabilities, decision semantics, limits and pricing for this model."
                },
                "service": {
                  "$ref": "#/components/schemas/ServiceKind",
                  "description": "Model service described by the profile."
                },
                "source": {
                  "type": "string",
                  "description": "Profile origin: curated, discovered, predefined or manual."
                },
                "vendor": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ModelVendor",
                      "description": "Model developer, when known; this may differ from the serving provider."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_MyInvitationResponse": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "org_name",
                "role"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "org_name": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Observer": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "An observer: online scoring config over production sessions.",
              "required": [
                "id",
                "name",
                "sampling_rate",
                "scorers",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "alert": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ObserverAlert",
                      "description": "Pass-rate alert, when set."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional description.",
                  "example": "Grades support replies for grounded answers."
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (observer_<32-hex>). Shown as \"id\" in API.",
                  "example": "observer_01933b5a000070008000000000000001"
                },
                "match": {
                  "$ref": "#/components/schemas/ObserverMatch",
                  "description": "Which sessions to score."
                },
                "name": {
                  "type": "string",
                  "description": "Display name.",
                  "example": "Support answer quality"
                },
                "sampling_rate": {
                  "type": "number",
                  "format": "double",
                  "description": "Fraction of matching turns to score (0.0–1.0), applied after match.",
                  "example": 0.1
                },
                "scorers": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObserverScorerConfig"
                  },
                  "description": "Scoring rules."
                },
                "status": {
                  "$ref": "#/components/schemas/ObserverStatus",
                  "description": "Lifecycle status."
                },
                "system_kind": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Present for system-managed observers, whose configuration is read-only."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_OrganizationResponse": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response for organization operations",
              "required": [
                "quality_monitoring",
                "id",
                "name",
                "default_provider_per_service",
                "system_decisions",
                "web_search_defaults",
                "background_limits",
                "monthly_session_limit",
                "monthly_agent_limit",
                "self_healing",
                "tool_approval_policy",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "agentid_agents_per_owner": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "How many agents one AgentID owner may sign in; null means the platform\ndefault."
                },
                "background_limits": {
                  "$ref": "#/components/schemas/BackgroundLimits",
                  "description": "Limits on unattended background work (Settings → Limits): schedule\nlifetime and run cap for agent-created schedules, the default and\nlargest schedule budget, and the daily unattended spend cap. Code\ndefaults when the organization never set any."
                },
                "base_harness_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Base harness used when session creation omits harness_id."
                },
                "chat_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default for the built-in Everruns Chat. None inherits the agents/sessions default."
                },
                "coding_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default for coding work: coding-harness agents and `coding` helpers.\nNone falls back to the default model."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the organization was created"
                },
                "default_harness_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default harness to preselect in the UI."
                },
                "default_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default LLM model for the organization."
                },
                "default_provider_per_service": {
                  "type": "object",
                  "description": "Org-level default provider per service (EVE-569), keyed by service kind.\nEmpty when no org defaults are configured.",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  }
                },
                "effective_research_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The model the research model resolves to now: the selection, else the\nAutomatic pick (Anthropic's recommended research model, then OpenAI's,\nthen another provider's), else the default model."
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (org_<32-hex-chars>)"
                },
                "monthly_agent_limit": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Maximum agents this organization can create per UTC calendar month.\nBuilt-in agents do not count; archiving or deleting never refunds.",
                  "maximum": 100000,
                  "minimum": 1
                },
                "monthly_session_limit": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Maximum sessions this organization can create per UTC calendar month.",
                  "maximum": 100000,
                  "minimum": 1
                },
                "name": {
                  "type": "string",
                  "description": "Display name"
                },
                "onboarding_completed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the org's creator finished or skipped the setup wizard. `null` means\nonboarding is still incomplete, which the UI uses to resume the user at\n`/orgs/{id}/setup`. Seeded/default and externally-synced orgs are complete."
                },
                "quality_monitoring": {
                  "$ref": "#/components/schemas/QualityMonitoringPolicy",
                  "description": "Opt-in system-managed compaction monitoring. Disabled by default."
                },
                "research_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Research model: the org's strongest model for hard reasoning and long\nresearch. None means Automatic."
                },
                "self_healing": {
                  "$ref": "#/components/schemas/SelfHealingPolicy",
                  "description": "What Everruns does on its own when a finding opens (Settings →\nLimits): pause a repeating schedule automatically, and whether the\nInspector suggests changes to agents. Code defaults when the\norganization never set any."
                },
                "small_model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional small chat model, independent of the main chat and decision defaults."
                },
                "system_decisions": {
                  "$ref": "#/components/schemas/SystemDecisions",
                  "description": "Who answers deployment-owned decision checks: `deployment` (default)\nor `organization` (the org's default decision model)."
                },
                "tool_approval_policy": {
                  "$ref": "#/components/schemas/OrgToolApprovalPolicy",
                  "description": "Tool approval policy (Settings → Approvals): which approval modes\npeople and agents may use, rules for every agent, and the trust notes\nthe auto reviewer reads. Empty when the organization set no limits."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the organization was last updated"
                },
                "web_search_defaults": {
                  "$ref": "#/components/schemas/WebSearchDefaults",
                  "description": "Web search defaults: the provider agents on \"Organization default\"\nuse, the Automatic order, whether model provider search is allowed,\nthe fallback, results per search and blocked domains. Built-in\ndefaults (Automatic) when the organization never set any."
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_SecretInfo": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Secret entry info (name and timestamps only, no value)",
              "required": [
                "name",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "binding": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SecretBinding",
                      "description": "Where the value may be sent, for a bound (write-only) secret."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "When the secret was created"
                },
                "name": {
                  "type": "string",
                  "description": "The secret name"
                },
                "updated_at": {
                  "type": "string",
                  "description": "When the secret was last updated"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Skill": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Skill entity (API response type)",
              "required": [
                "id",
                "name",
                "description",
                "source_type",
                "status",
                "version",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "allowed_tools": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Comma-separated list of tool patterns this skill may invoke. `None` means inherit from the harness."
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when this skill was archived, if any (RFC 3339). Archived skills are hidden from default list views."
                },
                "compatibility": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Compatibility marker describing host-runtime requirements declared by the skill (e.g. min platform version). Informational."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this skill was created (RFC 3339)."
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when this skill was hard-deleted, if any (RFC 3339)."
                },
                "description": {
                  "type": "string",
                  "description": "Short, agent- and user-readable summary of what the skill does and when to use it.",
                  "example": "Extract text and tables from PDF files."
                },
                "disable_model_invocation": {
                  "type": "boolean",
                  "description": "When `true`, the LLM is prevented from auto-invoking this skill; only the user can trigger it explicitly."
                },
                "id": {
                  "type": "string",
                  "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                  "example": "skill_01933b5a00007000800000000000001"
                },
                "license": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "License string as declared by the skill author (e.g. `MIT`, `Apache-2.0`). Informational; not enforced."
                },
                "metadata": {
                  "type": "object",
                  "description": "Free-form metadata declared by the skill author.",
                  "additionalProperties": {},
                  "propertyNames": {
                    "type": "string"
                  }
                },
                "name": {
                  "type": "string",
                  "description": "Stable kebab-case slug used to invoke the skill (e.g. `/pdf-processing` in chat). Safe to render in user-facing messages.",
                  "example": "pdf-processing"
                },
                "source_type": {
                  "$ref": "#/components/schemas/SkillSourceType",
                  "description": "How the skill content is sourced (filesystem, URL, embedded). Determines reload semantics."
                },
                "status": {
                  "$ref": "#/components/schemas/SkillStatus",
                  "description": "Current lifecycle status (`active`, `archived`, `deleted`)."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this skill was last updated (RFC 3339)."
                },
                "user_invocable": {
                  "type": "boolean",
                  "description": "Whether this skill appears as a `/`-prefixed slash command for end users in chat UIs."
                },
                "version": {
                  "type": "string",
                  "description": "Semver string declared by the skill author. Free-form; sorted lexicographically when comparing."
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_TaskWebhookResponse": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A configured outbound webhook target.",
              "required": [
                "id",
                "url",
                "enabled",
                "has_secret",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Whether this webhook is enabled."
                },
                "has_secret": {
                  "type": "boolean",
                  "description": "Whether a signing secret is configured (the secret itself is never returned)."
                },
                "id": {
                  "type": "string",
                  "description": "Public identifier (wh_<32-hex-chars>)."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "url": {
                  "type": "string",
                  "description": "Target URL that receives POST requests."
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_TraceScore": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One score produced by an observer scorer for one trace slice. Linked back\nto the exact session/turn it graded; agent/harness identifiers are\ndenormalized at scoring time for aggregation.",
              "required": [
                "id",
                "observer_id",
                "scorer_key",
                "session_id",
                "turn_id",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "agent_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Agent active in the session at scoring time."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Error details if errored."
                },
                "evidence_ref": {
                  "description": "Bounded runtime metadata and source-event references for system checks."
                },
                "harness_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Harness of the session."
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (score_<32-hex>). Shown as \"id\" in API.",
                  "example": "score_01933b5a000070008000000000000001"
                },
                "judge_cost_usd": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "format": "double",
                  "description": "Judge call cost in USD when the provider reports it (llm_judge only)."
                },
                "judge_input_tokens": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Judge LLM input tokens (llm_judge scores only).",
                  "minimum": 0
                },
                "judge_output_tokens": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Judge LLM output tokens (llm_judge scores only).",
                  "minimum": 0
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional categorical label from an LLM judge (e.g. `missing_source`)."
                },
                "observer_id": {
                  "type": "string",
                  "description": "Observer that produced this score.",
                  "example": "observer_01933b5a000070008000000000000001"
                },
                "pass": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the scorer passed (set when completed)."
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable explanation (set when completed). For LLM judges this is\nthe judge's reasoning — retained as the raw material for the Phase 2\nimprovement loop."
                },
                "review": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ScoreReview",
                      "description": "A person's review of this score."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scope": {
                  "$ref": "#/components/schemas/ObserverScope",
                  "description": "Trace slice this score grades."
                },
                "scorer_key": {
                  "type": "string",
                  "description": "Scorer key within the observer.",
                  "example": "grounded"
                },
                "session_id": {
                  "type": "string",
                  "description": "Session this score grades.",
                  "example": "session_01933b5a000070008000000000000001"
                },
                "status": {
                  "$ref": "#/components/schemas/TraceScoreStatus"
                },
                "turn_id": {
                  "type": "string",
                  "description": "What was graded: the turn id (turn scope), `session` (session scope)\nor the tool call id (tool scope)."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "value": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "format": "double",
                  "description": "Score value 0.0–1.0 (set when completed).",
                  "example": 0.85
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_User": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "User response for listing",
              "required": [
                "id",
                "email",
                "name",
                "roles",
                "created_at"
              ],
              "properties": {
                "auth_provider": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "avatar_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this resource was created (RFC 3339)."
                },
                "email": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
                },
                "name": {
                  "type": "string",
                  "description": "Human-readable name. Safe to render in user-facing messages."
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_App": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "App configuration for deploying agents to channels.\nAn app binds a harness and optional agent to distribution channels with a\npublish lifecycle.",
                  "required": [
                    "id",
                    "name",
                    "harness_id",
                    "owner_principal_id",
                    "status",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "agent_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Optional ID of the agent to use (format: agent_{32-hex}).",
                      "example": "agent_01933b5a00007000800000000000001"
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when the app was archived."
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AgentChannel"
                      },
                      "description": "Distribution channels attached to this app."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when the app was created."
                    },
                    "deleted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when the app was deleted."
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable description of what the app does."
                    },
                    "effective_owner": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/PrincipalSummary",
                          "description": "Effective human owner summary."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "harness_id": {
                      "type": "string",
                      "description": "ID of the harness to use (format: harness_{32-hex}).",
                      "example": "harness_01933b5a00007000800000000000001"
                    },
                    "id": {
                      "type": "string",
                      "description": "External identifier (app_<32-hex>). Shown as \"id\" in API.",
                      "example": "app_01933b5a000070008000000000000001"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the app."
                    },
                    "owner": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/PrincipalSummary",
                          "description": "Owning principal summary."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "owner_principal_id": {
                      "type": "string",
                      "description": "Owning principal for this app.",
                      "example": "principal_01933b5a000070008000000000000001"
                    },
                    "published_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when the app was last published."
                    },
                    "resolved_owner_user_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Denormalized effective human owner of the owning principal lineage."
                    },
                    "status": {
                      "$ref": "#/components/schemas/AppStatus",
                      "description": "Current lifecycle status."
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when the app was last updated."
                    },
                    "virtual_user_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Optional virtual identity that represents the app in unattended/channel execution.",
                      "example": "identity_01933b5a00007000800000000000001"
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_DeclarativeCapability": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "Persisted, org-scoped declarative capability — a YAML/JSON-defined\nbundle of skills, files, and tool defs that an agent or harness can\nreference by `capability_id` or name.",
                  "required": [
                    "id",
                    "capability_id",
                    "name",
                    "description",
                    "status",
                    "definition",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when this resource was archived, if any (RFC 3339)."
                    },
                    "capability_id": {
                      "type": "string",
                      "description": "Runtime capability reference. Agents and harnesses may use this or the plain unique name.",
                      "example": "declarative:research_pack"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this resource was created (RFC 3339)."
                    },
                    "definition": {
                      "type": "object",
                      "description": "Declarative capability payload: system prompt, skills, starter files, MCP servers, and metadata."
                    },
                    "definition_error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the stored definition could not be parsed, when it could not be.\n\nPresent only for a corrupt row. The capability keeps its identity\ncolumns so a surface can name what is broken, but `definition` is the\ninert default and `definition.status` reports `retired`, so nothing\nreads it as a usable capability.",
                      "example": "missing field `acts_as` at line 1 column 84"
                    },
                    "deleted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when this resource was soft-deleted, if any (RFC 3339)."
                    },
                    "description": {
                      "type": "string",
                      "description": "Short summary shown in pickers, search results, and API listings.",
                      "example": "Adds research instructions, starter files, and MCP tools."
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-facing label shown in the UI. Defaults to `name` when omitted.",
                      "example": "Research Pack"
                    },
                    "id": {
                      "type": "string",
                      "description": "Public resource ID for this persisted declarative capability.",
                      "example": "cap_01933b5a000070008000000000000001"
                    },
                    "name": {
                      "type": "string",
                      "description": "Stable unique name used in capability refs. Lowercase letters, numbers, and underscores.",
                      "example": "research_pack"
                    },
                    "status": {
                      "type": "string",
                      "description": "Lifecycle state for the resource: active, disabled, archived, or deleted.",
                      "example": "active"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this resource was last updated (RFC 3339)."
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_McpServer": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "MCP Server configuration.\nRepresents a remote MCP server that can provide tools and resources.",
                  "required": [
                    "id",
                    "name",
                    "url",
                    "transport_type",
                    "status",
                    "api_key_set",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "api_key_set": {
                      "type": "boolean",
                      "description": "Whether an API key has been configured."
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when the MCP server was archived."
                    },
                    "auth_mode": {
                      "$ref": "#/components/schemas/McpServerAuthMode",
                      "description": "Authentication mode for this MCP server."
                    },
                    "connection_check": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/McpConnectionCheck",
                          "description": "Whether this OAuth preset's sign-in service was reachable when it was\nlast checked. Present only on OAuth presets."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when the MCP server was created."
                    },
                    "deleted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when the MCP server was deleted."
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable description of the MCP server.",
                      "example": "Atlassian MCP Server for Jira and Confluence"
                    },
                    "elicitation_policy": {
                      "$ref": "#/components/schemas/McpElicitationPolicy",
                      "description": "Which elicitation modes this server may use (`url` by default)."
                    },
                    "headers": {
                      "type": "object",
                      "description": "Additional HTTP headers for authentication.\nKeys are header names, values are header values.",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string",
                      "description": "Unique identifier for the MCP server.",
                      "example": "mcp_01933b5a00007000800000000000001"
                    },
                    "interactive_views": {
                      "$ref": "#/components/schemas/McpInteractiveViews",
                      "description": "Where this server's MCP App views are shown: `on` (console and a\npicture in Slack), `console_only`, or `off`."
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the MCP server.",
                      "example": "atlassian-mcp-server"
                    },
                    "oauth_provider_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Stable provider id used for user-scoped OAuth connections."
                    },
                    "presentation": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/McpServerPresentation",
                          "description": "Title, icon, and links published by the remote server.\nThe operator `name` and `description` are unchanged."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "protocol_mode": {
                      "$ref": "#/components/schemas/McpProtocolMode",
                      "description": "Protocol-era adoption policy for the MCP client (`auto` negotiates)."
                    },
                    "service_connection_provider": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Connection provider whose connection on an agent's service virtual user\nsupplies the service credential instead of an MCP OAuth grant.",
                      "example": "github"
                    },
                    "status": {
                      "$ref": "#/components/schemas/McpServerStatus",
                      "description": "Current lifecycle status of the MCP server."
                    },
                    "tool_timeout_ms": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int64",
                      "description": "How long one tool call may take, in milliseconds. Absent means the\n60000 default.",
                      "example": 300000,
                      "minimum": 0
                    },
                    "transport_type": {
                      "$ref": "#/components/schemas/McpServerTransportType",
                      "description": "Transport type (currently only HTTP supported)."
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when the MCP server was last updated."
                    },
                    "url": {
                      "type": "string",
                      "description": "URL of the MCP server endpoint.",
                      "example": "https://mcp.atlassian.com/v1/mcp"
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_Model": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "LLM Model entity",
                  "required": [
                    "id",
                    "provider_id",
                    "model_id",
                    "profile_key",
                    "service",
                    "display_name",
                    "capabilities",
                    "is_favorite",
                    "enabled",
                    "source",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "capabilities": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Capability tags supported by this model (e.g. `chat`, `tools`, `vision`)."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this model was created (RFC 3339)."
                    },
                    "display_name": {
                      "type": "string",
                      "description": "Human-readable display name. Safe to render in user-facing messages."
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether this model is selectable. Controls UI visibility AND server-side resolution: `ProviderResolverService` requires `enabled = true`, and org default-model validation rejects disabled models. Disabled models stay visible in raw list endpoints (so admins can re-enable them) but cannot be used in active sessions or as a session/agent default."
                    },
                    "id": {
                      "type": "string",
                      "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                      "example": "model_01933b5a00007000800000000000001"
                    },
                    "is_favorite": {
                      "type": "boolean",
                      "description": "Whether this model is starred in the UI for quick access."
                    },
                    "model_id": {
                      "type": "string",
                      "description": "Provider-side model identifier as sent on the wire (e.g. `gpt-5.2`, `claude-sonnet-5`)."
                    },
                    "profile_key": {
                      "type": "string",
                      "description": "Stable assigned profile identity."
                    },
                    "provider_id": {
                      "type": "string",
                      "description": "Owning provider's prefixed public identifier.",
                      "example": "provider_01933b5a00007000800000000000001"
                    },
                    "service": {
                      "$ref": "#/components/schemas/ServiceKind",
                      "description": "The typed service selected by this model."
                    },
                    "source": {
                      "$ref": "#/components/schemas/ModelSource",
                      "description": "How this model entry was added (manually, discovered, or seeded as predefined)."
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this model was last updated (RFC 3339)."
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_ModelWithProvider": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "LLM Model with provider info",
                  "required": [
                    "id",
                    "provider_id",
                    "model_id",
                    "profile_key",
                    "service",
                    "display_name",
                    "capabilities",
                    "is_favorite",
                    "enabled",
                    "source",
                    "created_at",
                    "updated_at",
                    "provider_name",
                    "provider_type",
                    "healthy"
                  ],
                  "properties": {
                    "capabilities": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Capability tags supported by this model.",
                      "example": [
                        "text",
                        "tools",
                        "vision",
                        "thinking"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this model was created (RFC 3339).",
                      "example": "2026-01-04T11:23:00Z"
                    },
                    "display_name": {
                      "type": "string",
                      "description": "Human-readable display name.",
                      "example": "Claude Sonnet 5.5"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether this model is selectable. Controls UI visibility AND server-side resolution: `ProviderResolverService` requires `enabled = true`, and org default-model validation rejects disabled models.",
                      "example": true
                    },
                    "healthy": {
                      "type": "boolean",
                      "description": "Derived: model is configured and ready for use. Currently means the\njoined provider is active and has an API key set; over time this may\nalso incorporate live reachability checks. Not persisted.",
                      "example": true
                    },
                    "id": {
                      "type": "string",
                      "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                      "example": "model_01933b5a00007000800000000000001"
                    },
                    "is_favorite": {
                      "type": "boolean",
                      "description": "Whether this model is starred in the UI for quick access.",
                      "example": true
                    },
                    "is_new": {
                      "type": "boolean",
                      "description": "Derived: a discovered model that is still disabled and appeared after\nthe provider's models were last reviewed. Not persisted."
                    },
                    "model_id": {
                      "type": "string",
                      "description": "Provider-side model identifier as sent on the wire (e.g. `gpt-5.2`).",
                      "example": "claude-sonnet-5-5"
                    },
                    "model_vendor": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ModelVendor",
                          "description": "Vendor/brand of the model, derived from the model registry. Drives UI\nbranding (icons). `None` when the model id is not in the registry. Not persisted."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "profile": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ModelProfile",
                          "description": "Readonly profile with model capabilities (limits, pricing, modalities). Not persisted."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "profile_key": {
                      "type": "string",
                      "description": "Stable assigned profile identity."
                    },
                    "provider_id": {
                      "type": "string",
                      "description": "Owning provider's prefixed public identifier.",
                      "example": "provider_01933b5a00007000800000000000001"
                    },
                    "provider_name": {
                      "type": "string",
                      "description": "Joined provider display name.",
                      "example": "Anthropic"
                    },
                    "provider_type": {
                      "$ref": "#/components/schemas/DriverId",
                      "description": "Joined provider implementation type."
                    },
                    "service": {
                      "$ref": "#/components/schemas/ServiceKind",
                      "description": "The typed service selected by this model."
                    },
                    "source": {
                      "$ref": "#/components/schemas/ModelSource",
                      "description": "How this model entry was added (manually, discovered, or seeded as predefined)."
                    },
                    "stale": {
                      "type": "boolean",
                      "description": "Derived: a discovered model the provider no longer lists (not seen in\nits most recent sync). Kept, not deleted, so defaults and agents that\nuse it can be fixed first. Not persisted."
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this model was last updated (RFC 3339).",
                      "example": "2026-05-27T15:24:00Z"
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_Provider": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "LLM Provider entity (API keys never exposed)\nThis is the persisted provider entity, separate from the runtime provider trait.",
                  "required": [
                    "id",
                    "name",
                    "provider_type",
                    "api_key_set",
                    "status",
                    "managed",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "api": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Chat API declared by the provider driver; \"default\" restores its default."
                    },
                    "api_key_set": {
                      "type": "boolean",
                      "description": "Whether an API key is configured. The key itself is never returned."
                    },
                    "base_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Custom base URL for self-hosted / proxied providers. `None` means use the provider's default endpoint."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this provider was created (RFC 3339)."
                    },
                    "id": {
                      "type": "string",
                      "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                      "example": "provider_01933b5a00007000800000000000001"
                    },
                    "last_synced_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp of the most recent successful model sync from the provider's API (RFC 3339)."
                    },
                    "managed": {
                      "type": "boolean",
                      "description": "Whether this provider is host-managed (EVE-810). A managed provider is\nprovisioned by the host/embedder; the OSS API rejects tenant PATCH/DELETE\non it (403). Read-only to org admins. Defaults to `false`."
                    },
                    "models_reviewed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When someone last reviewed this provider's discovered models (RFC 3339).\nA discovered model created later that is still disabled is reported as\n`is_new` on the model. `None` means never reviewed."
                    },
                    "name": {
                      "type": "string",
                      "description": "Human-readable provider name. Safe to render in user-facing messages."
                    },
                    "provider_type": {
                      "$ref": "#/components/schemas/DriverId",
                      "description": "Provider implementation type (OpenAI, Anthropic, Gemini, etc.)."
                    },
                    "request_options": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ProviderRequestOptions",
                          "description": "Extra headers and diagnostics options applied to every request sent to\nthis provider. `None` when the org configured nothing."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "$ref": "#/components/schemas/ProviderStatus",
                      "description": "Current lifecycle status of this provider."
                    },
                    "trace": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ProviderTraceConfig",
                          "description": "Resolved trace/observability link configuration: the driver's default\ntemplates overlaid with this provider's stored overrides. `None` when the\ndriver exposes no dashboard and the org configured nothing."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this provider was last updated (RFC 3339)."
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_ResourceWithCounts_Harness": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "description": "Harness configuration for sessions.\nA harness defines the base behavior and capabilities that apply to all sessions.",
                      "required": [
                        "id",
                        "name",
                        "status",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "archived_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Timestamp when the harness was archived.",
                          "example": "2026-05-26T00:00:00Z"
                        },
                        "capabilities": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AgentCapabilityConfig"
                          },
                          "description": "Capabilities enabled for this harness with per-harness configuration."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp when the harness was created.",
                          "example": "2026-04-01T10:00:00Z"
                        },
                        "default_model_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Default LLM model ID for this harness.\nLowest priority in chain: controls > session > agent > harness.",
                          "example": "model_01933b5a00007000800000000000001"
                        },
                        "deleted_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Timestamp when the harness was deleted.",
                          "example": "2026-05-26T00:00:00Z"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Human-readable description of what the harness does.",
                          "example": "Default harness with file-system + secrets capabilities; safe baseline for new agents."
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Human-readable display name shown in UI.",
                          "example": "Conversation"
                        },
                        "embedder_metadata": {
                          "type": "object",
                          "description": "Arbitrary key-value metadata injected into LLM requests for observability.\nKeys from system context (session_id, org_id, etc.) always take precedence.",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "propertyNames": {
                            "type": "string"
                          },
                          "example": {
                            "env": "production",
                            "team": "platform"
                          }
                        },
                        "icon": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display glyph name rendered by the UI (e.g. \"message-circle\").\n\nBuilt-in harnesses declare it in their definition; custom harnesses\nleave it unset and fall back to the UI's generic harness glyph.",
                          "example": "message-circle"
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique identifier for the harness (format: harness_{32-hex}).",
                          "example": "harness_01933b5a00007000800000000000001"
                        },
                        "initial_files": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/InitialFile"
                          },
                          "description": "Starter files copied into each new session for this harness."
                        },
                        "is_built_in": {
                          "type": "boolean",
                          "description": "Whether this harness is built-in (system-managed, readonly).\nBuilt-in harnesses are provisioned during org initialization and\ncannot be modified or deleted via the API. Users can copy them.",
                          "example": false
                        },
                        "localizations": {
                          "$ref": "#/components/schemas/EntityLocalizations",
                          "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
                        },
                        "mcpServers": {
                          "$ref": "#/components/schemas/BTreeMap",
                          "description": "Remote MCP servers scoped to this harness and inherited by descendant layers."
                        },
                        "name": {
                          "type": "string",
                          "description": "Name, unique per org (e.g. \"conversation\").",
                          "example": "conversation"
                        },
                        "network_access": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/NetworkAccessList",
                              "description": "Network access list controlling which hosts/URLs sessions can reach.\nMerged with agent and session layers (allowed: intersect, blocked: union)."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parallel_tool_calls": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                          "example": true
                        },
                        "parent_harness_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Optional parent harness that this harness inherits from.",
                          "example": "harness_01933b5a000070008000000000000602"
                        },
                        "status": {
                          "$ref": "#/components/schemas/HarnessStatus",
                          "description": "Current lifecycle status of the harness."
                        },
                        "system_prompt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "System prompt that defines the harness's base behavior.\n\nForms the foundation of the prompt stack. Optional: when absent the\nharness contributes no base prompt, so the effective prompt comes\nentirely from the parent harness (if any), the agent, the session, and\ncapability contributions. Empty/whitespace-only values normalize to\n`None`.",
                          "example": "You are an Everruns agent. Be concise, cite sources when possible, and decline tasks outside your assigned scope."
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Tags for organizing and filtering harnesses.",
                          "example": [
                            "baseline",
                            "production"
                          ]
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp when the harness was last updated.",
                          "example": "2026-05-20T14:00:00Z"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "session_count",
                        "app_count"
                      ],
                      "properties": {
                        "app_count": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Number of non-deleted apps using this resource.",
                          "minimum": 0
                        },
                        "session_count": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Number of sessions using this resource.",
                          "minimum": 0
                        }
                      }
                    }
                  ],
                  "description": "Wrapper that flattens lightweight relationship counts into resource responses."
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_WithUrls_Skill": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "Skill entity (API response type)",
                  "required": [
                    "id",
                    "name",
                    "description",
                    "source_type",
                    "status",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "allowed_tools": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comma-separated list of tool patterns this skill may invoke. `None` means inherit from the harness."
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when this skill was archived, if any (RFC 3339). Archived skills are hidden from default list views."
                    },
                    "compatibility": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Compatibility marker describing host-runtime requirements declared by the skill (e.g. min platform version). Informational."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this skill was created (RFC 3339)."
                    },
                    "deleted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when this skill was hard-deleted, if any (RFC 3339)."
                    },
                    "description": {
                      "type": "string",
                      "description": "Short, agent- and user-readable summary of what the skill does and when to use it.",
                      "example": "Extract text and tables from PDF files."
                    },
                    "disable_model_invocation": {
                      "type": "boolean",
                      "description": "When `true`, the LLM is prevented from auto-invoking this skill; only the user can trigger it explicitly."
                    },
                    "id": {
                      "type": "string",
                      "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                      "example": "skill_01933b5a00007000800000000000001"
                    },
                    "license": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "License string as declared by the skill author (e.g. `MIT`, `Apache-2.0`). Informational; not enforced."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Free-form metadata declared by the skill author.",
                      "additionalProperties": {},
                      "propertyNames": {
                        "type": "string"
                      }
                    },
                    "name": {
                      "type": "string",
                      "description": "Stable kebab-case slug used to invoke the skill (e.g. `/pdf-processing` in chat). Safe to render in user-facing messages.",
                      "example": "pdf-processing"
                    },
                    "source_type": {
                      "$ref": "#/components/schemas/SkillSourceType",
                      "description": "How the skill content is sourced (filesystem, URL, embedded). Determines reload semantics."
                    },
                    "status": {
                      "$ref": "#/components/schemas/SkillStatus",
                      "description": "Current lifecycle status (`active`, `archived`, `deleted`)."
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when this skill was last updated (RFC 3339)."
                    },
                    "user_invocable": {
                      "type": "boolean",
                      "description": "Whether this skill appears as a `/`-prefixed slash command for end users in chat UIs."
                    },
                    "version": {
                      "type": "string",
                      "description": "Semver string declared by the skill author. Free-form; sorted lexicographically when comparing."
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListResponse_Workspace": {
        "type": "object",
        "description": "Response wrapper for list endpoints.\nAll list endpoints return responses wrapped in a `data` field.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "Shared workspace for the Q4 research project"
                },
                "id": {
                  "type": "string",
                  "example": "wsp_01933b5a000070008000000000000001"
                },
                "name": {
                  "type": "string",
                  "example": "team-research"
                },
                "status": {
                  "type": "string",
                  "example": "active"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          }
        }
      },
      "ListSchedulesQuery": {
        "type": "object",
        "description": "Query parameters for `GET /v1/schedules` — optional enabled/target-type\nfilters plus standard offset/limit paging.",
        "properties": {
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Filter by enabled status",
            "example": true
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Pagination limit (default: 20, max: 100)",
            "example": 20,
            "minimum": 0
          },
          "offset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Pagination offset",
            "example": 0,
            "minimum": 0
          },
          "target_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Filter by target type (\"workflow\" or \"activity\")",
            "example": "activity"
          }
        }
      },
      "ListUsersQuery": {
        "type": "object",
        "description": "Query parameters for listing users",
        "properties": {
          "search": {
            "type": [
              "string",
              "null"
            ],
            "description": "Search query to filter by name or email"
          }
        }
      },
      "ListWorkspacesQuery": {
        "type": "object",
        "properties": {
          "include_archived": {
            "type": "boolean"
          },
          "search": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LlmCompactionInfo": {
        "type": "object",
        "description": "Information about context compaction performed before LLM generation\n\nWhen the conversation context exceeds the model's limit, compaction is\nautomatically triggered to compress the context before retrying.",
        "required": [
          "compacted"
        ],
        "properties": {
          "compacted": {
            "type": "boolean",
            "description": "Whether compaction was performed"
          },
          "cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Provider-reported cost of the compaction call itself, in USD.\n\nAttribution only: the native call has its own `llm.generation` usage\nrecord. Consumers must not add this amount to the main call again."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Duration of the compaction operation in milliseconds",
            "minimum": 0
          },
          "estimated_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Price-table estimate for the native compaction call, kept distinct from\nauthoritative provider cost and used in effective spend when it is absent."
          },
          "input_tokens_after": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of input tokens after compaction",
            "minimum": 0
          },
          "input_tokens_before": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of input tokens before compaction",
            "minimum": 0
          }
        }
      },
      "LlmCostComponent": {
        "type": "object",
        "description": "One billable component of a generation.",
        "required": [
          "kind",
          "name"
        ],
        "properties": {
          "cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "USD amount. `None` is an explicit unknown amount, not zero.",
            "example": 0.02
          },
          "kind": {
            "type": "string",
            "description": "What is billed: `model_tokens`, `hosted_tool`, or `container`.",
            "example": "hosted_tool"
          },
          "name": {
            "type": "string",
            "description": "Which one, e.g. the model or the provider item type\n(`web_search_call`).",
            "example": "web_search_call"
          },
          "quantity": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Billed units (tokens, calls), when known.",
            "example": 2,
            "minimum": 0
          }
        }
      },
      "LlmGenerationData": {
        "type": "object",
        "description": "Data for llm.generation event\n\nEmitted after each LLM API call to provide full visibility into\nthe messages sent to the model and the response received.",
        "required": [
          "messages",
          "output",
          "metadata"
        ],
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuntimeMessage"
            },
            "description": "Messages sent to the LLM (including system prompt)"
          },
          "metadata": {
            "$ref": "#/components/schemas/LlmGenerationMetadata",
            "description": "Metadata about the generation"
          },
          "output": {
            "$ref": "#/components/schemas/LlmGenerationOutput",
            "description": "Output from the LLM"
          },
          "request_body": {
            "type": [
              "object",
              "null"
            ],
            "description": "The request body exactly as the driver serialized it for the\nprovider, when the driver captures it (see\n[`crate::driver_registry::LlmCallConfig::capture_request`]).\n\n`messages` above is the runtime's view of the prompt; this is the\nprovider's: its roles, its content blocks, its tool schemas and cache\nmarkers. Absent for drivers that do not capture.\n\nTHREAT[TM-LLM-039]: the body repeats the prompt `messages` already\ncarries, so it widens nothing beyond this event's existing audience.\nCredentials travel in headers and are never part of it."
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDefinitionSummary"
            },
            "description": "Tools available to the LLM for this generation"
          }
        }
      },
      "LlmGenerationMetadata": {
        "type": "object",
        "description": "Metadata about an LLM generation",
        "required": [
          "model",
          "success"
        ],
        "properties": {
          "compaction": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LlmCompactionInfo",
                "description": "Compaction information if context was compressed before generation\nOccurs when the conversation context exceeded the model's limit"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LlmCostComponent"
            },
            "description": "Billable components of this generation and what each cost, when the\ngeneration bills more than its tokens (provider-run tools, hosted\ncontainers, a managed harness). A component whose `cost_usd` is `None`\nis an explicit unknown amount, never a zero: budgets debit the priced\ncomponents and record the unknown ones (EVE-1125). Empty for an\nordinary token-billed generation."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Duration of the generation in milliseconds",
            "example": 1842,
            "minimum": 0
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if generation failed",
            "example": "provider returned 503"
          },
          "finish_reasons": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Finish reasons from the LLM (e.g., [\"stop\"], [\"tool_calls\"])\nRequired for gen-ai semantic conventions",
            "example": [
              "tool_calls"
            ]
          },
          "model": {
            "type": "string",
            "description": "Model identifier used for generation",
            "example": "claude-sonnet-4-6"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider type (openai, anthropic, etc.)",
            "example": "anthropic"
          },
          "provider_finish_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider's own finish/stop reason, verbatim (`max_tokens`,\n`MAX_TOKENS`, `max_output_tokens`, ...). `finish_reasons` carries the\nnormalized value; this keeps the provider vocabulary it came from.",
            "example": "max_tokens"
          },
          "provider_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider account that served the call: the id of the org's\nprovider row (`provider_...`) when the host resolves models from\nstored providers. Usage tracking reads it to record which provider row\nwas billed and whether that row is host-managed, which is what tells\nmanaged spend apart from the org's own keys (BYOK).",
            "example": "provider_01933b5a00007000800000000000001"
          },
          "request_options": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LlmRequestOptions",
                "description": "Request-side driver options that were enabled for this generation."
              },
              {
                "type": "null"
              }
            ]
          },
          "response_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique response identifier from the LLM provider\nRequired for gen-ai semantic conventions",
            "example": "msg_01ABCDef0123456789"
          },
          "response_model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model the provider reported actually serving the request.\n\n`model` is what was *asked for*, which is routinely an alias that\nresolves at request time — `claude-sonnet-4-6` served by\n`claude-sonnet-4-6-20260217`, or an OpenRouter route landing on one\nupstream of several. Collapsing the two loses the only record of which\nweights produced the answer, which is what a regression in output\nquality has to be correlated against.\n\n`None` when the provider reported no model, which is the honest answer:\nconsumers fall back to `model` rather than being told the alias was\nconfirmed.",
            "example": "claude-sonnet-4-6-20260217"
          },
          "retry": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LlmRetryInfo",
                "description": "Retry information if rate limit retries occurred\nContains number of retries and total wait time"
              },
              {
                "type": "null"
              }
            ]
          },
          "success": {
            "type": "boolean",
            "description": "Whether the generation was successful",
            "example": true
          },
          "time_to_first_token_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Time to first token in milliseconds (streaming latency)",
            "example": 312,
            "minimum": 0
          },
          "tool_calls_dropped": {
            "type": "integer",
            "format": "int32",
            "description": "Tool calls the model started that the driver discarded because the\nresponse was cut off or rejected. Omitted when zero.",
            "example": 1,
            "minimum": 0
          },
          "tool_calls_truncated_executed": {
            "type": "integer",
            "format": "int32",
            "description": "Tool calls handed on for execution from a response that was cut off.\nTheir own arguments are complete: a call whose arguments were cut off\nor do not parse is dropped (`tool_calls_dropped`), never run with `{}`.\nOmitted when zero.",
            "example": 1,
            "minimum": 0
          },
          "tool_changes": {
            "type": [
              "object",
              "null"
            ],
            "description": "Tool change recorded for this generation: the baseline tool list when\nit started an epoch, or what was added, redefined or removed since\n(see [`crate::tool_changes`]). Omitted when the tools did not change."
          },
          "truncation_gate": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the output-truncation gate did because this generation lost tool\ncalls (`finish_reason` `length`, or arguments that did not parse):\n`retried` (the model was told and the turn ran another generation) or\n`failed` (the turn ended with an error). Omitted when the gate did not\nact.",
            "example": "retried"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Token usage statistics"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LlmGenerationOutput": {
        "type": "object",
        "description": "LLM generation output",
        "properties": {
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text response from the model"
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolCall"
            },
            "description": "Tool calls requested by the model"
          }
        }
      },
      "LlmJudgeConfig": {
        "type": "object",
        "description": "LLM-as-judge scoring configuration. The judge grades the scoped trace\nslice against `rubric` and returns a 0.0–1.0 value, an optional\ncategorical label, and free-text reasoning.",
        "required": [
          "rubric"
        ],
        "properties": {
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Org model to judge with. When `None`, the org's default model is used.\nJudge calls go through the org's own providers and are billed to it."
          },
          "pass_threshold": {
            "type": "number",
            "format": "double",
            "description": "Score value at/above which `pass` is true."
          },
          "rubric": {
            "type": "string",
            "description": "Grading rubric shown to the judge model. Should describe what a high\nvs. low score means."
          }
        }
      },
      "LlmPromptCacheInfo": {
        "type": "object",
        "description": "Request-side prompt cache settings for an LLM generation.",
        "required": [
          "enabled",
          "strategy"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether prompt caching was enabled on the request."
          },
          "provider_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-specific prompt-cache mode used by the driver."
          },
          "retention": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cache retention the driver requested after snapping to what the\nprovider supports (`5m`, `30m`, `1h`). Absent when the provider's\nretention is not configurable."
          },
          "strategy": {
            "$ref": "#/components/schemas/PromptCacheStrategy",
            "description": "Strategy used to enable prompt caching."
          }
        }
      },
      "LlmRequestOptions": {
        "type": "object",
        "description": "Request options applied to an LLM generation.\n\nThese fields capture request-side intent such as prompt caching or deferred\ntool loading. They complement `usage`, which captures what actually happened.",
        "properties": {
          "max_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum output tokens requested, when set.",
            "minimum": 0
          },
          "metadata": {
            "type": "object",
            "description": "General request metadata passed to the LLM provider for tracking and observability.\nIncludes embedder-supplied labels merged with system tracking keys (session_id, turn_id, etc.).",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "prompt_cache": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LlmPromptCacheInfo",
                "description": "Prompt caching configuration for this request."
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_options": {
            "type": "object",
            "description": "Provider-specific request options that do not warrant dedicated fields.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "reasoning_effort": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reasoning / thinking effort level requested, as the string sent to the\nprovider (`low`, `medium`, `high`, ...), when set."
          },
          "stream": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the request used the provider's streaming mode."
          },
          "temperature": {
            "type": [
              "number",
              "null"
            ],
            "format": "float",
            "description": "Sampling temperature sent with the request, when set."
          },
          "tool_search": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LlmToolSearchInfo",
                "description": "Deferred tool-loading configuration for this request."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LlmRetryInfo": {
        "type": "object",
        "description": "Information about rate limit retries during LLM generation",
        "required": [
          "attempts",
          "total_wait_ms"
        ],
        "properties": {
          "attempts": {
            "type": "integer",
            "format": "int32",
            "description": "Number of retry attempts made (0 = succeeded on first try)",
            "minimum": 0
          },
          "total_wait_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Total time spent waiting between retries in milliseconds",
            "minimum": 0
          }
        }
      },
      "LlmToolSearchInfo": {
        "type": "object",
        "description": "Request-side tool_search settings for an LLM generation.",
        "required": [
          "enabled",
          "threshold"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether tool_search was enabled on the request."
          },
          "threshold": {
            "type": "integer",
            "description": "Minimum number of tools before deferred loading activates.",
            "minimum": 0
          }
        }
      },
      "LogQuery": {
        "type": "object",
        "description": "Query for log endpoint",
        "properties": {
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Max commits to return (default: 50)",
            "example": 50,
            "minimum": 0
          },
          "ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Ref to start from (default: HEAD)",
            "example": "HEAD"
          }
        }
      },
      "LoginResponse": {
        "type": "object",
        "description": "Browser destination for a newly created, bounded loopback login attempt.",
        "required": [
          "authorize_url"
        ],
        "properties": {
          "authorize_url": {
            "type": "string",
            "description": "Open this returned URL unchanged; it contains the attempt's PKCE, state, and nonce.",
            "example": "https://auth.openai.com/oauth/authorize?client_id=app_example"
          }
        }
      },
      "LoopLimits": {
        "type": "object",
        "description": "Loop limits in force in one room.",
        "required": [
          "max_hops",
          "max_wakes_per_agent_hour",
          "max_agent_posts_hour"
        ],
        "properties": {
          "max_agent_posts_hour": {
            "type": "integer",
            "format": "int64",
            "description": "Agent posts in one room per hour."
          },
          "max_hops": {
            "type": "integer",
            "format": "int32",
            "description": "Agent posts in a row before agents stop being woken."
          },
          "max_wakes_per_agent_hour": {
            "type": "integer",
            "format": "int64",
            "description": "Wakes of one agent in one room per hour."
          }
        }
      },
      "ManageSessionSandboxRequest": {
        "type": "object",
        "description": "Request body for the `manage_session_sandbox` operation.",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/SessionSandboxAction",
            "description": "Action to take on the sandbox (`reset`, `delete`, etc.)."
          }
        }
      },
      "ManageSessionSandboxResponse": {
        "type": "object",
        "description": "Response body for the `manage_session_sandbox` operation.",
        "required": [
          "action",
          "exists",
          "deleted"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/SessionSandboxAction",
            "description": "Action that was taken."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the action deleted the sandbox (`true` after a successful `delete`)."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable sandbox label."
          },
          "exists": {
            "type": "boolean",
            "description": "Whether a sandbox instance still exists after the action."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-side sandbox identifier."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sandbox provider (`daytona`, `e2b`, `docker`, etc.)."
          },
          "session_status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SessionSandboxStatusValue",
                "description": "Current sandbox lifecycle status after the action."
              },
              {
                "type": "null"
              }
            ]
          },
          "workspace_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute path of the sandbox workspace root."
          }
        }
      },
      "ManagedCredential": {
        "type": "object",
        "description": "Credential metadata for an authorized owner. Secret values are never included.",
        "required": [
          "id",
          "label",
          "kind",
          "scope",
          "configured",
          "revision"
        ],
        "properties": {
          "binding": {
            "description": "HTTP destination and injection metadata, without the credential value."
          },
          "configured": {
            "type": "boolean",
            "description": "Whether a stored value or connection reference is provisioned; does not imply current access."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Absolute credential expiry in UTC, if configured."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable credential binding identifier."
          },
          "kind": {
            "type": "string",
            "description": "Binding kind identifying HTTP or MCP parameter injection."
          },
          "label": {
            "type": "string",
            "description": "Human-readable label shown in Credentials settings and consent requests."
          },
          "last_used_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Actual responding agent at the most recent use, if recorded."
          },
          "last_used_agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the most recently recorded responding agent."
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Most recent authorized use, if any."
          },
          "mcp_server_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact MCP endpoint for an MCP parameter binding."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTP reference name, used as `$NAME`; absent for MCP-only bindings."
          },
          "parameter_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Top-level MCP parameter receiving the injected value."
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Current revision required for value replacement or credential revocation."
          },
          "scope": {
            "type": "string",
            "description": "Ownership scope; runtime authorization is evaluated separately."
          },
          "source_connection_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Native connection supplying credentials without copying its tokens into this binding."
          },
          "tool_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact MCP tool receiving the injected parameter."
          }
        }
      },
      "ManagedResourceGrant": {
        "type": "object",
        "description": "Metadata for an explicit resource use grant, without credential values.",
        "required": [
          "id",
          "consumer_scope",
          "usage"
        ],
        "properties": {
          "constraints": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResourceConstraints",
                "description": "Additional access bounds applied alongside the resource's native restrictions."
              },
              {
                "type": "null"
              }
            ]
          },
          "consumer_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Consumer identifier; absent for an organization-wide service grant."
          },
          "consumer_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable consumer name, when available."
          },
          "consumer_scope": {
            "$ref": "#/components/schemas/ResourceScope",
            "description": "Scope of the consumer authorized by this grant."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Absolute grant expiry in UTC, if configured."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable grant identifier used for revocation."
          },
          "usage": {
            "$ref": "#/components/schemas/CredentialUsage",
            "description": "Required invocation identity for use through this grant."
          }
        }
      },
      "ManagerContext": {
        "type": "object",
        "description": "An entity's manager context.",
        "required": [
          "entity_kind",
          "entity_ref",
          "content",
          "revision"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown, at most 16 KiB. Empty when none was written or it was cleared."
          },
          "entity_kind": {
            "type": "string",
            "example": "agent"
          },
          "entity_ref": {
            "type": "string",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Grows by one per write; 0 when none was ever written. Pass it as\n`--expected-revision` to a context write or `--context-revision` to a\nchange of the entity."
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_by_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The user the last write was made as."
          }
        }
      },
      "Manifest": {
        "type": "object",
        "description": "Authored values only: no organisation, agent, model, harness or channel IDs.",
        "properties": {
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Manifest"
            },
            "description": "Agents bundled with this one, each a complete definition. Folders and\narchives keep them in `.agents/agents/<name>/`; text formats inline them."
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackageCapability"
            },
            "description": "Named capabilities, optionally with configuration; the host validates availability."
          },
          "channels": {
            "type": "object",
            "description": "Named channel descriptions, upserted without removing omitted destination channels.",
            "additionalProperties": {
              "$ref": "#/components/schemas/Channel"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "communication": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Communication",
                "description": "How the agent talks: `direct` (its text is the reply) or `explicit`\n(its text is working notes; it talks through `send_message`).\nOmission means `direct`."
              },
              {
                "type": "null"
              }
            ]
          },
          "completion_check": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CompletionCheck",
                "description": "When a finishing turn gets a completion check: `off`, `unattended`\n(sessions started by triggers and schedules) or `always`. Omission\nmeans `unattended`."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description of the agent's purpose."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable agent label. Defaults to the stable name at the host."
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/File"
            },
            "description": "Starting files or package-relative sources. Sources retain their relative paths."
          },
          "harness": {
            "type": [
              "string",
              "null"
            ],
            "description": "Named harness requirement. Omission uses the host's default harness."
          },
          "instructions": {
            "type": "string",
            "description": "Authored instructions. Legacy system_prompt input is also accepted."
          },
          "instructions_file": {
            "type": [
              "string",
              "null"
            ],
            "description": "Package-relative instructions source. Folder loading defaults to instructions.md."
          },
          "intro_markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional Markdown introduction shown before the conversation starts."
          },
          "localizations": {
            "$ref": "#/components/schemas/EntityLocalizations",
            "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
          },
          "max_iterations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional tool-loop iteration limit. Omission keeps the host default.",
            "minimum": 0
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Ceiling on output tokens per model response. Omission keeps the provider default.",
            "minimum": 0
          },
          "mcpServers": {
            "type": "object",
            "description": "Named scoped MCP definitions. Credential placeholders require explicit host bindings.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ScopedMcpServer"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "members": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Other agents, by name, that this agent can hand work to. Agents bundled\nunder `.agents/agents/` are found without listing them here; an explicit\nempty list turns that discovery off."
          },
          "model": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PackageModel",
                "description": "Provider and model names. Omission uses the host's default model."
              },
              {
                "type": "null"
              }
            ]
          },
          "model_preset": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model preset the agent takes its job models from, by id (`automatic`,\n`provider:gemini` or a custom preset id). Hosts without the preset use\ntheir organization defaults."
          },
          "model_role": {
            "type": [
              "string",
              "null"
            ],
            "description": "Organization model the agent follows instead of `model`, such as\n`research` for the host's research model. Hosts without model roles\nuse their default model."
          },
          "name": {
            "type": "string",
            "description": "Stable agent name used for destination lookup; resource IDs are not portable."
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Optional outbound network policy enforced by the host."
              },
              {
                "type": "null"
              }
            ]
          },
          "parallel_tool_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether independent tool calls may run concurrently. Omission keeps the host default."
          },
          "sandbox_policy": {
            "description": "Platform-specific Sandbox policy. Other hosts must explicitly bind or\nreject it rather than silently discarding execution requirements."
          },
          "schema_version": {
            "type": "integer",
            "format": "int32",
            "description": "Portable format version. Currently 1; omitted values default to 1.",
            "minimum": 0
          },
          "short_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional short description for agent discovery surfaces."
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Package-relative skill folders including SKILL.md and supporting assets."
          },
          "starters": {
            "type": "array",
            "items": {},
            "description": "Suggested opening messages in the platform's starter format."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Discovery tags, compared as an unordered set."
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            },
            "description": "Tool schemas whose executable implementations must be bound by the host."
          }
        },
        "additionalProperties": false
      },
      "ManualFireStatus": {
        "type": "string",
        "description": "What a manual fire did.",
        "enum": [
          "dispatched",
          "filtered",
          "duplicate"
        ]
      },
      "ManualMemorySourceResponse": {
        "type": "object",
        "description": "Response body for manual memory source."
      },
      "ManualTriggerEvent": {
        "type": "object",
        "description": "An event to fire a trigger with, instead of a plain run.\n\nName it raw, as its source sends it (`payload`, with `name` for GitHub and\n`headers` for webhooks), or for a GitHub trigger by reference\n(`repository` and `pull_request`).",
        "properties": {
          "action": {
            "type": [
              "string",
              "null"
            ],
            "description": "GitHub reference: the action the built event carries. Defaults to the\nfirst of opened, synchronize, reopened, ready_for_review the trigger\nlistens to.",
            "example": "synchronize"
          },
          "headers": {
            "type": [
              "object",
              "null"
            ],
            "description": "Request headers a webhook trigger's templates see as `webhook.headers`.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Idempotency key. Defaults to a fresh id, so every manual fire runs;\nrepeat an id the trigger already saw to test deduplication."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Event name: the GitHub event (`pull_request`, `issue_comment`, the\n`X-GitHub-Event` header). For an MCP event trigger it defaults to the\ntrigger's event and must match it.",
            "example": "pull_request"
          },
          "payload": {
            "type": "object",
            "description": "The event as its source sends it: a webhook request body, a GitHub\nevent payload, an MCP event's `data`, or extra context a schedule\ntrigger's message reads as `{{payload.*}}`."
          },
          "pull_request": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "GitHub reference: the pull request number. The server reads it through\nthe agent's GitHub connection and builds a `pull_request` event.",
            "example": 12,
            "minimum": 0
          },
          "repository": {
            "type": [
              "string",
              "null"
            ],
            "description": "GitHub reference: the pull request's repository, `owner/name`.",
            "example": "acme/api"
          }
        },
        "additionalProperties": false
      },
      "McpClientAttribution": {
        "type": "object",
        "required": [
          "client_id",
          "grant_id",
          "client_name"
        ],
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_name": {
            "type": "string",
            "description": "Self-declared registration name, snapshotted at the time of the action."
          },
          "grant_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "McpConnectInChat": {
        "type": "string",
        "description": "Whether a missing sign-in for an agent MCP attachment may pause the turn\nwith an in-chat Connect card.\n\nDecision: `never` exists for agents behind channels that cannot render a\ncard (user MCP servers D5). The call then fails like any other tool error,\nnaming the server and where to connect it, and the turn keeps going. It\nchanges only how a missing grant is reported, never which grant is used.",
        "enum": [
          "ask",
          "never"
        ],
        "example": "ask"
      },
      "McpConnectionCheck": {
        "type": "object",
        "description": "Whether an OAuth preset's sign-in service (discovery and dynamic client\nregistration) works from this deployment. Never carries secrets or raw\nupstream bodies; `host` is shown to admins so they know what to allow.",
        "required": [
          "status"
        ],
        "properties": {
          "checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the check ran; absent when it has not run."
          },
          "host": {
            "type": [
              "string",
              "null"
            ],
            "description": "Host of the request that failed, when the check failed.",
            "example": "mcp.linear.app"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short, safe explanation of a failed check."
          },
          "status": {
            "$ref": "#/components/schemas/McpConnectionCheckStatus",
            "description": "Check outcome."
          }
        }
      },
      "McpConnectionCheckStatus": {
        "type": "string",
        "description": "Outcome of the connection check an OAuth preset gets when it is saved and\non \"Check again\".",
        "enum": [
          "ready",
          "blocked_by_network_policy",
          "unreachable",
          "failed",
          "not_checked"
        ]
      },
      "McpCredentialTarget": {
        "type": "object",
        "description": "Exact MCP endpoint and top-level tool parameter receiving a credential at execution time.",
        "required": [
          "server_name",
          "url",
          "tool_name",
          "parameter_name"
        ],
        "properties": {
          "parameter_name": {
            "type": "string",
            "description": "Top-level parameter name; dotted nested paths are rejected."
          },
          "server_name": {
            "type": "string",
            "description": "Attached MCP server name used to identify the target."
          },
          "tool_name": {
            "type": "string",
            "description": "Exact tool name within the attached server."
          },
          "url": {
            "type": "string",
            "description": "Exact HTTPS MCP endpoint; arbitrary destinations cannot receive the value."
          }
        },
        "additionalProperties": false
      },
      "McpElicitationPolicy": {
        "type": "string",
        "description": "Which MCP elicitation modes the client declares to one server.\n\nAn operator decision on the server record, never a per-call negotiation and\nnever something the model can widen. Under MRTR a server must not ask for an\ninput type the client did not declare, so this is what stops a configured\nserver from putting questions in front of a person.\n\nTHREAT[TM-TOOL-045]: form mode is opt-in per server. The default keeps the\nbehaviour every existing deployment already had, and it is omitted from\nserialized config so stored records stay byte-identical.",
        "enum": [
          "url",
          "url_and_form",
          "none"
        ],
        "example": "url"
      },
      "McpErrorCategory": {
        "type": "string",
        "description": "Broad-strokes routing hint sitting alongside the precise [`McpErrorCode`].\nThe categories are stable enough that an LLM can pick a recovery\nstrategy from this field alone (e.g. retry transients with backoff,\nsurface validation errors to the user, escalate auth failures).",
        "enum": [
          "transient",
          "permanent",
          "validation",
          "auth",
          "unknown"
        ]
      },
      "McpErrorCode": {
        "type": "string",
        "description": "Closed vocabulary of error codes for Everruns' own MCP `tools/call`\nexecute path. Surfaces in [`McpExecuteError::code`] so LLM toolcallers\ncan branch on a machine-readable value instead of regexing prose.\n\nNew variants are a spec change. SDKs should treat any value they don't\nrecognise as `unknown` (forward-compat) — serde's `#[serde(other)]`\ncatch-all enables that on the deserialize side.",
        "enum": [
          "tool_not_found",
          "tool_timeout",
          "tool_panicked",
          "invalid_arguments",
          "permission_denied",
          "insufficient_scope",
          "quota_exceeded",
          "network_blocked",
          "mcp_server_unreachable",
          "internal",
          "unknown"
        ]
      },
      "McpExecuteError": {
        "type": "object",
        "description": "Typed structured-error envelope returned by Everruns' MCP `tools/call`\nexecute path. Serialized into the MCP `structuredContent` field on\nerror responses so the legacy `content[0].text` channel stays\nbackward-compatible; new SDKs prefer the typed envelope.",
        "required": [
          "code",
          "message",
          "category",
          "retryable"
        ],
        "properties": {
          "category": {
            "$ref": "#/components/schemas/McpErrorCategory",
            "description": "Broad-strokes recovery category."
          },
          "cause_chain": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Chain of upstream error messages, oldest cause first. Useful for\ndebugging; SDKs should not treat this as machine-readable."
          },
          "code": {
            "$ref": "#/components/schemas/McpErrorCode",
            "description": "Machine-readable error code. Closed vocabulary; SDKs that see an\nunrecognised value should map it to `unknown`."
          },
          "hint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short, agent-readable recovery hint. Free-form; one or two sentences."
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message. Mirrors the legacy\n`content[0].text` string for backward compat."
          },
          "retry_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Seconds the caller should wait before retrying. Set on\n`tool_timeout`, `quota_exceeded`, and upstream-unreachable cases\nwhen the server has a concrete back-off hint.",
            "minimum": 0
          },
          "retryable": {
            "type": "boolean",
            "description": "`true` when the same call is worth retrying. Distinct from\n`category == \"transient\"` because a server may know about a\nnon-transient retry path (e.g. a transient `Internal`)."
          }
        }
      },
      "McpInteractiveViews": {
        "type": "string",
        "description": "Where an organization MCP server's views are shown. A display preference:\nhosted runtimes always tell servers they can render views, so turning views\noff never changes what a tool returns to the model.",
        "enum": [
          "on",
          "console_only",
          "off"
        ],
        "example": "on"
      },
      "McpProtocolMode": {
        "type": "string",
        "description": "Per-server policy for which MCP protocol era the client uses.\n\n`Auto` (the default) probes the server and adapts — it tries the stateless\n`2026-07-28` path first and transparently falls back to the stateful\nhandshake when a server demands it, so a single configuration speaks to\nevery era without operator action. The pinned variants skip negotiation when\nan operator knows a server's era (or to work around a server that\nmis-signals it).\n\nWire values are the version dates. The pre-release names (`legacy`,\n`stable`, `rc`) stay accepted as deserialization aliases so stored config\nkeeps loading, but they are no longer emitted.",
        "enum": [
          "auto",
          "2025-03-26",
          "2025-06-18",
          "2026-07-28"
        ],
        "example": "auto"
      },
      "McpServer": {
        "type": "object",
        "description": "MCP Server configuration.\nRepresents a remote MCP server that can provide tools and resources.",
        "required": [
          "id",
          "name",
          "url",
          "transport_type",
          "status",
          "api_key_set",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "api_key_set": {
            "type": "boolean",
            "description": "Whether an API key has been configured."
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the MCP server was archived."
          },
          "auth_mode": {
            "$ref": "#/components/schemas/McpServerAuthMode",
            "description": "Authentication mode for this MCP server."
          },
          "connection_check": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpConnectionCheck",
                "description": "Whether this OAuth preset's sign-in service was reachable when it was\nlast checked. Present only on OAuth presets."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the MCP server was created."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the MCP server was deleted."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description of the MCP server.",
            "example": "Atlassian MCP Server for Jira and Confluence"
          },
          "elicitation_policy": {
            "$ref": "#/components/schemas/McpElicitationPolicy",
            "description": "Which elicitation modes this server may use (`url` by default)."
          },
          "headers": {
            "type": "object",
            "description": "Additional HTTP headers for authentication.\nKeys are header names, values are header values.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "id": {
            "type": "string",
            "description": "Unique identifier for the MCP server.",
            "example": "mcp_01933b5a00007000800000000000001"
          },
          "interactive_views": {
            "$ref": "#/components/schemas/McpInteractiveViews",
            "description": "Where this server's MCP App views are shown: `on` (console and a\npicture in Slack), `console_only`, or `off`."
          },
          "name": {
            "type": "string",
            "description": "Display name of the MCP server.",
            "example": "atlassian-mcp-server"
          },
          "oauth_provider_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable provider id used for user-scoped OAuth connections."
          },
          "presentation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerPresentation",
                "description": "Title, icon, and links published by the remote server.\nThe operator `name` and `description` are unchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "protocol_mode": {
            "$ref": "#/components/schemas/McpProtocolMode",
            "description": "Protocol-era adoption policy for the MCP client (`auto` negotiates)."
          },
          "service_connection_provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Connection provider whose connection on an agent's service virtual user\nsupplies the service credential instead of an MCP OAuth grant.",
            "example": "github"
          },
          "status": {
            "$ref": "#/components/schemas/McpServerStatus",
            "description": "Current lifecycle status of the MCP server."
          },
          "tool_timeout_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How long one tool call may take, in milliseconds. Absent means the\n60000 default.",
            "example": 300000,
            "minimum": 0
          },
          "transport_type": {
            "$ref": "#/components/schemas/McpServerTransportType",
            "description": "Transport type (currently only HTTP supported)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the MCP server was last updated."
          },
          "url": {
            "type": "string",
            "description": "URL of the MCP server endpoint.",
            "example": "https://mcp.atlassian.com/v1/mcp"
          }
        }
      },
      "McpServerActsAs": {
        "type": "string",
        "description": "Identity whose OAuth grant a scoped MCP attachment requests.",
        "enum": [
          "none",
          "service",
          "user",
          "user_or_service"
        ],
        "example": "service"
      },
      "McpServerAuthMode": {
        "type": "string",
        "description": "MCP server authentication mode.",
        "enum": [
          "none",
          "api_key",
          "oauth",
          "session_token"
        ],
        "example": "api_key"
      },
      "McpServerCatalogEntry": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WithUrls_McpServer",
            "description": "MCP server preset and its resource URLs."
          },
          {
            "type": "object",
            "required": [
              "used_by_agents"
            ],
            "properties": {
              "used_by_agents": {
                "type": "integer",
                "format": "int64",
                "description": "Number of active agents that use this preset.",
                "example": 2
              }
            }
          }
        ],
        "description": "MCP server preset with its active-agent usage count."
      },
      "McpServerCatalogResponse": {
        "type": "object",
        "description": "One page of MCP server catalog entries for the selected organization.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpServerCatalogEntry"
            },
            "description": "MCP server presets in this page.",
            "example": [
              {
                "id": "mcp_01933b5a00007000800000000000001",
                "name": "microsoft_learn",
                "url": "https://learn.microsoft.com/api/mcp",
                "used_by_agents": 2
              }
            ]
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor for the next page, or null when this is the final page.",
            "example": "mcp_01933b5a00007000800000000000001"
          }
        }
      },
      "McpServerIcon": {
        "type": "object",
        "required": [
          "src"
        ],
        "properties": {
          "mime_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "src": {
            "type": "string",
            "description": "`https` URL on the MCP server's origin, or a raster `data:` URI."
          },
          "theme": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerIconTheme"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "McpServerIconTheme": {
        "type": "string",
        "enum": [
          "light",
          "dark"
        ]
      },
      "McpServerPresentation": {
        "type": "object",
        "description": "What the remote server says about itself. Absent fields were not published.",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "documentation_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "fetched_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "icons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpServerIcon"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Which documents contributed. Not shown in the UI."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "example": "GitHub MCP Server"
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "website_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://github.com"
          }
        }
      },
      "McpServerPresetRef": {
        "type": "string",
        "description": "Reference to an organization MCP server catalog entry.",
        "example": "catalog:linear"
      },
      "McpServerStatus": {
        "type": "string",
        "description": "MCP Server lifecycle status.\n- `active`: Server is available for use\n- `disabled`: Server is disabled and not used\n- `archived`: Server is hidden from listings and cannot be modified or assigned\n- `deleted`: Server is a tombstone kept only for historical references",
        "enum": [
          "active",
          "disabled",
          "archived",
          "deleted"
        ],
        "example": "active"
      },
      "McpServerTool": {
        "type": "object",
        "description": "One tool an MCP server offers, with its saved risk label.",
        "required": [
          "name"
        ],
        "properties": {
          "annotations": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpToolAnnotations",
                "description": "Hints the server declares about the tool (read-only, destructive, ...)."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the tool does, as the server describes it."
          },
          "label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpToolLabel",
                "description": "Risk label a person set. It wins over the annotations; null means none."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "The tool's own name on the MCP server.",
            "example": "search_docs"
          },
          "suggested_label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpToolLabel",
                "description": "Suggested label waiting for a person to confirm. Never applied by itself."
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable title the server gives the tool."
          }
        }
      },
      "McpServerTransportType": {
        "type": "string",
        "description": "MCP Server transport type.",
        "enum": [
          "http",
          "stdio"
        ],
        "example": "http"
      },
      "McpServerUsageResponse": {
        "type": "object",
        "description": "Bounded archive-impact summary for an MCP server preset.",
        "required": [
          "agent_names",
          "total_count",
          "truncated"
        ],
        "properties": {
          "agent_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of active agents that use the preset, up to the response limit.",
            "example": [
              "Docs agent",
              "Research agent"
            ]
          },
          "total_count": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of active agents that use the preset.",
            "example": 2
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether additional agent names were omitted from the bounded list.",
            "example": false
          }
        }
      },
      "McpToolAnnotations": {
        "type": "object",
        "description": "MCP tool annotations as defined by the MCP specification.\nAll fields are optional booleans following the MCP convention.",
        "properties": {
          "destructiveHint": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "idempotentHint": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "openWorldHint": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "readOnlyHint": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "McpToolLabel": {
        "type": "string",
        "description": "A person's saved risk label for one MCP tool.\n\nDecision (2026-10-10): a person's label always wins over the tool's own\nannotations, because a remote server describes itself and a person who\nowns the integration knows better. `read_only` also clears `open_world`,\nsince tool approval treats an outward-reaching tool like a destructive one;\nwithout that a read-only MCP tool would still ask every time.",
        "enum": [
          "read_only",
          "changes"
        ]
      },
      "Memory": {
        "type": "object",
        "description": "Response body for memory.",
        "required": [
          "id",
          "name",
          "scope",
          "source_type",
          "source",
          "is_readonly",
          "sync_status",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this resource was archived, if any (RFC 3339).",
            "example": "2026-05-26T00:00:00Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339).",
            "example": "2026-04-01T10:00:00Z"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this resource was soft-deleted, if any (RFC 3339).",
            "example": "2026-05-26T00:00:00Z"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Living design documents synced from GitHub"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "mem_01933b5a000070008000000000000001"
          },
          "is_readonly": {
            "type": "boolean",
            "description": "Whether the memory is mounted read-only into sessions. Read-only memories accept no writes from the session sandbox.",
            "example": false
          },
          "last_sync_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Most recent sync error message; cleared on the next successful sync.",
            "example": "ssh: connect to host github.com port 22: Connection timed out"
          },
          "last_synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the most recent successful sync (RFC 3339). `None` if never synced.",
            "example": "2026-05-25T08:00:00Z"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "design-docs"
          },
          "owner_agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Owning agent when `scope = agent`.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "owner_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Owning user when `scope = user`."
          },
          "scope": {
            "type": "string",
            "description": "Ownership scope (`org`, `agent`, or `user`).",
            "example": "org"
          },
          "source": {
            "$ref": "#/components/schemas/MemorySourceResponse",
            "description": "Source-specific configuration (git remote, github repo, manual upload)."
          },
          "source_type": {
            "type": "string",
            "description": "Source kind discriminator (`manual`, `git`, `github`). Determines which `source` variant is populated.",
            "example": "github"
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle status.",
            "example": "active"
          },
          "sync_status": {
            "type": "string",
            "description": "Current sync status (`idle`, `syncing`, `succeeded`, `failed`). Only meaningful when `source_type` is `git` or `github`.",
            "example": "succeeded"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was last updated (RFC 3339).",
            "example": "2026-05-25T08:00:00Z"
          }
        }
      },
      "MemoryFile": {
        "type": "object",
        "required": [
          "path",
          "content",
          "encoding",
          "size_bytes",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "Text or base64-encoded content; check `encoding`."
          },
          "content_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "encoding": {
            "type": "string",
            "description": "\"text\" or \"base64\"."
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MemoryFileInfo": {
        "type": "object",
        "required": [
          "path",
          "is_directory",
          "size_bytes",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "content_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_directory": {
            "type": "boolean"
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MemoryGrepResult": {
        "type": "object",
        "required": [
          "path",
          "size_bytes"
        ],
        "properties": {
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "MemorySourceResponse": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ManualMemorySourceResponse"
              },
              {
                "type": "object",
                "required": [
                  "provider"
                ],
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "manual"
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/GitHubMemorySourceResponse"
              },
              {
                "type": "object",
                "required": [
                  "provider"
                ],
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "github"
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/GitMemorySourceResponse"
              },
              {
                "type": "object",
                "required": [
                  "provider"
                ],
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "git"
                    ]
                  }
                }
              }
            ]
          }
        ],
        "description": "Response body for memory source."
      },
      "Message": {
        "type": "object",
        "description": "Message - primary conversation data (API response)",
        "required": [
          "id",
          "session_id",
          "sequence",
          "role",
          "content",
          "created_at"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentPart"
            },
            "description": "Array of content parts.\n\nReasoning artifacts appear here as `reasoning` parts, in the order the\nprovider emitted them, with opaque replay state (signatures, encrypted\npayloads) stripped."
          },
          "controls": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Controls",
                "description": "Runtime controls (model, reasoning, etc.)"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "delivery": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageDelivery",
                "description": "How a message just created was delivered. Only set on the response to\ncreating a message; absent when listing."
              },
              {
                "type": "null"
              }
            ]
          },
          "external_actor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExternalActor",
                "description": "External actor identity (for messages from external channels like Slack)"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "Unique message ID (format: message_{32-hex})",
            "example": "message_01933b5a00007000800000000000001"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Message-level metadata (locale, etc.)",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "phase": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExecutionPhase",
                "description": "Execution phase for agent messages: whether this is intermediate\n`commentary` or the turn's `final_answer`. Absent on user messages.\n\nWithout this a client cannot tell an intermediate message from the\nanswer, which is the single question most consumers of a session need\nanswered."
              },
              {
                "type": "null"
              }
            ]
          },
          "phase_source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PhaseSource",
                "description": "Whether `phase` was reported by the provider or inferred by the runtime\nfrom tool-call presence.\n\n`derived` is a weak signal: it means only \"this message called tools\",\nso a text-only preamble is reported as `final_answer`. Clients needing a\ndependable classification should treat `derived` accordingly."
              },
              {
                "type": "null"
              }
            ]
          },
          "role": {
            "$ref": "#/components/schemas/MessageRole"
          },
          "sequence": {
            "type": "integer",
            "format": "int32"
          },
          "session_id": {
            "type": "string",
            "description": "Session ID this message belongs to (format: session_{32-hex})",
            "example": "session_01933b5a00007000800000000000001"
          }
        }
      },
      "MessageDelivery": {
        "type": "string",
        "description": "How a created user message reached the session's turn.",
        "enum": [
          "started",
          "steered",
          "resumed",
          "duplicate"
        ]
      },
      "MessageFeedback": {
        "type": "object",
        "description": "The caller's rating of one message.",
        "required": [
          "message_id",
          "updated_at"
        ],
        "properties": {
          "comment": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional note kept with the rating."
          },
          "message_id": {
            "type": "string",
            "description": "Message the rating is for (`msg_...`).",
            "example": "msg_01933b5a00007000800000000000001"
          },
          "rating": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageRating",
                "description": "`good`, `bad`, or null when the rating was cleared."
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the rating was last set or cleared."
          }
        }
      },
      "MessageRating": {
        "type": "string",
        "description": "A person's verdict on one message.",
        "enum": [
          "good",
          "bad"
        ]
      },
      "MessageReactionData": {
        "type": "object",
        "description": "Data for `message.reaction.added` and `message.reaction.removed`.",
        "required": [
          "message_id",
          "emoji",
          "actor"
        ],
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/ReactionActor"
          },
          "emoji": {
            "type": "string",
            "description": "One Unicode emoji, or a platform custom emoji as `:name:`.",
            "example": "👍"
          },
          "message_id": {
            "type": "string",
            "description": "Message the reaction is on (`message_...`).",
            "example": "message_01933b5a00007000800000000000001"
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the reaction was made: `console`, `api`, `work_chat`, `agent`,\n`slack`, `ag_ui`, `a2a`."
          }
        }
      },
      "MessageReactions": {
        "type": "object",
        "description": "The reactions on one message.",
        "required": [
          "message_id",
          "reactions"
        ],
        "properties": {
          "author": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who wrote the message: `user` (a user-role message) or `agent`.",
            "example": "agent"
          },
          "message_id": {
            "type": "string",
            "example": "message_01933b5a00007000800000000000001"
          },
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReactionSummary"
            }
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Position of the message in the session's event log, which places it in\na turn of the trace. Absent when the message is no longer stored."
          }
        }
      },
      "MessageRole": {
        "type": "string",
        "description": "Message role (API layer)\n\nSimplified to only user and agent messages.\nTool results are conveyed via `tool.completed` events.\nSystem messages are internal and not exposed via API.",
        "enum": [
          "user",
          "agent"
        ]
      },
      "MetricsPoint": {
        "type": "object",
        "description": "Single metrics data point",
        "required": [
          "timestamp",
          "running_workflows",
          "pending_workflows",
          "pending_tasks",
          "claimed_tasks",
          "active_workers",
          "load_percentage",
          "dlq_size",
          "tasks_completed_total",
          "tasks_failed_total",
          "tasks_started_total",
          "workflows_completed_total",
          "workflows_failed_total",
          "workflows_started_total"
        ],
        "properties": {
          "active_workers": {
            "type": "integer",
            "description": "Number of workers actively heartbeating (gauge).",
            "example": 4,
            "minimum": 0
          },
          "claimed_tasks": {
            "type": "integer",
            "description": "Number of tasks currently claimed by a worker (gauge).",
            "example": 28,
            "minimum": 0
          },
          "dlq_size": {
            "type": "integer",
            "description": "Size of the dead-letter queue (gauge).",
            "example": 3,
            "minimum": 0
          },
          "load_percentage": {
            "type": "number",
            "format": "double",
            "description": "Aggregate worker load as a percentage of total `max_concurrency` (0.0-100.0).",
            "example": 62.5
          },
          "pending_tasks": {
            "type": "integer",
            "description": "Number of tasks waiting to be claimed by a worker (gauge).",
            "example": 12,
            "minimum": 0
          },
          "pending_workflows": {
            "type": "integer",
            "description": "Number of workflows waiting to be claimed by a worker (gauge).",
            "example": 7,
            "minimum": 0
          },
          "running_workflows": {
            "type": "integer",
            "description": "Number of workflows currently executing (gauge).",
            "example": 42,
            "minimum": 0
          },
          "tasks_completed_total": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative count of tasks completed successfully since process start (monotonic counter).",
            "example": 12843,
            "minimum": 0
          },
          "tasks_failed_total": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative count of tasks that failed or were sent to the DLQ (monotonic counter).",
            "example": 17,
            "minimum": 0
          },
          "tasks_started_total": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative count of tasks claimed at least once (monotonic counter).",
            "example": 12873,
            "minimum": 0
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Sampling timestamp for this data point (RFC 3339).",
            "example": "2026-05-27T15:30:00Z"
          },
          "workflows_completed_total": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative count of workflows that completed successfully (monotonic counter).",
            "example": 982,
            "minimum": 0
          },
          "workflows_failed_total": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative count of workflows that ended in failure (monotonic counter).",
            "example": 3,
            "minimum": 0
          },
          "workflows_started_total": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative count of workflows that started (monotonic counter).",
            "example": 1024,
            "minimum": 0
          }
        }
      },
      "MetricsTimeSeriesResponse": {
        "type": "object",
        "description": "Metrics time series response.\n\nIn multi-instance deployments, each instance maintains its own metrics\nring buffer. The `instance_count` field indicates how many instances\nare expected so consumers can aggregate or label appropriately.",
        "required": [
          "points",
          "resolution_seconds"
        ],
        "properties": {
          "instance_count": {
            "type": "integer",
            "format": "int32",
            "description": "Number of expected control-plane instances (from EXPECTED_INSTANCES env).\nWhen >1, these metrics represent only this instance's view.",
            "minimum": 0
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsPoint"
            }
          },
          "resolution_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "Modality": {
        "type": "string",
        "description": "Modality type (text, image, audio, video)",
        "enum": [
          "text",
          "image",
          "audio",
          "video",
          "pdf"
        ]
      },
      "Model": {
        "type": "object",
        "description": "LLM Model entity",
        "required": [
          "id",
          "provider_id",
          "model_id",
          "profile_key",
          "service",
          "display_name",
          "capabilities",
          "is_favorite",
          "enabled",
          "source",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Capability tags supported by this model (e.g. `chat`, `tools`, `vision`)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this model was created (RFC 3339)."
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable display name. Safe to render in user-facing messages."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether this model is selectable. Controls UI visibility AND server-side resolution: `ProviderResolverService` requires `enabled = true`, and org default-model validation rejects disabled models. Disabled models stay visible in raw list endpoints (so admins can re-enable them) but cannot be used in active sessions or as a session/agent default."
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "model_01933b5a00007000800000000000001"
          },
          "is_favorite": {
            "type": "boolean",
            "description": "Whether this model is starred in the UI for quick access."
          },
          "model_id": {
            "type": "string",
            "description": "Provider-side model identifier as sent on the wire (e.g. `gpt-5.2`, `claude-sonnet-5`)."
          },
          "profile_key": {
            "type": "string",
            "description": "Stable assigned profile identity."
          },
          "provider_id": {
            "type": "string",
            "description": "Owning provider's prefixed public identifier.",
            "example": "provider_01933b5a00007000800000000000001"
          },
          "service": {
            "$ref": "#/components/schemas/ServiceKind",
            "description": "The typed service selected by this model."
          },
          "source": {
            "$ref": "#/components/schemas/ModelSource",
            "description": "How this model entry was added (manually, discovered, or seeded as predefined)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this model was last updated (RFC 3339)."
          }
        }
      },
      "ModelCost": {
        "type": "object",
        "description": "Cost information for the model (per million tokens)",
        "required": [
          "input",
          "output"
        ],
        "properties": {
          "cache_read": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Cached read cost per million tokens (USD), if supported"
          },
          "cache_write": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Cache write cost per million tokens (USD); absent falls back to input."
          },
          "cost_tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostTier"
            },
            "description": "Tiered pricing that applies when prompt tokens exceed context thresholds.\nWhen present, the highest matching tier replaces the base rates for the\nwhole request."
          },
          "input": {
            "type": "number",
            "format": "double",
            "description": "Input cost per million tokens (USD)"
          },
          "output": {
            "type": "number",
            "format": "double",
            "description": "Output cost per million tokens (USD)"
          }
        }
      },
      "ModelJob": {
        "type": "string",
        "description": "A job a preset assigns a model to.",
        "enum": [
          "default",
          "chat",
          "coding",
          "research",
          "small",
          "decision"
        ]
      },
      "ModelLimits": {
        "type": "object",
        "description": "Token limits for the model",
        "required": [
          "context",
          "output"
        ],
        "properties": {
          "context": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum context window size in tokens"
          },
          "input": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum input tokens (if different from context - output)"
          },
          "max_media": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum images or PDF pages per request"
          },
          "output": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum output tokens"
          }
        }
      },
      "ModelMetadata": {
        "type": "object",
        "description": "Metadata about the model used for generation",
        "required": [
          "model"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model name (e.g., \"gpt-5.6-sol\", \"claude-sonnet-5\")"
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Model ID (internal identifier)"
          },
          "provider_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Provider ID (internal identifier)"
          }
        }
      },
      "ModelModalities": {
        "type": "object",
        "description": "Model modalities for input and output",
        "required": [
          "input",
          "output"
        ],
        "properties": {
          "input": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modality"
            },
            "description": "Supported input modalities"
          },
          "output": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Modality"
            },
            "description": "Supported output modalities"
          }
        }
      },
      "ModelPreset": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ModelPresetJobs",
            "description": "The model for each job."
          },
          {
            "type": "object",
            "required": [
              "id",
              "name",
              "kind",
              "read_only",
              "agent_count"
            ],
            "properties": {
              "agent_count": {
                "type": "integer",
                "format": "int64",
                "description": "Live agents whose models come from this preset."
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the custom preset was created; absent for built-ins."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the preset is for."
              },
              "fallback_jobs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ModelJob"
                },
                "description": "Jobs of a provider preset whose curated model is not usable in the\norganization and that use the provider's next recommended model."
              },
              "id": {
                "type": "string",
                "description": "Stable id: `automatic`, `provider:<driver>` or the custom preset's key.",
                "example": "provider:gemini"
              },
              "kind": {
                "$ref": "#/components/schemas/ModelPresetKind",
                "description": "Where the preset comes from: automatic, provider or custom."
              },
              "name": {
                "type": "string",
                "description": "Display name."
              },
              "provider_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Driver of a provider preset (`gemini`)."
              },
              "read_only": {
                "type": "boolean",
                "description": "Built-in presets cannot be changed; duplicate one to customize it."
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the custom preset last changed; absent for built-ins."
              }
            }
          }
        ],
        "description": "A named set of models, one per job."
      },
      "ModelPresetJobs": {
        "type": "object",
        "description": "The model for each job. A missing job uses the organization default for it.",
        "properties": {
          "chat_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for the built-in Everruns Chat."
          },
          "coding_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for coding-harness agents and coding helpers."
          },
          "decision_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for quick gate checks and the Auto helper pick."
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for agents and sessions with no model of their own."
          },
          "research_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for research-role agents and deep helpers."
          },
          "small_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for titles, summaries and fast helpers."
          }
        }
      },
      "ModelPresetKind": {
        "type": "string",
        "description": "Where a preset comes from.",
        "enum": [
          "automatic",
          "provider",
          "custom"
        ]
      },
      "ModelProfile": {
        "type": "object",
        "description": "LLM Model Profile describing model capabilities\nBased on models.dev structure (<https://models.dev/api.json>)\n\nThe registry of profiles lives in `crate::model_profile_data::profiles`; retired models are\ndropped from it as vendors sunset them.",
        "required": [
          "name",
          "family",
          "attachment",
          "reasoning",
          "temperature",
          "tool_call",
          "structured_output",
          "open_weights"
        ],
        "properties": {
          "attachment": {
            "type": "boolean",
            "description": "Whether the model supports file/image attachments"
          },
          "cost": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelCost",
                "description": "Cost per million tokens"
              },
              {
                "type": "null"
              }
            ]
          },
          "decisions": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecisionModelProfile",
                "description": "Typed semantics when this profile describes a decision model."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short human-readable description of the model's strengths and intended use"
          },
          "family": {
            "type": "string",
            "description": "Model family (e.g., \"gpt-5.6-sol\", \"claude-sonnet-5\")"
          },
          "images": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ImageModelProfile",
                "description": "What the model makes when this profile describes an image model."
              },
              {
                "type": "null"
              }
            ]
          },
          "knowledge": {
            "type": [
              "string",
              "null"
            ],
            "description": "Knowledge cutoff date (YYYY-MM-DD format)"
          },
          "last_updated": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last updated date (YYYY-MM-DD format)"
          },
          "limits": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelLimits",
                "description": "Token limits"
              },
              {
                "type": "null"
              }
            ]
          },
          "modalities": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelModalities",
                "description": "Supported modalities"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_card_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The vendor's model card or system card for this model: capabilities,\nevaluations, safety testing and known limits, in the vendor's words."
          },
          "name": {
            "type": "string",
            "description": "Display name of the model"
          },
          "open_weights": {
            "type": "boolean",
            "description": "Whether the model has open weights"
          },
          "reasoning": {
            "type": "boolean",
            "description": "Whether the model has reasoning/chain-of-thought capabilities"
          },
          "reasoning_effort": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffortConfig",
                "description": "Reasoning effort configuration (for reasoning models)"
              },
              {
                "type": "null"
              }
            ]
          },
          "release_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Release date (YYYY-MM-DD format)"
          },
          "speed": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SpeedConfig",
                "description": "Speed (service tier) configuration, for models served with\nselectable latency/price tiers (OpenAI `service_tier`)."
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "type": "boolean",
            "description": "Whether the model supports structured output (JSON mode)"
          },
          "supported_parameters": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Provider-advertised request parameters supported by this model."
          },
          "supports_phases": {
            "type": "boolean",
            "description": "Whether the model supports native execution phases (\"commentary\" / \"final_answer\").\nWhen true, the driver sends the `phase` field on assistant messages in the wire format.\nCurrently supported by GPT-5.4 and newer via OpenAI Responses API."
          },
          "supports_server_compaction": {
            "type": "boolean",
            "description": "Whether the direct provider API supports threshold server-side compaction.\n\nThis is an explicit rollout control. Unknown models and provider\nsurfaces that do not opt in remain disabled."
          },
          "temperature": {
            "type": "boolean",
            "description": "Whether temperature control is supported"
          },
          "tool_call": {
            "type": "boolean",
            "description": "Whether the model supports tool/function calling"
          },
          "tool_search": {
            "type": "boolean",
            "description": "Whether the model supports tool_search (deferred tool loading).\nWhen true, the driver can use namespaces and defer_loading to reduce\ntoken usage for large tool sets. Currently supported by GPT-5.4 and newer."
          },
          "verbosity": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerbosityConfig",
                "description": "Verbosity configuration, for models that expose output-length\ncontrol (OpenAI `verbosity`)."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ModelProfileResponse": {
        "type": "object",
        "description": "Read-only model behavior, independent from the credentials of a serving account.",
        "required": [
          "key",
          "service",
          "source",
          "profile"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "Stable profile identity, including a vendor or custom-account namespace."
          },
          "profile": {
            "$ref": "#/components/schemas/ModelProfile",
            "description": "Capabilities, decision semantics, limits and pricing for this model."
          },
          "service": {
            "$ref": "#/components/schemas/ServiceKind",
            "description": "Model service described by the profile."
          },
          "source": {
            "type": "string",
            "description": "Profile origin: curated, discovered, predefined or manual."
          },
          "vendor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelVendor",
                "description": "Model developer, when known; this may differ from the serving provider."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ModelSelectionChange": {
        "type": "object",
        "description": "A reviewed model enablement change with the provider and state the user saw.",
        "required": [
          "id",
          "provider_id",
          "expected_enabled",
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "expected_enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "provider_id": {
            "type": "string"
          }
        }
      },
      "ModelSelectionReceipt": {
        "type": "object",
        "description": "The saved before and after values and revisions of a model selection change.",
        "required": [
          "id",
          "from_revision",
          "revision",
          "before",
          "after",
          "label"
        ],
        "properties": {
          "after": {
            "type": "boolean"
          },
          "before": {
            "type": "boolean"
          },
          "from_revision": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ModelSource": {
        "type": "string",
        "description": "How the model was added to the system",
        "enum": [
          "manual",
          "discovered",
          "predefined"
        ],
        "example": "predefined"
      },
      "ModelVendor": {
        "type": "string",
        "description": "Vendor / brand that authored a model. Independent of the provider type\nthat serves it (the same model may be offered by several providers or\ngateways). Primarily drives UI iconography.",
        "enum": [
          "openai",
          "anthropic",
          "google",
          "nvidia",
          "qwen",
          "microsoft",
          "meta",
          "minimax",
          "mistral",
          "moonshot",
          "typesafe",
          "xai",
          "llmsim"
        ]
      },
      "ModelWithProvider": {
        "type": "object",
        "description": "LLM Model with provider info",
        "required": [
          "id",
          "provider_id",
          "model_id",
          "profile_key",
          "service",
          "display_name",
          "capabilities",
          "is_favorite",
          "enabled",
          "source",
          "created_at",
          "updated_at",
          "provider_name",
          "provider_type",
          "healthy"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Capability tags supported by this model.",
            "example": [
              "text",
              "tools",
              "vision",
              "thinking"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this model was created (RFC 3339).",
            "example": "2026-01-04T11:23:00Z"
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable display name.",
            "example": "Claude Sonnet 5.5"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether this model is selectable. Controls UI visibility AND server-side resolution: `ProviderResolverService` requires `enabled = true`, and org default-model validation rejects disabled models.",
            "example": true
          },
          "healthy": {
            "type": "boolean",
            "description": "Derived: model is configured and ready for use. Currently means the\njoined provider is active and has an API key set; over time this may\nalso incorporate live reachability checks. Not persisted.",
            "example": true
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "model_01933b5a00007000800000000000001"
          },
          "is_favorite": {
            "type": "boolean",
            "description": "Whether this model is starred in the UI for quick access.",
            "example": true
          },
          "is_new": {
            "type": "boolean",
            "description": "Derived: a discovered model that is still disabled and appeared after\nthe provider's models were last reviewed. Not persisted."
          },
          "model_id": {
            "type": "string",
            "description": "Provider-side model identifier as sent on the wire (e.g. `gpt-5.2`).",
            "example": "claude-sonnet-5-5"
          },
          "model_vendor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelVendor",
                "description": "Vendor/brand of the model, derived from the model registry. Drives UI\nbranding (icons). `None` when the model id is not in the registry. Not persisted."
              },
              {
                "type": "null"
              }
            ]
          },
          "profile": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelProfile",
                "description": "Readonly profile with model capabilities (limits, pricing, modalities). Not persisted."
              },
              {
                "type": "null"
              }
            ]
          },
          "profile_key": {
            "type": "string",
            "description": "Stable assigned profile identity."
          },
          "provider_id": {
            "type": "string",
            "description": "Owning provider's prefixed public identifier.",
            "example": "provider_01933b5a00007000800000000000001"
          },
          "provider_name": {
            "type": "string",
            "description": "Joined provider display name.",
            "example": "Anthropic"
          },
          "provider_type": {
            "$ref": "#/components/schemas/DriverId",
            "description": "Joined provider implementation type."
          },
          "service": {
            "$ref": "#/components/schemas/ServiceKind",
            "description": "The typed service selected by this model."
          },
          "source": {
            "$ref": "#/components/schemas/ModelSource",
            "description": "How this model entry was added (manually, discovered, or seeded as predefined)."
          },
          "stale": {
            "type": "boolean",
            "description": "Derived: a discovered model the provider no longer lists (not seen in\nits most recent sync). Kept, not deleted, so defaults and agents that\nuse it can be fixed first. Not persisted."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this model was last updated (RFC 3339).",
            "example": "2026-05-27T15:24:00Z"
          }
        }
      },
      "MonitoringActor": {
        "type": "object",
        "description": "Session actor ownership, lease validity, and durable progress cursors.",
        "required": [
          "session_id",
          "org_id",
          "session_status",
          "phase",
          "phase_since",
          "lease_state"
        ],
        "properties": {
          "attempts_since_release": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Lease attempts accumulated since the last release.",
            "example": 1
          },
          "cancel_requested_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "UTC cancellation request timestamp; null when cancellation is not requested.",
            "example": "2026-10-14T12:00:02Z"
          },
          "consumed_seq": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Persisted consumed event cursor; its difference from inbox_seq is not a pending-message count.",
            "example": 39
          },
          "fence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Monotonic ownership fence; null when no actor row exists.",
            "example": 17
          },
          "holder": {
            "type": [
              "string",
              "null"
            ],
            "description": "Current recorded holder, or previous holder for an expired lease; null when unleased.",
            "example": "worker-01"
          },
          "inbox_seq": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Durable inbox progress cursor; it is not a message count.",
            "example": 42
          },
          "lease_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "UTC deadline of the recorded lease; null when unleased.",
            "example": "2026-10-14T12:00:10Z"
          },
          "lease_renewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last persisted acquisition or renewal acknowledgement in UTC; null before an acknowledgement or after release.",
            "example": "2026-10-14T12:00:00Z"
          },
          "lease_state": {
            "type": "string",
            "description": "Observed lease validity: held, expired, or unleased.",
            "example": "held"
          },
          "lease_ttl_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Positive interval between renewal acknowledgement and expiry in milliseconds; null when unavailable.",
            "example": 10000,
            "minimum": 0
          },
          "next_input_seq": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Persisted next-input progress cursor.",
            "example": 12
          },
          "org_id": {
            "type": "string",
            "description": "Public identifier of the owning session's organization.",
            "example": "org_00000000000000000000000000000001"
          },
          "phase": {
            "type": "string",
            "description": "Observed execution state; idle is also possible for a released actor detail.",
            "example": "model"
          },
          "phase_since": {
            "type": "string",
            "format": "date-time",
            "description": "UTC timestamp of the committed observation used to classify the phase.",
            "example": "2026-10-14T12:00:01Z"
          },
          "runnable_age_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Milliseconds awaiting a valid lease; null for held or parked actors.",
            "example": 3000,
            "minimum": 0
          },
          "runnable_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "UTC timestamp when the actor became runnable; null for parked work.",
            "example": "2026-10-14T11:59:59Z"
          },
          "session_id": {
            "type": "string",
            "description": "Canonical session identifier whose actor is being inspected.",
            "example": "session_01933b5a000070008000000000000001"
          },
          "session_status": {
            "type": "string",
            "description": "Persisted session lifecycle status.",
            "example": "active"
          }
        }
      },
      "MonitoringActorDetail": {
        "type": "object",
        "description": "Authorized actor inspection with bounded ownership history and trace timing.",
        "required": [
          "generated_at",
          "actor",
          "ownership_history",
          "steps"
        ],
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/MonitoringActor",
            "description": "Actor observation after validating the owning session's organization."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC observation time for actor ownership and timing.",
            "example": "2026-10-14T12:00:03Z"
          },
          "ownership_history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringLeaseEvent"
            },
            "description": "Up to 50 newest ownership changes from the retained one-day history."
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringStep"
            },
            "description": "Up to 100 projected steps from the latest turn, newest first; no conversation payloads."
          }
        }
      },
      "MonitoringActorPage": {
        "type": "object",
        "description": "Bounded page of current session actor observations.",
        "required": [
          "generated_at",
          "actors"
        ],
        "properties": {
          "actors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringActor"
            },
            "description": "Up to 200 matching actors, ordered by expired leases and oldest runnable work."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC observation time for this actor page.",
            "example": "2026-10-14T12:00:03Z"
          },
          "next_offset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Offset for the next page; null when there are no further matching actors.",
            "example": 200,
            "minimum": 0
          }
        }
      },
      "MonitoringCheckTotals": {
        "type": "object",
        "description": "Verdict counts for one operational or continuity check in the report window.",
        "required": [
          "check",
          "passed",
          "failed",
          "insufficient_evidence",
          "pending"
        ],
        "properties": {
          "check": {
            "type": "string",
            "description": "Versioned check identity; operational and continuity results stay separate.",
            "example": "compaction_execution_v1"
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "description": "Assessments that found a failure in the checked behavior.",
            "example": 1
          },
          "insufficient_evidence": {
            "type": "integer",
            "format": "int64",
            "description": "Unassessed or inconclusive outcomes, excluded from the pass rate.",
            "example": 3
          },
          "passed": {
            "type": "integer",
            "format": "int64",
            "description": "Assessments that found the checked behavior successful.",
            "example": 12
          },
          "pending": {
            "type": "integer",
            "format": "int64",
            "description": "Assessments awaiting continuation evidence or worker processing.",
            "example": 0
          }
        }
      },
      "MonitoringCohort": {
        "type": "object",
        "description": "Bounded execution breakdown for one organization and live lease holder.",
        "required": [
          "phase",
          "org_id",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions in this phase, organization, and holder cohort.",
            "example": 32,
            "minimum": 0
          },
          "org_id": {
            "type": "string",
            "description": "Public identifier of the organization owning these sessions.",
            "example": "org_00000000000000000000000000000001"
          },
          "phase": {
            "type": "string",
            "description": "Execution state shared by this organization and live holder cohort.",
            "example": "model"
          },
          "worker_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Live lease holder; null for unleased or expired ownership.",
            "example": "worker-01"
          }
        }
      },
      "MonitoringLeaseEvent": {
        "type": "object",
        "description": "Persisted actor ownership transition, excluding renewal noise.",
        "required": [
          "occurred_at",
          "kind",
          "holder",
          "fence"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "New lease deadline in UTC; null for a release.",
            "example": "2026-10-14T12:00:10Z"
          },
          "fence": {
            "type": "integer",
            "format": "int64",
            "description": "Ownership fence associated with this transition.",
            "example": 18
          },
          "holder": {
            "type": "string",
            "description": "Holder acquiring ownership, or the holder relinquishing a released lease.",
            "example": "worker-02"
          },
          "kind": {
            "type": "string",
            "description": "Ownership transition: acquired, reacquired, or released; renewals produce no history entry.",
            "example": "reacquired"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC time of the persisted ownership transition.",
            "example": "2026-10-14T12:00:00Z"
          },
          "previous_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Previous lease deadline in UTC, when recorded.",
            "example": "2026-10-14T11:59:59Z"
          },
          "previous_holder": {
            "type": [
              "string",
              "null"
            ],
            "description": "Holder preceding acquisition or reacquisition, when recorded.",
            "example": "worker-01"
          }
        }
      },
      "MonitoringOwnership": {
        "type": "object",
        "description": "Valid actor ownership linking an organization to a worker.",
        "required": [
          "worker_id",
          "org_id",
          "actor_leases"
        ],
        "properties": {
          "actor_leases": {
            "type": "integer",
            "format": "int64",
            "description": "Valid actor leases held by this worker within this organization.",
            "example": 32,
            "minimum": 0
          },
          "org_id": {
            "type": "string",
            "description": "Public identifier of the sessions' owning organization.",
            "example": "org_00000000000000000000000000000001"
          },
          "worker_id": {
            "type": "string",
            "description": "Worker currently holding the valid actor leases.",
            "example": "worker-01"
          }
        }
      },
      "MonitoringPhase": {
        "type": "object",
        "description": "Population and age of one committed execution state.",
        "required": [
          "phase",
          "count",
          "oldest_ms"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Complete number of sessions observed in this execution state.",
            "example": 2800,
            "minimum": 0
          },
          "oldest_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Age of the oldest committed phase observation in milliseconds; may be partial when cohorts are truncated.",
            "example": 3200,
            "minimum": 0
          },
          "phase": {
            "type": "string",
            "description": "Execution state: runnable, model, tools, waiting, or setup.",
            "example": "model"
          }
        }
      },
      "MonitoringShard": {
        "type": "object",
        "description": "One data plane v2 shard: its newest minute report and its history.",
        "required": [
          "shard",
          "data_plane",
          "reported_at",
          "silent",
          "nodes",
          "nodes_answering",
          "sessions",
          "running",
          "queued",
          "resumed",
          "memory_bytes",
          "cpu_cores",
          "admit_p99_ms",
          "ship_lag_p99_ms",
          "term",
          "buckets"
        ],
        "properties": {
          "admit_p99_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Worst node's p99 time to admit a turn, in milliseconds.",
            "example": 12,
            "minimum": 0
          },
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringShardBucket"
            },
            "description": "History over the range, oldest first; buckets without a report are absent."
          },
          "cpu_cores": {
            "type": "number",
            "format": "double",
            "description": "The busiest node's CPU, in cores.",
            "example": 1.2
          },
          "cpu_limit_cores": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Its CPU limit in cores; null when unknown.",
            "example": 2
          },
          "data_plane": {
            "type": "string",
            "description": "Data plane the shard belongs to.",
            "example": "dp-eks-1"
          },
          "leader": {
            "type": [
              "string",
              "null"
            ],
            "description": "Leader node at the newest report.",
            "example": "shard-07-node-2"
          },
          "memory_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "The fullest node's resident memory, in bytes.",
            "example": 3221225472,
            "minimum": 0
          },
          "memory_limit_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Its memory limit in bytes; null when unknown.",
            "example": 4294967296,
            "minimum": 0
          },
          "nodes": {
            "type": "integer",
            "format": "int64",
            "description": "Members.",
            "example": 3,
            "minimum": 0
          },
          "nodes_answering": {
            "type": "integer",
            "format": "int64",
            "description": "Members that answered the leader.",
            "example": 3,
            "minimum": 0
          },
          "queued": {
            "type": "integer",
            "format": "int64",
            "description": "Messages waiting for a turn.",
            "example": 0,
            "minimum": 0
          },
          "reported_at": {
            "type": "string",
            "format": "date-time",
            "description": "Minute of the newest report.",
            "example": "2026-11-15T19:59:00Z"
          },
          "resumed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns running on a second or later attempt.",
            "example": 1,
            "minimum": 0
          },
          "running": {
            "type": "integer",
            "format": "int64",
            "description": "Turns running.",
            "example": 239,
            "minimum": 0
          },
          "sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions resident.",
            "example": 2650,
            "minimum": 0
          },
          "shard": {
            "type": "string",
            "description": "Shard name.",
            "example": "shard-07"
          },
          "ship_lag_p99_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Worst node's p99 log shipping lag, in milliseconds.",
            "example": 380,
            "minimum": 0
          },
          "silent": {
            "type": "boolean",
            "description": "No report for the last three minutes.",
            "example": false
          },
          "term": {
            "type": "integer",
            "format": "int64",
            "description": "Raft term.",
            "example": 4,
            "minimum": 0
          }
        }
      },
      "MonitoringShardBucket": {
        "type": "object",
        "description": "One shard over one bucket.",
        "required": [
          "start",
          "reports",
          "elections",
          "moves",
          "turns_completed",
          "turns_failed",
          "turns_cancelled"
        ],
        "properties": {
          "admit_p99_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Worst node's p99 time to admit a turn, in milliseconds.",
            "minimum": 0
          },
          "cpu_peak_pct": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "The busiest node's CPU use as a percentage of its limit."
          },
          "elections": {
            "type": "integer",
            "format": "int64",
            "description": "Leader elections.",
            "minimum": 0
          },
          "memory_peak_pct": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "The fullest node's memory use as a percentage of its limit."
          },
          "moves": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions moved to another shard.",
            "minimum": 0
          },
          "nodes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Highest node count.",
            "minimum": 0
          },
          "nodes_answering": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Lowest count of nodes that answered the leader.",
            "minimum": 0
          },
          "queued_peak": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Highest messages waiting for a turn.",
            "minimum": 0
          },
          "reports": {
            "type": "integer",
            "format": "int64",
            "description": "Minute reports received in the bucket.",
            "minimum": 0
          },
          "running_peak": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Highest turns running.",
            "minimum": 0
          },
          "sessions_peak": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Highest sessions resident.",
            "minimum": 0
          },
          "ship_lag_p99_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Worst node's p99 log shipping lag, in milliseconds.",
            "minimum": 0
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "UTC start of the bucket."
          },
          "turns_cancelled": {
            "type": "integer",
            "format": "int64",
            "description": "Turns cancelled.",
            "minimum": 0
          },
          "turns_completed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns completed.",
            "minimum": 0
          },
          "turns_failed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns failed.",
            "minimum": 0
          }
        }
      },
      "MonitoringShardDetail": {
        "type": "object",
        "description": "A shard's per-node detail, or why there is none.",
        "required": [
          "shard",
          "available",
          "step_seconds",
          "from",
          "to",
          "nodes"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether detail could be read.",
            "example": true
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive UTC start.",
            "example": "2026-11-15T19:00:00Z"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShardNodeDetail"
            },
            "description": "Nodes, by id."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why not, when `available` is false.",
            "example": "No detail store is configured (MONITORING_DETAIL)."
          },
          "shard": {
            "type": "string",
            "description": "Shard name.",
            "example": "shard-07"
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "The detail store's scheme and host, without credentials or path.",
            "example": "http://victoriametrics:8428"
          },
          "step_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Seconds between points.",
            "example": 10,
            "minimum": 0
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "UTC end.",
            "example": "2026-11-15T20:00:00Z"
          }
        }
      },
      "MonitoringShards": {
        "type": "object",
        "description": "Data plane v2 shards as their minute reports show them.",
        "required": [
          "generated_at",
          "from",
          "to",
          "bucket_seconds",
          "shards"
        ],
        "properties": {
          "bucket_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Bucket size in seconds.",
            "example": 60,
            "minimum": 0
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive UTC start of the history.",
            "example": "2026-11-15T14:00:00Z"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC time of this read.",
            "example": "2026-11-15T20:00:00Z"
          },
          "shards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringShard"
            },
            "description": "Shards that reported in the last week, by name."
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "Exclusive UTC end.",
            "example": "2026-11-15T20:00:00Z"
          }
        }
      },
      "MonitoringSnapshot": {
        "type": "object",
        "description": "Live execution population, ownership, and event-window summary.",
        "required": [
          "generated_at",
          "scope",
          "window_seconds",
          "actors",
          "organizations",
          "actor_leases",
          "expired_leases",
          "phases",
          "cohorts",
          "ownership",
          "workers",
          "events",
          "lease_events",
          "cohorts_truncated",
          "workers_truncated"
        ],
        "properties": {
          "actor_leases": {
            "type": "integer",
            "format": "int64",
            "description": "Complete count of actor leases valid at the observation time.",
            "example": 3700,
            "minimum": 0
          },
          "actors": {
            "type": "integer",
            "format": "int64",
            "description": "Complete population of live sessions and runnable or held session actors.",
            "example": 5000,
            "minimum": 0
          },
          "cohorts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringCohort"
            },
            "description": "Bounded phase, organization, and live holder breakdown; consult cohorts_truncated."
          },
          "cohorts_truncated": {
            "type": "boolean",
            "description": "Whether ownership cohort detail exceeded its limit; population and phase counts remain complete.",
            "example": false
          },
          "events": {
            "type": "object",
            "description": "Committed lifecycle event counts in the lookback window, not lifetime totals.",
            "additionalProperties": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "reason.started": 350,
              "tool.started": 240,
              "turn.started": 120
            }
          },
          "expired_leases": {
            "type": "integer",
            "format": "int64",
            "description": "Held leases whose deadline has passed, regardless of worker heartbeat.",
            "example": 3,
            "minimum": 0
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC observation time used to classify lease validity and event windows.",
            "example": "2026-10-14T12:00:03Z"
          },
          "lease_events": {
            "type": "object",
            "description": "Acquisition, reacquisition, and release counts in the lookback window; renewals are excluded.",
            "additionalProperties": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "acquired": 120,
              "reacquired": 3,
              "released": 110
            }
          },
          "oldest_runnable_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Age of the oldest work awaiting a valid lease, in milliseconds; null when none is runnable.",
            "example": 3000,
            "minimum": 0
          },
          "organizations": {
            "type": "integer",
            "format": "int64",
            "description": "Distinct organizations represented in the current population.",
            "example": 12,
            "minimum": 0
          },
          "ownership": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringOwnership"
            },
            "description": "Organization-to-worker mapping derived only from valid actor leases."
          },
          "phases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringPhase"
            },
            "description": "Complete counts by execution state, with observed phase ages."
          },
          "scope": {
            "type": "string",
            "description": "Monitoring boundary: organization or fleet.",
            "example": "fleet"
          },
          "window_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Lookback window for lifecycle and ownership event counts, in seconds.",
            "example": 60,
            "minimum": 0
          },
          "workers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringWorker"
            },
            "description": "Bounded worker observations; global telemetry is redacted for organization callers."
          },
          "workers_truncated": {
            "type": "boolean",
            "description": "Whether worker detail exceeded its limit; population and phase counts remain complete.",
            "example": false
          }
        }
      },
      "MonitoringSpend": {
        "type": "object",
        "description": "Current UTC-day monitoring admission and provider-reported spending.",
        "required": [
          "reserved_usd",
          "reported_usd"
        ],
        "properties": {
          "reported_usd": {
            "type": "number",
            "format": "double",
            "description": "Cost reported by completed provider responses; not an invoice guarantee.",
            "example": 0.005
          },
          "reserved_usd": {
            "type": "number",
            "format": "double",
            "description": "Allowance held for admitted calls, including uncertain and retry costs.",
            "example": 0.02
          }
        }
      },
      "MonitoringStep": {
        "type": "object",
        "description": "Payload-free timing projection of one step in the latest turn.",
        "required": [
          "turn_no",
          "step_no",
          "kind",
          "status",
          "started_at"
        ],
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Recorded step duration in milliseconds; null until duration is available.",
            "example": 820
          },
          "kind": {
            "type": "string",
            "description": "Trace-step category, without tool arguments, results, or agent names.",
            "example": "tool"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC time at which the projected step started.",
            "example": "2026-10-14T12:00:01Z"
          },
          "status": {
            "type": "string",
            "description": "Projected execution status of the trace step.",
            "example": "completed"
          },
          "step_no": {
            "type": "integer",
            "format": "int32",
            "description": "Projected step ordinal within the turn.",
            "example": 3
          },
          "turn_no": {
            "type": "integer",
            "format": "int32",
            "description": "Projected turn ordinal for this trace step.",
            "example": 2
          }
        }
      },
      "MonitoringTimeline": {
        "type": "object",
        "description": "Recorded execution history for one organization or the platform.",
        "required": [
          "generated_at",
          "scope",
          "from",
          "to",
          "bucket_seconds",
          "buckets",
          "summary",
          "previous",
          "markers",
          "open_sessions_now",
          "agents_now"
        ],
        "properties": {
          "agents_now": {
            "type": "integer",
            "format": "int64",
            "description": "Agents defined right now.",
            "minimum": 0
          },
          "bucket_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Bucket size in seconds.",
            "example": 300,
            "minimum": 0
          },
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineBucket"
            },
            "description": "Every bucket in the range, oldest first; buckets without history are zero."
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive UTC start, aligned to the bucket size."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC time of this read."
          },
          "markers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineMarker"
            },
            "description": "Deploys, worker changes and shard leader changes inside the range."
          },
          "open_sessions_now": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions not archived right now, on any data plane.",
            "minimum": 0
          },
          "previous": {
            "$ref": "#/components/schemas/TimelineSummary",
            "description": "Totals for the same length of time immediately before."
          },
          "scope": {
            "type": "string",
            "description": "organization or fleet.",
            "example": "organization"
          },
          "summary": {
            "$ref": "#/components/schemas/TimelineSummary",
            "description": "Totals for this range."
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "Exclusive UTC end."
          }
        }
      },
      "MonitoringTimelineWindow": {
        "type": "object",
        "description": "Breakdown of a selected window.",
        "required": [
          "from",
          "to",
          "busiest",
          "failures",
          "failed_tools"
        ],
        "properties": {
          "busiest": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineRank"
            },
            "description": "Up to 5 busiest agents (organization) or organizations (platform)."
          },
          "failed_tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineFailure"
            },
            "description": "Up to 6 tools whose calls failed most often; `code` is the tool name."
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineFailure"
            },
            "description": "Up to 6 failure codes, most frequent first."
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive UTC start."
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "Exclusive UTC end."
          }
        }
      },
      "MonitoringWorker": {
        "type": "object",
        "description": "Scope-aware actor ownership with platform-only worker telemetry.",
        "required": [
          "id",
          "actor_leases",
          "phases"
        ],
        "properties": {
          "accepting_work": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Last reported admission flag; null in organization scope.",
            "example": true
          },
          "actor_leases": {
            "type": "integer",
            "format": "int64",
            "description": "Valid actor leases in this monitoring scope; not occupied work slots.",
            "example": 32,
            "minimum": 0
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Reported maximum worker concurrency; null in organization scope.",
            "example": 50,
            "minimum": 0
          },
          "current_load": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Reported worker activity load, distinct from actor leases; null in organization scope.",
            "example": 8,
            "minimum": 0
          },
          "id": {
            "type": "string",
            "description": "Worker identifier recorded by actor ownership or the fleet registry.",
            "example": "worker-01"
          },
          "last_heartbeat_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last worker heartbeat in UTC; null in organization scope.",
            "example": "2026-10-14T12:00:00Z"
          },
          "phases": {
            "type": "object",
            "description": "Leased session counts by execution state within this scope.",
            "additionalProperties": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "model": 20,
              "tools": 12
            }
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fleet-only worker status, including stale heartbeats; null in organization scope.",
            "example": "active"
          },
          "worker_group": {
            "type": [
              "string",
              "null"
            ],
            "description": "Registered worker group; null in organization scope.",
            "example": "execution"
          }
        }
      },
      "MoveFileRequest": {
        "type": "object",
        "description": "Request to move/rename a file",
        "required": [
          "src_path",
          "dst_path"
        ],
        "properties": {
          "dst_path": {
            "type": "string",
            "description": "Destination path (relative to the workspace filesystem root).",
            "example": "docs/migration-plan.md"
          },
          "src_path": {
            "type": "string",
            "description": "Source path (relative to the workspace filesystem root).",
            "example": "drafts/migration-plan.md"
          }
        }
      },
      "MyInvitationResponse": {
        "type": "object",
        "required": [
          "id",
          "org_name",
          "role"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "org_name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "NativeSearchProvider": {
        "type": "object",
        "description": "A connected model provider whose models search natively.",
        "required": [
          "provider_id",
          "name",
          "provider_type",
          "price_note"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "price_note": {
            "type": "string"
          },
          "provider_id": {
            "type": "string"
          },
          "provider_type": {
            "type": "string",
            "example": "anthropic"
          }
        }
      },
      "NativeToolCall": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "call_id",
              "name",
              "arguments",
              "type"
            ],
            "properties": {
              "arguments": {
                "type": "string",
                "description": "Complete JSON arguments, preserved exactly as received.",
                "example": "{\"query\":\"weather in Paris\"}"
              },
              "async": {
                "type": "boolean",
                "description": "Whether execution may start before response generation completes.",
                "example": true
              },
              "call_id": {
                "type": "string",
                "description": "Original provider call identity used when delivering the result.",
                "example": "call_lookup_1"
              },
              "name": {
                "type": "string",
                "description": "Registered function or custom tool name.",
                "example": "lookup"
              },
              "type": {
                "type": "string",
                "enum": [
                  "function_call"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "call_id",
              "name",
              "input",
              "type"
            ],
            "properties": {
              "async": {
                "type": "boolean",
                "description": "Whether execution may start before response generation completes.",
                "example": true
              },
              "call_id": {
                "type": "string",
                "description": "Original provider call identity used when delivering the result.",
                "example": "call_lookup_1"
              },
              "input": {
                "type": "string",
                "description": "Raw custom-tool input, without JSON normalization.",
                "example": "weather in Paris"
              },
              "name": {
                "type": "string",
                "description": "Registered function or custom tool name.",
                "example": "lookup"
              },
              "type": {
                "type": "string",
                "enum": [
                  "custom_tool_call"
                ]
              }
            }
          }
        ],
        "description": "A complete provider-native call, retaining its original identity and payload.",
        "example": {
          "arguments": "{\"query\":\"weather in Paris\"}",
          "async": true,
          "call_id": "call_lookup_1",
          "name": "lookup",
          "type": "function_call"
        }
      },
      "NetworkAccessList": {
        "type": "object",
        "description": "Network access list controlling which hosts/URLs an agent session can reach.\n\n- `allowed`: if non-empty, only URLs matching these patterns are permitted.\n- `blocked`: URLs matching these patterns are always denied (takes precedence over allowed).\n\nPattern format:\n- `example.com` — exact domain match (any port, any path)\n- `*.example.com` — domain and all subdomains\n- `https://example.com/api/` — exact URL prefix (scheme + host + path)",
        "properties": {
          "allowed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowed host patterns. If non-empty, only matching URLs are permitted.\nAn empty list means \"no restriction from this layer\" (inherit parent)."
          },
          "blocked": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Blocked host patterns. Always denied, even if matched by `allowed`."
          }
        },
        "example": {
          "allowed": [
            "*.example.com",
            "https://api.acme.com/"
          ],
          "blocked": [
            "169.254.169.254"
          ]
        }
      },
      "Notification": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "title",
          "body",
          "payload",
          "occurrence_count",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "body": {
            "type": "string",
            "description": "Plain-text summary of what happened."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "href": {
            "type": [
              "string",
              "null"
            ],
            "description": "UI link that opens the resource the notification is about.",
            "example": "/chat/session_01933b5a00007000800000000000001"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "notification_01933b5a00007000800000000000001"
          },
          "kind": {
            "type": "string",
            "description": "Discriminator selecting the variant of this resource.",
            "example": "health.issue"
          },
          "occurrence_count": {
            "type": "integer",
            "format": "int32",
            "description": "How many times the same event recurred into this notification.",
            "example": 1
          },
          "payload": {
            "type": "object",
            "description": "Kind-specific structured detail."
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotificationSource",
                "description": "What sent the notification. Absent on notifications written before\nsenders were recorded."
              },
              {
                "type": "null"
              }
            ]
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Prefixed public identifier of the resource the notification is about.",
            "example": "session_01933b5a00007000800000000000001"
          },
          "target_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Kind of resource the notification is about, when it has one.",
            "example": "session"
          },
          "title": {
            "type": "string",
            "description": "Human-readable title. Safe to render in user-facing messages.",
            "example": "Agent run failed"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was last updated (RFC 3339)."
          },
          "viewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the current user marked the notification as viewed; null while unviewed."
          }
        }
      },
      "NotificationSource": {
        "type": "object",
        "description": "What sent a notification. Kinds share one shape so new senders (a shared\nagent, an integration) render without a client change.",
        "required": [
          "type"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public ID of the sender, when it has one.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the sender.",
            "example": "Platform Assistant"
          },
          "type": {
            "type": "string",
            "description": "`agent` or `system`.",
            "example": "agent"
          }
        }
      },
      "OAuthAuthorizeQuery": {
        "type": "object",
        "description": "Browser setup options. The canonical target is selected by the authorized resource path.",
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required when `mode = identity`: the agent whose service grant this is.\nThe grant is owned by the agent's identity, not by the admin who\nauthorizes it (EVE-1030).\nOptional legacy service agent target."
          },
          "mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Legacy setup mode; canonical resource paths capture the target.",
            "example": "virtual_user"
          },
          "popup": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether setup completes in a popup.",
            "example": false
          },
          "return_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Same-origin return path after setup.",
            "example": "/settings/connections"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional session grant destination for legacy setup."
          }
        }
      },
      "Observer": {
        "type": "object",
        "description": "An observer: online scoring config over production sessions.",
        "required": [
          "id",
          "name",
          "sampling_rate",
          "scorers",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "alert": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ObserverAlert",
                "description": "Pass-rate alert, when set."
              },
              {
                "type": "null"
              }
            ]
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description.",
            "example": "Grades support replies for grounded answers."
          },
          "id": {
            "type": "string",
            "description": "External identifier (observer_<32-hex>). Shown as \"id\" in API.",
            "example": "observer_01933b5a000070008000000000000001"
          },
          "match": {
            "$ref": "#/components/schemas/ObserverMatch",
            "description": "Which sessions to score."
          },
          "name": {
            "type": "string",
            "description": "Display name.",
            "example": "Support answer quality"
          },
          "sampling_rate": {
            "type": "number",
            "format": "double",
            "description": "Fraction of matching turns to score (0.0–1.0), applied after match.",
            "example": 0.1
          },
          "scorers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ObserverScorerConfig"
            },
            "description": "Scoring rules."
          },
          "status": {
            "$ref": "#/components/schemas/ObserverStatus",
            "description": "Lifecycle status."
          },
          "system_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Present for system-managed observers, whose configuration is read-only."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ObserverAlert": {
        "type": "object",
        "description": "Open a health issue, and tell the people who own the watched agents, when\nan observer's pass rate falls under `min_pass_rate` over the last\n`window_hours`. Needs `min_scored` scores in the window so a handful of\nsamples cannot raise it. The issue resolves itself once the rate recovers.",
        "required": [
          "min_pass_rate"
        ],
        "properties": {
          "min_pass_rate": {
            "type": "number",
            "format": "double",
            "description": "Pass rate (0.0–1.0) under which the alert opens.",
            "example": 0.8
          },
          "min_scored": {
            "type": "integer",
            "format": "int32",
            "description": "Scores the window needs before the alert can open. Defaults to 20.",
            "example": 20,
            "minimum": 0
          },
          "window_hours": {
            "type": "integer",
            "format": "int32",
            "description": "Window the rate is measured over, in hours (1–168). Defaults to 24.",
            "example": 24,
            "minimum": 0
          }
        }
      },
      "ObserverMatch": {
        "type": "object",
        "description": "Predicates selecting which production sessions an observer scores.\nAll present predicates must match (AND); within a list, any entry matches (OR).\nAn empty match block matches all org traffic. Sessions tagged `eval` are\nalways excluded so synthetic eval-run sessions are never scored.",
        "properties": {
          "agent_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Match sessions running any of these agents."
          },
          "harness_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Match sessions on any of these harnesses."
          },
          "session_tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Match sessions carrying any of these tags."
          }
        }
      },
      "ObserverScope": {
        "type": "string",
        "description": "What slice of the trace a scorer grades.\n\n- `turn`: one exchange, scored when the turn completes.\n- `session`: the whole conversation, scored once the session has been idle\n  for a while ([`SESSION_SETTLE_SECONDS`]); a later idle re-scores it, so\n  each session has one current score.\n- `tool`: one tool call and its result, scored when the call completes.",
        "enum": [
          "turn",
          "session",
          "tool",
          "compaction"
        ]
      },
      "ObserverScorerConfig": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ScorerMethod",
            "description": "How this scorer grades (rule or llm_judge)."
          },
          {
            "type": "object",
            "required": [
              "key"
            ],
            "properties": {
              "key": {
                "type": "string",
                "description": "Stable name within the observer (score series name)."
              },
              "scope": {
                "$ref": "#/components/schemas/ObserverScope",
                "description": "Trace slice this scorer grades."
              },
              "tools": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Tool scope only: grade calls to these tools. Empty or absent grades\nevery tool call."
              }
            }
          }
        ],
        "description": "One scorer inside an observer. `key` names the score series in listings\nand future dashboards; `scope` selects the trace slice; `method` is how\nit grades."
      },
      "ObserverStatus": {
        "type": "string",
        "description": "Observer lifecycle status. `paused` keeps configuration but stops matching.",
        "enum": [
          "active",
          "paused",
          "archived",
          "deleted"
        ]
      },
      "OrgDecisionSettings": {
        "type": "object",
        "description": "The decision-model selection for the active organization.",
        "properties": {
          "model_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OrgEgressAllowlistResponse": {
        "type": "object",
        "description": "An organization's egress allowlist extension.",
        "required": [
          "granted",
          "patterns",
          "open",
          "mode",
          "max_patterns",
          "can_edit",
          "can_grant"
        ],
        "properties": {
          "can_edit": {
            "type": "boolean",
            "description": "Whether the caller may edit the patterns (an organization admin; the\nedit also needs `granted`)."
          },
          "can_grant": {
            "type": "boolean",
            "description": "Whether the caller may grant or revoke (a platform administrator)."
          },
          "granted": {
            "type": "boolean",
            "description": "Whether a platform administrator allowed this organization to extend\nthe deployment's outbound allowlist. Patterns are enforced only while\nthis is true."
          },
          "max_patterns": {
            "type": "integer",
            "description": "Most patterns one organization may add.",
            "minimum": 0
          },
          "mode": {
            "type": "string",
            "description": "The deployment's egress policy: `open`, `curated-writes`, or\n`curated-all`. Extensions only matter in a curated mode.",
            "example": "curated-writes"
          },
          "open": {
            "type": "boolean",
            "description": "Whether a platform administrator granted this organization open\negress: its agents reach any public host the deny list allows, for\nreads and writes, whatever the deployment's curated policy."
          },
          "patterns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Host patterns this organization adds to the allowlist: `example.com`,\n`*.example.com`, or an `https://example.com/path/` prefix."
          }
        }
      },
      "OrgFeatureFlagSetting": {
        "type": "object",
        "required": [
          "name",
          "label",
          "description",
          "grade",
          "system_enabled",
          "default_enabled",
          "effective",
          "can_manage"
        ],
        "properties": {
          "can_manage": {
            "type": "boolean"
          },
          "default_enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "effective": {
            "type": "boolean"
          },
          "grade": {
            "$ref": "#/components/schemas/FeatureFlagGrade"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "org_override": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "None inherits the grade default; false is a durable prod opt-out."
          },
          "system_enabled": {
            "type": "boolean"
          }
        }
      },
      "OrgFeatureFlagsSettingsResponse": {
        "type": "object",
        "required": [
          "flags"
        ],
        "properties": {
          "flags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgFeatureFlagSetting"
            }
          }
        }
      },
      "OrgToolApprovalPolicy": {
        "type": "object",
        "description": "An organization's approval policy. Empty means no limits.",
        "properties": {
          "allowed_modes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Modes people and agents may use (`off`, `auto`, `normal`,\n`protective`). Empty allows all. A mode outside the list is raised to\nthe next more careful allowed one."
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolApprovalRule"
            },
            "description": "Rules for every agent in the organization."
          },
          "trust_notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Plain sentences the auto reviewer reads: trusted domains, repositories,\nwhich systems count as production."
          }
        },
        "additionalProperties": false
      },
      "OrganizationAccountMetadata": {
        "type": "object",
        "description": "Editable history contains only the account's display name.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "OrganizationAccountNameRequest": {
        "type": "object",
        "description": "A new display name; account credentials remain unchanged.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "OrganizationConnectionResponse": {
        "type": "object",
        "description": "Non-secret metadata for an organization-owned provider account.",
        "required": [
          "id",
          "name",
          "provider",
          "connected_at",
          "updated_at"
        ],
        "properties": {
          "connected_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time at which the provider account was first connected.",
            "example": "2026-10-07T12:00:00Z"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable connection identifier used by Sandbox Templates and web search.",
            "example": "00000000-0000-0000-0000-000000000002"
          },
          "name": {
            "type": "string",
            "description": "Human-readable account name.",
            "example": "Production Daytona"
          },
          "provider": {
            "type": "string",
            "description": "Connector identifier, e.g. `daytona` or `brave_search`.",
            "example": "daytona"
          },
          "provider_username": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider identity returned while validating the credential, when available.",
            "example": "platform-team"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time at which the account name or credential was last replaced.",
            "example": "2026-10-07T12:30:00Z"
          }
        }
      },
      "OrganizationResponse": {
        "type": "object",
        "description": "Response for organization operations",
        "required": [
          "quality_monitoring",
          "id",
          "name",
          "default_provider_per_service",
          "system_decisions",
          "web_search_defaults",
          "background_limits",
          "monthly_session_limit",
          "monthly_agent_limit",
          "self_healing",
          "tool_approval_policy",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agentid_agents_per_owner": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How many agents one AgentID owner may sign in; null means the platform\ndefault."
          },
          "background_limits": {
            "$ref": "#/components/schemas/BackgroundLimits",
            "description": "Limits on unattended background work (Settings → Limits): schedule\nlifetime and run cap for agent-created schedules, the default and\nlargest schedule budget, and the daily unattended spend cap. Code\ndefaults when the organization never set any."
          },
          "base_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base harness used when session creation omits harness_id."
          },
          "chat_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default for the built-in Everruns Chat. None inherits the agents/sessions default."
          },
          "coding_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default for coding work: coding-harness agents and `coding` helpers.\nNone falls back to the default model."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the organization was created"
          },
          "default_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default harness to preselect in the UI."
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default LLM model for the organization."
          },
          "default_provider_per_service": {
            "type": "object",
            "description": "Org-level default provider per service (EVE-569), keyed by service kind.\nEmpty when no org defaults are configured.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "effective_research_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The model the research model resolves to now: the selection, else the\nAutomatic pick (Anthropic's recommended research model, then OpenAI's,\nthen another provider's), else the default model."
          },
          "id": {
            "type": "string",
            "description": "External identifier (org_<32-hex-chars>)"
          },
          "monthly_agent_limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum agents this organization can create per UTC calendar month.\nBuilt-in agents do not count; archiving or deleting never refunds.",
            "maximum": 100000,
            "minimum": 1
          },
          "monthly_session_limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum sessions this organization can create per UTC calendar month.",
            "maximum": 100000,
            "minimum": 1
          },
          "name": {
            "type": "string",
            "description": "Display name"
          },
          "onboarding_completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the org's creator finished or skipped the setup wizard. `null` means\nonboarding is still incomplete, which the UI uses to resume the user at\n`/orgs/{id}/setup`. Seeded/default and externally-synced orgs are complete."
          },
          "quality_monitoring": {
            "$ref": "#/components/schemas/QualityMonitoringPolicy",
            "description": "Opt-in system-managed compaction monitoring. Disabled by default."
          },
          "research_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Research model: the org's strongest model for hard reasoning and long\nresearch. None means Automatic."
          },
          "self_healing": {
            "$ref": "#/components/schemas/SelfHealingPolicy",
            "description": "What Everruns does on its own when a finding opens (Settings →\nLimits): pause a repeating schedule automatically, and whether the\nInspector suggests changes to agents. Code defaults when the\norganization never set any."
          },
          "small_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional small chat model, independent of the main chat and decision defaults."
          },
          "system_decisions": {
            "$ref": "#/components/schemas/SystemDecisions",
            "description": "Who answers deployment-owned decision checks: `deployment` (default)\nor `organization` (the org's default decision model)."
          },
          "tool_approval_policy": {
            "$ref": "#/components/schemas/OrgToolApprovalPolicy",
            "description": "Tool approval policy (Settings → Approvals): which approval modes\npeople and agents may use, rules for every agent, and the trust notes\nthe auto reviewer reads. Empty when the organization set no limits."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the organization was last updated"
          },
          "web_search_defaults": {
            "$ref": "#/components/schemas/WebSearchDefaults",
            "description": "Web search defaults: the provider agents on \"Organization default\"\nuse, the Automatic order, whether model provider search is allowed,\nthe fallback, results per search and blocked domains. Built-in\ndefaults (Automatic) when the organization never set any."
          }
        }
      },
      "OrganizationSourceAccount": {
        "type": "object",
        "description": "The organization's links to the shared Everruns GitHub App.",
        "required": [
          "can_connect",
          "accounts",
          "repositories"
        ],
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Linked GitHub accounts."
          },
          "can_connect": {
            "type": "boolean",
            "description": "The caller may link another GitHub account (organization admins)."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why repositories could not be listed, when they could not."
          },
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRepository"
            },
            "description": "Repositories reachable through the linked installations."
          }
        }
      },
      "OutputMessageCompletedData": {
        "type": "object",
        "description": "Data for output.message.completed event",
        "required": [
          "message"
        ],
        "properties": {
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable error code for user-facing failures surfaced as assistant text."
          },
          "error_disclosure": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error-disclosure mode applied to `error_code`/`error_fields`\n(\"generic\" | \"standard\" | \"detailed\"). Tracking metadata; absent for\nnon-error messages and for paths that predate disclosure modes."
          },
          "error_fields": {
            "type": [
              "object",
              "null"
            ],
            "description": "Structured interpolation fields for localized error rendering."
          },
          "message": {
            "$ref": "#/components/schemas/RuntimeMessage",
            "description": "The agent message"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelMetadata",
                "description": "Metadata about the model used"
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Token usage"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OutputMessageDeltaData": {
        "type": "object",
        "description": "Data for output.message.delta event\n\nIncremental text update during LLM generation. Events are batched (~100ms)\nto reduce volume while providing real-time feedback.",
        "required": [
          "turn_id",
          "message_id",
          "delta",
          "accumulated"
        ],
        "properties": {
          "accumulated": {
            "type": "string",
            "description": "Accumulated text so far"
          },
          "delta": {
            "type": "string",
            "description": "The new text chunk"
          },
          "message_id": {
            "type": "string",
            "description": "Stable public ID for this assistant message across its streaming lifecycle.\nThis is the same identifier as `OutputMessageCompletedData.message.id`.",
            "example": "message_550e8400e29b41d4a716446655440000"
          },
          "phase": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExecutionPhase",
                "description": "Best-effort streamed phase hint (EVE-774).\n\n`None` means \"not yet classified — treat as ordinary assistant text\",\nNEVER \"thinking\". Refinement is monotonic: once a stream reveals a native\nphase (`Commentary` or `FinalAnswer`) it stays fixed for the rest of the\nmessage — it never flip-flops and never reverts to `None`\n(see `ExecutionPhase::refine_streamed_hint`). Providers without native\nmid-stream phase (Anthropic, Gemini, …) leave this `None` until\ncompletion. The authoritative classification remains the completed\n`RuntimeMessage.phase`."
              },
              {
                "type": "null"
              }
            ]
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID this delta belongs to",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "OutputMessageReplacedData": {
        "type": "object",
        "description": "Data for `output.message.replaced` event.\n\nEmitted between the last (suppressed) `output.message.delta` and the final\n`output.message.completed`. Tells the client to discard the text accumulated\nfor `message_id` and use `replacement` as that assistant message's text. The\noriginal model output is never persisted or replayed.",
        "required": [
          "turn_id",
          "message_id",
          "guardrail_capability_id",
          "guardrail_id",
          "reason_code",
          "replacement"
        ],
        "properties": {
          "guardrail_capability_id": {
            "type": "string",
            "description": "Stable ID of the capability that contributed the guardrail\n(e.g. `\"prompt_canary_guardrail\"`)."
          },
          "guardrail_id": {
            "type": "string",
            "description": "Stable ID of the guardrail itself (e.g. `\"prompt_canary\"`)."
          },
          "message_id": {
            "type": "string",
            "description": "Stable public ID for the assistant message whose streamed text is replaced.\nThis is the same identifier as the subsequent completed `RuntimeMessage.id`.",
            "example": "message_550e8400e29b41d4a716446655440000"
          },
          "reason_code": {
            "type": "string",
            "description": "Stable machine-readable reason code (e.g. `\"system_prompt_leak\"`).\nClients localize their copy from this rather than the human text."
          },
          "replacement": {
            "type": "string",
            "description": "Replacement text shown to the user and stored as the assistant message."
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID this replacement belongs to.",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "OutputMessageStartedData": {
        "type": "object",
        "description": "Data for output.message.started event\n\nEmitted when the LLM starts generating a response. UI can show a\n\"thinking\" indicator until output.message.delta or output.message.completed events arrive.",
        "required": [
          "turn_id",
          "message_id"
        ],
        "properties": {
          "iteration": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Current iteration number within this turn (1-based).\nUseful for UI to show progress during multi-step tool-calling flows.",
            "minimum": 0
          },
          "message_id": {
            "type": "string",
            "description": "Stable public ID for this assistant message across its streaming lifecycle.\nThis is the same identifier as `OutputMessageCompletedData.message.id`.",
            "example": "message_550e8400e29b41d4a716446655440000"
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional model name being used"
          },
          "phase": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExecutionPhase",
                "description": "Best-effort streamed phase hint (EVE-774).\n\n`None` means \"not yet classified — treat as ordinary assistant text\",\nNEVER \"thinking\". A missing/unknown phase must fall back to the\nassistant-text channel, never the reasoning channel. Only populated when\nthe provider stream reveals a native phase before this event is emitted;\ntoday `output.message.started` is emitted before the LLM call, so this is\ngenerally `None` at start. The authoritative classification remains the\ncompleted `RuntimeMessage.phase`."
              },
              {
                "type": "null"
              }
            ]
          },
          "reasoning_state": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReasoningState",
                "description": "Prepared Astra effort state, persisted before the provider call so an\ninterrupted worker can resume without changing the request baseline."
              },
              {
                "type": "null"
              }
            ]
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID this output belongs to",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "PackageCapability": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "$ref": "#/components/schemas/PackageCapabilityReference"
          }
        ],
        "description": "A named capability or a named capability with host-validated configuration."
      },
      "PackageCapabilityReference": {
        "type": "object",
        "description": "A capability requirement identified by a stable reference and optional settings.",
        "required": [
          "ref"
        ],
        "properties": {
          "config": {
            "description": "Configuration validated against the destination capability schema."
          },
          "ref": {
            "type": "string",
            "description": "Built-in or catalog capability name. Destination resource IDs are rejected."
          }
        }
      },
      "PackageInput": {
        "type": "object",
        "description": "A self-contained agent definition or package in the current session workspace.",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown/TOML/YAML/JSON agent definition, with assets embedded."
          },
          "file": {
            "type": [
              "string",
              "null"
            ],
            "description": "Path in the current Platform Chat session workspace (never server disk)."
          },
          "format": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text encoding: auto, markdown, toml, yaml or json. Defaults to auto-detection."
          },
          "target": {
            "type": [
              "string",
              "null"
            ],
            "description": "Existing agent name to update or compare. Omit to create."
          }
        },
        "additionalProperties": false
      },
      "PackageModel": {
        "type": "object",
        "description": "A portable provider/model name pair, resolved at the destination.",
        "required": [
          "provider",
          "model"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Provider-native model name, rather than a platform model ID."
          },
          "provider": {
            "type": "string",
            "description": "Stable provider name, such as openai or anthropic."
          }
        }
      },
      "PaginatedResponse_Session": {
        "type": "object",
        "description": "Response wrapper for paginated list endpoints.\nIncludes pagination metadata along with the data array.\n\n`next_url` and `prev_url` are populated by the [`decorate_pagination_links`]\nmiddleware after the handler returns, so handlers don't need to thread the\nrequest URL into every construction site.",
        "required": [
          "data",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Session - instance of agentic loop execution.\nA session represents a single conversation with an agent.",
              "required": [
                "id",
                "organization_id",
                "workspace_id",
                "harness_id",
                "owner_principal_id",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "active_schedule_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Number of active (enabled) schedules for this session.\nPopulated when the session is fetched for API responses.",
                  "example": 2,
                  "minimum": 0
                },
                "activity": {
                  "$ref": "#/components/schemas/SessionActivity",
                  "description": "Outcome-oriented status derived from `status` and the last turn result.\nThis is the value the sessions list groups by and the facet rail counts."
                },
                "agent_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ID of the agent working in this session (format: agent_{32-hex}). Optional.",
                  "example": "agent_01933b5a00007000800000000000001"
                },
                "agent_revision": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "Revision of the agent's history this session started on, when the\nagent had one. `everruns history show <agent> --revision N` shows the\nconfiguration that ran.",
                  "example": 4
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When this session was archived; `None` means active. Archived sessions\nare hidden from default list results and shown by opting in\n(`include_archived=true`). Unlike `is_pinned`, archive is a property of\nthe session itself rather than of the viewer.",
                  "example": "2026-05-25T10:14:32Z"
                },
                "blueprint_config": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Validated config passed by host at blueprint spawn time.\nExample: `{\"target_repo\": \"acme/everruns\"}`."
                },
                "blueprint_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Blueprint ID. When set, reason_activity and act_activity build TurnAgent\nfrom the blueprint definition instead of from harness_id/agent_id.",
                  "example": "blueprint_research_pack"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentCapabilityConfig"
                  },
                  "description": "Session-level capabilities (additive to agent capabilities).\nApplied after agent capabilities when building TurnAgent."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the session was created.",
                  "example": "2026-05-25T10:00:00Z"
                },
                "effective_owner": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PrincipalSummary",
                      "description": "Effective human owner summary."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "event_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Total events recorded for this session (EVE-868). Derived from the\nsession's event sequence rather than counted, so the session detail\ntab bar costs no extra scan over `events`.\n`None` on payloads built outside the database read path.",
                  "example": 42,
                  "minimum": 0
                },
                "features": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Aggregated UI features from all active capabilities (harness + agent + session).\nComputed at read time from the capability registry.\nKnown features: \"file_system\", \"schedules\", \"secrets\", \"key_value\",\n\"sql_database\", \"leased_resources\".",
                  "example": [
                    "file_system",
                    "secrets"
                  ]
                },
                "file_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Non-directory files in this session's workspace (EVE-868). Read from\n`workspaces.file_count`. Counts persisted files only: capability-provided\nvirtual mounts are served from memory and are not included.",
                  "example": 6,
                  "minimum": 0
                },
                "finished_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the session finished (completed or failed).",
                  "example": "2026-05-25T10:14:32Z"
                },
                "forked_from_sequence": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Parent event sequence the fork was taken at (the fork point). NULL unless\nthis session is a fork.",
                  "example": 42
                },
                "forked_from_session_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Session this one was forked from. NULL for sessions that were not forked.\nDistinct from `parent_session_id` (subagent nesting): forking is a\nuser-initiated \"branch from here\" relationship."
                },
                "goal": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Session objective visible to the runtime agent at system-prompt level.",
                  "example": "Investigate the queue latency regression"
                },
                "harness_id": {
                  "type": "string",
                  "description": "ID of the harness for this session (format: harness_{32-hex}).",
                  "example": "harness_01933b5a00007000800000000000001"
                },
                "hints": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Session-level client hints — arbitrary key-value pairs declared by the\nclient at session creation time. These are defaults for every turn;\nper-message `controls.hints` override these key-by-key (shallow merge).\n\nExamples: `{\"setup_connection\": true, \"rich_media\": true}`",
                  "additionalProperties": {},
                  "propertyNames": {
                    "type": "string"
                  }
                },
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the session (format: session_{32-hex}).",
                  "example": "session_01933b5a00007000800000000000001"
                },
                "initial_files": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InitialFile"
                  },
                  "description": "Starting files for a new file tree (additive to agent/harness files).\nMatching paths override earlier layers. Rejected when attaching workspace_id."
                },
                "is_pinned": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether this session is pinned by the current user.\nOnly populated when the request has an authenticated user context.",
                  "example": false
                },
                "last_message_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp of the latest input or completed assistant message.\nPopulated on session lists; session edits and tool events do not advance it."
                },
                "last_turn_status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Outcome of the latest terminal turn, distinguishing cancellation from failure."
                },
                "locale": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Locale for localized agent behavior and formatting (BCP 47, e.g. `uk-UA`).",
                  "example": "en-US"
                },
                "max_iterations": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Maximum number of LLM iterations per turn for this session.",
                  "example": 50,
                  "minimum": 0
                },
                "mcpServers": {
                  "$ref": "#/components/schemas/BTreeMap",
                  "description": "Remote MCP servers scoped to this session only."
                },
                "mcp_creator": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/McpClientAttribution",
                      "description": "Server-recorded MCP client that created this session. Not the author of later inputs."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "model_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "LLM model ID to use for this session (format: model_{32-hex}).\nOverrides the agent's default model if set.",
                  "example": "model_01933b5a00007000800000000000001"
                },
                "network_access": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/NetworkAccessList",
                      "description": "Network access list controlling which hosts/URLs this session can reach.\nMerged with harness and agent layers (allowed: intersect, blocked: union)."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "organization_id": {
                  "type": "string",
                  "description": "Organization this session belongs to (format: org_{32-hex}).",
                  "example": "org_00000000000000000000000000000001"
                },
                "output_preview": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Preview text from the last assistant response (truncated).",
                  "example": "Here is a Q3 plan covering the three pillars we discussed..."
                },
                "owner": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PrincipalSummary",
                      "description": "Owning principal summary."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "owner_principal_id": {
                  "type": "string",
                  "description": "Owning principal for this session.",
                  "example": "principal_01933b5a000070008000000000000001"
                },
                "parallel_tool_calls": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                  "example": true
                },
                "parent_session_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Parent session that spawned this subagent. NULL for top-level sessions.\nUsed to compute governed subagent delegation depth."
                },
                "playground_user_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Fixed end-user identity for a Playground conversation; independent of the resident service."
                },
                "preview": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Preview text from the first user message (truncated).",
                  "example": "Help me draft the Q3 marketing plan"
                },
                "resolved_owner_user_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "Denormalized effective human owner of the owning principal lineage.",
                  "example": "550e8400-e29b-41d4-a716-446655440000"
                },
                "run_summary": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Generated one-sentence description of what the run did, and where it\nfailed (EVE-867). Absent until a terminal turn has been summarised, and\nalways absent for chat threads and for deployments with no utility LLM,\nso a reader must have a fallback rather than treating this as required.",
                  "example": "Ran the nightly report and failed posting it to Slack: channel_not_found."
                },
                "source": {
                  "$ref": "#/components/schemas/SessionSource",
                  "description": "How this session was started. Server-owned for every ingress path."
                },
                "started_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Timestamp when the session started executing.",
                  "example": "2026-05-25T10:00:01Z"
                },
                "status": {
                  "$ref": "#/components/schemas/SessionStatus",
                  "description": "Current execution status of the session."
                },
                "system_prompt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Session-level system prompt override.\nPrepended to the agent's system prompt when building TurnAgent."
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Tags for organizing and filtering sessions.",
                  "example": [
                    "marketing",
                    "q3",
                    "draft"
                  ]
                },
                "task_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "Background work owned by this session — subagents, external agents and\nbackground tools (EVE-868). Read from `sessions.task_count`. This is\nwhat the Work tab holds; `active_schedule_count` describes only the\nschedules it also lists.",
                  "example": 3,
                  "minimum": 0
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable title for the session.",
                  "example": "Q3 marketing brief"
                },
                "tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ToolDefinition"
                  },
                  "description": "Client-side tools for this session (additive to agent tools)."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when the session was last updated.",
                  "example": "2026-05-25T10:14:32Z"
                },
                "usage": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TokenUsage",
                      "description": "Cumulative token usage for all LLM calls in this session."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "virtual_user_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional resident virtual user for unattended/background execution.",
                  "example": "identity_01933b5a00007000800000000000001"
                },
                "workspace_id": {
                  "type": "string",
                  "description": "Workspace this session is attached to (format: wsp_{32-hex}). Owns the\nsession's virtual filesystem. For the default 1:1 case this mirrors the\nsession id, but clients should read it here rather than deriving it.",
                  "example": "wsp_01933b5a00007000800000000000001"
                }
              }
            },
            "description": "Array of items returned by the list operation."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of items per page.",
            "minimum": 0
          },
          "next_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the next page, with `offset` advanced by `limit`. Omitted from the response (field absent) when this is the last page."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Current offset (starting position).",
            "minimum": 0
          },
          "prev_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the previous page, with `offset` rolled back by `limit`. Omitted from the response (field absent) when this is the first page."
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of items matching the query (across all pages).",
            "minimum": 0
          }
        }
      },
      "PaginatedResponse_VirtualUser": {
        "type": "object",
        "description": "Response wrapper for paginated list endpoints.\nIncludes pagination metadata along with the data array.\n\n`next_url` and `prev_url` are populated by the [`decorate_pagination_links`]\nmiddleware after the handler returns, so handlers don't need to thread the\nrequest URL into every construction site.",
        "required": [
          "data",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Organization-scoped runtime account with its own profile and connections.",
              "required": [
                "id",
                "organization_id",
                "usage",
                "name",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Archive timestamp."
                },
                "avatar_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional avatar URL for UI surfaces."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Creation timestamp."
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Delete timestamp."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Optional description shown in management UI."
                },
                "effective_owner": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PrincipalSummary",
                      "description": "Effective human owner summary derived from the principal lineage."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "External identifier (identity_<32-hex>). Shown as `id` in API.",
                  "example": "identity_01933b5a000070008000000000000001"
                },
                "locale": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default locale for unattended runs."
                },
                "name": {
                  "type": "string",
                  "description": "Display name used when the identity acts autonomously."
                },
                "organization_id": {
                  "type": "string",
                  "description": "Organization that owns the runtime account.",
                  "example": "org_example"
                },
                "principal": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PrincipalSummary",
                      "description": "Principal row representing this identity as a durable owner/executor."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/VirtualUserStatus",
                  "description": "Lifecycle status."
                },
                "timezone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Default timezone for unattended runs."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Last update timestamp."
                },
                "usage": {
                  "$ref": "#/components/schemas/VirtualUserUsage",
                  "description": "Immutable runtime account purpose."
                }
              }
            },
            "description": "Array of items returned by the list operation."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of items per page.",
            "minimum": 0
          },
          "next_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the next page, with `offset` advanced by `limit`. Omitted from the response (field absent) when this is the last page."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Current offset (starting position).",
            "minimum": 0
          },
          "prev_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the previous page, with `offset` rolled back by `limit`. Omitted from the response (field absent) when this is the first page."
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of items matching the query (across all pages).",
            "minimum": 0
          }
        }
      },
      "PaginatedResponse_WithUrls_AgentWithCounts": {
        "type": "object",
        "description": "Response wrapper for paginated list endpoints.\nIncludes pagination metadata along with the data array.\n\n`next_url` and `prev_url` are populated by the [`decorate_pagination_links`]\nmiddleware after the handler returns, so handlers don't need to thread the\nrequest URL into every construction site.",
        "required": [
          "data",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Agent"
                    },
                    {
                      "type": "object",
                      "required": [
                        "session_count",
                        "app_count",
                        "effective_harness",
                        "channels"
                      ],
                      "properties": {
                        "app_count": {
                          "type": "integer",
                          "format": "int64",
                          "minimum": 0
                        },
                        "channels": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AgentChannelSummary"
                          }
                        },
                        "effective_harness": {
                          "$ref": "#/components/schemas/AgentHarnessSummary"
                        },
                        "session_count": {
                          "type": "integer",
                          "format": "int64",
                          "minimum": 0
                        }
                      }
                    }
                  ],
                  "description": "Agent list/detail payload with relationship counts and resolved harness metadata."
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of items per page.",
            "minimum": 0
          },
          "next_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the next page, with `offset` advanced by `limit`. Omitted from the response (field absent) when this is the last page."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Current offset (starting position).",
            "minimum": 0
          },
          "prev_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the previous page, with `offset` rolled back by `limit`. Omitted from the response (field absent) when this is the first page."
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of items matching the query (across all pages).",
            "minimum": 0
          }
        },
        "x-sdk-response-wrapper": {
          "kind": "list",
          "model": "#/components/schemas/Agent"
        }
      },
      "PaginatedResponse_WithUrls_CapabilityInfo": {
        "type": "object",
        "description": "Response wrapper for paginated list endpoints.\nIncludes pagination metadata along with the data array.\n\n`next_url` and `prev_url` are populated by the [`decorate_pagination_links`]\nmiddleware after the handler returns, so handlers don't need to thread the\nrequest URL into every construction site.",
        "required": [
          "data",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "Public capability information (without internal details)\nThis is what gets returned from the API\nNamed CapabilityInfo to distinguish from the Capability trait",
                  "required": [
                    "id",
                    "name",
                    "description",
                    "status"
                  ],
                  "properties": {
                    "agent_count": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Number of active agents referencing this capability in the org.",
                      "example": 42,
                      "minimum": 0
                    },
                    "category": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Category for grouping in UI",
                      "example": "filesystem"
                    },
                    "config_schema": {
                      "type": "object",
                      "description": "JSON Schema for capability-specific per-agent config."
                    },
                    "config_ui_schema": {
                      "type": "object",
                      "description": "react-jsonschema-form uiSchema hints for rendering config_schema."
                    },
                    "dependencies": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "IDs of capabilities that this capability depends on.\nWhen this capability is selected, its dependencies are automatically included.",
                      "example": [
                        "approval"
                      ]
                    },
                    "description": {
                      "type": "string",
                      "description": "Description of what this capability provides",
                      "example": "Read, write, edit, list, grep, delete, and stat files in the session workspace."
                    },
                    "docs_slug": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Slug under the [capability documentation](https://everruns.com/docs/capabilities/) when public docs exist.",
                      "example": "session_file_system"
                    },
                    "feature_flag": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Rollout flag that gates this capability, when one is required.\nPresent whether or not the flag is on, so a management screen can name\nan attached capability and avoid offering it for new selection.",
                      "example": "skills"
                    },
                    "features": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "UI feature strings this capability contributes to.\nMultiple capabilities can contribute the same feature.",
                      "example": [
                        "file_browser"
                      ]
                    },
                    "harness_count": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Number of active harnesses referencing this capability in the org.",
                      "example": 7,
                      "minimum": 0
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Icon name (for UI rendering)",
                      "example": "Folder"
                    },
                    "id": {
                      "type": "string",
                      "description": "Unique capability identifier",
                      "example": "session_file_system"
                    },
                    "is_guardrail": {
                      "type": "boolean",
                      "description": "Whether this capability is a guardrail (constrains agent behavior\nrather than granting abilities). Used for UI grouping and filtering.",
                      "example": false
                    },
                    "is_mcp": {
                      "type": "boolean",
                      "description": "Whether this is an MCP server capability (for UI badge)",
                      "example": false
                    },
                    "is_skill": {
                      "type": "boolean",
                      "description": "Whether this is an Agent Skill capability (for UI badge)",
                      "example": false
                    },
                    "localizations": {
                      "type": "object",
                      "description": "Localized display strings keyed by lowercase language tag (e.g. \"uk\").\nThe \"en\" entry carries only `config_description`, since the base\nname/description/config_schema strings are already English.",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/CapabilityLocalizationInfo"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "example": {
                        "uk": {
                          "description": "Монтує спільні файли пам'яті в сесії.",
                          "name": "Пам'ять"
                        }
                      }
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name",
                      "example": "Session File System"
                    },
                    "risk_level": {
                      "$ref": "#/components/schemas/RiskLevel",
                      "description": "TM-AGENT-005: Risk level. High-risk capabilities require admin approval."
                    },
                    "status": {
                      "type": "string",
                      "description": "Current status",
                      "example": "active"
                    },
                    "system_prompt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "System prompt addition contributed by this capability",
                      "example": "You can read and write files in /workspace via the session_file_system tools."
                    },
                    "tool_definitions": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Tool definitions provided by this capability",
                      "example": [
                        {
                          "description": "Read a file from the session workspace.",
                          "name": "read_file"
                        },
                        {
                          "description": "Write or overwrite a file in the session workspace.",
                          "name": "write_file"
                        }
                      ]
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of items per page.",
            "minimum": 0
          },
          "next_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the next page, with `offset` advanced by `limit`. Omitted from the response (field absent) when this is the last page."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Current offset (starting position).",
            "minimum": 0
          },
          "prev_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the previous page, with `offset` rolled back by `limit`. Omitted from the response (field absent) when this is the first page."
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of items matching the query (across all pages).",
            "minimum": 0
          }
        },
        "x-sdk-response-wrapper": {
          "kind": "list",
          "model": "#/components/schemas/CapabilityInfo"
        }
      },
      "PaginatedResponse_WithUrls_Session": {
        "type": "object",
        "description": "Response wrapper for paginated list endpoints.\nIncludes pagination metadata along with the data array.\n\n`next_url` and `prev_url` are populated by the [`decorate_pagination_links`]\nmiddleware after the handler returns, so handlers don't need to thread the\nrequest URL into every construction site.",
        "required": [
          "data",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "description": "Session - instance of agentic loop execution.\nA session represents a single conversation with an agent.",
                  "required": [
                    "id",
                    "organization_id",
                    "workspace_id",
                    "harness_id",
                    "owner_principal_id",
                    "status",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "active_schedule_count": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int32",
                      "description": "Number of active (enabled) schedules for this session.\nPopulated when the session is fetched for API responses.",
                      "example": 2,
                      "minimum": 0
                    },
                    "activity": {
                      "$ref": "#/components/schemas/SessionActivity",
                      "description": "Outcome-oriented status derived from `status` and the last turn result.\nThis is the value the sessions list groups by and the facet rail counts."
                    },
                    "agent_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the agent working in this session (format: agent_{32-hex}). Optional.",
                      "example": "agent_01933b5a00007000800000000000001"
                    },
                    "agent_revision": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int64",
                      "description": "Revision of the agent's history this session started on, when the\nagent had one. `everruns history show <agent> --revision N` shows the\nconfiguration that ran.",
                      "example": 4
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When this session was archived; `None` means active. Archived sessions\nare hidden from default list results and shown by opting in\n(`include_archived=true`). Unlike `is_pinned`, archive is a property of\nthe session itself rather than of the viewer.",
                      "example": "2026-05-25T10:14:32Z"
                    },
                    "blueprint_config": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Validated config passed by host at blueprint spawn time.\nExample: `{\"target_repo\": \"acme/everruns\"}`."
                    },
                    "blueprint_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Blueprint ID. When set, reason_activity and act_activity build TurnAgent\nfrom the blueprint definition instead of from harness_id/agent_id.",
                      "example": "blueprint_research_pack"
                    },
                    "capabilities": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AgentCapabilityConfig"
                      },
                      "description": "Session-level capabilities (additive to agent capabilities).\nApplied after agent capabilities when building TurnAgent."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when the session was created.",
                      "example": "2026-05-25T10:00:00Z"
                    },
                    "effective_owner": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/PrincipalSummary",
                          "description": "Effective human owner summary."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "event_count": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int32",
                      "description": "Total events recorded for this session (EVE-868). Derived from the\nsession's event sequence rather than counted, so the session detail\ntab bar costs no extra scan over `events`.\n`None` on payloads built outside the database read path.",
                      "example": 42,
                      "minimum": 0
                    },
                    "features": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Aggregated UI features from all active capabilities (harness + agent + session).\nComputed at read time from the capability registry.\nKnown features: \"file_system\", \"schedules\", \"secrets\", \"key_value\",\n\"sql_database\", \"leased_resources\".",
                      "example": [
                        "file_system",
                        "secrets"
                      ]
                    },
                    "file_count": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int32",
                      "description": "Non-directory files in this session's workspace (EVE-868). Read from\n`workspaces.file_count`. Counts persisted files only: capability-provided\nvirtual mounts are served from memory and are not included.",
                      "example": 6,
                      "minimum": 0
                    },
                    "finished_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when the session finished (completed or failed).",
                      "example": "2026-05-25T10:14:32Z"
                    },
                    "forked_from_sequence": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int32",
                      "description": "Parent event sequence the fork was taken at (the fork point). NULL unless\nthis session is a fork.",
                      "example": 42
                    },
                    "forked_from_session_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Session this one was forked from. NULL for sessions that were not forked.\nDistinct from `parent_session_id` (subagent nesting): forking is a\nuser-initiated \"branch from here\" relationship."
                    },
                    "goal": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Session objective visible to the runtime agent at system-prompt level.",
                      "example": "Investigate the queue latency regression"
                    },
                    "harness_id": {
                      "type": "string",
                      "description": "ID of the harness for this session (format: harness_{32-hex}).",
                      "example": "harness_01933b5a00007000800000000000001"
                    },
                    "hints": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Session-level client hints — arbitrary key-value pairs declared by the\nclient at session creation time. These are defaults for every turn;\nper-message `controls.hints` override these key-by-key (shallow merge).\n\nExamples: `{\"setup_connection\": true, \"rich_media\": true}`",
                      "additionalProperties": {},
                      "propertyNames": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string",
                      "description": "Unique identifier for the session (format: session_{32-hex}).",
                      "example": "session_01933b5a00007000800000000000001"
                    },
                    "initial_files": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InitialFile"
                      },
                      "description": "Starting files for a new file tree (additive to agent/harness files).\nMatching paths override earlier layers. Rejected when attaching workspace_id."
                    },
                    "is_pinned": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether this session is pinned by the current user.\nOnly populated when the request has an authenticated user context.",
                      "example": false
                    },
                    "last_message_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp of the latest input or completed assistant message.\nPopulated on session lists; session edits and tool events do not advance it."
                    },
                    "last_turn_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Outcome of the latest terminal turn, distinguishing cancellation from failure."
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Locale for localized agent behavior and formatting (BCP 47, e.g. `uk-UA`).",
                      "example": "en-US"
                    },
                    "max_iterations": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Maximum number of LLM iterations per turn for this session.",
                      "example": 50,
                      "minimum": 0
                    },
                    "mcpServers": {
                      "$ref": "#/components/schemas/BTreeMap",
                      "description": "Remote MCP servers scoped to this session only."
                    },
                    "mcp_creator": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/McpClientAttribution",
                          "description": "Server-recorded MCP client that created this session. Not the author of later inputs."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "model_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "LLM model ID to use for this session (format: model_{32-hex}).\nOverrides the agent's default model if set.",
                      "example": "model_01933b5a00007000800000000000001"
                    },
                    "network_access": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/NetworkAccessList",
                          "description": "Network access list controlling which hosts/URLs this session can reach.\nMerged with harness and agent layers (allowed: intersect, blocked: union)."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "organization_id": {
                      "type": "string",
                      "description": "Organization this session belongs to (format: org_{32-hex}).",
                      "example": "org_00000000000000000000000000000001"
                    },
                    "output_preview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Preview text from the last assistant response (truncated).",
                      "example": "Here is a Q3 plan covering the three pillars we discussed..."
                    },
                    "owner": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/PrincipalSummary",
                          "description": "Owning principal summary."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "owner_principal_id": {
                      "type": "string",
                      "description": "Owning principal for this session.",
                      "example": "principal_01933b5a000070008000000000000001"
                    },
                    "parallel_tool_calls": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                      "example": true
                    },
                    "parent_session_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Parent session that spawned this subagent. NULL for top-level sessions.\nUsed to compute governed subagent delegation depth."
                    },
                    "playground_user_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Fixed end-user identity for a Playground conversation; independent of the resident service."
                    },
                    "preview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Preview text from the first user message (truncated).",
                      "example": "Help me draft the Q3 marketing plan"
                    },
                    "resolved_owner_user_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid",
                      "description": "Denormalized effective human owner of the owning principal lineage.",
                      "example": "550e8400-e29b-41d4-a716-446655440000"
                    },
                    "run_summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Generated one-sentence description of what the run did, and where it\nfailed (EVE-867). Absent until a terminal turn has been summarised, and\nalways absent for chat threads and for deployments with no utility LLM,\nso a reader must have a fallback rather than treating this as required.",
                      "example": "Ran the nightly report and failed posting it to Slack: channel_not_found."
                    },
                    "source": {
                      "$ref": "#/components/schemas/SessionSource",
                      "description": "How this session was started. Server-owned for every ingress path."
                    },
                    "started_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Timestamp when the session started executing.",
                      "example": "2026-05-25T10:00:01Z"
                    },
                    "status": {
                      "$ref": "#/components/schemas/SessionStatus",
                      "description": "Current execution status of the session."
                    },
                    "system_prompt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Session-level system prompt override.\nPrepended to the agent's system prompt when building TurnAgent."
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Tags for organizing and filtering sessions.",
                      "example": [
                        "marketing",
                        "q3",
                        "draft"
                      ]
                    },
                    "task_count": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int32",
                      "description": "Background work owned by this session — subagents, external agents and\nbackground tools (EVE-868). Read from `sessions.task_count`. This is\nwhat the Work tab holds; `active_schedule_count` describes only the\nschedules it also lists.",
                      "example": 3,
                      "minimum": 0
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable title for the session.",
                      "example": "Q3 marketing brief"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ToolDefinition"
                      },
                      "description": "Client-side tools for this session (additive to agent tools)."
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp when the session was last updated.",
                      "example": "2026-05-25T10:14:32Z"
                    },
                    "usage": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/TokenUsage",
                          "description": "Cumulative token usage for all LLM calls in this session."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "virtual_user_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Optional resident virtual user for unattended/background execution.",
                      "example": "identity_01933b5a00007000800000000000001"
                    },
                    "workspace_id": {
                      "type": "string",
                      "description": "Workspace this session is attached to (format: wsp_{32-hex}). Owns the\nsession's virtual filesystem. For the default 1:1 case this mirrors the\nsession id, but clients should read it here rather than deriving it.",
                      "example": "wsp_01933b5a00007000800000000000001"
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "self_url",
                    "view_url",
                    "ui_link"
                  ],
                  "properties": {
                    "allowed_actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AllowedAction"
                      },
                      "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
                    },
                    "self_url": {
                      "type": "string",
                      "description": "Full API endpoint URL for this resource."
                    },
                    "ui_link": {
                      "type": "string",
                      "description": "Alias for `view_url`, used by command and MCP outputs."
                    },
                    "view_url": {
                      "type": "string",
                      "description": "Full UI URL for viewing this resource."
                    }
                  }
                }
              ],
              "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
            },
            "description": "Array of items returned by the list operation."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of items per page.",
            "minimum": 0
          },
          "next_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the next page, with `offset` advanced by `limit`. Omitted from the response (field absent) when this is the last page."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "description": "Current offset (starting position).",
            "minimum": 0
          },
          "prev_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute URL for the previous page, with `offset` rolled back by `limit`. Omitted from the response (field absent) when this is the first page."
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of items matching the query (across all pages).",
            "minimum": 0
          }
        },
        "x-sdk-response-wrapper": {
          "kind": "list",
          "model": "#/components/schemas/Session"
        }
      },
      "PaymentAccount": {
        "type": "object",
        "description": "A payment account — the org-scoped source of funds for paid agent calls.\nEach account binds an owning principal (user, virtual user, or org)\nto one settlement rail and tracks its provisioning lifecycle.",
        "required": [
          "id",
          "organization_id",
          "owner_type",
          "owner_id",
          "rail",
          "label",
          "status",
          "metadata",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this account was created (RFC 3339).",
            "example": "2026-04-01T10:00:00Z"
          },
          "id": {
            "$ref": "#/components/schemas/payacctId",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
          },
          "label": {
            "type": "string",
            "description": "Human-readable label for this account. Safe to render in user-facing messages.",
            "example": "Production USDC ops wallet"
          },
          "metadata": {
            "description": "Free-form metadata attached to this account (caller-defined; opaque to the platform)."
          },
          "organization_id": {
            "type": "string",
            "description": "Owning organization's prefixed public identifier.",
            "example": "org_01933b5a000070008000000000000001"
          },
          "owner_id": {
            "type": "string",
            "description": "Prefixed identifier of the owning principal (e.g. `user_…`, `agent_…`, `org_…`).",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "owner_type": {
            "$ref": "#/components/schemas/PaymentOwnerType",
            "description": "Principal class that owns this account (user, virtual user, or organization)."
          },
          "public_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public address on the rail (chain address, account number, etc.). Optional; `None` until provisioning completes.",
            "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
          },
          "rail": {
            "$ref": "#/components/schemas/PaymentRail",
            "description": "Settlement rail this account operates on."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus",
            "description": "Current lifecycle status of this account."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this account was last updated (RFC 3339).",
            "example": "2026-05-20T14:00:00Z"
          }
        }
      },
      "PaymentAttempt": {
        "type": "object",
        "description": "A single paid-call settlement attempt — the durable record of one\nauthorization+settlement cycle issued through the payment authority.\nPersisted regardless of outcome so failed attempts remain auditable.",
        "required": [
          "id",
          "organization_id",
          "capability",
          "operation",
          "amount_usd",
          "currency",
          "target_url",
          "status",
          "receipt",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "amount_usd": {
            "type": "number",
            "format": "double",
            "description": "Amount actually charged (USD).",
            "example": 0.014
          },
          "capability": {
            "type": "string",
            "description": "Capability ID that originated this paid call.",
            "example": "paid_search"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this attempt was created (RFC 3339).",
            "example": "2026-05-25T10:14:00Z"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code for the charge (typically `USD`).",
            "example": "USD"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable error message when `status` is `failed`; `None` otherwise.",
            "example": "rail.insufficient_funds: settled balance below minimum"
          },
          "id": {
            "$ref": "#/components/schemas/payattId",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
          },
          "operation": {
            "type": "string",
            "description": "Capability-specific operation name that originated this paid call.",
            "example": "search.query"
          },
          "organization_id": {
            "type": "string",
            "description": "Owning organization's prefixed public identifier.",
            "example": "org_01933b5a000070008000000000000001"
          },
          "payment_account_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/payacctId",
                "description": "Payment account that settled (or attempted to settle) this attempt. `None` if no account could be resolved."
              },
              {
                "type": "null"
              }
            ]
          },
          "rail": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentRail",
                "description": "Settlement rail actually used. `None` if the attempt failed before rail selection."
              },
              {
                "type": "null"
              }
            ]
          },
          "receipt": {
            "description": "Rail-specific receipt payload (transaction id, block reference, signature, etc.)."
          },
          "request_hash": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable hash of the outbound request used to detect replays. `None` when not applicable.",
            "example": "sha256:9f1e2a4c3d5b6e8a0b2c4d6e8f0a1b3c5d7e9f0a1b2c4d6e8f0a1b2c4d6e8f0a"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session that initiated the paid call, if any.",
            "example": "session_01933b5a000070008000000000000001"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus",
            "description": "Current lifecycle status of this attempt."
          },
          "target_url": {
            "type": "string",
            "description": "Destination URL of the paid outbound call.",
            "example": "https://api.example.com/v1/search"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this attempt was last updated (RFC 3339).",
            "example": "2026-05-25T10:14:02Z"
          }
        }
      },
      "PaymentOwnerType": {
        "type": "string",
        "description": "Principal class that owns a payment account.",
        "enum": [
          "user",
          "virtual_user",
          "organization"
        ]
      },
      "PaymentPolicy": {
        "type": "object",
        "description": "A payment policy — the binding between a paying account and a subject\n(virtual user, session) that controls which paid calls are\nauthorized and at what spend caps.",
        "required": [
          "id",
          "organization_id",
          "payment_account_id",
          "subject_type",
          "subject_id",
          "allowed_capabilities",
          "allowed_hosts",
          "rail_preference",
          "status",
          "metadata",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "allowed_capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Capability IDs this policy permits paid calls for. Empty list means no capability gating.",
            "example": [
              "paid_search",
              "paid_image_gen"
            ]
          },
          "allowed_hosts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "HTTP host allowlist for paid outbound calls. Empty list means no host gating.",
            "example": [
              "api.openai.com",
              "api.anthropic.com"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this policy was created (RFC 3339).",
            "example": "2026-04-01T10:00:00Z"
          },
          "id": {
            "$ref": "#/components/schemas/paypolId",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
          },
          "max_amount_usd_per_day": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Maximum cumulative amount (USD) over a rolling 24 hours, enforced before signing by reserving each request's maximum. `None` means no per-day cap.",
            "example": 50
          },
          "max_amount_usd_per_request": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Maximum amount (USD) any single paid request may settle for. **Enforced** by the payment authority at policy selection. `None` means no per-request cap.",
            "example": 2.5
          },
          "max_amount_usd_per_turn": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Maximum cumulative amount (USD) per agent turn, enforced before signing by reserving each request's maximum against the turn. A request with no turn binding fails closed. `None` means no per-turn cap.",
            "example": 5
          },
          "metadata": {
            "description": "Free-form metadata attached to this policy."
          },
          "organization_id": {
            "type": "string",
            "description": "Owning organization's prefixed public identifier.",
            "example": "org_01933b5a000070008000000000000001"
          },
          "payment_account_id": {
            "$ref": "#/components/schemas/payacctId",
            "description": "Payment account this policy authorizes spending from."
          },
          "rail_preference": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRail"
            },
            "description": "Preferred settlement rails in priority order; the authority picks the first available."
          },
          "require_approval_above_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Threshold (USD) above which a request would require explicit human approval. **Advisory only — not yet enforced.** Stored on the policy for forward compatibility; no approval gate is wired up yet. `None` disables the (future) gate.",
            "example": 10
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus",
            "description": "Current lifecycle status of this policy."
          },
          "subject_id": {
            "type": "string",
            "description": "Prefixed identifier of the bound subject.",
            "example": "identity_01933b5a000070008000000000000001"
          },
          "subject_type": {
            "type": "string",
            "description": "Class of subject this policy binds to (e.g. `virtual_user`, `session`).",
            "example": "virtual_user"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this policy was last updated (RFC 3339).",
            "example": "2026-05-20T14:00:00Z"
          }
        }
      },
      "PaymentRail": {
        "type": "string",
        "description": "Payment rail used to settle a machine payment.",
        "enum": [
          "mpp_tempo",
          "x402_base"
        ]
      },
      "PaymentStatus": {
        "type": "string",
        "description": "Lifecycle state of a payment account, policy, or attempt. The shared\nvocabulary keeps account/policy admin and attempt settlement on the\nsame status taxonomy.",
        "enum": [
          "active",
          "disabled",
          "pending",
          "succeeded",
          "failed",
          "released"
        ]
      },
      "PendingApprovalView": {
        "type": "object",
        "description": "A held-back tool call the session waits on. Same shape as serve's\n`pending_approvals` item, plus `answerable`.",
        "required": [
          "tool_call_id",
          "answerable",
          "tool_name",
          "arguments",
          "risk",
          "expires_at"
        ],
        "properties": {
          "agent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RequestingAgent",
                "description": "The asking agent, when another agent in the run asked."
              },
              {
                "type": "null"
              }
            ]
          },
          "answerable": {
            "type": "boolean",
            "description": "Always `true`: the person using the agent answers its approvals."
          },
          "arguments": {
            "type": "object"
          },
          "arguments_truncated": {
            "type": "boolean",
            "description": "`arguments` is a truncated preview; the decision still binds to the\nfull arguments."
          },
          "expires_at": {
            "type": "string",
            "description": "When the request counts as rejected (RFC 3339)."
          },
          "risk": {
            "type": "string",
            "description": "Why the gate asked: `destructive`, `open_world`, `mutating` or `policy`."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The asking agent's session, when another agent in the run asked.\nAnswer on this session; the server routes it."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The request to name in `POST …/tool-approvals`."
          },
          "tool_name": {
            "type": "string"
          }
        }
      },
      "PendingQuestionView": {
        "type": "object",
        "description": "An `ask_user` question set the session waits on. Same shape as serve's\n`pending_questions` item.",
        "required": [
          "tool_call_id",
          "questions"
        ],
        "properties": {
          "agent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RequestingAgent",
                "description": "The asking agent, when another agent in the run asked."
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the server stops waiting (RFC 3339)."
          },
          "questions": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The questions as asked: `kind`, `id`, `header`, `question`, `options`,\n`multi_select`, `allow_other`."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The asking agent's session, when another agent in the run asked.\nAnswer on this session; the server routes it."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The `ask_user` call to name in `POST …/question-answers`."
          }
        }
      },
      "PersonalSourceAccount": {
        "type": "object",
        "description": "The caller's own GitHub sign-in.",
        "required": [
          "connected",
          "repositories"
        ],
        "properties": {
          "connected": {
            "type": "boolean",
            "description": "The caller has signed in to GitHub."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why repositories could not be listed, when they could not."
          },
          "login": {
            "type": [
              "string",
              "null"
            ],
            "description": "GitHub login of that sign-in.",
            "example": "octocat"
          },
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRepository"
            },
            "description": "Repositories reachable through the shared App's installations the person can access."
          }
        }
      },
      "PhaseSource": {
        "type": "string",
        "description": "Where a message's [`ExecutionPhase`] came from.\n\nOnly some providers report a phase. For the rest the runtime infers one from\ntool-call presence, where \"commentary\" means nothing more than \"this message\ncalled tools\" — so a text-only preamble is indistinguishable from a final\nanswer. Those are different claims, and a consumer cannot tell them apart\nfrom the phase value alone, so the source travels with it.",
        "enum": [
          "provider",
          "derived",
          "communication"
        ]
      },
      "PlatformDetection": {
        "type": "object",
        "description": "An open finding of the platform operator's concern, in any organization.",
        "required": [
          "issue_id",
          "org_id",
          "org_name",
          "code",
          "first_detected_at"
        ],
        "properties": {
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the session's agent.",
            "example": "Outreach bot"
          },
          "cluster_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of the cluster of similar findings in that organization."
          },
          "code": {
            "type": "string",
            "description": "Detector code of the finding.",
            "example": "session.suspected_abuse"
          },
          "evidence": {
            "type": [
              "object",
              "null"
            ],
            "description": "The numbers the classifier recorded, never session content."
          },
          "first_detected_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the current episode was first detected.",
            "example": "2026-10-18T21:40:00Z"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid",
            "description": "Health issue identifier of the finding.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "org_id": {
            "type": "string",
            "description": "Public identifier of the organization.",
            "example": "org_550e8400e29b41d4a716446655440000"
          },
          "org_name": {
            "type": "string",
            "description": "Display name of the organization.",
            "example": "Acme"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public identifier of the session the finding points at.",
            "example": "session_550e8400e29b41d4a716446655440000"
          },
          "severity": {
            "type": [
              "string",
              "null"
            ],
            "description": "`high`, `medium` or `low`, as the Inspector judged it.",
            "example": "high"
          },
          "suggested_action": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Inspector's suggested next step."
          },
          "what_happened": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Inspector's account of what happened, once written."
          }
        }
      },
      "PlatformDetectionList": {
        "type": "object",
        "description": "A page of open platform detections.",
        "required": [
          "data",
          "total",
          "offset",
          "limit"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformDetection"
            },
            "description": "Detections in this page."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Effective page size.",
            "example": 20
          },
          "offset": {
            "type": "integer",
            "format": "int64",
            "description": "Effective pagination offset.",
            "example": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Number of open detections.",
            "example": 1
          }
        }
      },
      "PolicySource": {
        "type": "string",
        "description": "Which usage a policy counts. Absent counts everything.",
        "enum": [
          "all",
          "managed",
          "own_keys"
        ]
      },
      "PolicyStep": {
        "type": "object",
        "description": "One step of a usage policy, at a percent of the limit.",
        "required": [
          "at_percent",
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/PolicyStepAction",
            "description": "What happens when usage reaches the step."
          },
          "at_percent": {
            "type": "number",
            "format": "double",
            "description": "Percent of the limit at which the step applies (1 to 100)."
          }
        }
      },
      "PolicyStepAction": {
        "type": "string",
        "description": "What a usage policy does when its spend crosses a step.",
        "enum": [
          "notify",
          "ask",
          "stop"
        ]
      },
      "PostRoomMessageResponse": {
        "type": "object",
        "description": "A posted message and the agents it woke.",
        "required": [
          "message",
          "woke"
        ],
        "properties": {
          "message": {
            "$ref": "#/components/schemas/RoomMessage",
            "description": "The posted message."
          },
          "woke": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomWake"
            },
            "description": "Agent members the message addressed, and what happened to each."
          }
        }
      },
      "PostTaskMessageBody": {
        "type": "object",
        "description": "Request body for posting an inbound task message.",
        "properties": {
          "content": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/TaskMessagePart"
            },
            "description": "Structured message parts (alternative to `text`)."
          },
          "in_reply_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Input request ID this message answers, when applicable."
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Plain-text message (alternative to `content`)."
          }
        }
      },
      "PreviewAgentRequest": {
        "type": "object",
        "description": "Request to preview the final agent shape with capabilities applied",
        "required": [
          "system_prompt"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Saved agent this draft edits, for checks that depend on its channels\nand harness (for example, a Slack channel without Reactions).",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capabilities to apply with per-agent configuration.",
            "example": [
              {
                "config": {},
                "ref": "current_time"
              },
              {
                "config": {},
                "ref": "test_math"
              }
            ]
          },
          "harness_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/harnessId",
                "description": "Harness to layer beneath this draft. Omit to preview the agent layer alone."
              },
              {
                "type": "null"
              }
            ]
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Draft starter files; agent paths override inherited harness files."
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "Remote MCP servers scoped to the previewed agent."
          },
          "system_prompt": {
            "type": "string",
            "description": "The base system prompt (before capability additions)",
            "example": "You are a helpful customer support agent."
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Client-side tools to include in the preview."
          }
        }
      },
      "PreviewHarnessRequest": {
        "type": "object",
        "description": "Request to preview harness shape with capabilities applied",
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capability configurations to layer onto the preview. Empty list means none.",
            "example": [
              {
                "config": {},
                "ref": "web.search"
              },
              {
                "config": {
                  "root": "/workspace"
                },
                "ref": "filesystem.read"
              }
            ]
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "MCP servers scoped to this preview, keyed by scope (`shared` / per-agent / etc.).\nUse the camelCase key `mcpServers` (preferred) or the snake_case alias `mcp_servers`. Empty by default."
          },
          "parent_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parent harness to extend. When set, its prompt, capabilities, and MCP servers are\nmerged with the fields in this request before rendering.",
            "example": "harness_01933b5a000070008000000000000602"
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "System prompt to render as the base prompt for the preview. Optional:\nomit to preview a harness that contributes no base prompt of its own.",
            "example": "You are a research assistant."
          }
        }
      },
      "PrincipalKind": {
        "type": "string",
        "description": "Class of principal that can hold permissions or own resources. `system`\nis reserved for platform-internal callers and is never minted via the\npublic API.",
        "enum": [
          "user",
          "virtual_user",
          "system"
        ]
      },
      "PrincipalSummary": {
        "type": "object",
        "description": "Compact view of a principal — id + kind + the subject-id pointer back\ninto the user/virtual-user row. Used wherever a full `Principal`\nwould be redundant (e.g. as a sub-field of a session or audit record).",
        "required": [
          "id",
          "kind"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "principal_01933b5a000070008000000000000001"
          },
          "kind": {
            "$ref": "#/components/schemas/PrincipalKind"
          },
          "metadata": {},
          "subject_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "ProfileResponse": {
        "type": "object",
        "description": "Response from profile update",
        "required": [
          "id",
          "email",
          "name"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages."
          }
        }
      },
      "ProgressStep": {
        "type": "object",
        "description": "One checklist line in [`BackgroundProgress::steps`].",
        "required": [
          "title",
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ProgressStepStatus"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "ProgressStepStatus": {
        "type": "string",
        "description": "State of one checklist line.",
        "enum": [
          "pending",
          "in_progress",
          "done",
          "skipped"
        ]
      },
      "PromptCacheStrategy": {
        "type": "string",
        "description": "Strategy for prompt caching.",
        "enum": [
          "auto",
          "explicit"
        ]
      },
      "ProposalCategory": {
        "type": "string",
        "description": "What part of the agent's job a proposed case covers.",
        "enum": [
          "happy_path",
          "edge_case",
          "failure",
          "adversarial"
        ]
      },
      "ProposalStatus": {
        "type": "string",
        "description": "Whether a proposal is decided.",
        "enum": [
          "proposed",
          "accepted",
          "dismissed"
        ]
      },
      "Provider": {
        "type": "object",
        "description": "LLM Provider entity (API keys never exposed)\nThis is the persisted provider entity, separate from the runtime provider trait.",
        "required": [
          "id",
          "name",
          "provider_type",
          "api_key_set",
          "status",
          "managed",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "api": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chat API declared by the provider driver; \"default\" restores its default."
          },
          "api_key_set": {
            "type": "boolean",
            "description": "Whether an API key is configured. The key itself is never returned."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom base URL for self-hosted / proxied providers. `None` means use the provider's default endpoint."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this provider was created (RFC 3339)."
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "provider_01933b5a00007000800000000000001"
          },
          "last_synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the most recent successful model sync from the provider's API (RFC 3339)."
          },
          "managed": {
            "type": "boolean",
            "description": "Whether this provider is host-managed (EVE-810). A managed provider is\nprovisioned by the host/embedder; the OSS API rejects tenant PATCH/DELETE\non it (403). Read-only to org admins. Defaults to `false`."
          },
          "models_reviewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When someone last reviewed this provider's discovered models (RFC 3339).\nA discovered model created later that is still disabled is reported as\n`is_new` on the model. `None` means never reviewed."
          },
          "name": {
            "type": "string",
            "description": "Human-readable provider name. Safe to render in user-facing messages."
          },
          "provider_type": {
            "$ref": "#/components/schemas/DriverId",
            "description": "Provider implementation type (OpenAI, Anthropic, Gemini, etc.)."
          },
          "request_options": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderRequestOptions",
                "description": "Extra headers and diagnostics options applied to every request sent to\nthis provider. `None` when the org configured nothing."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ProviderStatus",
            "description": "Current lifecycle status of this provider."
          },
          "trace": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderTraceConfig",
                "description": "Resolved trace/observability link configuration: the driver's default\ntemplates overlaid with this provider's stored overrides. `None` when the\ndriver exposes no dashboard and the org configured nothing."
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this provider was last updated (RFC 3339)."
          }
        }
      },
      "ProviderOpaqueContent": {
        "type": "object",
        "description": "Provider-native assistant content retained for lossless replay.\n\nDrivers use this only when a provider requires its response content to be\nsent back without reconstruction. The portable text, reasoning, and tool\ncall fields remain the fallback for other providers.",
        "required": [
          "provider",
          "content"
        ],
        "properties": {
          "content": {
            "type": "object",
            "description": "Original provider-native assistant content."
          },
          "provider": {
            "type": "string",
            "description": "Provider that owns and can replay this content."
          }
        }
      },
      "ProviderRequestHeader": {
        "type": "object",
        "description": "One extra HTTP header sent with every request to a provider connection.",
        "required": [
          "name",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Header name, e.g. `x-gateway-tenant`."
          },
          "value": {
            "type": "string",
            "description": "Header value, sent verbatim."
          }
        }
      },
      "ProviderRequestOptions": {
        "type": "object",
        "description": "Per-connection request options: what an org wants added to every outbound\nrequest to this provider, beyond endpoint and credentials.\n\nThese are connection-level on purpose. A gateway header or a diagnostics\nopt-in describes the *service* an org talks to, not one agent's behavior, so\nit belongs next to the base URL and credentials rather than on every agent.",
        "properties": {
          "cache_diagnostics": {
            "type": "boolean",
            "description": "Ask the provider to explain unexpected prompt-cache misses. Honored by\ndrivers with a diagnostics protocol (today: Anthropic's\n`cache-diagnosis` beta); ignored elsewhere."
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderRequestHeader"
            },
            "description": "Extra HTTP headers added to every request to this provider. They\noverride the driver's and the connection's own headers by name, but\nconnection-level headers (`host`, `content-length`, ...) are ignored."
          }
        }
      },
      "ProviderResponse": {
        "type": "object",
        "description": "Provider info for the connections UI",
        "required": [
          "provider_id",
          "display_name",
          "description",
          "icon",
          "connection_type",
          "capabilities"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Product features that can consume this connection."
          },
          "connection_type": {
            "type": "string",
            "description": "Provider credential mechanism.",
            "example": "oauth"
          },
          "description": {
            "type": "string",
            "description": "Provider description.",
            "example": "Connect your repositories"
          },
          "display_name": {
            "type": "string",
            "description": "Provider display name.",
            "example": "GitHub"
          },
          "form_schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FormSchemaResponse",
                "description": "Fields required for API key providers."
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "type": "string",
            "description": "Provider icon name.",
            "example": "github"
          },
          "icon_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Theme-neutral icon published by an MCP server. The named `icon` remains\nthe fallback when this is absent."
          },
          "icons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpServerIcon"
            },
            "description": "Icons published by an MCP server, including light and dark variants."
          },
          "provider_id": {
            "type": "string",
            "description": "Stable provider identifier.",
            "example": "github"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Operator slug when the heading is a discovered title or a plugin name."
          }
        }
      },
      "ProviderSandboxState": {
        "type": "object",
        "description": "What the provider reports about the sandbox now. Built from an allowlist of\nfields; never the provider's raw object.",
        "required": [
          "provider",
          "external_id",
          "checked_at",
          "exists",
          "state",
          "labels",
          "details"
        ],
        "properties": {
          "active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether it holds compute (and so bills for it), when known."
          },
          "auto_archive_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "auto_delete_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "auto_stop_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The provider's own idle stop in minutes (0 is off). It acts on its own,\nindependently of Everruns' idle pause."
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "desired_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "details": {
            "type": "object",
            "description": "Size, region, image and similar non-secret details.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the provider ends the sandbox on its own."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider's own error or exit reason."
          },
          "exists": {
            "type": "boolean",
            "description": "Whether the provider still knows the sandbox."
          },
          "external_id": {
            "type": "string"
          },
          "labels": {
            "type": "object",
            "description": "Labels Everruns set on it.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "provider": {
            "type": "string",
            "example": "daytona"
          },
          "recoverable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "state": {
            "type": "string",
            "description": "Provider-native state, such as `started`, `stopped` or `archived`.",
            "example": "stopped"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ProviderStatus": {
        "type": "string",
        "description": "LLM provider status",
        "enum": [
          "active",
          "disabled"
        ]
      },
      "ProviderTraceConfig": {
        "type": "object",
        "description": "Configuration for linking from the chat UI to a provider's observability\ndashboard (\"trace\"/\"logs\").\n\nThis is provider-agnostic: any driver with a dashboard can supply default\ntemplates (see [`DriverId::default_trace_templates`]), and an org enables\nlinks per provider once it has confirmed logging is on for that account.\nURL templates support the `{response_id}`, `{session_id}`, `{turn_id}` and\n`{model}` placeholders, so the same mechanism works for OpenRouter today and\nfor third-party observability backends (Langfuse, Helicone, ...) via an\noverride.",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether trace links should be shown for this provider. Defaults to\n`false`: vendors typically do not retain trace content unless logging is\nexplicitly enabled, so the org opts in once that is set up."
          },
          "generation_url_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL template for a single generation's trace, e.g.\n`\"https://openrouter.ai/logs?id={response_id}\"`."
          },
          "session_url_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL template for a session's grouped trace, e.g.\n`\"https://openrouter.ai/logs\"`."
          }
        }
      },
      "ProvidersConfigResponse": {
        "type": "object",
        "description": "Provider resource config: caller policies plus the credential schemas the UI\nrenders per driver.",
        "required": [
          "policies",
          "drivers"
        ],
        "properties": {
          "drivers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DriverCredentialInfo"
            },
            "description": "Per-driver credential schemas, ordered by driver id."
          },
          "policies": {
            "type": "object",
            "description": "Map of policy ID → whether the caller satisfies it.",
            "additionalProperties": {
              "type": "boolean"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "PublishedAgentView": {
        "type": "object",
        "description": "The view snapshot available to the current chat viewer.",
        "required": [
          "revision",
          "title",
          "layout",
          "data",
          "allow_personalization"
        ],
        "properties": {
          "allow_personalization": {
            "type": "boolean",
            "description": "Whether the current viewer may save a personal layout.",
            "example": true
          },
          "data": {
            "type": "object",
            "description": "Most recently published data allowed by this definition.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "changes": 3,
              "status": "Up to date"
            }
          },
          "layout": {
            "$ref": "#/components/schemas/AgentViewLayout",
            "description": "Published layout or the Agent's default layout."
          },
          "personal_layout": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentViewLayout",
                "description": "Layout saved privately by the current viewer, if available."
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Revision of the Agent's current view settings.",
            "example": 1
          },
          "title": {
            "type": "string",
            "description": "Display name from the Agent's view definition.",
            "example": "Repository activity"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of the latest successful publication, if available.",
            "example": "2026-11-20T19:00:00Z"
          }
        }
      },
      "QualityGroup": {
        "type": "object",
        "description": "Completed scores in one group of a live-quality summary.",
        "required": [
          "key",
          "scored",
          "passed",
          "sessions"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "An agent id, an observer id or a day (`YYYY-MM-DD`), by list.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "pass_rate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "`passed / scored`; absent when nothing was scored.",
            "example": 0.92
          },
          "passed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "scored": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Distinct sessions the scores read.",
            "minimum": 0
          },
          "trend": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "description": "Daily pass rates, oldest first (agent groups only)."
          }
        }
      },
      "QualityMonitoringPolicy": {
        "type": "object",
        "description": "Consent and spending admission for system-managed compaction observers.\nNo content is shared outside the organization's configured model provider.",
        "properties": {
          "daily_budget_usd": {
            "type": "number",
            "format": "double",
            "description": "UTC-day admission cap, including reserved uncertain/retry costs.\nZero disables model calls while retaining mechanical checks.",
            "default": 0,
            "example": 0
          },
          "enabled": {
            "type": "boolean",
            "description": "Explicit organization consent. Disabled by default.",
            "default": false,
            "example": false
          },
          "excluded_tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sessions with any of these tags are excluded before reading content.",
            "example": [
              "sensitive"
            ],
            "default": []
          },
          "model_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/modelId",
                "description": "Explicit org model. None enables mechanical checks only."
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "sampling_rate": {
            "type": "number",
            "format": "double",
            "description": "Fraction of eligible checkpoints receiving a content-based assessment.",
            "default": 0.02,
            "example": 0.02
          }
        },
        "additionalProperties": false
      },
      "QualityMonitoringReport": {
        "type": "object",
        "description": "Organization consent, monitoring coverage and current daily spending.",
        "required": [
          "policy",
          "today",
          "checks"
        ],
        "properties": {
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringCheckTotals"
            },
            "description": "Separate execution and continuity verdict counts over seven days."
          },
          "observer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Managed observer identity, absent until monitoring has been configured.",
            "example": "observer_01933b5a000070008000000000000001"
          },
          "policy": {
            "$ref": "#/components/schemas/QualityMonitoringPolicy",
            "description": "Current organization opt-in and assessment settings."
          },
          "today": {
            "$ref": "#/components/schemas/MonitoringSpend",
            "description": "Conservative admission reservations and provider-reported cost for this UTC day."
          }
        }
      },
      "QualitySummary": {
        "type": "object",
        "description": "How production traffic scored over the last `days`: in total, by agent,\nby observer and by day.",
        "required": [
          "since",
          "days",
          "scored",
          "passed",
          "sessions",
          "by_agent",
          "by_observer",
          "by_day"
        ],
        "properties": {
          "by_agent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QualityGroup"
            }
          },
          "by_day": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QualityGroup"
            }
          },
          "by_observer": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QualityGroup"
            }
          },
          "days": {
            "type": "integer",
            "format": "int32",
            "example": 7,
            "minimum": 0
          },
          "pass_rate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "example": 0.92
          },
          "passed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "scored": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "sessions": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "since": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the window."
          }
        }
      },
      "QuestionAnswersRequest": {
        "type": "object",
        "description": "Request to answer a pending `ask_user` question set.",
        "properties": {
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubmittedAnswer"
            },
            "description": "One answer per asked question, keyed by question id.",
            "example": [
              {
                "id": "target",
                "other_text": null,
                "selected": [
                  "Staging"
                ]
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SubmittedStatus",
            "description": "What the person did. `answered` carries answers; `declined` is a finished\ndecision the model must not re-ask."
          },
          "tool_call_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `ask_user` tool call being answered. Optional: when omitted the one\npending question set on the session is used.",
            "example": "toolu_01933b5a00007000800000000000001"
          }
        }
      },
      "QuestionAnswersResponse": {
        "type": "object",
        "description": "Result of answering a pending question set.",
        "required": [
          "status",
          "answered_by",
          "session_status"
        ],
        "properties": {
          "answered_by": {
            "type": "string",
            "description": "Who the server attributed the outcome to.",
            "example": "user"
          },
          "session_status": {
            "type": "string",
            "description": "Session status after the answer.",
            "example": "active"
          },
          "status": {
            "type": "string",
            "description": "Outcome recorded against the call.",
            "example": "answered"
          }
        }
      },
      "ReactionActor": {
        "type": "object",
        "description": "Who put a reaction on a message.",
        "required": [
          "kind",
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable id of the actor: a user, principal, agent or platform user id.",
            "example": "user_01933b5a00007000800000000000001"
          },
          "kind": {
            "$ref": "#/components/schemas/ReactionActorKind"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name at the time of the reaction."
          }
        }
      },
      "ReactionActorKind": {
        "type": "string",
        "description": "Who reacted.",
        "enum": [
          "user",
          "consumer",
          "agent",
          "external"
        ]
      },
      "ReactionActorView": {
        "type": "object",
        "description": "One person or agent who reacted.",
        "required": [
          "kind",
          "id",
          "reacted_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "User, principal, agent or platform user id."
          },
          "kind": {
            "$ref": "#/components/schemas/ReactionActorKind"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "reacted_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ReactionChange": {
        "type": "object",
        "description": "Result of adding or removing a reaction.",
        "required": [
          "message_id",
          "emoji",
          "reacted",
          "changed"
        ],
        "properties": {
          "changed": {
            "type": "boolean",
            "description": "False when the message already was in that state."
          },
          "emoji": {
            "type": "string",
            "example": "👍"
          },
          "message_id": {
            "type": "string",
            "description": "Message the reaction is on (`message_...`).",
            "example": "message_01933b5a00007000800000000000001"
          },
          "reacted": {
            "type": "boolean",
            "description": "Whether the reaction is on the message now."
          }
        }
      },
      "ReactionSummary": {
        "type": "object",
        "description": "One emoji on a message.",
        "required": [
          "emoji",
          "count",
          "me",
          "agent",
          "actors"
        ],
        "properties": {
          "actors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReactionActorView"
            },
            "description": "Who reacted, earliest first."
          },
          "agent": {
            "type": "boolean",
            "description": "The agent is among those who reacted."
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "emoji": {
            "type": "string",
            "example": "👍"
          },
          "me": {
            "type": "boolean",
            "description": "The caller is among those who reacted."
          }
        }
      },
      "ReasonCompletedData": {
        "type": "object",
        "description": "Data for reason.completed event",
        "required": [
          "success",
          "has_tool_calls",
          "tool_call_count"
        ],
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Duration of the reason phase in milliseconds",
            "minimum": 0
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if failed"
          },
          "has_tool_calls": {
            "type": "boolean",
            "description": "Whether tool calls were requested"
          },
          "success": {
            "type": "boolean",
            "description": "Whether the LLM call succeeded"
          },
          "text_preview": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text response preview (first 200 chars)"
          },
          "tool_call_count": {
            "type": "integer",
            "format": "int32",
            "description": "Number of tool calls requested",
            "minimum": 0
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Token usage from the LLM call"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ReasonItemData": {
        "type": "object",
        "description": "Data for `reason.item` event.\n\nDurable record of one provider reasoning artifact.\n\nCarries identity and curated summary text only. Opaque replay state\n(signatures, encrypted reasoning context) is deliberately absent: it is\nstate the driver hands back to the provider, not content, and it must not\nreach an event stream or any API surface. Plaintext chain-of-thought is\nlikewise never persisted here.",
        "required": [
          "turn_id",
          "provider",
          "item_id"
        ],
        "properties": {
          "item_id": {
            "type": "string",
            "description": "Provider-assigned identifier for the reasoning item."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model identifier reported by the provider, if known."
          },
          "provider": {
            "type": "string",
            "description": "Provider that produced the reasoning item (e.g., \"openai\")."
          },
          "summary": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Safe summary text segments curated by the provider. Never includes\nplaintext reasoning content."
          },
          "token_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Per-item reasoning token count, when the provider reports one.",
            "minimum": 0
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID this reasoning item belongs to.",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "ReasonRecoveredData": {
        "type": "object",
        "description": "Data for the `reason.recovered` event (EVE-532).\n\nEmitted by `ReasonAtom` when it detects an in-flight partial assistant\nmessage from a previous worker execution and applies the ContinuePartial\nrecovery policy.",
        "required": [
          "turn_id",
          "mode",
          "accumulated_len"
        ],
        "properties": {
          "accumulated_len": {
            "type": "integer",
            "description": "Character length of the persisted accumulated text.",
            "minimum": 0
          },
          "mode": {
            "$ref": "#/components/schemas/RecoveryMode",
            "description": "Recovery action taken."
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID the partial belonged to.",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "ReasonStartedData": {
        "type": "object",
        "description": "Data for reason.started event",
        "required": [
          "harness_id"
        ],
        "properties": {
          "agent_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/agentId",
                "description": "Agent ID being used (optional)"
              },
              {
                "type": "null"
              }
            ]
          },
          "harness_id": {
            "$ref": "#/components/schemas/harnessId",
            "description": "Harness ID being used"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ModelMetadata",
                "description": "Metadata about the model being used"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ReasonThinkingCompletedData": {
        "type": "object",
        "description": "Data for reason.thinking.completed event\n\nEmitted when extended thinking completes and the model transitions\nto producing the final response. Contains the complete thinking content.",
        "required": [
          "turn_id",
          "thinking"
        ],
        "properties": {
          "thinking": {
            "type": "string",
            "description": "Complete thinking content"
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID this thinking belongs to",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "ReasonThinkingDeltaData": {
        "type": "object",
        "description": "Data for reason.thinking.delta event (extended thinking content from models like Claude)\n\nThis event streams incremental thinking/reasoning content from models that support\nextended thinking mode (e.g., Claude with thinking enabled). The thinking content\nrepresents the model's chain-of-thought reasoning before producing the final response.",
        "required": [
          "turn_id",
          "delta",
          "accumulated"
        ],
        "properties": {
          "accumulated": {
            "type": "string",
            "description": "Accumulated thinking text so far (convenience for UI)"
          },
          "delta": {
            "type": "string",
            "description": "The thinking delta (new thinking text since last delta)"
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID this delta belongs to (for correlation)",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "ReasonThinkingStartedData": {
        "type": "object",
        "description": "Data for reason.thinking.started event\n\nEmitted when extended thinking begins during reasoning phase.\nThis signals the model is using chain-of-thought reasoning.\nUI can show a \"thinking\" indicator.",
        "required": [
          "turn_id"
        ],
        "properties": {
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional model name being used"
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID this thinking belongs to",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "ReasoningConfig": {
        "type": "object",
        "description": "Reasoning configuration for the model",
        "properties": {
          "effort": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort",
                "description": "Effort level for reasoning.\n\nTyped rather than free-form: the effort taxonomy is closed, and each\ndriver previously re-parsed the string with its own case handling, which\nlet `minimal` silently mean \"no reasoning\" on budget-based models."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ReasoningContentPart": {
        "type": "object",
        "description": "One provider-issued reasoning artifact, ordered in `Message.content`\nalongside text and tool calls.\n\nOrdering is the point. Providers interleave reasoning with text and tool\ncalls, and every current provider requires its artifacts replayed in the\nposition it issued them: Anthropic verifies each thinking block against its\nown `signature`, OpenAI keys reasoning items by the `item_id` it issued and\nexpects them adjacent to the item they precede, and Gemini binds a\n`thoughtSignature` to a specific function call. A flattened per-message\nfield cannot express any of that, so this is a content part.\n\n`signature` and `encrypted` are opaque provider artifacts. They are carried\nverbatim and never interpreted, never rendered, and never published on an\nAPI surface — see [`ReasoningContentPart::to_public`].",
        "required": [
          "provider"
        ],
        "properties": {
          "bound_tool_call_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Id of the tool call this artifact is bound to, when the provider scopes\nit that way (Gemini attaches a thought signature to one function call)."
          },
          "encrypted": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-encrypted reasoning context (OpenAI `encrypted_content`).\nOpaque."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-assigned identifier, carried verbatim (e.g. OpenAI `rs_…`)."
          },
          "provider": {
            "type": "string",
            "description": "Provider that produced this artifact (e.g. `anthropic`, `openai`).\nReplay is only valid against the provider that issued it."
          },
          "signature": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider signature over this specific block (Anthropic thinking\nsignature, Gemini `thoughtSignature`). Opaque."
          },
          "text": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReasoningText",
                "description": "Readable reasoning, when the provider exposes any."
              },
              {
                "type": "null"
              }
            ]
          },
          "tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Reasoning tokens attributed to this artifact, when reported.",
            "minimum": 0
          }
        }
      },
      "ReasoningEffort": {
        "type": "string",
        "description": "Reasoning effort level for models that support it",
        "enum": [
          "none",
          "minimal",
          "low",
          "medium",
          "high",
          "xhigh",
          "max"
        ]
      },
      "ReasoningEffortConfig": {
        "type": "object",
        "description": "Reasoning effort configuration for a model",
        "required": [
          "values",
          "default"
        ],
        "properties": {
          "default": {
            "$ref": "#/components/schemas/ReasoningEffort",
            "description": "Default reasoning effort for this model"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReasoningEffortValue"
            },
            "description": "Available reasoning effort values for this model"
          }
        }
      },
      "ReasoningEffortValue": {
        "type": "object",
        "description": "Named reasoning effort value for UI display",
        "required": [
          "value",
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name (e.g., \"Low\", \"Medium\")"
          },
          "value": {
            "$ref": "#/components/schemas/ReasoningEffort",
            "description": "The API value (e.g., \"low\", \"medium\")"
          }
        }
      },
      "ReasoningState": {
        "type": "object",
        "description": "Persisted with assistant messages and native compaction checkpoints.",
        "required": [
          "epoch"
        ],
        "properties": {
          "baseline": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort",
                "description": "Original request-level effort preserved throughout this epoch."
              },
              {
                "type": "null"
              }
            ]
          },
          "effective": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort",
                "description": "Effort currently active after ordered configuration updates."
              },
              {
                "type": "null"
              }
            ]
          },
          "epoch": {
            "type": "string",
            "description": "A new epoch starts when switching model/provider or entering this mode.",
            "example": "01933b5a-0000-7000-8000-000000000001"
          }
        }
      },
      "ReasoningText": {
        "oneOf": [
          {
            "type": "object",
            "description": "Verbatim chain-of-thought exposed by the provider (Anthropic extended\nthinking, Gemini thought parts, Chat Completions `reasoning_content`).",
            "required": [
              "text",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "plain"
                ]
              },
              "text": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "description": "Provider-curated summary segments, not raw chain-of-thought (OpenAI\nResponses `summary_text`). Safe to display; never the model's own words.",
            "required": [
              "parts",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "summary"
                ]
              },
              "parts": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          {
            "type": "object",
            "description": "The provider withheld the content (Anthropic `redacted_thinking`). The\nartifact must still be replayed verbatim, so the part keeps its\nsignature/encrypted payload while carrying no readable text.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "redacted"
                ]
              }
            }
          }
        ],
        "description": "Readable reasoning text, in the form the provider actually exposes.\n\nProviders differ in *what* they are willing to show, and collapsing that\ndifference loses the one thing a consumer needs to know: whether it is\nlooking at the model's own words or a curated gloss of them."
      },
      "RecoveryMode": {
        "type": "string",
        "description": "Recovery mode chosen by the ContinuePartial classifier (EVE-532).",
        "enum": [
          "finalize",
          "restart"
        ]
      },
      "RedactionOptions": {
        "type": "object",
        "description": "Redaction controls. Secret scrubbing is always applied regardless of these.",
        "properties": {
          "redact_content": {
            "type": "boolean",
            "description": "When true, replace message text/tool content with a placeholder, keeping\nonly structure (roles, tool names, ids). Secret scrubbing still runs.",
            "example": true
          }
        }
      },
      "RegisterExternalAgent": {
        "type": "object",
        "description": "Register a predeployed HTTPS endpoint after a signed ownership challenge.",
        "required": [
          "endpoint_url",
          "endpoint_secret"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Agent public ID or name; the HTTP route supplies this value."
          },
          "endpoint_secret": {
            "type": "string",
            "description": "Preinstall this random, 32+ character secret in the endpoint. Never a user PAT.",
            "writeOnly": true
          },
          "endpoint_url": {
            "type": "string",
            "description": "Verified public HTTPS URL that receives signed invocation requests.",
            "example": "https://sales.example.workers.dev/"
          }
        }
      },
      "RejectFindingFixRequest": {
        "type": "object",
        "description": "Why a fix is not wanted.",
        "required": [
          "note"
        ],
        "properties": {
          "note": {
            "type": "string",
            "description": "Kept so later suggestions can be compared with what people turned down.\n(Named `note` because `reason` is the change-intent flag every command\ntakes.)"
          }
        }
      },
      "RenameOrganizationConnectionRequest": {
        "type": "object",
        "description": "A display-name change that preserves the connected account credential.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "ReplaceAgentViewRequest": {
        "type": "object",
        "description": "Replaces or removes a view at the supplied revision.",
        "required": [
          "revision",
          "view"
        ],
        "properties": {
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "The revision returned by the most recent read of the Agent's settings.",
            "example": 1
          },
          "view": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentViewDefinition",
                "description": "Pass null to remove the view."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "RequestingAgent": {
        "type": "object",
        "description": "The agent a request came from.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The agent's id, as `/v1/agents/{agent_id}` takes it.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "name": {
            "type": "string",
            "description": "The agent's display name.",
            "example": "Research Assistant"
          }
        }
      },
      "ResolveOrgResponse": {
        "type": "object",
        "description": "Response body for the `resolve_org` operation.",
        "required": [
          "org_id",
          "org_name"
        ],
        "properties": {
          "org_id": {
            "type": "string",
            "description": "Public ID of the organization that owns the resource."
          },
          "org_name": {
            "type": "string",
            "description": "Organization name (for UX messaging)."
          }
        }
      },
      "ResolvedSandboxSpec": {
        "type": "object",
        "description": "Session-pinned specification. Every security- and recovery-relevant default has\nbeen made explicit.",
        "required": [
          "target",
          "containment",
          "durability",
          "lifecycle",
          "bootstrap"
        ],
        "properties": {
          "bootstrap": {
            "$ref": "#/components/schemas/SandboxBootstrap",
            "description": "Pinned initialization commands."
          },
          "containment": {
            "$ref": "#/components/schemas/SandboxContainmentSpec",
            "description": "Fully resolved containment contract."
          },
          "durability": {
            "$ref": "#/components/schemas/SandboxDurability",
            "description": "Fully resolved recovery guarantee."
          },
          "lifecycle": {
            "$ref": "#/components/schemas/SandboxLifecycle",
            "description": "Pinned lifecycle policy."
          },
          "target": {
            "$ref": "#/components/schemas/SandboxTargetSpec",
            "description": "Exact target pinned for the Session."
          },
          "template_revision_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reusable revision from which this complete snapshot was copied."
          }
        }
      },
      "ResourceConfigResponse": {
        "type": "object",
        "description": "Response type for per-resource config endpoints.\n\nEvery resource exposes `GET /v1/{resource}/config` returning this type.\nUI uses it to gate controls (create/edit/delete buttons, admin panels).",
        "required": [
          "policies"
        ],
        "properties": {
          "policies": {
            "type": "object",
            "description": "Map of policy ID → whether the caller satisfies it.",
            "additionalProperties": {
              "type": "boolean"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "ResourceConstraints": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "repositories",
              "permissions",
              "provider"
            ],
            "properties": {
              "permissions": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "provider": {
                "type": "string",
                "enum": [
                  "github"
                ]
              },
              "repositories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "description": "Provider limits must be enforced by the adapter before a token is exposed."
      },
      "ResourceScope": {
        "type": "string",
        "description": "Ownership or consumer scope. Ownership determines lifetime, not permission to use a resource.",
        "enum": [
          "session",
          "agent",
          "virtual_user",
          "organization"
        ]
      },
      "ResourceStats": {
        "type": "object",
        "description": "Response body for resource stats.",
        "required": [
          "session_count",
          "active_session_count",
          "idle_session_count",
          "started_session_count",
          "waiting_for_tool_results_session_count",
          "execution_count",
          "total_session_duration_ms",
          "total_input_tokens",
          "total_output_tokens",
          "total_cache_read_tokens",
          "total_cache_creation_tokens",
          "total_actual_cost_usd",
          "total_estimated_cost_usd",
          "total_cost_usd"
        ],
        "properties": {
          "active_session_count": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions in a running state right now.",
            "example": 7,
            "minimum": 0
          },
          "avg_session_duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Average session duration in milliseconds. `None` when `session_count` is 0.",
            "example": 20858,
            "minimum": 0
          },
          "execution_count": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of agent executions (turns) recorded across all sessions for this resource.",
            "example": 14206,
            "minimum": 0
          },
          "first_session_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the first session for this resource (RFC 3339). `None` if no sessions exist.",
            "example": "2026-01-04T11:23:00Z"
          },
          "idle_session_count": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions in an idle state right now (created but no recent activity).",
            "example": 23,
            "minimum": 0
          },
          "last_execution_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the most recent execution (turn) for this resource (RFC 3339). `None` if no executions exist.",
            "example": "2026-05-27T15:24:42Z"
          },
          "last_session_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the most recent session for this resource (RFC 3339). `None` if no sessions exist.",
            "example": "2026-05-27T15:24:00Z"
          },
          "session_count": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of sessions ever created for this resource.",
            "example": 1842,
            "minimum": 0
          },
          "started_session_count": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions that have started at least one turn.",
            "example": 1810,
            "minimum": 0
          },
          "total_actual_cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Cumulative provider-reported actual cost in USD across all sessions\n(e.g. OpenRouter's `usage.cost`). Excludes generations with no reported cost.",
            "example": 31.07
          },
          "total_cache_creation_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative cache-write tokens across all sessions (charged when first writing a cache entry).",
            "example": 412005,
            "minimum": 0
          },
          "total_cache_read_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative cache-read tokens across all sessions (where the provider supports prompt caching).",
            "example": 5234122,
            "minimum": 0
          },
          "total_cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Cumulative best-effort cost in USD across all sessions: actual provider\ncost where reported, otherwise the price-table estimate. Actual takes priority.",
            "example": 42.18
          },
          "total_estimated_cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Cumulative price-table estimated cost in USD across all sessions.\nExcludes generations with no profile cost data.",
            "example": 40.55
          },
          "total_input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative LLM input tokens billed across all sessions.",
            "example": 18457321,
            "minimum": 0
          },
          "total_output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative LLM output tokens billed across all sessions.",
            "example": 2184109,
            "minimum": 0
          },
          "total_session_duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Cumulative session wall-clock duration in milliseconds across all sessions.",
            "example": 38421500,
            "minimum": 0
          },
          "waiting_for_tool_results_session_count": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions currently paused waiting for client-side tool results.",
            "example": 2,
            "minimum": 0
          }
        }
      },
      "RestoreRequest": {
        "type": "object",
        "description": "The revision to bring back.",
        "required": [
          "revision"
        ],
        "properties": {
          "expected_revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Agent revision the user saw; refuses concurrent changes."
          },
          "fields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Restore only these top-level Agent fields. Requires expected_revision."
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Entity kind, needed only for kinds whose ids have no prefix."
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RestoreResult": {
        "type": "object",
        "description": "What a restore did.",
        "required": [
          "restored_revision",
          "entity",
          "warnings"
        ],
        "properties": {
          "entity": {
            "description": "The entity after the restore, as its update command returned it."
          },
          "restored_revision": {
            "type": "integer",
            "format": "int64",
            "description": "The revision brought back."
          },
          "revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The committed inverse's revision, for correlating subsequent reads."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Secrets kept at their current value that differ from the revision."
          }
        }
      },
      "ResumeSessionResponse": {
        "type": "object",
        "description": "Result of resuming budgets paused for a session.",
        "required": [
          "resumed_budgets",
          "session_id"
        ],
        "properties": {
          "resumed_budgets": {
            "type": "integer",
            "minimum": 0
          },
          "session_id": {
            "type": "string"
          }
        }
      },
      "ReviewScoreRequest": {
        "type": "object",
        "description": "A person's verdict on one score.",
        "required": [
          "agrees"
        ],
        "properties": {
          "agrees": {
            "type": "boolean",
            "description": "True when the grader got it right."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional note on why (at most 2000 characters)."
          }
        }
      },
      "ReviseSandboxTemplateRequest": {
        "type": "object",
        "required": [
          "spec"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Omit to preserve; send null to clear.",
            "example": "Larger recoverable workspace for repository builds"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement display name; omit to preserve the current value.",
            "example": "Coding - Daytona (large)"
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxTemplateSpec",
            "description": "Complete specification stored as the next immutable revision."
          }
        }
      },
      "RiskLevel": {
        "type": "string",
        "description": "Risk classification for capabilities (TM-AGENT-005).\n\nUsed to enforce approval requirements when assigning capabilities.",
        "enum": [
          "low",
          "medium",
          "high"
        ],
        "example": "low"
      },
      "Room": {
        "type": "object",
        "description": "An org-owned conversation space for people and agents.",
        "required": [
          "id",
          "name",
          "metadata",
          "loop_limits",
          "archived",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived": {
            "type": "boolean",
            "description": "Whether the room is archived: it keeps everything but takes no posts and wakes no agents.",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the room was created.",
            "example": "2026-11-10T15:04:05Z"
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "The builder's own id for this room.",
            "example": "ticket-4521"
          },
          "id": {
            "type": "string",
            "description": "Prefixed room id (`room_...`).",
            "example": "room_01933b5a000070008000000000000001"
          },
          "last_message_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the last message was posted.",
            "example": "2026-11-10T15:04:05Z"
          },
          "link_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where a message opens in the builder's product; `{room_id}`,\n`{message_id}` and `{thread_id}` are filled in to make each message's\n`url`.",
            "example": "https://desk.example.com/rooms/{room_id}/m/{message_id}"
          },
          "loop_limits": {
            "$ref": "#/components/schemas/LoopLimits",
            "description": "Loop limits in force."
          },
          "metadata": {
            "description": "Free-form data the builder keeps with the room."
          },
          "name": {
            "type": "string",
            "description": "Room name.",
            "example": "Support desk"
          },
          "topic": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the room is about.",
            "example": "Customer escalations"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the room last changed.",
            "example": "2026-11-10T15:04:05Z"
          }
        }
      },
      "RoomAuthor": {
        "type": "object",
        "description": "Who wrote a message, as the message shows it.",
        "required": [
          "id",
          "handle",
          "display_name",
          "kind"
        ],
        "properties": {
          "display_name": {
            "type": "string",
            "description": "Name shown with the message.",
            "example": "Triage agent"
          },
          "handle": {
            "type": "string",
            "description": "Mention name, written `@handle`.",
            "example": "triage"
          },
          "id": {
            "type": "string",
            "description": "Member id of the author.",
            "example": "rmem_01933b5a000070008000000000000003"
          },
          "kind": {
            "$ref": "#/components/schemas/RoomMemberKind",
            "description": "Person, Everruns agent, outside agent or guest."
          }
        }
      },
      "RoomEvent": {
        "type": "object",
        "description": "One entry of a room's change feed.",
        "required": [
          "seq",
          "room_id",
          "type",
          "data",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it happened.",
            "example": "2026-11-10T15:04:05Z"
          },
          "data": {
            "description": "Details of the change; the shape depends on `type`."
          },
          "member_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member it is about or by, if any.",
            "example": "rmem_01933b5a000070008000000000000003"
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The message it is about, if any.",
            "example": "rmsg_01933b5a000070008000000000000002"
          },
          "room_id": {
            "type": "string",
            "description": "The room it happened in.",
            "example": "room_01933b5a000070008000000000000001"
          },
          "seq": {
            "type": "integer",
            "format": "int64",
            "description": "Position in the org's room feed; read on with `after`.",
            "example": 120
          },
          "type": {
            "type": "string",
            "description": "`room.created`, `room.updated`, `room.archived`, `room.unarchived`,\n`member.joined`, `member.left`, `message.posted`, `message.edited`,\n`message.deleted`, `message.pinned`, `message.unpinned`,\n`reaction.added`, `reaction.removed`, `agent.woken`, `agent.limited`.",
            "example": "message.posted"
          }
        }
      },
      "RoomEventListResponse": {
        "type": "object",
        "description": "A page of a room change feed.",
        "required": [
          "data",
          "next_after"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomEvent"
            },
            "description": "Events, in order."
          },
          "next_after": {
            "type": "integer",
            "format": "int64",
            "description": "Pass as `after` to read on.",
            "example": 120
          }
        }
      },
      "RoomFile": {
        "type": "object",
        "description": "A file in a room's shared folder, as it is now.",
        "required": [
          "path",
          "version",
          "size_bytes",
          "updated_at"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Path in the room's folder, from its root.",
            "example": "/plans/launch.md"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Size of the current content, in bytes.",
            "example": 2048
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the file last changed.",
            "example": "2026-11-10T09:30:00Z"
          },
          "updated_by": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RoomAuthor",
                "description": "Who made the current version, when a member did."
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "The file's current version; every change adds one.",
            "example": 3
          }
        }
      },
      "RoomFileContent": {
        "type": "object",
        "description": "A room file's content at one version.",
        "required": [
          "path",
          "version",
          "encoding",
          "content",
          "size_bytes",
          "updated_at"
        ],
        "properties": {
          "author": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RoomAuthor",
                "description": "Who made that version."
              },
              {
                "type": "null"
              }
            ]
          },
          "content": {
            "type": "string",
            "description": "The content, in `encoding`.",
            "example": "# Launch plan\n\n- [ ] Draft the announcement\n"
          },
          "encoding": {
            "type": "string",
            "description": "`text` (UTF-8) or `base64` (anything else).",
            "example": "text"
          },
          "path": {
            "type": "string",
            "description": "Path of the file at that version.",
            "example": "/plans/launch.md"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Size of the content, in bytes.",
            "example": 2048
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When that version was made.",
            "example": "2026-11-10T09:30:00Z"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "The version read.",
            "example": 3
          }
        }
      },
      "RoomFileHistoryResponse": {
        "type": "object",
        "description": "A room file's history, newest first.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomFileVersion"
            },
            "description": "Versions, newest first."
          }
        }
      },
      "RoomFileListResponse": {
        "type": "object",
        "description": "A room's files.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomFile"
            },
            "description": "The files, by path."
          }
        }
      },
      "RoomFileVersion": {
        "type": "object",
        "description": "One version of a room file: one change and who made it.",
        "required": [
          "path",
          "version",
          "action",
          "size_bytes",
          "created_at"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "`write`, `move`, `delete` or `restore`.",
            "example": "write"
          },
          "author": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RoomAuthor",
                "description": "The member who made the change."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the change was made.",
            "example": "2026-11-10T09:30:00Z"
          },
          "moved_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a move: where the file was before.",
            "example": "/plan.md"
          },
          "path": {
            "type": "string",
            "description": "Path of the file after this change.",
            "example": "/plans/launch.md"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Size of the content after this change, in bytes; 0 for a delete.",
            "example": 2048
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "Version number, from 1, per file.",
            "example": 3
          }
        }
      },
      "RoomListResponse": {
        "type": "object",
        "description": "A page of rooms.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Room"
            },
            "description": "Rooms, most recently active first."
          }
        }
      },
      "RoomMember": {
        "type": "object",
        "description": "A member of a room.",
        "required": [
          "id",
          "room_id",
          "kind",
          "handle",
          "display_name",
          "role",
          "wake",
          "session_scope",
          "left",
          "joined_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent's id, for an Everruns agent.",
            "example": "agent_01933b5a000070008000000000000005"
          },
          "display_name": {
            "type": "string",
            "description": "Name shown with the member's messages.",
            "example": "Triage agent"
          },
          "handle": {
            "type": "string",
            "description": "Mention name, written `@handle`.",
            "example": "triage"
          },
          "id": {
            "type": "string",
            "description": "Prefixed member id (`rmem_...`).",
            "example": "rmem_01933b5a000070008000000000000003"
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ],
            "description": "Extra instructions an agent member gets in this room.",
            "example": "Answer billing questions only."
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the member joined.",
            "example": "2026-11-10T15:04:05Z"
          },
          "kind": {
            "$ref": "#/components/schemas/RoomMemberKind",
            "description": "Person, Everruns agent, outside agent or guest."
          },
          "left": {
            "type": "boolean",
            "description": "Whether the member left. Left members still name their old messages.",
            "example": false
          },
          "role": {
            "$ref": "#/components/schemas/RoomMemberRole",
            "description": "Owner or member."
          },
          "room_id": {
            "type": "string",
            "description": "The room this member belongs to.",
            "example": "room_01933b5a000070008000000000000001"
          },
          "session_scope": {
            "$ref": "#/components/schemas/SessionScope",
            "description": "Which conversation an agent member keeps."
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The person's user id, for a person.",
            "example": "user_01933b5a000070008000000000000004"
          },
          "wake": {
            "$ref": "#/components/schemas/WakeMode",
            "description": "When an agent member is woken."
          }
        }
      },
      "RoomMemberKind": {
        "type": "string",
        "description": "Kind of room member.",
        "enum": [
          "person",
          "agent",
          "outside_agent",
          "guest"
        ]
      },
      "RoomMemberListResponse": {
        "type": "object",
        "description": "A room's members.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomMember"
            },
            "description": "Members, in the order they joined."
          }
        }
      },
      "RoomMemberRole": {
        "type": "string",
        "description": "Role of a member in its room.",
        "enum": [
          "owner",
          "member"
        ]
      },
      "RoomMention": {
        "type": "object",
        "description": "A member a message mentions.",
        "required": [
          "id",
          "handle"
        ],
        "properties": {
          "handle": {
            "type": "string",
            "description": "Mention name as written.",
            "example": "triage"
          },
          "id": {
            "type": "string",
            "description": "Member id of the mentioned member.",
            "example": "rmem_01933b5a000070008000000000000003"
          }
        }
      },
      "RoomMessage": {
        "type": "object",
        "description": "A message in a room.",
        "required": [
          "id",
          "room_id",
          "text",
          "mentions",
          "reactions",
          "reply_count",
          "pinned",
          "deleted",
          "hops",
          "created_at"
        ],
        "properties": {
          "author": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RoomAuthor",
                "description": "Absent for a room notice."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was posted.",
            "example": "2026-11-10T15:04:05Z"
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether it was deleted; a marker stays in its place.",
            "example": false
          },
          "edited_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last edited.",
            "example": "2026-11-10T15:04:05Z"
          },
          "hops": {
            "type": "integer",
            "format": "int32",
            "description": "Agent posts in a row up to this message (0 when a person wrote it).",
            "example": 0
          },
          "id": {
            "type": "string",
            "description": "Prefixed message id (`rmsg_...`).",
            "example": "rmsg_01933b5a000070008000000000000002"
          },
          "last_reply_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When its thread last got a reply.",
            "example": "2026-11-10T15:04:05Z"
          },
          "mentions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomMention"
            },
            "description": "Members the text mentions, resolved when it was posted."
          },
          "pinned": {
            "type": "boolean",
            "description": "Whether it is pinned to the room.",
            "example": false
          },
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomReaction"
            },
            "description": "Reactions, one entry per emoji."
          },
          "reply_count": {
            "type": "integer",
            "format": "int32",
            "description": "Replies in its thread, for a top-level message.",
            "example": 3
          },
          "room_id": {
            "type": "string",
            "description": "The room it was posted in.",
            "example": "room_01933b5a000070008000000000000001"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent session that wrote it, for agent posts.",
            "example": "session_01933b5a000070008000000000000006"
          },
          "text": {
            "type": "string",
            "description": "Markdown. Empty once deleted.",
            "example": "@triage can you check ticket 4521?"
          },
          "thread_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The thread it is a reply in (its root message); absent at the top level.",
            "example": "rmsg_01933b5a000070008000000000000002"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where it opens in the builder's product (the room's `link_template`).",
            "example": "https://desk.example.com/rooms/room_01933b5a000070008000000000000001/m/rmsg_01933b5a000070008000000000000002"
          }
        }
      },
      "RoomMessageListResponse": {
        "type": "object",
        "description": "A page of messages.",
        "required": [
          "data",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomMessage"
            },
            "description": "Messages, oldest first."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether older messages exist before the first one returned.",
            "example": false
          }
        }
      },
      "RoomReaction": {
        "type": "object",
        "description": "One emoji on a message, with who added it.",
        "required": [
          "emoji",
          "count",
          "member_ids"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "How many members added it.",
            "example": 2,
            "minimum": 0
          },
          "emoji": {
            "type": "string",
            "description": "The emoji, as text.",
            "example": "👀"
          },
          "member_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Members who added it.",
            "example": [
              "rmem_01933b5a000070008000000000000003"
            ]
          }
        }
      },
      "RoomReadMark": {
        "type": "object",
        "description": "A reader's position in one scope.",
        "required": [
          "scope_id",
          "read_through"
        ],
        "properties": {
          "read_through": {
            "type": "string",
            "format": "date-time",
            "description": "How far the reader has read.",
            "example": "2026-11-10T15:04:05Z"
          },
          "scope_id": {
            "type": "string",
            "description": "The room id for the top level, or a thread's root message id.",
            "example": "room_01933b5a000070008000000000000001"
          }
        }
      },
      "RoomReader": {
        "type": "object",
        "description": "One reader of a scope.",
        "required": [
          "member_id",
          "handle",
          "read_through"
        ],
        "properties": {
          "handle": {
            "type": "string",
            "description": "Its mention name.",
            "example": "ana-lopez"
          },
          "member_id": {
            "type": "string",
            "description": "The reader.",
            "example": "rmem_01933b5a000070008000000000000003"
          },
          "read_through": {
            "type": "string",
            "format": "date-time",
            "description": "How far it has read.",
            "example": "2026-11-10T15:04:05Z"
          }
        }
      },
      "RoomReadersResponse": {
        "type": "object",
        "description": "Who has read a message, and who has not.",
        "required": [
          "read_by",
          "not_read_by"
        ],
        "properties": {
          "not_read_by": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomAuthor"
            },
            "description": "Members who have not, the author left out."
          },
          "read_by": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomReader"
            },
            "description": "Members who have read up to the message."
          }
        }
      },
      "RoomUnreadResponse": {
        "type": "object",
        "description": "Messages a member has not read yet, each with its thread root for\ncontext, already marked read.",
        "required": [
          "data",
          "threads",
          "has_more"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomMessage"
            },
            "description": "Unread messages, oldest first."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more unread messages remain after this page.",
            "example": false
          },
          "threads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomMessage"
            },
            "description": "Root messages of the threads the unread replies belong to."
          }
        }
      },
      "RoomWake": {
        "type": "object",
        "description": "An agent member a message woke, or did not wake because of a limit.",
        "required": [
          "member_id",
          "handle",
          "outcome"
        ],
        "properties": {
          "handle": {
            "type": "string",
            "description": "Its mention name.",
            "example": "triage"
          },
          "member_id": {
            "type": "string",
            "description": "The agent member.",
            "example": "rmem_01933b5a000070008000000000000003"
          },
          "outcome": {
            "type": "string",
            "description": "`woken`, or the loop limit that stopped it (`hops`, `agent_hourly`,\n`room_hourly`), or `failed`.",
            "example": "woken"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent's session for this conversation.",
            "example": "session_01933b5a000070008000000000000006"
          }
        }
      },
      "RotateAgentKeyRequest": {
        "type": "object",
        "description": "Request to rotate an agent key.",
        "properties": {
          "overlap_hours": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Hours the replaced secret keeps working (0 to 168, default 24).",
            "minimum": 0
          }
        }
      },
      "RoutingMode": {
        "type": "string",
        "description": "How an agent combines its destinations with organization defaults.",
        "enum": [
          "inherit",
          "add",
          "replace",
          "off"
        ]
      },
      "RoutingPolicy": {
        "type": "object",
        "description": "Customer destinations selected for future turns; never changes platform telemetry.",
        "properties": {
          "destination_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Distinct destination identifiers from this organization; at most eight selections."
          },
          "mode": {
            "$ref": "#/components/schemas/RoutingMode",
            "description": "Use organization defaults, add selections, replace defaults, or disable customer exports."
          }
        },
        "additionalProperties": false
      },
      "RunAgent": {
        "type": "object",
        "description": "The agent behind a session of the run.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The agent's id, as `/v1/agents/{agent_id}` takes it.",
            "example": "agent_01h9xk2m"
          },
          "name": {
            "type": "string",
            "description": "The agent's display name.",
            "example": "Triage"
          }
        }
      },
      "RunBucket": {
        "type": "object",
        "description": "Turns started and failed in one bucket.",
        "required": [
          "runs",
          "failed"
        ],
        "properties": {
          "failed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "RunIssueFixerRequest": {
        "type": "object",
        "description": "Run one of the fixers an issue offers.",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "The fixer to run, as the issue's `fixers` list names it.",
            "example": "slack.add_permissions"
          }
        }
      },
      "RunRequest": {
        "type": "object",
        "description": "One request from another agent in the run.",
        "required": [
          "session_id",
          "requested_at",
          "tool_call"
        ],
        "properties": {
          "agent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RequestingAgent",
                "description": "The asking agent. Absent when the agent was deleted."
              },
              {
                "type": "null"
              }
            ]
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-03T10:15:00Z"
          },
          "session_id": {
            "type": "string",
            "description": "The asking agent's session.",
            "example": "session_01933b5a00007000800000000000001"
          },
          "tool_call": {
            "$ref": "#/components/schemas/RunRequestToolCall"
          }
        }
      },
      "RunRequestToolCall": {
        "type": "object",
        "description": "A tool call another agent in the run waits on the person for.",
        "required": [
          "id",
          "name",
          "arguments"
        ],
        "properties": {
          "arguments": {
            "type": "object"
          },
          "id": {
            "type": "string",
            "example": "call_approval_1"
          },
          "name": {
            "type": "string",
            "description": "`ask_user`, `approve_tool_call`, `openai_mcp_approval`,\n`confirm_url_elicitation` or `setup_connection`.",
            "example": "approve_tool_call"
          }
        }
      },
      "RunRequestsResponse": {
        "type": "object",
        "description": "What the other agents in a run wait on the person for.",
        "required": [
          "requests"
        ],
        "properties": {
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunRequest"
            }
          }
        }
      },
      "RunSession": {
        "type": "object",
        "description": "One agent session of the run.",
        "required": [
          "session_id",
          "status",
          "created_at",
          "cost_usd",
          "turns"
        ],
        "properties": {
          "agent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunAgent",
                "description": "The agent that ran it. Absent when it has none or it was deleted."
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Model spend in USD.",
            "example": 0.21
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-03T09:00:00Z"
          },
          "last_turn_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When its last turn ended; absent while it works or before it ran.",
            "example": "2026-11-03T09:01:30Z"
          },
          "last_turn_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Outcome of its last finished turn: `completed`, `failed` or `cancelled`.",
            "example": "completed"
          },
          "parent_session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The session that handed it work; absent for the first session.",
            "example": "session_01h9xk1a"
          },
          "session_id": {
            "type": "string",
            "description": "Session's prefixed public identifier.",
            "example": "session_01h9xk2m"
          },
          "status": {
            "type": "string",
            "description": "Session status: `started`, `active`, `idle`, `waiting_for_tool_results`, ...",
            "example": "idle"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "The session's title: for work handed off, the task's name.",
            "example": "Triage the failing build"
          },
          "turns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunTurn"
            },
            "description": "Its turns, oldest first."
          }
        }
      },
      "RunSummary": {
        "type": "object",
        "description": "Aggregate metrics for a completed eval run.",
        "required": [
          "total",
          "passed",
          "failed",
          "errored",
          "pass_rate",
          "avg_score",
          "avg_turns",
          "avg_latency_ms",
          "total_input_tokens",
          "total_output_tokens"
        ],
        "properties": {
          "avg_latency_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Mean case latency in milliseconds.",
            "example": 8450,
            "minimum": 0
          },
          "avg_score": {
            "type": "number",
            "format": "double",
            "description": "Mean score across cases, 0.0 to 1.0.",
            "example": 0.85
          },
          "avg_turns": {
            "type": "number",
            "format": "double",
            "description": "Mean agent turns per case.",
            "example": 3.2
          },
          "cases": {
            "type": "integer",
            "format": "int32",
            "description": "Distinct cases in the run.",
            "example": 4,
            "minimum": 0
          },
          "cases_passed_any_trial": {
            "type": "integer",
            "format": "int32",
            "description": "Cases that passed in at least one trial (pass@k).",
            "example": 4,
            "minimum": 0
          },
          "cases_passed_every_trial": {
            "type": "integer",
            "format": "int32",
            "description": "Cases that passed in every trial (pass^k).",
            "example": 3,
            "minimum": 0
          },
          "errored": {
            "type": "integer",
            "format": "int32",
            "description": "Number of cases that errored.",
            "example": 1,
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "description": "Number of cases that failed.",
            "example": 2,
            "minimum": 0
          },
          "pass_rate": {
            "type": "number",
            "format": "double",
            "description": "Fraction of cases that passed, 0.0 to 1.0.",
            "example": 0.75
          },
          "passed": {
            "type": "integer",
            "format": "int32",
            "description": "Number of cases that passed.",
            "example": 9,
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of cases in the run.",
            "example": 12,
            "minimum": 0
          },
          "total_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "What the run spent in USD: the agents' model calls plus grading.\nAbsent on imported runs, whose cost is in their own metrics.",
            "example": 0.42
          },
          "total_input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Total input tokens across cases.",
            "example": 14400,
            "minimum": 0
          },
          "total_output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Total output tokens across cases.",
            "example": 10200,
            "minimum": 0
          },
          "trials": {
            "type": "integer",
            "format": "int32",
            "description": "Repetitions per case. `total` counts every repetition.",
            "example": 3,
            "minimum": 0
          }
        }
      },
      "RunTurn": {
        "type": "object",
        "description": "One turn of a session in the run.",
        "required": [
          "turn_no",
          "turn_id",
          "started_at",
          "status",
          "cost_usd"
        ],
        "properties": {
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Model spend of the turn in USD.",
            "example": 0.21
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Absent while the turn runs.",
            "example": "2026-11-03T09:01:30Z"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-03T09:00:00Z"
          },
          "status": {
            "type": "string",
            "description": "Trace status of the turn: `running`, `completed`, `failed`, ...",
            "example": "completed"
          },
          "turn_id": {
            "type": "string",
            "description": "Public turn id (`turn_...`).",
            "example": "turn_01h9xk2m"
          },
          "turn_no": {
            "type": "integer",
            "format": "int32",
            "description": "Turn number within its session, from 1.",
            "example": 1
          }
        }
      },
      "RunsWithAgentsLine": {
        "type": "object",
        "description": "The runs one agent led, with whole-run cost and who spent it.",
        "required": [
          "agent_id",
          "agent_name",
          "runs",
          "cost_usd",
          "by_agent"
        ],
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "The agent the runs started with.",
            "example": "agent_01h9xk1a"
          },
          "agent_name": {
            "type": "string",
            "example": "Foreman"
          },
          "by_agent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunsWithAgentsShare"
            },
            "description": "Who spent it, the leading agent itself included, largest first."
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Priced cost of those runs in USD, every agent included.",
            "example": 212.4
          },
          "runs": {
            "type": "integer",
            "format": "int64",
            "description": "Runs it handed work to other agents in, with usage in the window.",
            "example": 12
          }
        }
      },
      "RunsWithAgentsShare": {
        "type": "object",
        "description": "One agent's spend within the runs another agent led.",
        "required": [
          "relation",
          "cost_usd"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absent for usage recorded with no agent.",
            "example": "agent_01h9xk2m"
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "example": "Implement"
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "example": 121.3
          },
          "relation": {
            "type": "string",
            "description": "`lead` for the leading agent itself, `created_here` for an agent\ncreated as part of it, `linked` for any other agent.",
            "example": "created_here"
          }
        }
      },
      "RuntimeMessage": {
        "type": "object",
        "description": "A message in the conversation",
        "required": [
          "id",
          "role",
          "content",
          "created_at"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentPart"
            },
            "description": "Message content as array of content parts (text, images, tool calls, tool results)"
          },
          "controls": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Controls",
                "description": "Runtime controls (model, reasoning, etc.)"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the message was created"
          },
          "external_actor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExternalActor",
                "description": "External actor identity (for messages from external channels like Slack)"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "Unique message ID (format: message_{32-hex})",
            "example": "message_01933b5a00007000800000000000001"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Message-level metadata"
          },
          "phase": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExecutionPhase",
                "description": "Execution phase for this message.\n\nHelps LLMs distinguish between intermediate working commentary and completed\nanswers in multi-step tool-calling flows. Only set on agent (assistant) messages.\nProviders with native phase support (OpenAI GPT-5.x) send this value in the API\nrequest; others derive it from state but don't send it to the provider."
              },
              {
                "type": "null"
              }
            ]
          },
          "phase_source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PhaseSource",
                "description": "Whether [`Self::phase`] was reported by the provider or inferred from\ntool-call presence. A derived phase carries no information beyond\n\"this message called tools\", so consumers that need a real\nclassification must be able to tell the two apart."
              },
              {
                "type": "null"
              }
            ]
          },
          "role": {
            "$ref": "#/components/schemas/RuntimeMessageRole",
            "description": "Message role"
          }
        }
      },
      "RuntimeMessageRole": {
        "type": "string",
        "description": "Message role in the conversation",
        "enum": [
          "system",
          "user",
          "agent",
          "tool_result"
        ]
      },
      "SandboxBootstrap": {
        "type": "object",
        "description": "Reproducible initialization pinned with the specification snapshot.",
        "properties": {
          "commands": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ordered commands replayed when creating or recovering physical compute."
          }
        }
      },
      "SandboxBuildProvenance": {
        "type": "object",
        "description": "Reference data resolved by the server from an applied artifact in this tenant.\nSoftware notes remain untrusted author content, never runtime policy.",
        "required": [
          "build_id",
          "snapshot_id",
          "built_at"
        ],
        "properties": {
          "build_id": {
            "type": "string",
            "description": "Applied build resolved from the exact tenant, provider account, and snapshot.",
            "example": "sbxbuild_01933b5a000070008000000000000001"
          },
          "built_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the originating build attempt was accepted.",
            "example": "2026-10-29T00:01:00Z"
          },
          "snapshot_id": {
            "type": "string",
            "description": "Exact immutable provider snapshot selected by the Session.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "software_notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Author-supplied reference notes, never trusted instructions or policy.",
            "example": "# Installed tools\n- HTTPie 3.2.4"
          },
          "verification_command": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional check that passed after installation and in fresh snapshot compute.",
            "example": "/home/daytona/.venvs/devtools/bin/http --version"
          }
        }
      },
      "SandboxBuildRequest": {
        "type": "object",
        "description": "Inputs for a single isolated installation and reusable filesystem snapshot.\nBuild compute receives no workload credentials or private Session state.",
        "required": [
          "source_revision_id",
          "install_script"
        ],
        "properties": {
          "build_network": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxNetworkPolicy",
                "description": "Package sources for the build only. Defaults to the template policy."
              },
              {
                "type": "null"
              }
            ]
          },
          "install_script": {
            "type": "string",
            "description": "POSIX shell install script, 1–32768 UTF-8 bytes. Keep secrets out of it.",
            "example": "python -m venv /home/daytona/.venvs/devtools\n/home/daytona/.venvs/devtools/bin/pip install httpie==3.2.4"
          },
          "metadata_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional bounded, author-supplied Markdown captured from the builder.",
            "example": "/home/daytona/.everruns/sandbox.md"
          },
          "source_revision_id": {
            "type": "string",
            "description": "Source revision to guard against concurrent template edits.",
            "example": "sbxtplrev_01933b5a000070008000000000000001"
          },
          "timeout_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Total build deadline, including installation and fresh verification, in seconds.",
            "example": 600,
            "maximum": 1800,
            "minimum": 60
          },
          "verification_command": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional check run after installation and again in fresh snapshot compute.",
            "example": "/home/daytona/.venvs/devtools/bin/http --version"
          }
        },
        "additionalProperties": false
      },
      "SandboxBuildStatus": {
        "type": "string",
        "description": "Durable build lifecycle. Ready artifacts can be applied only after cleanup completes.",
        "enum": [
          "queued",
          "running",
          "ready",
          "failed",
          "cancelled",
          "applied",
          "discarded"
        ]
      },
      "SandboxCapabilities": {
        "type": "object",
        "description": "What the Sandbox target can actually do.\n\nRead this before assuming a shell behaves like Linux. Bashkit reports\n`native_processes: false`, which is why a build fails there; the answer is\navailable before the first turn rather than after a confusing tool error.",
        "required": [
          "native_processes",
          "packages",
          "pty",
          "ports",
          "portable_checkpoint",
          "network_enforced"
        ],
        "properties": {
          "native_processes": {
            "type": "boolean",
            "description": "Whether commands can spawn operating-system processes."
          },
          "network_enforced": {
            "type": "boolean",
            "description": "Whether the target enforces the declared outbound network policy."
          },
          "packages": {
            "type": "boolean",
            "description": "Whether the runtime can install operating-system packages."
          },
          "portable_checkpoint": {
            "type": "boolean",
            "description": "Whether filesystem state has a portable checkpoint representation."
          },
          "ports": {
            "type": "boolean",
            "description": "Whether workloads can bind and expose network ports."
          },
          "pty": {
            "type": "boolean",
            "description": "Whether interactive pseudo-terminals are supported."
          }
        }
      },
      "SandboxConcurrencyPoint": {
        "type": "object",
        "description": "How many Sandboxes were running from `at` until the next point.",
        "required": [
          "at",
          "running"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "running": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "SandboxContainment": {
        "type": "object",
        "description": "What commands may touch, and who enforces it.",
        "required": [
          "level",
          "network"
        ],
        "properties": {
          "level": {
            "type": "string",
            "description": "`none`, `native`, or `isolated`.",
            "example": "isolated"
          },
          "network": {
            "type": "string",
            "description": "Outbound network policy: `deny`, `allowlist`, or `allow`.",
            "example": "allow"
          }
        }
      },
      "SandboxContainmentLevel": {
        "type": "string",
        "enum": [
          "none",
          "native",
          "isolated"
        ]
      },
      "SandboxContainmentSpec": {
        "type": "object",
        "description": "What commands may touch.",
        "required": [
          "level"
        ],
        "properties": {
          "escalation": {
            "$ref": "#/components/schemas/SandboxEscalation",
            "description": "Whether the runtime may widen containment after Session creation."
          },
          "filesystem": {
            "$ref": "#/components/schemas/SandboxFilesystemPolicy",
            "description": "Filesystem mutation boundary for command execution."
          },
          "level": {
            "$ref": "#/components/schemas/SandboxContainmentLevel",
            "description": "Isolation mechanism the provider must supply."
          },
          "network": {
            "$ref": "#/components/schemas/SandboxNetworkPolicy",
            "description": "Outbound network access the provider must enforce."
          }
        }
      },
      "SandboxCount": {
        "type": "object",
        "description": "A count keyed by a label.",
        "required": [
          "key",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "example": 5
          },
          "key": {
            "type": "string",
            "example": "running"
          }
        }
      },
      "SandboxDiagnosis": {
        "type": "object",
        "description": "Everything known about why a Sandbox is in its state.",
        "required": [
          "generated_at",
          "status",
          "sandbox",
          "work",
          "findings",
          "recent_events"
        ],
        "properties": {
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxFinding"
            },
            "description": "Problems and warnings first."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "lifecycle": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxLifecycleStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderSandboxState",
                "description": "What the provider says now; absent when it was not asked."
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the provider was not asked, or what went wrong asking it."
          },
          "recent_events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxEvent"
            },
            "description": "The latest recorded causes, oldest first."
          },
          "sandbox": {
            "$ref": "#/components/schemas/SandboxFleetItem"
          },
          "shard_sandbox": {
            "type": [
              "object",
              "null"
            ],
            "description": "The sandbox as its shard records it (v2 sessions)."
          },
          "status": {
            "$ref": "#/components/schemas/CheckStatus",
            "description": "The worst status of any finding."
          },
          "work": {
            "$ref": "#/components/schemas/SandboxSessionWork"
          }
        }
      },
      "SandboxDurability": {
        "type": "string",
        "description": "What survives physical compute loss.",
        "enum": [
          "checkpointed",
          "provider_snapshot",
          "none"
        ]
      },
      "SandboxEscalation": {
        "type": "string",
        "description": "Who may widen containment after a session starts.",
        "enum": [
          "never",
          "approval",
          "auto"
        ]
      },
      "SandboxEvent": {
        "type": "object",
        "description": "One recorded cause: who acted on the Sandbox (or decided not to), and why.",
        "required": [
          "at",
          "generation",
          "actor",
          "action",
          "outcome",
          "reason",
          "message",
          "detail"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "`pause`, `resume` or `delete`.",
            "example": "pause"
          },
          "actor": {
            "type": "string",
            "description": "`idle_timer`, `idle_sweep`, `retention_sweep` or `person`.",
            "example": "idle_sweep"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "detail": {
            "type": "object"
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Incarnation the event applied to."
          },
          "message": {
            "type": "string",
            "description": "What happened, in one sentence."
          },
          "outcome": {
            "type": "string",
            "description": "`done`, `skipped` or `failed`.",
            "example": "skipped"
          },
          "reason": {
            "type": "string",
            "description": "Stable reason code, such as `idle_limit`, `stale_turn`, `session_active`,\n`idle_pause_off`, `retention`, `idle_action_delete` or `provider_error`.",
            "example": "session_active"
          }
        }
      },
      "SandboxEventList": {
        "type": "object",
        "description": "A Sandbox's decisions and states over a window.",
        "required": [
          "sandbox_id",
          "from",
          "to",
          "events",
          "states"
        ],
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxEvent"
            },
            "description": "Recorded causes, oldest first."
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "sandbox_id": {
            "type": "string"
          },
          "states": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxStateSpan"
            },
            "description": "States over the same window, oldest first. A state change with no\nevent beside it was made by an agent's sandbox call or found on the\nprovider (a lost sandbox), not by a lifecycle decision."
          },
          "to": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SandboxFilesystemPolicy": {
        "type": "object",
        "description": "Filesystem paths the target permits command execution to mutate.",
        "properties": {
          "writable_roots": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Absolute roots the runtime may mutate; empty means provider default."
          }
        }
      },
      "SandboxFinding": {
        "type": "object",
        "description": "One finding: what is true, why it matters, how to fix it.",
        "required": [
          "id",
          "status",
          "title",
          "summary"
        ],
        "properties": {
          "fix": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "description": "Stable identifier, such as `provider.state` or `lifecycle.overdue`.",
            "example": "provider.auto_stop"
          },
          "status": {
            "$ref": "#/components/schemas/CheckStatus"
          },
          "summary": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "why": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SandboxFleetDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SandboxFleetItem"
          },
          {
            "type": "object",
            "required": [
              "incarnations",
              "history"
            ],
            "properties": {
              "history": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SandboxStateSpan"
                },
                "description": "State history, oldest first."
              },
              "incarnations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SandboxIncarnation"
                },
                "description": "Provider resources, newest first."
              },
              "lifecycle": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SandboxLifecycleStatus",
                    "description": "Lifecycle policy pinned when the Session was created, with the\ndeadlines it sets now. `sandboxes events list` holds the decisions\ntaken under it; `sandboxes diagnose` explains the state."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        ],
        "description": "One Sandbox with its incarnations and lifecycle history."
      },
      "SandboxFleetItem": {
        "type": "object",
        "description": "One logical Sandbox in the organization.",
        "required": [
          "id",
          "state",
          "desired_state",
          "provider",
          "role",
          "generation",
          "checkpoint_count",
          "attention",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent the Session ran."
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent display name.",
            "example": "Coder"
          },
          "attention": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Why this Sandbox needs attention: `lost`, `failed`, `init_failed`,\n`idle_running` (running with no activity for an hour) or `cleanup_failed`."
          },
          "checkpoint_count": {
            "type": "integer",
            "format": "int64",
            "description": "Committed workspace checkpoints.",
            "example": 12
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "desired_state": {
            "type": "string",
            "description": "Lifecycle intent the control plane is moving the Sandbox toward: `ready`, `paused` or `deleted`.",
            "example": "ready"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider's id for the latest physical resource.",
            "example": "dtn-7f3a91c2"
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Incarnation counter. Above 1 means the provider resource was lost and rebuilt.",
            "example": 1
          },
          "id": {
            "type": "string",
            "description": "Durable logical Sandbox id. Stays the same when the provider resource is replaced.",
            "example": "sandbox_01933b5a00007000800000000000001"
          },
          "idle_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Inactivity interval before the Sandbox is paused.",
            "example": 300
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image the template asked for (`target.options.image`), when it named one.",
            "example": "ghcr.io/everruns/sandbox-dev:v0.53.0"
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last recorded tool activity or state change."
          },
          "last_init_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error from the latest init commands, if they failed."
          },
          "provider": {
            "type": "string",
            "description": "Provider id, such as `daytona`, `modal` or `docker`.",
            "example": "daytona"
          },
          "role": {
            "type": "string",
            "description": "`primary` (addressed implicitly by shell and file tools) or `resource`.",
            "example": "primary"
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Owning Session; absent once the Session is deleted."
          },
          "session_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session title, kept after the Session is deleted.",
            "example": "Fix flaky CI"
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "Size the template asked for (`target.options.size`), when it named one.",
            "example": "small"
          },
          "state": {
            "type": "string",
            "description": "`running`, `paused`, `lost`, `starting`, `failed`, `not_started` or `deleted`.",
            "example": "running"
          },
          "target_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Target kind from the pinned specification: `managed`, `container`, `machine`, `vfs` or `host`.",
            "example": "managed"
          },
          "template": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxTemplateRef",
                "description": "Template revision the Sandbox was created from."
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Working directory inside the Sandbox.",
            "example": "/home/daytona/workspace"
          }
        }
      },
      "SandboxFleetPage": {
        "type": "object",
        "description": "A page of the fleet.",
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxFleetItem"
            }
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Sandboxes matching the filters."
          }
        }
      },
      "SandboxFleetStats": {
        "type": "object",
        "description": "Roll-ups for the fleet summary.",
        "required": [
          "window_days",
          "by_state",
          "live_by_provider",
          "created_in_window",
          "created_in_prior_window",
          "running_seconds_in_window",
          "recoveries_in_window",
          "needs_attention"
        ],
        "properties": {
          "by_state": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxCount"
            },
            "description": "Sandboxes per state."
          },
          "created_in_prior_window": {
            "type": "integer",
            "format": "int64",
            "description": "Created in the window before, for a trend."
          },
          "created_in_window": {
            "type": "integer",
            "format": "int64"
          },
          "live_by_provider": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxCount"
            },
            "description": "Live Sandboxes per provider."
          },
          "needs_attention": {
            "type": "integer",
            "format": "int64",
            "description": "Sandboxes with at least one attention reason."
          },
          "recoveries_in_window": {
            "type": "integer",
            "format": "int64",
            "description": "Provider resources lost and rebuilt in the window."
          },
          "running_seconds_in_window": {
            "type": "integer",
            "format": "int64",
            "description": "Total time Sandboxes spent running in the window."
          },
          "window_days": {
            "type": "integer",
            "format": "int64",
            "description": "Days covered by the `*_in_window` figures.",
            "example": 7
          }
        }
      },
      "SandboxIdleAction": {
        "type": "string",
        "enum": [
          "checkpoint_and_stop",
          "stop",
          "keep_running",
          "delete"
        ]
      },
      "SandboxIncarnation": {
        "type": "object",
        "description": "One physical provider resource behind a logical Sandbox.",
        "required": [
          "generation",
          "external_id",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "external_id": {
            "type": "string"
          },
          "generation": {
            "type": "integer",
            "format": "int64"
          },
          "last_init_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "retired_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was replaced or deleted."
          },
          "status": {
            "type": "string",
            "description": "Provider status the last time it was observed: `running`, `paused` or `lost`."
          }
        }
      },
      "SandboxLifecycle": {
        "type": "object",
        "description": "Control-plane lifecycle intent. Providers do not own these timers.",
        "properties": {
          "delete_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How long a paused Sandbox is kept, counted from its last activity,\nbefore Everruns deletes it with its files. The Session stays; its next\nSandbox call provisions a fresh one. `null` keeps paused Sandboxes\nuntil their Session is deleted.",
            "example": 259200,
            "minimum": 0
          },
          "idle_action": {
            "$ref": "#/components/schemas/SandboxIdleAction",
            "description": "Action Everruns requests after the idle interval."
          },
          "idle_after_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Inactivity interval before applying `idle_action`.",
            "example": 300,
            "minimum": 0
          }
        }
      },
      "SandboxLifecycleData": {
        "type": "object",
        "description": "Non-secret lifecycle details for a managed Sandbox incarnation.",
        "required": [
          "provider",
          "previous_instance_id",
          "process_state_lost"
        ],
        "properties": {
          "current_instance_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement physical resource. Present only on the recovery event."
          },
          "generation": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Current incarnation fence, when hosted persistence is available."
          },
          "previous_instance_id": {
            "type": "string",
            "description": "Physical provider resource that was lost or replaced."
          },
          "process_state_lost": {
            "type": "boolean",
            "description": "Provider process state is ephemeral and is not restored across replacement."
          },
          "provider": {
            "type": "string",
            "description": "Compute provider selected by the Sandbox Template specification."
          },
          "sandbox_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Durable logical Sandbox identifier, when hosted persistence is available."
          }
        }
      },
      "SandboxLifecycleStatus": {
        "type": "object",
        "description": "The lifecycle policy pinned when the Session was created, and what it\nmeans for this Sandbox now.",
        "required": [
          "idle_after_seconds",
          "idle_action",
          "idle_since"
        ],
        "properties": {
          "delete_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How long a paused Sandbox is kept before deletion; `null` keeps it.",
            "minimum": 0
          },
          "delete_due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the retention sweep deletes the provider sandbox (paused only)."
          },
          "idle_action": {
            "type": "string",
            "description": "`checkpoint_and_stop`, `stop`, `keep_running` or `delete`.",
            "example": "checkpoint_and_stop"
          },
          "idle_after_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Inactivity before the idle action.",
            "minimum": 0
          },
          "idle_since": {
            "type": "string",
            "format": "date-time",
            "description": "Last activity, from which every deadline counts."
          },
          "pause_due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the in-process idle timer pauses it (running only)."
          },
          "stale_turn_pause_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the sweep pauses it although its session claims a running turn."
          },
          "sweep_pause_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the sweep pauses it if the timer did not (running only)."
          }
        }
      },
      "SandboxNetworkPolicy": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "mode"
            ],
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "deny"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "allowed_hosts",
              "mode"
            ],
            "properties": {
              "allowed_hosts": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mode": {
                "type": "string",
                "enum": [
                  "allowlist"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "mode"
            ],
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "allow"
                ]
              }
            }
          }
        ],
        "description": "Outbound network policy the target must actually enforce."
      },
      "SandboxPolicy": {
        "type": "object",
        "description": "Agent policy for selecting the Session's primary Sandbox Template.",
        "required": [
          "default"
        ],
        "properties": {
          "default": {
            "type": "string",
            "description": "Template binding inherited when Session creation does not choose one.",
            "example": "primary"
          },
          "mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxPolicyMode",
                "description": "Who may choose the primary Sandbox for a Session. Older rows omit this\nfield; one template then means `fixed`, while several mean `selectable`."
              },
              {
                "type": "null"
              }
            ]
          },
          "templates": {
            "type": "object",
            "description": "Template snapshots addressable by binding name at Session creation.",
            "additionalProperties": {
              "$ref": "#/components/schemas/SandboxTemplateSpec"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "SandboxPolicyMode": {
        "type": "string",
        "description": "Agent policy for choosing the Session's one immutable primary Sandbox.",
        "enum": [
          "fixed",
          "selectable",
          "configurable"
        ]
      },
      "SandboxSelection": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "use"
            ],
            "properties": {
              "use": {
                "type": "string"
              }
            }
          },
          {
            "$ref": "#/components/schemas/SandboxTemplateSpec"
          }
        ],
        "description": "Session-level selection: use an Agent template binding or provide an inline specification."
      },
      "SandboxSessionWork": {
        "type": "object",
        "description": "The session's work, as the runtime sees it.",
        "required": [
          "data_plane"
        ],
        "properties": {
          "attempts": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "cancel_requested_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "claim_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "claimed": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether a worker holds the turn right now."
          },
          "data_plane": {
            "type": "boolean",
            "description": "The session runs on a v2 data plane (a shard)."
          },
          "pending_inputs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Inputs admitted but not yet taken by a turn."
          },
          "phase": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the turn is: `idle`, `queued`, `running`, ..."
          },
          "phase_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "queued_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Waiting for a worker since."
          },
          "session_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "`active` means a turn is running."
          }
        }
      },
      "SandboxStateSpan": {
        "type": "object",
        "description": "A span of time a Sandbox spent in one state.",
        "required": [
          "state",
          "generation",
          "start",
          "end",
          "current"
        ],
        "properties": {
          "current": {
            "type": "boolean",
            "description": "The Sandbox is still in this state."
          },
          "end": {
            "type": "string",
            "format": "date-time"
          },
          "generation": {
            "type": "integer",
            "format": "int64",
            "description": "Incarnation during the span."
          },
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "description": "Fleet state during the span.",
            "example": "running"
          }
        }
      },
      "SandboxTarget": {
        "type": "object",
        "description": "Where a session's commands run.",
        "required": [
          "kind"
        ],
        "properties": {
          "connection_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Registered connection used by a machine target.",
            "example": "conn_01933b5a000070008000000000000001"
          },
          "kind": {
            "type": "string",
            "description": "Shape of the target: `host`, `machine`, `vfs`, `container`, `managed`.",
            "example": "managed"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Concrete provider, when the kind has one (`bashkit`, `daytona`, ...).",
            "example": "daytona"
          }
        }
      },
      "SandboxTargetDescriptor": {
        "type": "object",
        "description": "One target this deployment can offer, and what it can do.",
        "required": [
          "display_name",
          "icon",
          "kind",
          "available",
          "capabilities",
          "containment_levels",
          "durability",
          "credential_sources"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether this deployment can actually run it right now."
          },
          "capabilities": {
            "$ref": "#/components/schemas/SandboxCapabilities",
            "description": "Capabilities the deployment can honestly provide for this target."
          },
          "containment_levels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Containment levels this target supports, weakest first."
          },
          "credential_sources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Credential sources accepted by this target."
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable provider/target name."
          },
          "durability": {
            "type": "string",
            "description": "Recovery guarantee offered by this target."
          },
          "icon": {
            "type": "string",
            "description": "Lucide icon name used by management surfaces."
          },
          "isolation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxTargetIsolation",
                "description": "How this deployment runs the target, for targets it runs itself\n(isolated sandboxes). Absent for provider accounts."
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "description": "Provider-neutral target class."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Concrete provider adapter, when the target class requires one."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it is unavailable. Present only when `available` is false."
          }
        }
      },
      "SandboxTargetIsolation": {
        "type": "object",
        "description": "Deployment settings of a target the deployment runs itself.",
        "required": [
          "vm_isolated",
          "sizes",
          "default_image",
          "max_per_org"
        ],
        "properties": {
          "billing_note": {
            "type": [
              "string",
              "null"
            ],
            "description": "What running a sandbox costs the organization, in plain words;\nabsent when the deployment does not charge for them."
          },
          "default_image": {
            "type": "string",
            "description": "Image used when a template names none."
          },
          "max_per_org": {
            "type": "integer",
            "format": "int32",
            "description": "Running sandboxes one organization may hold at a time.",
            "minimum": 0
          },
          "runtime_class": {
            "type": [
              "string",
              "null"
            ],
            "description": "Kubernetes runtime class sandbox pods run under (for example\n`isolated-sandbox` for AWS Nitro Sandboxes); absent for plain\ncontainers."
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sizes a template may pick (`small`, `medium`, `large`)."
          },
          "vm_isolated": {
            "type": "boolean",
            "description": "Whether each sandbox runs in its own VM or kernel sandbox. Plain\ncontainers share the node's kernel and are no boundary for untrusted\ncode."
          }
        }
      },
      "SandboxTargetKind": {
        "type": "string",
        "description": "Provider-neutral target class.",
        "enum": [
          "host",
          "machine",
          "vfs",
          "container",
          "managed"
        ]
      },
      "SandboxTargetSpec": {
        "type": "object",
        "description": "Where commands execute.",
        "required": [
          "kind"
        ],
        "properties": {
          "connection_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Credential/transport binding for a registered machine target.",
            "example": "conn_01933b5a000070008000000000000001"
          },
          "credential": {
            "$ref": "#/components/schemas/SessionSandboxCredential",
            "description": "Provider credential source. User and Agent bindings are resolved to an\nexact virtual user when the Session starts; organization bindings also\npin the exact connection."
          },
          "kind": {
            "$ref": "#/components/schemas/SandboxTargetKind",
            "description": "Provider-neutral target class."
          },
          "options": {
            "type": "object",
            "description": "Provider-owned, non-secret configuration. Credentials are references,\nnever values in this object."
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Concrete adapter for target kinds with more than one implementation.",
            "example": "daytona"
          }
        }
      },
      "SandboxTargetsResponse": {
        "type": "object",
        "description": "Response body for the `list_sandbox_targets` operation.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxTargetDescriptor"
            },
            "description": "Target descriptors known to this deployment."
          }
        }
      },
      "SandboxTemplate": {
        "type": "object",
        "description": "Organization-scoped reusable Sandbox Template.",
        "required": [
          "id",
          "name",
          "display_name",
          "is_managed",
          "status",
          "current_revision",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "current_revision": {
            "$ref": "#/components/schemas/SandboxTemplateRevision",
            "description": "Latest immutable revision used for new references."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional explanation of the Sandbox Template's intended workload.",
            "example": "Recoverable coding workspace managed by Daytona"
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable name shown in management surfaces.",
            "example": "Coding - Daytona"
          },
          "id": {
            "type": "string",
            "description": "Stable public Sandbox Template identifier."
          },
          "is_managed": {
            "type": "boolean",
            "description": "Whether the definition is owned and sealed by the platform."
          },
          "name": {
            "type": "string",
            "description": "Addressable name used in configuration.",
            "example": "coding-daytona"
          },
          "status": {
            "type": "string",
            "description": "Lifecycle state such as `active` or `archived`.",
            "example": "active"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the most recent definition or revision change."
          }
        }
      },
      "SandboxTemplateBuild": {
        "type": "object",
        "description": "Tenant-scoped build attempt, retained inputs, bounded output, and provider artifact.\nManagement credentials are stored separately and never appear in this record.",
        "required": [
          "id",
          "sandbox_template_id",
          "request",
          "source_spec",
          "status",
          "step",
          "logs",
          "snapshot_name",
          "cancel_requested",
          "cleanup_pending",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "applied_revision_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Immutable template revision created by applying this artifact, if applied.",
            "example": "sbxtplrev_01933b5a000070008000000000000002"
          },
          "builder_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Disposable installation compute identifier or its persisted submission name.",
            "example": "550e8400-e29b-41d4-a716-446655440001"
          },
          "cancel_requested": {
            "type": "boolean",
            "description": "Whether cancellation was accepted; stale worker saves cannot erase this request.",
            "example": false
          },
          "cleanup_pending": {
            "type": "boolean",
            "description": "Whether provider resources still require confirmed cleanup or reconciliation.",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time this build attempt was accepted.",
            "example": "2026-10-29T00:00:00Z"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bounded failure explanation, absent when no failure has been recorded.",
            "example": "Command failed with exit code 23"
          },
          "id": {
            "type": "string",
            "description": "Unique build attempt identifier.",
            "example": "sbxbuild_01933b5a000070008000000000000001"
          },
          "logs": {
            "type": "string",
            "description": "UTF-8 execution-output tail, bounded to 32 KiB.",
            "example": "HTTPie 3.2.4\nVerification passed\n"
          },
          "request": {
            "$ref": "#/components/schemas/SandboxBuildRequest",
            "description": "Original immutable installation and verification inputs."
          },
          "sandbox_template_id": {
            "type": "string",
            "description": "Parent template whose immutable source revision supplied the build configuration.",
            "example": "sbxtpl_01933b5a000070008000000000000001"
          },
          "snapshot_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider snapshot identifier, present once the artifact has been resolved.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "snapshot_name": {
            "type": "string",
            "description": "Deterministic provider artifact name used to reconcile uncertain submissions.",
            "example": "everruns-build-01933b5a000070008000000000000001"
          },
          "snapshot_requested_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Submission time used when reconciling a snapshot response lost in transport.",
            "example": "2026-10-29T00:00:00Z"
          },
          "software_notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Up to 16 KiB of author-supplied Markdown, presented as untrusted reference data.",
            "example": "# Installed tools\n- HTTPie 3.2.4"
          },
          "source_spec": {
            "$ref": "#/components/schemas/SandboxTemplateSpec",
            "description": "Exact source spec; no runtime credentials or workspace are attached."
          },
          "status": {
            "$ref": "#/components/schemas/SandboxBuildStatus",
            "description": "Persisted lifecycle state; inspect cleanup_pending before applying a Ready build."
          },
          "step": {
            "type": "string",
            "description": "Current execution or cleanup step.",
            "example": "installing"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the last persisted build update.",
            "example": "2026-10-29T00:01:00Z"
          },
          "verification_sandbox_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Disposable fresh-snapshot verification compute identifier or submission name.",
            "example": "550e8400-e29b-41d4-a716-446655440002"
          }
        }
      },
      "SandboxTemplateMetadataRequest": {
        "type": "object",
        "description": "Editable template metadata; omitted fields retain their current values.",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SandboxTemplateRef": {
        "type": "object",
        "description": "Template revision a Sandbox was created from.",
        "required": [
          "id"
        ],
        "properties": {
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Template display name.",
            "example": "Coding - Daytona"
          },
          "id": {
            "type": "string",
            "description": "Sandbox Template id.",
            "example": "sbxtpl_01933b5a00007000800000000000001"
          },
          "revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Revision number pinned when the Session was created.",
            "example": 4
          }
        }
      },
      "SandboxTemplateRevision": {
        "type": "object",
        "description": "Immutable revision of a Sandbox Template.",
        "required": [
          "id",
          "sandbox_template_id",
          "revision",
          "spec",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Revision creation timestamp."
          },
          "id": {
            "type": "string",
            "description": "Stable public revision identifier pinned into Agent and Session snapshots."
          },
          "revision": {
            "type": "integer",
            "format": "int32",
            "description": "Monotonically increasing revision number within the Sandbox Template.",
            "example": 3
          },
          "sandbox_template_id": {
            "type": "string",
            "description": "Parent reusable Sandbox Template identifier."
          },
          "spec": {
            "$ref": "#/components/schemas/SandboxTemplateSpec",
            "description": "Complete immutable authored specification."
          }
        }
      },
      "SandboxTemplateSpec": {
        "type": "object",
        "description": "Desired Sandbox configuration authored by a human or application.\n\nContainment and durability may be omitted when the target has exactly one\nhonest answer. Resolution fills those fields before the specification is pinned\nto a Session.",
        "required": [
          "target"
        ],
        "properties": {
          "bootstrap": {
            "$ref": "#/components/schemas/SandboxBootstrap",
            "description": "Reproducible commands run when physical compute is initialized."
          },
          "containment": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxContainmentSpec",
                "description": "Requested isolation policy; resolution supplies an honest target default."
              },
              {
                "type": "null"
              }
            ]
          },
          "durability": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxDurability",
                "description": "Requested recovery guarantee; resolution supplies a target default."
              },
              {
                "type": "null"
              }
            ]
          },
          "lifecycle": {
            "$ref": "#/components/schemas/SandboxLifecycle",
            "description": "Idle lifecycle policy controlled by Everruns."
          },
          "target": {
            "$ref": "#/components/schemas/SandboxTargetSpec",
            "description": "Provider-neutral target plus its concrete adapter binding."
          },
          "template_revision_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Immutable Sandbox Template revision this specification was copied from.\nThe specification remains complete so Agent snapshots are portable and\nlater template revisions cannot change an existing snapshot."
          }
        }
      },
      "SandboxTimeline": {
        "type": "object",
        "description": "Lifecycle of the fleet over a window.",
        "required": [
          "from",
          "to",
          "lanes",
          "total_lanes",
          "concurrency",
          "peak_running"
        ],
        "properties": {
          "concurrency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxConcurrencyPoint"
            },
            "description": "Step series of concurrently running Sandboxes across every lane."
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "lanes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxTimelineLane"
            },
            "description": "Lanes ordered by running time, longest first."
          },
          "peak_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "peak_running": {
            "type": "integer",
            "format": "int64"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "total_lanes": {
            "type": "integer",
            "format": "int64",
            "description": "Sandboxes with activity in the window, including those beyond `limit`."
          }
        }
      },
      "SandboxTimelineLane": {
        "type": "object",
        "description": "One Sandbox's lane on the timeline.",
        "required": [
          "sandbox",
          "spans",
          "running_seconds"
        ],
        "properties": {
          "running_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds spent running within the window."
          },
          "sandbox": {
            "$ref": "#/components/schemas/SandboxFleetItem"
          },
          "spans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxStateSpan"
            },
            "description": "Spans clipped to the window, oldest first."
          }
        }
      },
      "SaveDestinationRequest": {
        "type": "object",
        "description": "Create or update a receiver; omitted authentication preserves existing credentials.",
        "required": [
          "config"
        ],
        "properties": {
          "config": {
            "$ref": "#/components/schemas/DestinationConfig",
            "description": "Non-secret destination settings, including capture consent and pause state."
          },
          "revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Expected current revision for updates; omit when creating a destination.",
            "example": 1
          },
          "secrets": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TraceSecrets",
                "description": "Receiver authentication. Required for creation or a receiver change; never returned."
              },
              {
                "type": "null"
              }
            ],
            "writeOnly": true
          }
        },
        "additionalProperties": false
      },
      "SaveOrganizationConnectionRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreateConnectionRequest",
            "description": "Provider credential and any provider-specific connection fields."
          },
          {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Human-readable account name shown in Sandbox Template and web search selectors.",
                "example": "Production Daytona"
              }
            }
          }
        ],
        "description": "Organization-owned provider account input (sandbox provider or search account)."
      },
      "SaveRoutingRequest": {
        "type": "object",
        "description": "Save routing only when the supplied revision still matches the current policy.",
        "required": [
          "policy",
          "revision"
        ],
        "properties": {
          "policy": {
            "$ref": "#/components/schemas/RoutingPolicy",
            "description": "Routing mode and the organization-owned destination selections to save."
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Current revision used to reject stale saves and deletes.",
            "example": 1
          }
        },
        "additionalProperties": false
      },
      "ScheduleExecutionResponse": {
        "type": "object",
        "description": "Schedule execution response",
        "required": [
          "id",
          "schedule_id",
          "scheduled_at",
          "started_at",
          "status",
          "created_at"
        ],
        "properties": {
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this resource completed, if any (RFC 3339).",
            "example": "2026-05-25T02:00:12Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339).",
            "example": "2026-05-25T02:00:00Z"
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Total execution duration in milliseconds (`completed_at - started_at`). `None` while still running.",
            "example": 11000
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable error message, populated when this resource is in a failed state.",
            "example": "workflow.exec.timeout: activity exceeded 30s budget"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the schedule execution.",
            "example": "01933b5b-0000-7000-8000-000000000001"
          },
          "schedule_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the owning schedule.",
            "example": "01933b5a-0000-7000-8000-000000000001"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource is scheduled to run (RFC 3339).",
            "example": "2026-05-25T02:00:00Z"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource started, if any (RFC 3339).",
            "example": "2026-05-25T02:00:01Z"
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle status (`pending`, `running`, `completed`, `failed`, `skipped`).",
            "example": "completed"
          },
          "task_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Durable task's identifier.",
            "example": "01933b5d-0000-7000-8000-000000000001"
          },
          "workflow_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Durable workflow's identifier.",
            "example": "01933b5c-0000-7000-8000-000000000001"
          }
        }
      },
      "ScheduleExecutionsListResponse": {
        "type": "object",
        "description": "Schedule executions list response",
        "required": [
          "data",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleExecutionResponse"
            },
            "description": "Page of items returned by this query."
          },
          "total": {
            "type": "integer",
            "description": "Total number of items matching the query, across all pages.",
            "example": 142,
            "minimum": 0
          }
        }
      },
      "ScheduleResponse": {
        "type": "object",
        "description": "Schedule response",
        "required": [
          "id",
          "name",
          "cron_expression",
          "timezone",
          "target",
          "enabled",
          "catch_up_missed",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "catch_up_missed": {
            "type": "boolean",
            "description": "When `true`, missed fires (while the scheduler was down, paused, or unreachable) are queued and run after recovery, subject to `max_catch_up`.",
            "example": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339).",
            "example": "2026-05-01T12:00:00Z"
          },
          "cron_expression": {
            "type": "string",
            "description": "Cron expression in the standard `min hour day-of-month month day-of-week` form (6 fields with seconds optional). Evaluated in `timezone`.",
            "example": "0 2 * * *"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Fires the support-triage agent every night at 02:00 UTC"
          },
          "enabled": {
            "type": "boolean",
            "description": "When `false`, the schedule is paused — kept in storage but never fires until re-enabled.",
            "example": true
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the schedule.",
            "example": "01933b5a-0000-7000-8000-000000000001"
          },
          "last_triggered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the most recent fire (RFC 3339). `None` if never triggered.",
            "example": "2026-05-25T02:00:00Z"
          },
          "max_catch_up": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum number of missed fires to replay when `catch_up_missed` is `true`. Older missed fires are dropped. `None` means no cap.",
            "example": 3,
            "minimum": 0
          },
          "max_concurrent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum number of overlapping executions allowed. `None` means no limit beyond the worker pool's concurrency.",
            "example": 1,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "nightly-triage"
          },
          "next_trigger_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the next scheduled fire (RFC 3339). `None` when the schedule is disabled or the cron expression has no upcoming match.",
            "example": "2026-05-26T02:00:00Z"
          },
          "retry_policy": {
            "description": "Optional retry policy for failed runs (provider-specific JSON; see the durable engine's `RetryPolicy`).\nExample: `{\"max_attempts\": 3, \"initial_backoff_secs\": 30, \"backoff_multiplier\": 2.0}`."
          },
          "target": {
            "$ref": "#/components/schemas/ScheduleTargetResponse",
            "description": "What the schedule invokes when it fires (a session, an agent, an app channel, etc.)."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone name used to interpret `cron_expression` (e.g. `UTC`, `America/New_York`).",
            "example": "UTC"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was last updated (RFC 3339).",
            "example": "2026-05-20T12:00:00Z"
          }
        }
      },
      "ScheduleStatsResponse": {
        "type": "object",
        "description": "Schedule stats response",
        "required": [
          "total_executions",
          "successful_executions",
          "failed_executions",
          "skipped_executions"
        ],
        "properties": {
          "avg_duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Average execution duration in milliseconds across `total_executions`. `None` when no executions exist yet.",
            "example": 8421,
            "minimum": 0
          },
          "failed_executions": {
            "type": "integer",
            "format": "int64",
            "description": "Count of executions that ended in failure (after exhausting retries).",
            "example": 3,
            "minimum": 0
          },
          "last_execution_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Status of the most recent execution (one of the `ScheduleExecutionResponse.status` values:\n`pending`, `running`, `completed`, `failed`, `skipped`). `None` if the schedule has never fired.",
            "example": "completed"
          },
          "skipped_executions": {
            "type": "integer",
            "format": "int64",
            "description": "Count of fires that were intentionally skipped (e.g. blocked by `max_concurrent` or disabled mid-fire).",
            "example": 2,
            "minimum": 0
          },
          "successful_executions": {
            "type": "integer",
            "format": "int64",
            "description": "Count of executions that completed successfully.",
            "example": 137,
            "minimum": 0
          },
          "total_executions": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of executions recorded for this schedule (sum of successful + failed + skipped).",
            "example": 142,
            "minimum": 0
          }
        }
      },
      "ScheduleTarget": {
        "type": "object",
        "description": "Target for a schedule - either a workflow or activity",
        "required": [
          "type",
          "name"
        ],
        "properties": {
          "input": {
            "description": "Input JSON for the workflow/activity"
          },
          "name": {
            "type": "string",
            "description": "Workflow type name or activity type name",
            "example": "leased_resource_cleanup"
          },
          "type": {
            "type": "string",
            "description": "Target type: \"workflow\" or \"activity\"",
            "example": "activity"
          }
        },
        "example": {
          "input": {
            "batch_size": 25,
            "retry_after_seconds": 60,
            "stale_after_seconds": 300
          },
          "name": "leased_resource_cleanup",
          "type": "activity"
        }
      },
      "ScheduleTargetResponse": {
        "type": "object",
        "description": "Schedule target response",
        "required": [
          "type",
          "name",
          "input"
        ],
        "properties": {
          "input": {
            "type": "object",
            "description": "Input JSON payload passed to the workflow/activity on each fire.\nExample: `{\"batch_size\": 25, \"stale_after_seconds\": 300, \"retry_after_seconds\": 60}`."
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "leased_resource_cleanup"
          },
          "type": {
            "type": "string",
            "description": "Target type discriminator (`workflow` or `activity`).",
            "example": "activity"
          }
        }
      },
      "ScheduleTriggerConfig": {
        "type": "object",
        "description": "Typed configuration for a `Schedule` trigger.\n\n`message` is also the template body. `{{path.to.value}}` placeholders are\nexpanded at invocation time. Mirrors `app::ScheduleChannelConfig`.",
        "required": [
          "cron_expression",
          "message"
        ],
        "properties": {
          "cron_expression": {
            "type": "string",
            "description": "Cron expression that drives the durable schedule."
          },
          "message": {
            "type": "string",
            "description": "Message content or template sent when the schedule fires."
          },
          "script": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScriptRun",
                "description": "Saved script the schedule runs instead of asking the model; `message`\nis then the line the run is recorded under."
              },
              {
                "type": "null"
              }
            ]
          },
          "session_mode": {
            "$ref": "#/components/schemas/SessionBinding",
            "description": "Whether invocations reuse a stable session or create a new one."
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScheduleTriggerTarget",
                "description": "Conversation of one of the agent's own channels each run speaks in,\ninstead of a session of the trigger's own. `session_mode` then does\nnot apply: the conversation's binding picks the session."
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone identifier for cron evaluation."
          }
        }
      },
      "ScheduleTriggerTarget": {
        "type": "object",
        "description": "A conversation a schedule trigger runs in: the session a message from that\nconversation would land in, created and bound on the first run.\n\nSlack only. `binding_key` names the conversation the way the channel binds\nit: `slack:user:{user_id}` (a direct message with that person) on a\n`per_user` channel, `slack:channel:{channel_id}` (a top-level post) on a\n`per_channel` one.",
        "required": [
          "channel_id",
          "binding_key"
        ],
        "properties": {
          "binding_key": {
            "type": "string",
            "description": "The conversation's binding key on that channel."
          },
          "channel_id": {
            "type": "string",
            "description": "The agent's channel the conversation belongs to."
          }
        }
      },
      "SchedulesListResponse": {
        "type": "object",
        "description": "Schedules list response",
        "required": [
          "data",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleResponse"
            },
            "description": "Page of items returned by this query."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of items matching the query, across all pages.",
            "example": 17,
            "minimum": 0
          }
        }
      },
      "SchemaResponse": {
        "type": "object",
        "description": "Schema response for a database.",
        "required": [
          "database",
          "tables"
        ],
        "properties": {
          "database": {
            "type": "string"
          },
          "tables": {
            "type": "array",
            "items": {}
          }
        }
      },
      "ScopedMcpServer": {
        "type": "object",
        "description": "Session-, agent-, or harness-scoped remote MCP server configuration.\n\nThis intentionally mirrors the `mcpServers` object shape used by common MCP\nclient config files while staying within Everruns' current remote-HTTP-only\nsupport.",
        "properties": {
          "actsAs": {
            "$ref": "#/components/schemas/McpServerActsAs",
            "description": "Identity whose grant this attachment requests."
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Arguments passed to the stdio `command`."
          },
          "auth_mode": {
            "$ref": "#/components/schemas/McpServerAuthMode",
            "description": "Authentication mode used when executing tools from this scoped server."
          },
          "command": {
            "type": [
              "string",
              "null"
            ],
            "description": "Executable to spawn for a stdio transport server."
          },
          "connectInChat": {
            "$ref": "#/components/schemas/McpConnectInChat",
            "description": "Whether a missing sign-in may pause the turn with an in-chat Connect\ncard (`ask`, the default) or fails the call with a settings link\n(`never`)."
          },
          "deferred": {
            "type": "boolean",
            "description": "Whether the server's tools are listed only when the model asks for\nthem through tool search (`false`, the default, lists them at turn\nstart)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Searchable server context supplied by its attachment or catalog. It is\nmetadata, not an instruction or a credential."
          },
          "elicitation_policy": {
            "$ref": "#/components/schemas/McpElicitationPolicy",
            "description": "Which elicitation modes this server may use (`url` by default)."
          },
          "env": {
            "type": "object",
            "description": "Environment variables set for the stdio `command`.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "headers": {
            "type": "object",
            "description": "Additional HTTP headers sent on MCP requests (HTTP transport only).",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "oauth_provider_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider id used to resolve a user-scoped bearer token."
          },
          "protocol_mode": {
            "$ref": "#/components/schemas/McpProtocolMode",
            "description": "Protocol-era adoption policy for the MCP client (`auto` negotiates)."
          },
          "tool_discovery": {
            "type": "boolean",
            "description": "Whether to discover tool definitions live from this server."
          },
          "tool_labels": {
            "type": "object",
            "description": "Risk labels for this server's tools, by the tool's own name:\n`read_only` never asks for approval in the normal mode, `changes`\nalways asks. They win over the tool's annotations and over a catalog\npreset's saved labels. Honored on harness, agent and person-owned\nservers; dropped from session-scoped servers.",
            "additionalProperties": {
              "$ref": "#/components/schemas/McpToolLabel"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "tool_timeout_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How long one `tools/call` to this server may take, in milliseconds.\nUnset means [`MCP_TOOL_TIMEOUT_DEFAULT_MS`] (60 s); accepted range is\n[`MCP_TOOL_TIMEOUT_MIN_MS`]..=[`MCP_TOOL_TIMEOUT_MAX_MS`]. `timeout`\nis accepted as an alias, matching common `mcpServers` config files.",
            "minimum": 0
          },
          "type": {
            "$ref": "#/components/schemas/McpServerTransportType",
            "description": "MCP transport type. Only remote HTTP is supported today."
          },
          "url": {
            "type": "string",
            "description": "URL of the remote MCP server endpoint. Required for HTTP transport;\nempty/ignored for stdio."
          },
          "use": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerPresetRef",
                "description": "Organization catalog preset that supplies transport and authentication policy."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Score": {
        "type": "object",
        "description": "Result from a single scorer evaluation.",
        "required": [
          "pass",
          "value",
          "reason"
        ],
        "properties": {
          "pass": {
            "type": "boolean",
            "description": "Whether this scorer passed.",
            "example": true
          },
          "reason": {
            "type": "string",
            "description": "Human-readable explanation.",
            "example": "Output contains expected text"
          },
          "value": {
            "type": "number",
            "format": "double",
            "description": "Score value 0.0–1.0.",
            "example": 1
          }
        }
      },
      "ScoreReview": {
        "type": "object",
        "description": "A person's verdict on one score: whether the grader got it right. Reviews\ncalibrate graders, and a disagreed score is a candidate eval case.",
        "required": [
          "agrees"
        ],
        "properties": {
          "agrees": {
            "type": "boolean",
            "description": "True when the person agrees with the grader's pass or fail."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional note on why."
          },
          "reviewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When, set by the server."
          },
          "reviewed_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who reviewed (user id), set by the server."
          }
        }
      },
      "Scorer": {
        "oneOf": [
          {
            "type": "object",
            "description": "Final assistant message contains substring.",
            "required": [
              "text",
              "type"
            ],
            "properties": {
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "contains"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Final assistant message does NOT contain substring.",
            "required": [
              "text",
              "type"
            ],
            "properties": {
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "not_contains"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Final assistant message matches regex pattern.",
            "required": [
              "pattern",
              "type"
            ],
            "properties": {
              "pattern": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "regex"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Agent called named tool at least `min` times. With\n`arguments_contain`, only calls whose argument JSON contains that text\ncount, so a case can check what the agent asked a tool to do.",
            "required": [
              "tool",
              "type"
            ],
            "properties": {
              "arguments_contain": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "min": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "tool": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "tool_called"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Agent did NOT call named tool.",
            "required": [
              "tool",
              "type"
            ],
            "properties": {
              "tool": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "tool_not_called"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Total tool calls within range.",
            "required": [
              "type"
            ],
            "properties": {
              "max": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "minimum": 0
              },
              "min": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "minimum": 0
              },
              "type": {
                "type": "string",
                "enum": [
                  "tool_call_count"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Completed within N turns.",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "max": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "type": {
                "type": "string",
                "enum": [
                  "turns_within"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "The agent spent at most `max` tokens (input plus output).",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "max": {
                "type": "integer",
                "format": "int64",
                "example": 20000,
                "minimum": 0
              },
              "type": {
                "type": "string",
                "enum": [
                  "tokens_within"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Session filesystem file contains substring.",
            "required": [
              "path",
              "text",
              "type"
            ],
            "properties": {
              "path": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "file_contains"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Final assistant message parses as JSON matching schema.",
            "required": [
              "schema",
              "type"
            ],
            "properties": {
              "schema": {},
              "type": {
                "type": "string",
                "enum": [
                  "json_schema"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "Citation faithfulness: the answer's citations\nmust cover the claim and be verified as supported. Scored from the\n`TextAnnotation`s on the final message — pair with the\n`citation_verification` capability so verdicts are present.",
            "required": [
              "type"
            ],
            "properties": {
              "min_citations": {
                "type": "integer",
                "format": "int32",
                "description": "Minimum number of citations the answer must carry.",
                "example": 1,
                "minimum": 0
              },
              "pass_threshold": {
                "type": "number",
                "format": "double",
                "description": "Minimum fraction of citations verified `entailed` to pass.",
                "example": 0.8
              },
              "type": {
                "type": "string",
                "enum": [
                  "citation_faithful"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double",
                "description": "Relative weight of this scorer in the case's weighted average.",
                "example": 1
              }
            }
          },
          {
            "type": "object",
            "description": "Citation faithfulness judged by an LLM: each cited claim/source pair is\ngraded by a model, so the eval works even without the\n`citation_verification` capability.",
            "required": [
              "type"
            ],
            "properties": {
              "model_id": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/modelId",
                    "description": "Judge model; the org's default is used when absent."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pass_threshold": {
                "type": "number",
                "format": "double",
                "description": "Minimum judged score `[0,1]` to pass.",
                "example": 0.8
              },
              "rubric": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Rubric override; a citation-faithfulness rubric is used when absent.",
                "example": "Score the fraction of cited claims supported by their source."
              },
              "type": {
                "type": "string",
                "enum": [
                  "citation_judged"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double",
                "description": "Relative weight of this scorer in the case's weighted average.",
                "example": 1
              }
            }
          },
          {
            "type": "object",
            "description": "The org's chat model grades the answer against a rubric and returns a\nvalue from 0 to 1 with its reasoning.",
            "required": [
              "rubric",
              "type"
            ],
            "properties": {
              "model_id": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/modelId",
                    "description": "Judge model; the org's default is used when absent."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pass_threshold": {
                "type": "number",
                "format": "double",
                "description": "Minimum judged value to pass.",
                "example": 0.5
              },
              "rubric": {
                "type": "string",
                "description": "What a good answer does and what a bad one does.",
                "example": "Score 1 when the answer resolves the refund request with the policy's actual terms; 0 when it invents terms or deflects."
              },
              "type": {
                "type": "string",
                "enum": [
                  "judge"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              }
            }
          },
          {
            "type": "object",
            "description": "A decision model answers one yes/no question about the answer; the\nprobability of yes is the value. Cheaper than `judge` and typed, so it\nsuits any check with a yes/no shape.",
            "required": [
              "question",
              "type"
            ],
            "properties": {
              "no": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What a no means."
              },
              "pass_threshold": {
                "type": "number",
                "format": "double",
                "description": "Minimum probability of yes to pass.",
                "example": 0.5
              },
              "question": {
                "type": "string",
                "description": "The yes/no question, asked about the user message, the answer and\nthe tools used.",
                "example": "Does the answer stay within the published refund policy?"
              },
              "type": {
                "type": "string",
                "enum": [
                  "decision"
                ]
              },
              "weight": {
                "type": "number",
                "format": "double"
              },
              "yes": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What a yes means, when the question alone is ambiguous."
              }
            }
          }
        ],
        "description": "A scoring rule applied to eval case output."
      },
      "ScorerMethod": {
        "oneOf": [
          {
            "type": "object",
            "description": "Deterministic rule. `file_contains` is rejected for observers (session\nfilesystems are not part of the observable trace contract).",
            "required": [
              "rule",
              "method"
            ],
            "properties": {
              "method": {
                "type": "string",
                "enum": [
                  "rule"
                ]
              },
              "rule": {
                "$ref": "#/components/schemas/Scorer"
              }
            }
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/LlmJudgeConfig",
                "description": "LLM-as-judge."
              },
              {
                "type": "object",
                "required": [
                  "method"
                ],
                "properties": {
                  "method": {
                    "type": "string",
                    "enum": [
                      "llm_judge"
                    ]
                  }
                }
              }
            ],
            "description": "LLM-as-judge."
          },
          {
            "type": "object",
            "description": "Versioned built-in checks, configured through organization settings.",
            "required": [
              "check",
              "method"
            ],
            "properties": {
              "check": {
                "$ref": "#/components/schemas/CompactionCheck"
              },
              "method": {
                "type": "string",
                "enum": [
                  "system_compaction"
                ]
              }
            }
          }
        ],
        "description": "How a scorer grades a trace slice: a deterministic `rule` (reusing the\neval scorer vocabulary) or an `llm_judge`."
      },
      "ScriptRun": {
        "type": "object",
        "description": "A saved script a trigger runs instead of sending its message to the model.",
        "required": [
          "script"
        ],
        "properties": {
          "input": {
            "type": [
              "object",
              "null"
            ],
            "description": "The script's input object, passed on its stdin."
          },
          "script": {
            "type": "string",
            "description": "The saved script's name."
          },
          "wake_agent_on_failure": {
            "type": "boolean",
            "description": "When the run fails or stops, hand the result to the agent's model,\nwhich then answers in the same turn. Off: the run only records it."
          }
        }
      },
      "SearchAccountSummary": {
        "type": "object",
        "description": "A connected organization search account (never its key).",
        "required": [
          "id",
          "provider",
          "name",
          "status",
          "connected_at"
        ],
        "properties": {
          "automatic_position": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Place in the Automatic order (1-based), counting native and accounts.",
            "minimum": 0
          },
          "connected_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Account name the admin gave it."
          },
          "provider": {
            "type": "string",
            "example": "brave_search"
          },
          "status": {
            "type": "string",
            "description": "`ready` when a key is stored, `missing_key` otherwise.",
            "example": "ready"
          }
        }
      },
      "SearchConnector": {
        "type": "object",
        "description": "A connector whose organization accounts answer web search.",
        "required": [
          "provider",
          "name",
          "description",
          "icon"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "description": "Connector id, used to connect an account at\n`/v1/orgs/{org}/organization-connections/providers/{provider}`.",
            "example": "brave_search"
          }
        }
      },
      "SearchFallbackMode": {
        "type": "string",
        "description": "What happens when a provider cannot answer.",
        "enum": [
          "next",
          "none"
        ]
      },
      "SearchPlanPreview": {
        "type": "object",
        "description": "The plan an agent's search would follow.",
        "required": [
          "provider",
          "fallback",
          "limit",
          "model_has_native",
          "org_blocked_domains",
          "steps"
        ],
        "properties": {
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "fallback": {
            "$ref": "#/components/schemas/SearchFallbackMode"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "description": "Results per search when the model does not ask.",
            "minimum": 0
          },
          "model_has_native": {
            "type": "boolean",
            "description": "Whether the model searches natively (and the organization allows it)."
          },
          "org_blocked_domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "provider": {
            "$ref": "#/components/schemas/SearchProviderSetting",
            "description": "The setting in effect after following the organization default."
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchPlanStep"
            }
          },
          "test": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SearchTestOutcome"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SearchPlanPreviewRequest": {
        "type": "object",
        "description": "Resolve an agent's web search setting and model to a plan.",
        "properties": {
          "config": {
            "type": "object",
            "description": "The agent's `web_search` capability config; omitted means\n`{\"provider\": \"org_default\"}`."
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The model the agent runs; omitted uses the organization's default model."
          },
          "test": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SearchTestQuery",
                "description": "Optional test query against one provider (organization admins)."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SearchPlanStep": {
        "type": "object",
        "description": "One provider in a previewed plan.",
        "required": [
          "id",
          "label",
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether this step can answer for this model now."
          },
          "id": {
            "type": "string",
            "description": "`native`, `brave`, `account:<id>` or `free`."
          },
          "label": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it cannot, or what it relies on."
          },
          "price_note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SearchProviderCatalog": {
        "type": "object",
        "description": "Everything the organization can search with.",
        "required": [
          "built_in",
          "native_providers",
          "connectors",
          "accounts",
          "defaults"
        ],
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchAccountSummary"
            }
          },
          "built_in": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuiltInSearchProvider"
            }
          },
          "connectors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchConnector"
            }
          },
          "defaults": {
            "$ref": "#/components/schemas/WebSearchDefaults"
          },
          "native_providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NativeSearchProvider"
            }
          }
        }
      },
      "SearchProviderSetting": {
        "type": "string",
        "description": "Which provider web search uses.",
        "enum": [
          "org_default",
          "auto",
          "native",
          "brave",
          "parallel",
          "account",
          "free"
        ]
      },
      "SearchTestOutcome": {
        "type": "object",
        "description": "What a test query returned.",
        "required": [
          "provider",
          "ok",
          "duration_ms",
          "results"
        ],
        "properties": {
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "ok": {
            "type": "boolean"
          },
          "provider": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchTestResult"
            }
          }
        }
      },
      "SearchTestQuery": {
        "type": "object",
        "description": "Run one query against one provider.",
        "required": [
          "query",
          "provider"
        ],
        "properties": {
          "provider": {
            "type": "string",
            "description": "`free` or `account:<id>`.",
            "example": "free"
          },
          "query": {
            "type": "string",
            "example": "tokio release notes"
          }
        }
      },
      "SearchTestResult": {
        "type": "object",
        "description": "One result of a test query.",
        "required": [
          "title",
          "url",
          "site"
        ],
        "properties": {
          "site": {
            "type": "string"
          },
          "snippet": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "SecretAuth": {
        "oneOf": [
          {
            "type": "object",
            "description": "`Authorization: Bearer <value>`.",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "bearer"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "`<name>: <value>`, e.g. `X-Api-Key`.",
            "required": [
              "name",
              "type"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Header name."
              },
              "type": {
                "type": "string",
                "enum": [
                  "header"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "One application/x-www-form-urlencoded field, never a body template.",
            "required": [
              "name",
              "type"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "form_field"
                ]
              }
            }
          }
        ],
        "description": "How a bound secret is put on an outbound request.\n\nOnly the declared header or named, structured form field may carry a value."
      },
      "SecretBinding": {
        "type": "object",
        "description": "Where a bound secret may be sent, and how.",
        "required": [
          "url",
          "auth"
        ],
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/SecretAuth",
            "description": "How the value is attached."
          },
          "url": {
            "type": "string",
            "description": "`https://host[:port][/path-prefix]` the value may be sent to."
          }
        }
      },
      "SecretInfo": {
        "type": "object",
        "description": "Secret entry info (name and timestamps only, no value)",
        "required": [
          "name",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "binding": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SecretBinding",
                "description": "Where the value may be sent, for a bound (write-only) secret."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "description": "When the secret was created"
          },
          "name": {
            "type": "string",
            "description": "The secret name"
          },
          "updated_at": {
            "type": "string",
            "description": "When the secret was last updated"
          }
        }
      },
      "SelectAvatarPreset": {
        "type": "object",
        "description": "Select a curated avatar by its stable catalog ID.",
        "required": [
          "preset_id"
        ],
        "properties": {
          "preset_id": {
            "type": "string",
            "description": "Stable ID returned by the public avatar preset catalog.",
            "example": "familiars-patch"
          }
        },
        "additionalProperties": false
      },
      "SelfHealingMode": {
        "type": "string",
        "description": "What Everruns does about one kind of finding.",
        "enum": [
          "auto",
          "suggest",
          "off"
        ]
      },
      "SelfHealingPolicy": {
        "type": "object",
        "description": "An org's self-healing policy (Settings → Limits).",
        "properties": {
          "agent_fixes": {
            "$ref": "#/components/schemas/SelfHealingMode",
            "description": "The Inspector's suggested changes to an agent's instructions: `suggest`\n(default) or `off`. A person always approves them.",
            "default": "suggest"
          },
          "runaway_schedules": {
            "$ref": "#/components/schemas/SelfHealingMode",
            "description": "Pausing a schedule whose runs keep ending the same way, at the warning\ncount rather than the hard stop. Default `auto`.",
            "default": "auto"
          }
        }
      },
      "ServiceKind": {
        "type": "string",
        "description": "A typed service a provider driver can offer.\n\nDrivers declare supported services in code; catalog models persist their\nselected service. One provider account composes typed chat, decision and\nembedding drivers over shared authentication.",
        "enum": [
          "chat",
          "decisions",
          "extractions",
          "embeddings",
          "realtime",
          "images",
          "rerank"
        ]
      },
      "Session": {
        "type": "object",
        "description": "Session - instance of agentic loop execution.\nA session represents a single conversation with an agent.",
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "harness_id",
          "owner_principal_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "active_schedule_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of active (enabled) schedules for this session.\nPopulated when the session is fetched for API responses.",
            "example": 2,
            "minimum": 0
          },
          "activity": {
            "$ref": "#/components/schemas/SessionActivity",
            "description": "Outcome-oriented status derived from `status` and the last turn result.\nThis is the value the sessions list groups by and the facet rail counts."
          },
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the agent working in this session (format: agent_{32-hex}). Optional.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "agent_revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Revision of the agent's history this session started on, when the\nagent had one. `everruns history show <agent> --revision N` shows the\nconfiguration that ran.",
            "example": 4
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this session was archived; `None` means active. Archived sessions\nare hidden from default list results and shown by opting in\n(`include_archived=true`). Unlike `is_pinned`, archive is a property of\nthe session itself rather than of the viewer.",
            "example": "2026-05-25T10:14:32Z"
          },
          "blueprint_config": {
            "type": [
              "object",
              "null"
            ],
            "description": "Validated config passed by host at blueprint spawn time.\nExample: `{\"target_repo\": \"acme/everruns\"}`."
          },
          "blueprint_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Blueprint ID. When set, reason_activity and act_activity build TurnAgent\nfrom the blueprint definition instead of from harness_id/agent_id.",
            "example": "blueprint_research_pack"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Session-level capabilities (additive to agent capabilities).\nApplied after agent capabilities when building TurnAgent."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the session was created.",
            "example": "2026-05-25T10:00:00Z"
          },
          "effective_owner": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PrincipalSummary",
                "description": "Effective human owner summary."
              },
              {
                "type": "null"
              }
            ]
          },
          "event_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Total events recorded for this session (EVE-868). Derived from the\nsession's event sequence rather than counted, so the session detail\ntab bar costs no extra scan over `events`.\n`None` on payloads built outside the database read path.",
            "example": 42,
            "minimum": 0
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Aggregated UI features from all active capabilities (harness + agent + session).\nComputed at read time from the capability registry.\nKnown features: \"file_system\", \"schedules\", \"secrets\", \"key_value\",\n\"sql_database\", \"leased_resources\".",
            "example": [
              "file_system",
              "secrets"
            ]
          },
          "file_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Non-directory files in this session's workspace (EVE-868). Read from\n`workspaces.file_count`. Counts persisted files only: capability-provided\nvirtual mounts are served from memory and are not included.",
            "example": 6,
            "minimum": 0
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the session finished (completed or failed).",
            "example": "2026-05-25T10:14:32Z"
          },
          "forked_from_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Parent event sequence the fork was taken at (the fork point). NULL unless\nthis session is a fork.",
            "example": 42
          },
          "forked_from_session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session this one was forked from. NULL for sessions that were not forked.\nDistinct from `parent_session_id` (subagent nesting): forking is a\nuser-initiated \"branch from here\" relationship."
          },
          "goal": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session objective visible to the runtime agent at system-prompt level.",
            "example": "Investigate the queue latency regression"
          },
          "harness_id": {
            "type": "string",
            "description": "ID of the harness for this session (format: harness_{32-hex}).",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "hints": {
            "type": [
              "object",
              "null"
            ],
            "description": "Session-level client hints — arbitrary key-value pairs declared by the\nclient at session creation time. These are defaults for every turn;\nper-message `controls.hints` override these key-by-key (shallow merge).\n\nExamples: `{\"setup_connection\": true, \"rich_media\": true}`",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "id": {
            "type": "string",
            "description": "Unique identifier for the session (format: session_{32-hex}).",
            "example": "session_01933b5a00007000800000000000001"
          },
          "initial_files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Starting files for a new file tree (additive to agent/harness files).\nMatching paths override earlier layers. Rejected when attaching workspace_id."
          },
          "is_pinned": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this session is pinned by the current user.\nOnly populated when the request has an authenticated user context.",
            "example": false
          },
          "last_message_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp of the latest input or completed assistant message.\nPopulated on session lists; session edits and tool events do not advance it."
          },
          "last_turn_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Outcome of the latest terminal turn, distinguishing cancellation from failure."
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Locale for localized agent behavior and formatting (BCP 47, e.g. `uk-UA`).",
            "example": "en-US"
          },
          "max_iterations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum number of LLM iterations per turn for this session.",
            "example": 50,
            "minimum": 0
          },
          "mcpServers": {
            "$ref": "#/components/schemas/BTreeMap",
            "description": "Remote MCP servers scoped to this session only."
          },
          "mcp_creator": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpClientAttribution",
                "description": "Server-recorded MCP client that created this session. Not the author of later inputs."
              },
              {
                "type": "null"
              }
            ]
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "LLM model ID to use for this session (format: model_{32-hex}).\nOverrides the agent's default model if set.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list controlling which hosts/URLs this session can reach.\nMerged with harness and agent layers (allowed: intersect, blocked: union)."
              },
              {
                "type": "null"
              }
            ]
          },
          "organization_id": {
            "type": "string",
            "description": "Organization this session belongs to (format: org_{32-hex}).",
            "example": "org_00000000000000000000000000000001"
          },
          "output_preview": {
            "type": [
              "string",
              "null"
            ],
            "description": "Preview text from the last assistant response (truncated).",
            "example": "Here is a Q3 plan covering the three pillars we discussed..."
          },
          "owner": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PrincipalSummary",
                "description": "Owning principal summary."
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_principal_id": {
            "type": "string",
            "description": "Owning principal for this session.",
            "example": "principal_01933b5a000070008000000000000001"
          },
          "parallel_tool_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
            "example": true
          },
          "parent_session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parent session that spawned this subagent. NULL for top-level sessions.\nUsed to compute governed subagent delegation depth."
          },
          "playground_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fixed end-user identity for a Playground conversation; independent of the resident service."
          },
          "preview": {
            "type": [
              "string",
              "null"
            ],
            "description": "Preview text from the first user message (truncated).",
            "example": "Help me draft the Q3 marketing plan"
          },
          "resolved_owner_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Denormalized effective human owner of the owning principal lineage.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "run_summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Generated one-sentence description of what the run did, and where it\nfailed (EVE-867). Absent until a terminal turn has been summarised, and\nalways absent for chat threads and for deployments with no utility LLM,\nso a reader must have a fallback rather than treating this as required.",
            "example": "Ran the nightly report and failed posting it to Slack: channel_not_found."
          },
          "source": {
            "$ref": "#/components/schemas/SessionSource",
            "description": "How this session was started. Server-owned for every ingress path."
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the session started executing.",
            "example": "2026-05-25T10:00:01Z"
          },
          "status": {
            "$ref": "#/components/schemas/SessionStatus",
            "description": "Current execution status of the session."
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session-level system prompt override.\nPrepended to the agent's system prompt when building TurnAgent."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing and filtering sessions.",
            "example": [
              "marketing",
              "q3",
              "draft"
            ]
          },
          "task_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Background work owned by this session — subagents, external agents and\nbackground tools (EVE-868). Read from `sessions.task_count`. This is\nwhat the Work tab holds; `active_schedule_count` describes only the\nschedules it also lists.",
            "example": 3,
            "minimum": 0
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable title for the session.",
            "example": "Q3 marketing brief"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            },
            "description": "Client-side tools for this session (additive to agent tools)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the session was last updated.",
            "example": "2026-05-25T10:14:32Z"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Cumulative token usage for all LLM calls in this session."
              },
              {
                "type": "null"
              }
            ]
          },
          "virtual_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional resident virtual user for unattended/background execution.",
            "example": "identity_01933b5a00007000800000000000001"
          },
          "workspace_id": {
            "type": "string",
            "description": "Workspace this session is attached to (format: wsp_{32-hex}). Owns the\nsession's virtual filesystem. For the default 1:1 case this mirrors the\nsession id, but clients should read it here rather than deriving it.",
            "example": "wsp_01933b5a00007000800000000000001"
          }
        }
      },
      "SessionActivatedData": {
        "type": "object",
        "description": "Data for session.activated event (turn started, session now active)",
        "required": [
          "turn_id",
          "input_message_id"
        ],
        "properties": {
          "input_message_id": {
            "type": "string",
            "description": "Input message ID that triggered the turn",
            "example": "message_01933b5a00007000800000000000001"
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID that activated the session",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "SessionActivity": {
        "type": "string",
        "description": "Outcome-oriented view of a session, as the sessions list and facet rail\npresent it. Derived from the session's execution status plus the outcome of\nits most recent turn — `SessionStatus` alone has no notion of failure.",
        "enum": [
          "running",
          "paused",
          "failed",
          "completed",
          "idle"
        ]
      },
      "SessionApprovalMode": {
        "type": "object",
        "description": "The session's approval mode switch and the modes the organization allows.",
        "required": [
          "allowed_modes"
        ],
        "properties": {
          "allowed_modes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Modes the organization allows (`off`, `auto`, `normal`, `protective`)."
          },
          "mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The mode a person picked for this session, or `null` when the session\nfollows the owner's default and the agent's own mode."
          }
        }
      },
      "SessionBinding": {
        "type": "string",
        "description": "What identity keys a session, for every exposure and every transport.\n\nOne enum replaces the former `SessionStrategy` (messaging channels) and\n`InvocationSessionMode` (triggers and request/reply endpoints), which asked\nthe same question with disjoint vocabularies and forced every new surface to\npick a side (EVE-1005).\n\n**The serialized values are deliberately the legacy ones.** Every variant\nrenames in Rust but serializes exactly as it did before, with the new name\naccepted as a read alias. Persisted `channel_config` JSONB therefore needs no\nmigration, and the API and UI keep exchanging the values they already do.\nMoving the wire vocabulary is a separate, migration-bearing change.\n\n`Requester` keys on the **transport's own external actor id** — the Slack\nuser id, the Public Chat visitor id — never on an Everruns principal. Those\nactors are unrelated to Everruns accounts (a Public Chat visitor is anonymous\nor Google-signed-in), so there is one consistent answer rather than a split\nvariant: whatever the transport calls the requester, scoped by the\n`{platform}:` tag prefix that already namespaces it.",
        "enum": [
          "per_thread",
          "per_channel",
          "per_user",
          "shared_session",
          "session_per_invocation"
        ],
        "example": "per_thread"
      },
      "SessionContextReport": {
        "type": "object",
        "description": "Token-budget report for a session — a model-aware breakdown of the\ncontext window into named sections plus per-source contributions, so\ncallers can answer \"what's filling the context?\" without reverse-\nengineering the prompt assembly.",
        "required": [
          "session_id",
          "model",
          "estimated_input_tokens",
          "sections",
          "contributions"
        ],
        "properties": {
          "as_of_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Canonical generation event sequence; absent for an assembled preview."
          },
          "compaction": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CompactionStatus",
                "description": "Effective compaction policy and safe checkpoint metadata when the host reports it."
              },
              {
                "type": "null"
              }
            ]
          },
          "context_window_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Total context window size in tokens for `model`. `None` if the model's profile lacks limits data.",
            "minimum": 0
          },
          "contributions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextReportContribution"
            },
            "description": "Per-source token contributions (per-tool, per-capability, per-message) for attribution."
          },
          "cumulative_usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Cumulative LLM usage observed across the session so far (token + cost rollup)."
              },
              {
                "type": "null"
              }
            ]
          },
          "estimated_input_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Estimated number of input tokens consumed by the next generation given the current context.",
            "minimum": 0
          },
          "measurement_available": {
            "type": "boolean",
            "description": "Whether a main model request or assembled context backs the estimates."
          },
          "model": {
            "type": "string",
            "description": "Model identifier the report's token estimates target (used to scope context-window math)."
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextReportSection"
            },
            "description": "Logical sections of the assembled context (system prompt, tool defs, message history, etc.) for inspection."
          },
          "session_id": {
            "type": "string",
            "description": "Prefixed session identifier this report describes."
          }
        }
      },
      "SessionCost": {
        "type": "object",
        "description": "What a session spent, split by cost category, over time, by what started\neach turn, by tool, and by sandbox.",
        "required": [
          "session_id",
          "total_usd",
          "model_calls",
          "unpriced_calls",
          "categories",
          "unattributed_usd",
          "models",
          "hours",
          "turns",
          "turns_truncated",
          "sources",
          "tools",
          "sandboxes"
        ],
        "properties": {
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostCategory"
            },
            "description": "Spend and tokens per cost category, in a fixed order: `uncached_input`,\n`cache_read`, `cache_write`, `output`."
          },
          "hours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostHour"
            },
            "description": "Spend per UTC hour that had model calls, oldest first."
          },
          "model_calls": {
            "type": "integer",
            "format": "int64",
            "description": "Model calls recorded for the session.",
            "example": 3811
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostModel"
            },
            "description": "Spend per model, largest first."
          },
          "sandboxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSandbox"
            },
            "description": "Sandboxes the session ran, oldest first."
          },
          "session_id": {
            "type": "string",
            "description": "Session's prefixed public identifier.",
            "example": "session_01a1510c99c8714eabb22a463e7c1fa1"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostSource"
            },
            "description": "Turns and spend by what started them, largest spend first."
          },
          "tools": {
            "$ref": "#/components/schemas/CostTools",
            "description": "Tool calls across the session."
          },
          "total_usd": {
            "type": "number",
            "format": "double",
            "description": "Total spend in USD: the provider-reported cost of each model call where\nreported, otherwise the price-table estimate.",
            "example": 106.26
          },
          "turns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostTurn"
            },
            "description": "Spend per turn, oldest first; the newest turns when `turns_truncated`."
          },
          "turns_truncated": {
            "type": "boolean",
            "description": "Older turns were left out of `turns`."
          },
          "unattributed_usd": {
            "type": "number",
            "format": "double",
            "description": "Spend of model calls whose split by category is unknown: the provider\nreported a cost but the model has no price table.",
            "example": 0
          },
          "unpriced_calls": {
            "type": "integer",
            "format": "int64",
            "description": "Model calls with no reported cost and no price-table estimate. They count\ntokens but add nothing to `total_usd`.",
            "example": 0
          }
        }
      },
      "SessionFacetCount": {
        "type": "object",
        "description": "One bucket of a sessions facet dimension.",
        "required": [
          "value",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "value": {
            "type": "string",
            "description": "The dimension value: an activity, a source, or an agent's public id.",
            "example": "running"
          }
        }
      },
      "SessionFacetsResponse": {
        "type": "object",
        "description": "Facet-rail counts and masthead metrics for the sessions surface (EVE-852).\n\nEvery count is aggregated server-side over the same filter predicate as\n`GET /v1/sessions`, so a client never derives them by paging the list. Each\nfacet dimension is counted with the other filters applied but its own\nselection excluded, which is what lets the rail offer multi-select.",
        "required": [
          "total",
          "by_activity",
          "by_source",
          "by_agent",
          "active_now",
          "failed_today",
          "p95_duration_ms",
          "tokens_today"
        ],
        "properties": {
          "active_now": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions executing a turn or awaiting client tool results right now.",
            "minimum": 0
          },
          "by_activity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionFacetCount"
            },
            "description": "Counts per derived activity (`running`, `paused`, `failed`,\n`completed`, `idle`)."
          },
          "by_agent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionFacetCount"
            },
            "description": "Counts per agent, keyed by the agent's public id. Sessions with no\nagent are omitted."
          },
          "by_source": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionFacetCount"
            },
            "description": "Counts per session source."
          },
          "failed_today": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions whose most recent turn failed or was cancelled today (UTC).",
            "minimum": 0
          },
          "p95_duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "95th percentile session duration over the filtered set, milliseconds.",
            "minimum": 0
          },
          "tokens_today": {
            "type": "integer",
            "format": "int64",
            "description": "Tokens consumed by sessions created today (UTC).",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions matching every applied filter.",
            "minimum": 0
          }
        }
      },
      "SessionFile": {
        "type": "object",
        "description": "Complete file with content",
        "required": [
          "id",
          "session_id",
          "path",
          "name",
          "is_directory",
          "is_readonly",
          "size_bytes",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "File content. Encoding is controlled by the `encoding` field: plain UTF-8 text for `text`, base64-encoded bytes for `base64`. `None` for directories and when this is a metadata-only listing."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this entry was created (RFC 3339)."
          },
          "encoding": {
            "type": "string",
            "description": "Content encoding for the `content` field: `text` (UTF-8) or `base64` (binary)."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Internal database UUID for this file entry."
          },
          "is_directory": {
            "type": "boolean",
            "description": "`true` when this entry represents a directory; `false` for a regular file."
          },
          "is_readonly": {
            "type": "boolean",
            "description": "Whether the entry was marked read-only at creation. Read-only entries cannot be edited or deleted by the session."
          },
          "name": {
            "type": "string",
            "description": "File or directory name (the last segment of `path`)."
          },
          "path": {
            "type": "string",
            "description": "Absolute path within the session workspace (e.g. `/notes.md`)."
          },
          "session_id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the owning session."
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "description": "File size in bytes. `0` for directories."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this entry was last updated (RFC 3339)."
          }
        }
      },
      "SessionIdledData": {
        "type": "object",
        "description": "Data for session.idled event (turn completed, session now idle)",
        "required": [
          "turn_id"
        ],
        "properties": {
          "iterations": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of iterations in the completed turn",
            "minimum": 0
          },
          "turn_id": {
            "type": "string",
            "description": "Turn ID that just completed",
            "example": "turn_01933b5a00007000800000000000001"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Cumulative token usage for the session at this point"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SessionModelChangedData": {
        "type": "object",
        "description": "Data for `session.model.changed`.\n\nNames are the provider's own model identifiers, captured at emission time so\nthe transcript stays readable after a model is renamed or removed from the\norganization. Clients that still have the model may prefer its display name.",
        "required": [
          "model_id",
          "model_name"
        ],
        "properties": {
          "model_id": {
            "type": "string",
            "description": "Model selected for the next turn.",
            "example": "model_01933b5a00007000800000000000002"
          },
          "model_name": {
            "type": "string",
            "description": "Name of the selected model, captured at emission time."
          },
          "previous_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model used before the switch. `None` when the previous turn ran on an\ninherited default that the emitter could not name.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "previous_model_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the previous model, captured at emission time."
          }
        }
      },
      "SessionParticipant": {
        "type": "object",
        "description": "Session participant - an agent or user that has joined a session.",
        "required": [
          "id",
          "session_id",
          "kind",
          "principal_id",
          "role",
          "joined_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Present for agent participants.",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name captured for this participant."
          },
          "id": {
            "type": "string",
            "description": "Unique identifier for the participant row (format: part_{32-hex}).",
            "example": "part_01933b5a00007000800000000000001"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "$ref": "#/components/schemas/SessionParticipantKind"
          },
          "left_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "principal_id": {
            "type": "string",
            "description": "Principal that joined the session.",
            "example": "principal_01933b5a000070008000000000000001"
          },
          "role": {
            "$ref": "#/components/schemas/SessionParticipantRole"
          },
          "session_id": {
            "type": "string",
            "description": "Session this participant belongs to.",
            "example": "session_01933b5a00007000800000000000001"
          }
        }
      },
      "SessionParticipantKind": {
        "type": "string",
        "description": "Kind of actor participating in a session.",
        "enum": [
          "agent",
          "user"
        ]
      },
      "SessionParticipantRole": {
        "type": "string",
        "description": "Role a participant has inside a session.",
        "enum": [
          "host",
          "member"
        ]
      },
      "SessionRepositoriesResponse": {
        "type": "object",
        "description": "What a session changed in the repositories checked out in its sandbox.",
        "required": [
          "sandbox_state",
          "repositories"
        ],
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionRepository"
            }
          },
          "sandbox_state": {
            "type": "string",
            "description": "`running` when the checkouts were read. Any other value (`paused`,\n`not_started`, `none`, ...) means the sandbox was left alone and\n`repositories` is empty.",
            "example": "running"
          },
          "work_branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "The branch the agent works on in every writable repository.",
            "example": "everruns/bdaf0ce2"
          }
        }
      },
      "SessionRepository": {
        "type": "object",
        "description": "One checkout under `/workspace`.",
        "required": [
          "path",
          "access",
          "branch",
          "on_work_branch",
          "base_branch",
          "uncommitted_files"
        ],
        "properties": {
          "access": {
            "type": "string",
            "description": "`read`, `write`, or `none` when the session's settings do not list it.",
            "example": "write"
          },
          "base_branch": {
            "type": "string",
            "example": "main"
          },
          "branch": {
            "type": "string",
            "example": "everruns/bdaf0ce2"
          },
          "commits_ahead_of_base": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Absent when the base branch is not known locally.",
            "minimum": 0
          },
          "commits_not_pushed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Absent when the branch was never pushed.",
            "minimum": 0
          },
          "diff": {
            "type": "string",
            "description": "Unified diff against the base branch, cut at a fixed size."
          },
          "diff_truncated": {
            "type": "boolean"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionRepositoryFile"
            },
            "description": "Files that differ from the base branch, committed or not."
          },
          "on_work_branch": {
            "type": "boolean"
          },
          "path": {
            "type": "string",
            "example": "/workspace/app"
          },
          "repo": {
            "type": [
              "string",
              "null"
            ],
            "description": "`owner/name`, when the checkout's remote is a GitHub repository.",
            "example": "acme/app"
          },
          "uncommitted_files": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "SessionRepositoryFile": {
        "type": "object",
        "required": [
          "path",
          "committed"
        ],
        "properties": {
          "additions": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Absent for binary and new untracked files.",
            "minimum": 0
          },
          "committed": {
            "type": "boolean"
          },
          "deletions": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "path": {
            "type": "string",
            "example": "src/config.rs"
          }
        }
      },
      "SessionResolvedModelResponse": {
        "type": "object",
        "description": "The model the runtime will use when a turn has no per-message override.",
        "properties": {
          "model_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SessionResourceEntry": {
        "type": "object",
        "description": "A resource registered in the session resource registry.",
        "required": [
          "resource_id",
          "session_id",
          "kind",
          "display_name",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable label."
          },
          "kind": {
            "type": "string",
            "description": "Resource kind: \"sandbox\", \"subagent\", \"browser_session\", etc."
          },
          "metadata": {
            "description": "Kind-specific non-secret metadata."
          },
          "resource_id": {
            "type": "string",
            "description": "Caller-provided stable ID (unique per session)."
          },
          "session_id": {
            "type": "string",
            "description": "Parent session."
          },
          "status": {
            "$ref": "#/components/schemas/SessionResourceStatus",
            "description": "Lifecycle status."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SessionResourceStatus": {
        "type": "string",
        "description": "Status of a resource in the session resource registry.",
        "enum": [
          "active",
          "completed",
          "failed",
          "released"
        ]
      },
      "SessionRun": {
        "type": "object",
        "description": "The run a session belongs to: every agent that took part, with status,\ntiming and spend.",
        "required": [
          "root_session_id",
          "cost_usd",
          "first_session_cost_usd",
          "waiting_requests",
          "sessions",
          "truncated"
        ],
        "properties": {
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Spend of every session in the run, in USD.",
            "example": 5.06
          },
          "first_session_cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Spend of the first session alone, in USD.",
            "example": 0.25
          },
          "root_session_id": {
            "type": "string",
            "description": "The run's first session, the one the person talks to.",
            "example": "session_01h9xk1a"
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunSession"
            },
            "description": "The first session, then every session started under it by creation."
          },
          "truncated": {
            "type": "boolean",
            "description": "More sessions or turns existed than were returned.",
            "example": false
          },
          "waiting_requests": {
            "type": "integer",
            "description": "Questions and approvals any agent in the run waits on the person for.",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "SessionSandboxAction": {
        "type": "string",
        "description": "Operator action to take against a session's managed sandbox. `Pause`\nsuspends the instance, `Resume` restarts it, `Delete` releases the\nlease.",
        "enum": [
          "pause",
          "resume",
          "delete"
        ]
      },
      "SessionSandboxCredential": {
        "type": "object",
        "description": "Non-secret, session-pinned credential binding.",
        "required": [
          "source"
        ],
        "properties": {
          "connection_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Exact connection for organization grants, which may have several\naccounts for one provider.",
            "example": "00000000-0000-0000-0000-000000000002"
          },
          "source": {
            "$ref": "#/components/schemas/SessionSandboxCredentialSource",
            "description": "Identity scope from which the provider credential is resolved."
          },
          "virtual_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Exact virtual-user owner for user, Agent, and organization grants.",
            "example": "00000000-0000-0000-0000-000000000001"
          }
        }
      },
      "SessionSandboxCredentialSource": {
        "type": "string",
        "description": "Where a managed Sandbox obtains its provider credential.",
        "enum": [
          "none",
          "session_user",
          "agent",
          "organization",
          "platform"
        ]
      },
      "SessionSandboxResponse": {
        "type": "object",
        "description": "The primary Sandbox a Session is running in.",
        "required": [
          "containment",
          "durability",
          "capabilities",
          "resolved_from"
        ],
        "properties": {
          "build": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxBuildProvenance",
                "description": "Server-resolved provenance for the exact tenant, account and snapshot.\nCaptured software notes are untrusted author reference data."
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "$ref": "#/components/schemas/SandboxCapabilities"
          },
          "containment": {
            "$ref": "#/components/schemas/SandboxContainment"
          },
          "current_checkpoint_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Most recent checkpoint used to recover this logical Sandbox."
          },
          "desired_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "Control-plane lifecycle intent and latest observed physical state."
          },
          "durability": {
            "type": "string",
            "description": "`checkpointed`, `provider_snapshot`, or `none`. Declared per target, so a\nsession on somebody else's machine is never reported as recoverable."
          },
          "generation": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Physical incarnation fence. Increments whenever compute is replaced."
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last recorded runtime activity used by lifecycle policy."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent template binding selected for this Session (`inline` for one-offs)."
          },
          "observed_state": {
            "type": [
              "string",
              "null"
            ],
            "description": "Latest lifecycle state observed from the physical provider resource."
          },
          "resolved_from": {
            "type": "string",
            "description": "How this view was produced. `capabilities` means it was derived from the\nSession's effective capability set rather than a stored Sandbox spec."
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "description": "`primary` for the implicit shell/files binding."
          },
          "sandbox_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Durable logical primary Sandbox id. Absent for legacy capability-derived sessions."
          },
          "sandbox_template_revision_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reusable Sandbox Template revision pinned into this Sandbox."
          },
          "source_capability": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capability that supplied the compute, for operators tracing a surprise."
          },
          "spec": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ResolvedSandboxSpec",
                "description": "Immutable resolved specification pinned when the Session was created."
              },
              {
                "type": "null"
              }
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxTarget",
                "description": "Target, absent when the session has no compute at all and only reads and\nwrites files. That is a real configuration, not a misconfiguration."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SessionSandboxStatusValue": {
        "type": "string",
        "description": "Wire-facing status of a session sandbox. Mirrors\n`everruns_capabilities::session_sandbox::SessionSandboxStatus` for the public API.",
        "enum": [
          "running",
          "paused",
          "lost"
        ]
      },
      "SessionScope": {
        "type": "string",
        "description": "Which conversation an agent member keeps in a room.",
        "enum": [
          "thread",
          "room"
        ]
      },
      "SessionSource": {
        "type": "string",
        "description": "How a session came into existence.\n\nClosed set: the sessions facet rail enumerates every variant, so the value\nis typed rather than a free-form string. Ingress paths set it server-side —\nclients may only declare the two variants they can legitimately be\n(`Chat` and `Api`), which keeps a facet like \"started by a schedule\"\ntrustworthy. Rows that predate the column, or whose origin could not be\ninferred at backfill time, carry `Unknown`.",
        "enum": [
          "chat",
          "playground",
          "api",
          "slack",
          "ag_ui",
          "fcp",
          "schedule",
          "webhook",
          "a2a",
          "eval",
          "subagent",
          "room",
          "unknown"
        ]
      },
      "SessionStartedData": {
        "type": "object",
        "description": "Data for session.started event",
        "required": [
          "harness_id"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent ID (optional)",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "harness_id": {
            "type": "string",
            "description": "Harness ID",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model ID if specified",
            "example": "model_01933b5a00007000800000000000001"
          }
        }
      },
      "SessionStatsResponse": {
        "type": "object",
        "description": "Response for session statistics endpoint",
        "required": [
          "total",
          "active",
          "idle",
          "started",
          "waiting_for_tool_results"
        ],
        "properties": {
          "active": {
            "type": "integer",
            "format": "int32",
            "description": "Sessions with a turn currently running",
            "minimum": 0
          },
          "idle": {
            "type": "integer",
            "format": "int32",
            "description": "Sessions waiting for next input",
            "minimum": 0
          },
          "started": {
            "type": "integer",
            "format": "int32",
            "description": "Sessions just created, no turn executed yet",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of sessions across all statuses",
            "minimum": 0
          },
          "waiting_for_tool_results": {
            "type": "integer",
            "format": "int32",
            "description": "Sessions waiting for client-side tool results",
            "minimum": 0
          }
        }
      },
      "SessionStatus": {
        "type": "string",
        "description": "Session execution status.\n- `started`: Session just created, no turn executed yet\n- `active`: A turn is currently running\n- `idle`: Turn completed, session waiting for next input\n- `paused`: Budget limit reached, waiting for user to increase limit or resume",
        "enum": [
          "started",
          "active",
          "idle",
          "waitingfortoolresults",
          "paused"
        ]
      },
      "SessionTask": {
        "type": "object",
        "description": "A unit of background work owned by a session.",
        "required": [
          "id",
          "session_id",
          "kind",
          "display_name",
          "state",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskArtifact"
            }
          },
          "attempt": {
            "type": "integer",
            "format": "int32",
            "description": "Execution attempt, starting at 1. Incremented on re-attach."
          },
          "cancel_requested_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Cooperative cancel intent. A flag, not a state."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "display_name": {
            "type": "string",
            "description": "Human-readable label."
          },
          "error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TaskError"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "heartbeat_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "description": "`task_*` public ID."
          },
          "input_request": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TaskInputRequest",
                "description": "Pending ask while `awaiting_input`; cleared when answered."
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "description": "Task kind: \"subagent\", \"external_agent\", \"background_tool\", \"monitor\", …"
          },
          "links": {
            "$ref": "#/components/schemas/TaskLinks"
          },
          "progress": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BackgroundProgress"
              },
              {
                "type": "null"
              }
            ]
          },
          "result_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Machine result in the session VFS: `/.tasks/{task_id}/result.json`."
          },
          "root_session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Root of the owning session's delegation tree (EVE-680). Populated on\nAPI reads from the denormalized storage column so cross-session tooling\n(e.g. the Work view) can group a whole tree's tasks by one id. `None`\nfor a top-level session that is its own root, or when unavailable.\nStorage-derived, never client-settable on create."
          },
          "session_id": {
            "type": "string",
            "description": "Owning session."
          },
          "spec": {
            "type": "object",
            "description": "Kind-specific input (instructions, tool args, external agent id)."
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "state": {
            "$ref": "#/components/schemas/SessionTaskState"
          },
          "state_detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short live status line (\"polling remote task\", \"iteration 4/10\")."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable outcome."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "wake_policy": {
            "$ref": "#/components/schemas/TaskWakePolicy"
          },
          "worker_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SessionTaskDetail": {
        "type": "object",
        "description": "Task snapshot plus the recent message thread.",
        "required": [
          "task",
          "messages"
        ],
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskMessage"
            }
          },
          "task": {
            "$ref": "#/components/schemas/SessionTask"
          }
        }
      },
      "SessionTaskEventData": {
        "type": "object",
        "description": "Data for task lifecycle events (`task.created`, `task.updated`).\n\nCarries the full task snapshot so consumers never need a follow-up read;\nUIs reconcile by `task.id` (snapshot-then-delta).",
        "required": [
          "task"
        ],
        "properties": {
          "task": {
            "$ref": "#/components/schemas/SessionTask"
          }
        }
      },
      "SessionTaskState": {
        "type": "string",
        "description": "Lifecycle state of a session task.\n\nThree classes: active (`queued`, `running`), interrupted (`awaiting_input`,\nresumable), terminal (`succeeded`, `failed`, `canceled`). Timeout and\nrejection are `error.kind` values on `failed`, not states.",
        "enum": [
          "queued",
          "running",
          "awaiting_input",
          "succeeded",
          "failed",
          "canceled"
        ]
      },
      "SessionTitleUpdatedData": {
        "type": "object",
        "description": "Data for `session.title.updated`.",
        "required": [
          "title"
        ],
        "properties": {
          "previous_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title before the mutation. `None` means the session was untitled."
          },
          "title": {
            "type": "string",
            "description": "New session title."
          }
        }
      },
      "SessionWorkResult": {
        "type": "object",
        "description": "Response of `GET /v1/sessions/{session_id}/work`.",
        "properties": {
          "report": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkReport",
                "description": "The report, or `null` when the session has not run a turn."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SetAgentAvatarRequest": {
        "type": "object",
        "description": "The avatar source: exactly one of `preset_id` or `image_base64`.",
        "properties": {
          "content_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "MIME type of `image_base64`. Detected from the bytes when omitted.",
            "example": "image/png"
          },
          "image_base64": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image bytes as base64 (a `data:image/...;base64,` URI also works): PNG, JPEG, GIF or\nWebP, at least 64x64, at most 1 MB decoded. Center-cropped to a square."
          },
          "preset_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Curated preset ID from `list_avatar_presets`. Pass this or `image_base64`, not both.",
            "example": "familiars-patch"
          }
        }
      },
      "SetAgentCredentialValueRequest": {
        "type": "object",
        "description": "Request to replace a credential binding's encrypted value.",
        "required": [
          "revision",
          "value"
        ],
        "properties": {
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Revision observed in scoped credential metadata."
          },
          "value": {
            "type": "string",
            "description": "Write-only credential value. It is encrypted and never returned.",
            "example": "vsk_disposable_example"
          }
        }
      },
      "SetCredentialValue": {
        "type": "object",
        "description": "Secure write-only credential provisioning. The value is encrypted and never returned.",
        "required": [
          "value",
          "revision"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Absolute expiry in UTC; omit for a value that remains valid until revoked."
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Last observed resource revision; stale updates are rejected."
          },
          "value": {
            "type": "string",
            "description": "Secret value to store through this secure entry endpoint only."
          }
        }
      },
      "SetDefaultDecisionModel": {
        "type": "object",
        "description": "Select or clear the organization decision default.",
        "properties": {
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Prefixed saved model ID; omit or pass null to clear the default."
          }
        }
      },
      "SetDefaultImageModel": {
        "type": "object",
        "description": "Select or clear the organization's default image model.",
        "properties": {
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Prefixed saved model ID of an image model; omit or pass null to clear\nthe default, which makes agents use GPT Image 2.6 Flare."
          }
        }
      },
      "SetManagerContextRequest": {
        "type": "object",
        "description": "Replace an entity's manager context.",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "The whole document, markdown, at most 16 KiB."
          },
          "expected_revision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The revision this edit was based on (0 when none exists yet); refused\nwith `manager_context_changed` when the stored one differs."
          }
        }
      },
      "SetPreferenceRequest": {
        "type": "object",
        "description": "Request body for setting a preference value.",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "type": "object"
          }
        }
      },
      "SetUserMcpToolLabelRequest": {
        "type": "object",
        "description": "Set or clear the person's risk label for one tool.",
        "properties": {
          "label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpToolLabel",
                "description": "`read_only` never asks for approval in the normal mode, `changes`\nalways asks. Null clears the label."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Settings": {
        "type": "object",
        "properties": {
          "archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "pinned": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ShardNodeDetail": {
        "type": "object",
        "description": "One node's detail.",
        "required": [
          "node",
          "points"
        ],
        "properties": {
          "node": {
            "type": "string",
            "description": "Node id within the shard.",
            "example": "2"
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShardNodePoint"
            },
            "description": "Points, oldest first."
          }
        }
      },
      "ShardNodePoint": {
        "type": "object",
        "description": "One point of a node's detail.",
        "required": [
          "t"
        ],
        "properties": {
          "admit_p99_ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "One-minute p99 time to admit a turn, in milliseconds.",
            "example": 12.5
          },
          "queued": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Messages waiting for a turn, as the node sees them.",
            "example": 0
          },
          "rss_bytes": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Resident memory in bytes.",
            "example": 1073741824
          },
          "running": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Turns running on the node.",
            "example": 81
          },
          "t": {
            "type": "string",
            "format": "date-time",
            "description": "UTC time of the point.",
            "example": "2026-11-15T19:59:50Z"
          }
        }
      },
      "SideEffectClass": {
        "type": "string",
        "description": "How many times a tool call may safely be executed given the same inputs.\n\nUsed during turn recovery when the journal records a tool start without a\ncompleted result:\n\n* `Pure` / `Idempotent` — safe to re-execute with the same inputs.\n* `AtMostOnce` — do not repeat an execution with an unknown outcome; settle\n  it as `interrupted` and surface the uncertainty to the model instead.\n\nWhen unset (`None`), the conservative default is `AtMostOnce`.",
        "enum": [
          "Pure",
          "Idempotent",
          "AtMostOnce"
        ]
      },
      "SimulatedUser": {
        "type": "object",
        "description": "A model that plays the user for a multistep case.",
        "required": [
          "persona",
          "goal"
        ],
        "properties": {
          "done_when": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the user stops: the simulator ends the conversation once this\nholds. Defaults to \"the goal is met or clearly cannot be\".",
            "example": "The agent opened a refund ticket with the right order number."
          },
          "goal": {
            "type": "string",
            "description": "What the user wants from the conversation.",
            "example": "Get the duplicate charge refunded, or a clear date when it will be."
          },
          "max_turns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Most messages the simulator sends (default 8, at most 30).",
            "example": 8,
            "maximum": 30,
            "minimum": 1
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model that plays the user. Omitted: the organization's default model.",
            "example": "model_01933b5a00007000800000000000022c"
          },
          "persona": {
            "type": "string",
            "description": "Who the user is, what they know and how they write.",
            "example": "Small shop owner charged twice for the Pro plan. Writes short messages. Gives the order number ORD-48213 only when asked."
          },
          "virtual_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Virtual user the simulator speaks as, so the agent sees that end\nuser's identity, connections and memory.",
            "example": "identity_01933b5a000070008000000000000001"
          }
        }
      },
      "Skill": {
        "type": "object",
        "description": "Skill entity (API response type)",
        "required": [
          "id",
          "name",
          "description",
          "source_type",
          "status",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "allowed_tools": {
            "type": [
              "string",
              "null"
            ],
            "description": "Comma-separated list of tool patterns this skill may invoke. `None` means inherit from the harness."
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this skill was archived, if any (RFC 3339). Archived skills are hidden from default list views."
          },
          "compatibility": {
            "type": [
              "string",
              "null"
            ],
            "description": "Compatibility marker describing host-runtime requirements declared by the skill (e.g. min platform version). Informational."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this skill was created (RFC 3339)."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this skill was hard-deleted, if any (RFC 3339)."
          },
          "description": {
            "type": "string",
            "description": "Short, agent- and user-readable summary of what the skill does and when to use it.",
            "example": "Extract text and tables from PDF files."
          },
          "disable_model_invocation": {
            "type": "boolean",
            "description": "When `true`, the LLM is prevented from auto-invoking this skill; only the user can trigger it explicitly."
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
            "example": "skill_01933b5a00007000800000000000001"
          },
          "license": {
            "type": [
              "string",
              "null"
            ],
            "description": "License string as declared by the skill author (e.g. `MIT`, `Apache-2.0`). Informational; not enforced."
          },
          "metadata": {
            "type": "object",
            "description": "Free-form metadata declared by the skill author.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "name": {
            "type": "string",
            "description": "Stable kebab-case slug used to invoke the skill (e.g. `/pdf-processing` in chat). Safe to render in user-facing messages.",
            "example": "pdf-processing"
          },
          "source_type": {
            "$ref": "#/components/schemas/SkillSourceType",
            "description": "How the skill content is sourced (filesystem, URL, embedded). Determines reload semantics."
          },
          "status": {
            "$ref": "#/components/schemas/SkillStatus",
            "description": "Current lifecycle status (`active`, `archived`, `deleted`)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this skill was last updated (RFC 3339)."
          },
          "user_invocable": {
            "type": "boolean",
            "description": "Whether this skill appears as a `/`-prefixed slash command for end users in chat UIs."
          },
          "version": {
            "type": "string",
            "description": "Semver string declared by the skill author. Free-form; sorted lexicographically when comparing."
          }
        }
      },
      "SkillContent": {
        "type": "object",
        "description": "Skill content response (for /content endpoint)",
        "required": [
          "skill_md",
          "files"
        ],
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillFileEntry"
            }
          },
          "skill_md": {
            "type": "string"
          }
        }
      },
      "SkillFileEntry": {
        "type": "object",
        "description": "A file entry in a skill archive",
        "required": [
          "path",
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        }
      },
      "SkillSourceType": {
        "type": "string",
        "description": "Skill source type",
        "enum": [
          "markdown",
          "archive"
        ]
      },
      "SkillStatus": {
        "type": "string",
        "description": "Skill lifecycle status",
        "enum": [
          "active",
          "disabled",
          "archived",
          "deleted"
        ]
      },
      "SkillUsage": {
        "type": "object",
        "description": "Number of agents and harnesses that reference a skill via its\n`skill:{uuid}` capability id. The `/v1/skills/usage` endpoint returns this\nkeyed by public `SkillId`; skills with no references are omitted from the\nmap and the UI defaults missing entries to zero.",
        "required": [
          "agents",
          "harnesses"
        ],
        "properties": {
          "agents": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "harnesses": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "SkillValidationResult": {
        "type": "object",
        "description": "Validation result for SKILL.md",
        "required": [
          "valid"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parsed skill description. `None` when not present in the input or unparseable."
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Hard validation errors. Non-empty if and only if `valid` is `false`."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parsed skill slug from the front matter. `None` when the input could not be parsed enough to extract a name."
          },
          "valid": {
            "type": "boolean",
            "description": "`true` when the candidate SKILL.md parsed and passes all hard checks; `false` if any error was found."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Non-fatal warnings (style, deprecated patterns, optional fields missing). Emitted alongside a `valid` result."
          }
        }
      },
      "SourceGitHubAccount": {
        "type": "string",
        "description": "Development GitHub account a source reads and writes through. Never the\nAgent's runtime GitHub identity.",
        "enum": [
          "personal",
          "organization"
        ]
      },
      "SourceInput": {
        "type": "object",
        "description": "A connected repository mounted beneath a non-overlapping collection path.",
        "required": [
          "kind"
        ],
        "properties": {
          "config": {
            "description": "Adapter-specific repository, revision and root-folder configuration, without credentials."
          },
          "connection_owner": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional GitHub connection owner; existing connection authorization still applies."
          },
          "kind": {
            "type": "string",
            "description": "Source adapter: `github` reuses a connection; `git` reads a public HTTPS repository."
          },
          "root_path": {
            "type": "string",
            "description": "Collection-relative root under which the source hierarchy is preserved."
          }
        },
        "additionalProperties": false
      },
      "SourceLocation": {
        "type": "object",
        "description": "Repository, branch and package path that define an Agent's GitHub source.",
        "required": [
          "repository",
          "branch"
        ],
        "properties": {
          "branch": {
            "type": "string",
            "description": "Branch whose future commits the Agent follows.",
            "example": "main"
          },
          "path": {
            "type": "string",
            "description": "Repository-relative package folder or manifest; empty selects the repository root.",
            "example": "agents/support"
          },
          "repository": {
            "type": "string",
            "description": "GitHub repository in owner/name form.",
            "example": "acme/agents"
          }
        }
      },
      "SourceMode": {
        "type": "string",
        "description": "Source direction. Existing bindings remain inbound-only until explicitly changed.",
        "enum": [
          "pull",
          "two_way"
        ]
      },
      "SourceOptionsRequest": {
        "type": "object",
        "description": "Repository location to browse before selecting an Agent source package.",
        "required": [
          "repository"
        ],
        "properties": {
          "branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "Branch to browse; omitted uses the repository's default branch.",
            "example": "main"
          },
          "github_account": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SourceGitHubAccount",
                "description": "Development GitHub account to read through; omitted prefers the caller's own."
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "type": "string",
            "description": "Repository-relative directory to browse; empty selects the root.",
            "example": "agents"
          },
          "repository": {
            "type": "string",
            "description": "GitHub repository in owner/name form.",
            "example": "acme/agents"
          }
        }
      },
      "SourceRepository": {
        "type": "object",
        "description": "One repository a development account can reach.",
        "required": [
          "full_name",
          "account",
          "private"
        ],
        "properties": {
          "account": {
            "type": "string",
            "description": "GitHub account that owns the repository.",
            "example": "acme"
          },
          "full_name": {
            "type": "string",
            "description": "Repository in owner/name form.",
            "example": "acme/agents"
          },
          "private": {
            "type": "boolean"
          }
        }
      },
      "Speed": {
        "type": "string",
        "description": "Speed level for models that expose a latency/price service tier.\nWire values map 1:1 to the OpenAI `service_tier` request parameter:\n`flex` (slower, cheaper), `default` (standard), `priority` (faster,\npremium), `fast` (OpenAI's current name for `priority`; the API accepts\nboth), and `ultrafast` (premium speed tier, model-gated). `auto` is\ndeliberately not offered — omitting the field preserves the provider's\ndefault routing.",
        "enum": [
          "flex",
          "default",
          "priority",
          "fast",
          "ultrafast"
        ]
      },
      "SpeedConfig": {
        "type": "object",
        "description": "Speed configuration for a model",
        "required": [
          "values",
          "default"
        ],
        "properties": {
          "default": {
            "$ref": "#/components/schemas/Speed",
            "description": "Default speed for this model"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpeedValue"
            },
            "description": "Available speed values for this model"
          }
        }
      },
      "SpeedValue": {
        "type": "object",
        "description": "Named speed value for UI display",
        "required": [
          "value",
          "name"
        ],
        "properties": {
          "cost_multiplier": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Price of this tier relative to the standard rate (e.g. `2.0` for Fast,\n`0.5` for Flex), applied to every token bucket. `None` when the tier's\nrate is not recorded; cost estimates then use the standard rate."
          },
          "name": {
            "type": "string",
            "description": "Display name (e.g., \"Flex\", \"Fast\")"
          },
          "value": {
            "$ref": "#/components/schemas/Speed",
            "description": "The API value (e.g., \"flex\", \"priority\")"
          }
        }
      },
      "StatRequest": {
        "type": "object",
        "required": [
          "path"
        ],
        "properties": {
          "path": {
            "type": "string"
          }
        }
      },
      "SubmitToolApprovalsRequest": {
        "type": "object",
        "description": "Request to answer pending tool-approval requests, `POST …/sessions/{id}/tool-approvals`.",
        "required": [
          "decisions"
        ],
        "properties": {
          "decisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolApprovalAnswer"
            },
            "description": "Decisions for the pending requests. A pending request in the same batch\nthat is left out is resolved as not approved: the turn resumes once, so\nevery request in it is settled now, and silence never approves."
          }
        }
      },
      "SubmitToolApprovalsResponse": {
        "type": "object",
        "description": "Result of answering tool-approval requests.",
        "required": [
          "resolved",
          "status"
        ],
        "properties": {
          "resolved": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolApprovalResolution"
            },
            "description": "How every pending request in the batch was settled."
          },
          "status": {
            "type": "string",
            "description": "Session status after the decision.",
            "example": "active"
          }
        }
      },
      "SubmitToolResultsRequest": {
        "type": "object",
        "description": "Request to submit client-side tool results",
        "required": [
          "tool_results"
        ],
        "properties": {
          "tool_results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientToolResult"
            },
            "description": "Tool results from the client",
            "example": [
              {
                "result": {
                  "url": "https://example.com/orders/42"
                },
                "tool_call_id": "toolu_01933b5a00007000800000000000001"
              }
            ]
          }
        }
      },
      "SubmitToolResultsResponse": {
        "type": "object",
        "description": "Response from submitting tool results",
        "required": [
          "accepted",
          "status"
        ],
        "properties": {
          "accepted": {
            "type": "integer",
            "description": "Number of tool results accepted",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "description": "Session status after submission"
          }
        }
      },
      "SubmittedAnswer": {
        "type": "object",
        "description": "One submitted answer.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Question id, as carried in the `tool.call_requested` payload."
          },
          "other_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free text. Required for a `text` question, and accepted on a `choice`\nquestion only when it allows another answer."
          },
          "secret_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Handle to the stored credential, on a `secret` question only — the value\nitself is never submitted here. Store it with\n`PUT /v1/sessions/{session_id}/storage/secrets` first, then answer with\n`session:{secret_name}`.",
            "example": "session:STRIPE_API_KEY"
          },
          "selected": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Chosen option labels. Must be labels that were actually offered."
          }
        }
      },
      "SubmittedStatus": {
        "type": "string",
        "description": "The outcomes a caller may submit.\n\n`cancelled` and `timed_out` are deliberately absent: they are the server's to\ndecide, from a superseding message and from the deadline sweep. A caller that\ncould assert them could claim a person's silence as their answer.",
        "enum": [
          "answered",
          "declined"
        ]
      },
      "SuccessResponse": {
        "type": "object",
        "description": "Generic success response",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          }
        }
      },
      "SwitchOrgRequest": {
        "type": "object",
        "description": "Request to switch organization",
        "required": [
          "org_id"
        ],
        "properties": {
          "org_id": {
            "type": "string",
            "description": "Organization public ID to switch to",
            "example": "org_2f3c1b3e6a9d4c6f8a1d4e9c9b7f21a0"
          }
        }
      },
      "SwitchOrgResponse": {
        "type": "object",
        "description": "Response from switch org endpoint",
        "required": [
          "success",
          "org_id"
        ],
        "properties": {
          "org_id": {
            "type": "string",
            "description": "The organization ID that was switched to"
          },
          "success": {
            "type": "boolean",
            "description": "Whether the switch was successful"
          }
        }
      },
      "SyncModelsResponse": {
        "oneOf": [
          {
            "type": "object",
            "description": "Sync completed successfully",
            "required": [
              "created",
              "updated",
              "stale",
              "status"
            ],
            "properties": {
              "created": {
                "type": "integer",
                "description": "Number of new models discovered",
                "minimum": 0
              },
              "stale": {
                "type": "integer",
                "description": "Number of models marked as stale (not seen in this sync)",
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "success"
                ]
              },
              "updated": {
                "type": "integer",
                "description": "Number of existing models updated",
                "minimum": 0
              }
            }
          },
          {
            "type": "object",
            "description": "Provider doesn't support model discovery",
            "required": [
              "status"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "not_supported"
                ]
              }
            }
          }
        ],
        "description": "Response from syncing models from a provider"
      },
      "SystemDecisions": {
        "type": "string",
        "description": "Who answers an org's deployment-owned decision checks (guardrail `jev`\nchecks and the Slack relevance check).",
        "enum": [
          "deployment",
          "organization"
        ]
      },
      "TakeFindingActionRequest": {
        "type": "object",
        "description": "The action to take.",
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "`pause_schedule`."
          }
        }
      },
      "TaskArtifact": {
        "type": "object",
        "description": "Typed link to something the task produced.",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session VFS path, when the artifact lives in the session filesystem."
          },
          "type": {
            "type": "string",
            "description": "Artifact type: \"file\", \"url\", \"session\", \"pr\", etc."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "External URL, when the artifact lives elsewhere."
          }
        }
      },
      "TaskError": {
        "type": "object",
        "description": "Terminal error detail. Timeout/rejection/orphaned are kinds, not states.",
        "required": [
          "kind",
          "message"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "TaskInputRequest": {
        "type": "object",
        "description": "Structured ask posted by a task that needs input to continue.",
        "required": [
          "id",
          "prompt"
        ],
        "properties": {
          "expected": {
            "type": "object",
            "description": "Optional machine-readable description of the expected answer."
          },
          "id": {
            "type": "string",
            "description": "Stable ID referenced by the answering message's `in_reply_to`."
          },
          "prompt": {
            "type": "string",
            "description": "Human/agent-readable prompt."
          }
        }
      },
      "TaskLinks": {
        "type": "object",
        "description": "Cross-references owned by a task.",
        "properties": {
          "child_session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Child session, for subagent-shaped tasks. Full transcript lives there."
          },
          "remote_task_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Remote task ID, for tasks wrapping an external protocol task (A2A)."
          },
          "resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Session resources (sandboxes, browser sessions) this task holds."
          }
        }
      },
      "TaskMessage": {
        "type": "object",
        "description": "A message exchanged between a session and one of its tasks.",
        "required": [
          "id",
          "task_id",
          "direction",
          "content",
          "created_at"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskMessagePart"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "direction": {
            "$ref": "#/components/schemas/TaskMessageDirection"
          },
          "id": {
            "type": "string",
            "description": "`tmsg_*` public ID."
          },
          "in_reply_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when this message answers a `TaskInputRequest`."
          },
          "task_id": {
            "type": "string"
          }
        }
      },
      "TaskMessageDirection": {
        "type": "string",
        "description": "Direction of a task message. Inbound = session → task.",
        "enum": [
          "inbound",
          "outbound"
        ]
      },
      "TaskMessageEventData": {
        "type": "object",
        "description": "Data for task message events (`task.message.sent`, `task.message.received`).",
        "required": [
          "task_id",
          "message"
        ],
        "properties": {
          "message": {
            "$ref": "#/components/schemas/TaskMessage"
          },
          "task_id": {
            "type": "string"
          }
        }
      },
      "TaskMessagePart": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "text",
              "type"
            ],
            "properties": {
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "text"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "data",
              "type"
            ],
            "properties": {
              "data": {
                "type": "object"
              },
              "type": {
                "type": "string",
                "enum": [
                  "data"
                ]
              }
            }
          }
        ],
        "description": "One content part of a task message."
      },
      "TaskPushConfig": {
        "type": "object",
        "description": "Public view of a per-task push config. The stored secret is NEVER returned —\nonly `has_secret` signals whether one is configured.",
        "required": [
          "id",
          "url",
          "has_secret",
          "event_filter",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the config was created (RFC 3339).",
            "example": "2026-07-11T00:00:00Z"
          },
          "event_filter": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Events that trigger delivery (terminal, awaiting_input, message)."
          },
          "has_secret": {
            "type": "boolean",
            "description": "Whether a signing secret is configured (the secret itself is never returned).",
            "example": true
          },
          "id": {
            "type": "string",
            "description": "Public identifier (tpc_<32-hex-chars>).",
            "example": "tpc_9f8c2b1a4e7d4c3b8a1f2e3d4c5b6a7f"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the config was last updated (RFC 3339).",
            "example": "2026-07-11T00:00:00Z"
          },
          "url": {
            "type": "string",
            "description": "Target URL that receives POST deliveries.",
            "example": "https://hooks.example.com/everruns/tasks"
          }
        }
      },
      "TaskResponse": {
        "type": "object",
        "description": "Task response",
        "required": [
          "id",
          "activity_id",
          "activity_type",
          "status",
          "priority",
          "attempt",
          "max_attempts",
          "created_at"
        ],
        "properties": {
          "activity_id": {
            "type": "string",
            "description": "Stable per-workflow activity ID (used for deduplication within a workflow run).",
            "example": "tool_call_0042"
          },
          "activity_type": {
            "type": "string",
            "description": "Activity type name, used by workers to route the task.",
            "example": "tool_call"
          },
          "attempt": {
            "type": "integer",
            "format": "int32",
            "description": "Attempt counter. `0` before the task has ever been claimed; incremented to `1` on the first claim and once more per retry.",
            "example": 1,
            "minimum": 0
          },
          "claimed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this task was last claimed by a worker (RFC 3339). `None` if never claimed.",
            "example": "2026-05-27T15:24:03Z"
          },
          "claimed_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Worker ID that holds the current claim; `None` if pending or terminal.",
            "example": "worker-7f3a9b2e-1c4d-4a5f-8b6c-9d0e1f2a3b4c"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this task was enqueued (RFC 3339).",
            "example": "2026-05-27T15:24:00Z"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the task.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last error message recorded by the worker; `None` if the task has never failed.",
            "example": "tool exceeded 30s budget"
          },
          "max_attempts": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of attempts before the task is sent to the DLQ.",
            "example": 5,
            "minimum": 0
          },
          "priority": {
            "type": "integer",
            "format": "int32",
            "description": "Priority; higher values run first within the same activity type.",
            "example": 10
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle status (`pending`, `claimed`, `completed`, `failed`, `dead`, `cancelled`).",
            "example": "claimed"
          },
          "workflow_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Owning workflow's identifier. `None` for one-off tasks not tied to a workflow.",
            "example": "9a1b2c3d-4e5f-6789-abcd-ef0123456789"
          }
        }
      },
      "TaskWakePolicy": {
        "type": "string",
        "description": "When outbound task activity wakes the owning session's agent.",
        "enum": [
          "silent",
          "on_terminal",
          "on_activity"
        ]
      },
      "TaskWebhookResponse": {
        "type": "object",
        "description": "A configured outbound webhook target.",
        "required": [
          "id",
          "url",
          "enabled",
          "has_secret",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether this webhook is enabled."
          },
          "has_secret": {
            "type": "boolean",
            "description": "Whether a signing secret is configured (the secret itself is never returned)."
          },
          "id": {
            "type": "string",
            "description": "Public identifier (wh_<32-hex-chars>)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "description": "Target URL that receives POST requests."
          }
        }
      },
      "TasksListResponse": {
        "type": "object",
        "description": "Tasks list response",
        "required": [
          "data",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskResponse"
            },
            "description": "Page of items returned by this query."
          },
          "total": {
            "type": "integer",
            "description": "Total number of items matching the query, across all pages.",
            "minimum": 0
          }
        }
      },
      "TemplateMetadata": {
        "type": "object",
        "description": "Editable Sandbox Template labels and metadata, excluding execution configuration.",
        "required": [
          "id",
          "display_name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/sbxtplId"
          }
        }
      },
      "TestTraceResponse": {
        "type": "object",
        "description": "Result of sending synthetic data to the receiver; contains no customer turn content.",
        "required": [
          "accepted",
          "message"
        ],
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether the receiver accepted the synthetic export; partial OTLP rejection is false.",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "Safe explanation of the synthetic test result.",
            "example": "Receiver accepted the test trace"
          }
        }
      },
      "TextAnnotation": {
        "type": "object",
        "description": "A claim-level citation attached to a span of generated text.\n\nThe single shared type across every citation capability: a text span linked\nto a source. Producers agree only on this render contract — each capability\nkeeps its own richer representation (e.g. `KnowledgeIndexCitation`) and maps\ninto this envelope at emit time.",
        "required": [
          "start",
          "end",
          "origin",
          "source"
        ],
        "properties": {
          "end": {
            "type": "integer",
            "description": "Exclusive end char offset.",
            "example": 19,
            "minimum": 0
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque producer id (e.g. `kchk_…`, `kbe_…`, a URL hash). Not interpreted\nby the render contract.",
            "example": "kchk_01j9y3q8w2"
          },
          "origin": {
            "type": "string",
            "description": "Capability id that produced this annotation (e.g. `citation_retrieval`).\nLets the UI and evals attribute and filter each citation by feed.",
            "example": "citation_retrieval"
          },
          "source": {
            "$ref": "#/components/schemas/AnnotationSource",
            "description": "The cited source."
          },
          "start": {
            "type": "integer",
            "description": "0-indexed start char offset into the enclosing `TextContentPart.text`.",
            "example": 0,
            "minimum": 0
          },
          "verified": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerificationVerdict",
                "description": "Verification verdict, filled by the `citation_verification` capability.\nAbsent means unverified (not \"unsupported\")."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TextContentPart": {
        "type": "object",
        "description": "Text content part",
        "required": [
          "text"
        ],
        "properties": {
          "annotations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextAnnotation"
            },
            "description": "Claim-level citations attached to spans of `text`.\n\nThe narrow render contract shared by all citation capabilities. Empty for non-cited text, so the wire shape of\nexisting messages is unchanged."
          },
          "text": {
            "type": "string"
          }
        }
      },
      "TimelineBucket": {
        "type": "object",
        "description": "One time bucket. Averages are over 10-second samples; counters are exact.",
        "required": [
          "start",
          "sampled",
          "backfilled",
          "active_avg",
          "active_peak",
          "model_avg",
          "tools_avg",
          "waiting_avg",
          "runnable_avg",
          "setup_avg",
          "runnable_peak",
          "leases_peak",
          "lease_takeovers",
          "turns_started",
          "turns_completed",
          "turns_failed",
          "turns_cancelled",
          "model_calls",
          "tool_calls",
          "tool_failures",
          "input_tokens",
          "output_tokens",
          "cost_usd",
          "worker_loads",
          "agents_working_avg",
          "agents_working_peak"
        ],
        "properties": {
          "active_avg": {
            "type": "number",
            "format": "double",
            "description": "Average sessions with an active, runnable, or held actor.",
            "example": 96.4
          },
          "active_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest sampled count of such sessions.",
            "example": 112,
            "minimum": 0
          },
          "agents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Agents defined, not archived: the newest count in or before the bucket.",
            "minimum": 0
          },
          "agents_working_avg": {
            "type": "number",
            "format": "double",
            "description": "Average distinct agents with an active session on workers."
          },
          "agents_working_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest sampled count of such agents.",
            "minimum": 0
          },
          "backfilled": {
            "type": "boolean",
            "description": "Whether this bucket includes history rebuilt from turn records (no phase split or queue data)."
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Model spend in USD, actual where reconciled, otherwise estimated.",
            "example": 0.29
          },
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Model input tokens.",
            "minimum": 0
          },
          "lease_takeovers": {
            "type": "integer",
            "format": "int64",
            "description": "Expired leases another worker took over.",
            "minimum": 0
          },
          "leases_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest sampled count of valid actor leases.",
            "minimum": 0
          },
          "model_avg": {
            "type": "number",
            "format": "double",
            "description": "Average sessions in a model phase."
          },
          "model_calls": {
            "type": "integer",
            "format": "int64",
            "description": "Model calls started.",
            "minimum": 0
          },
          "model_latency_p95_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Highest per-minute p95 model call duration in the bucket, in milliseconds.",
            "minimum": 0
          },
          "oldest_runnable_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Longest wait for a worker lease observed in the bucket, in milliseconds.",
            "minimum": 0
          },
          "open_sessions": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Sessions not archived, on any data plane: the newest count in or before the bucket.",
            "minimum": 0
          },
          "organizations_peak": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: highest number of organizations with active sessions at once.",
            "minimum": 0
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Model output tokens.",
            "minimum": 0
          },
          "runnable_avg": {
            "type": "number",
            "format": "double",
            "description": "Average sessions ready and waiting for a worker lease."
          },
          "runnable_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest sampled count of sessions waiting for a worker.",
            "minimum": 0
          },
          "sampled": {
            "type": "boolean",
            "description": "Whether population was sampled; false for empty buckets and history rebuilt from turn records."
          },
          "servers": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: server replicas running.",
            "minimum": 0
          },
          "setup_avg": {
            "type": "number",
            "format": "double",
            "description": "Average sessions in turn setup or a phase handoff."
          },
          "shards": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimelineShardsBucket",
                "description": "Data plane v2 shards; absent when no shard reported and no shard turn finished in the bucket."
              },
              {
                "type": "null"
              }
            ]
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "UTC start of the bucket.",
            "example": "2026-11-01T05:00:00Z"
          },
          "tool_calls": {
            "type": "integer",
            "format": "int64",
            "description": "Tool calls started.",
            "minimum": 0
          },
          "tool_failures": {
            "type": "integer",
            "format": "int64",
            "description": "Tool calls that ended in an error or timeout.",
            "minimum": 0
          },
          "tools_avg": {
            "type": "number",
            "format": "double",
            "description": "Average sessions running tools."
          },
          "turns_cancelled": {
            "type": "integer",
            "format": "int64",
            "description": "Turns cancelled.",
            "minimum": 0
          },
          "turns_completed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns completed.",
            "minimum": 0
          },
          "turns_failed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns failed.",
            "minimum": 0
          },
          "turns_started": {
            "type": "integer",
            "format": "int64",
            "description": "Turns started.",
            "minimum": 0
          },
          "waiting_avg": {
            "type": "number",
            "format": "double",
            "description": "Average sessions waiting for input or external tool results."
          },
          "worker_capacity": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: total worker slots.",
            "minimum": 0
          },
          "worker_load_avg": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Platform only: average reported worker load across all workers."
          },
          "worker_load_peak": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: highest reported total worker load.",
            "minimum": 0
          },
          "worker_loads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineWorkerLoad"
            },
            "description": "Platform only: per-worker average load."
          },
          "workers": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: registered workers with a fresh heartbeat.",
            "minimum": 0
          }
        }
      },
      "TimelineFailure": {
        "type": "object",
        "description": "Failed turns of one classified error code.",
        "required": [
          "code",
          "turns"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Classified error code, or other.",
            "example": "provider_rate_limited"
          },
          "turns": {
            "type": "integer",
            "format": "int64",
            "description": "Failed turns with this code.",
            "minimum": 0
          }
        }
      },
      "TimelineMarker": {
        "type": "object",
        "description": "Deploy or worker change on the timeline.",
        "required": [
          "at",
          "kind",
          "label"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "UTC time of the change."
          },
          "kind": {
            "type": "string",
            "description": "deploy, worker_joined, worker_left, or leader_change (all but deploy are platform only).",
            "example": "deploy"
          },
          "label": {
            "type": "string",
            "description": "Server version for a deploy, worker id or shard name otherwise.",
            "example": "0.50.1"
          }
        }
      },
      "TimelineRank": {
        "type": "object",
        "description": "One agent (organization) or organization (platform) ranked in a window.",
        "required": [
          "sessions",
          "turns"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent or organization public identifier; null for sessions without an agent."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent name; null in platform scope."
          },
          "sessions": {
            "type": "integer",
            "format": "int64",
            "description": "Sessions that started a turn in the window.",
            "minimum": 0
          },
          "turns": {
            "type": "integer",
            "format": "int64",
            "description": "Turns started in the window.",
            "minimum": 0
          }
        }
      },
      "TimelineShardsBucket": {
        "type": "object",
        "description": "What data plane v2 shards reported over a bucket. Population comes from\neach shard's one-minute report; counters from the shards' feed.",
        "required": [
          "reporting",
          "sessions_avg",
          "sessions_peak",
          "running_avg",
          "running_peak",
          "queued_peak",
          "agents_working_avg",
          "agents_working_peak",
          "turns_completed",
          "turns_failed",
          "turns_cancelled",
          "model_calls",
          "input_tokens",
          "output_tokens",
          "cost_usd"
        ],
        "properties": {
          "admit_p99_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: worst node's p99 time to admit a turn, in milliseconds.",
            "minimum": 0
          },
          "agents_working_avg": {
            "type": "number",
            "format": "double",
            "description": "Average distinct agents with a running turn on shards."
          },
          "agents_working_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest per-minute agents with a running turn on shards.",
            "minimum": 0
          },
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Model spend on shards in USD."
          },
          "cpu_peak_pct": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Platform only: the busiest node's CPU use as a percentage of its limit."
          },
          "elections": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: leader elections across shards.",
            "minimum": 0
          },
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Model input tokens on shards.",
            "minimum": 0
          },
          "memory_peak_pct": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Platform only: the fullest node's memory use as a percentage of its limit."
          },
          "model_calls": {
            "type": "integer",
            "format": "int64",
            "description": "Model calls made on shards.",
            "minimum": 0
          },
          "moves": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: sessions moved to another shard.",
            "minimum": 0
          },
          "nodes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: highest total of shard nodes (pods) in one minute.",
            "minimum": 0
          },
          "nodes_answering": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: lowest total of nodes that answered their leader in one minute.",
            "minimum": 0
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Model output tokens on shards.",
            "minimum": 0
          },
          "queued_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest per-minute messages waiting for a turn on shards.",
            "minimum": 0
          },
          "reporting": {
            "type": "integer",
            "format": "int64",
            "description": "Highest number of shards that reported in one minute.",
            "example": 12,
            "minimum": 0
          },
          "resumed_peak": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: highest per-minute turns running on a second or later attempt.",
            "minimum": 0
          },
          "running_avg": {
            "type": "number",
            "format": "double",
            "description": "Average turns running on shards."
          },
          "running_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest per-minute turns running on shards.",
            "minimum": 0
          },
          "sessions_avg": {
            "type": "number",
            "format": "double",
            "description": "Average sessions resident on shards."
          },
          "sessions_peak": {
            "type": "integer",
            "format": "int64",
            "description": "Highest per-minute sessions resident on shards.",
            "minimum": 0
          },
          "ship_lag_p99_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: worst node's p99 log shipping lag, in milliseconds.",
            "minimum": 0
          },
          "turns_cancelled": {
            "type": "integer",
            "format": "int64",
            "description": "Turns cancelled on shards.",
            "minimum": 0
          },
          "turns_completed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns completed on shards.",
            "minimum": 0
          },
          "turns_failed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns failed on shards.",
            "minimum": 0
          }
        }
      },
      "TimelineSummary": {
        "type": "object",
        "description": "Totals over a range, for the summary row and the previous-period comparison.",
        "required": [
          "peak_active",
          "turns_started",
          "turns_finished",
          "turns_failed",
          "tool_calls",
          "cost_usd"
        ],
        "properties": {
          "cost_usd": {
            "type": "number",
            "format": "double",
            "description": "Model spend in USD."
          },
          "failure_rate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Failed turns divided by finished turns; null when none finished."
          },
          "longest_wait_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start of the bucket with the longest wait."
          },
          "longest_wait_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Longest wait for a worker lease, in milliseconds.",
            "minimum": 0
          },
          "peak_active": {
            "type": "integer",
            "format": "int64",
            "description": "Highest sampled parallel sessions.",
            "minimum": 0
          },
          "peak_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Minute of that peak."
          },
          "seconds_above_90": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: seconds of buckets whose peak load exceeded 90% of capacity.",
            "minimum": 0
          },
          "shards_elections": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Platform only: leader elections across shards; null when no shard reported.",
            "minimum": 0
          },
          "shards_peak_running": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Highest per-minute turns running on shards; null when no shard reported.",
            "minimum": 0
          },
          "tool_calls": {
            "type": "integer",
            "format": "int64",
            "description": "Tool calls started.",
            "minimum": 0
          },
          "turns_failed": {
            "type": "integer",
            "format": "int64",
            "description": "Turns failed.",
            "minimum": 0
          },
          "turns_finished": {
            "type": "integer",
            "format": "int64",
            "description": "Turns that finished: completed, failed, or cancelled.",
            "minimum": 0
          },
          "turns_started": {
            "type": "integer",
            "format": "int64",
            "description": "Turns started.",
            "minimum": 0
          }
        }
      },
      "TimelineWorkerLoad": {
        "type": "object",
        "description": "Load of one worker over a bucket (platform scope).",
        "required": [
          "worker_id",
          "load_avg",
          "capacity"
        ],
        "properties": {
          "capacity": {
            "type": "integer",
            "format": "int64",
            "description": "Reported maximum concurrency.",
            "example": 50,
            "minimum": 0
          },
          "load_avg": {
            "type": "number",
            "format": "double",
            "description": "Average reported load over the bucket's samples.",
            "example": 31.5
          },
          "worker_id": {
            "type": "string",
            "description": "Worker identifier from the registry.",
            "example": "worker-01"
          }
        }
      },
      "TimerCancelledData": {
        "type": "object",
        "description": "Data for `timer.cancelled`.",
        "required": [
          "timer_id"
        ],
        "properties": {
          "timer_id": {
            "type": "string",
            "description": "Timer that will not fire again.",
            "example": "sched_01933b5a00007000800000000000001"
          }
        }
      },
      "TimerFiredData": {
        "type": "object",
        "description": "Data for `timer.fired`.",
        "required": [
          "timer_id",
          "fired_at"
        ],
        "properties": {
          "fired_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the occurrence was delivered."
          },
          "next_fire_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Next time the timer is due; absent when this was its last occurrence."
          },
          "timer_id": {
            "type": "string",
            "description": "Timer that fired.",
            "example": "sched_01933b5a00007000800000000000001"
          }
        }
      },
      "TimerPurpose": {
        "type": "string",
        "description": "What a timer wakes the session for.",
        "enum": [
          "schedule"
        ]
      },
      "TimerSetData": {
        "type": "object",
        "description": "Data for `timer.set`.",
        "required": [
          "timer_id",
          "purpose",
          "fire_at"
        ],
        "properties": {
          "cron_expression": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cron expression for a recurring timer; absent for a one-shot timer."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text delivered to the session when the timer fires."
          },
          "fire_at": {
            "type": "string",
            "format": "date-time",
            "description": "First time the timer is due."
          },
          "metadata": {
            "type": "object",
            "description": "Host-defined fields kept with the timer (for example a schedule's name)."
          },
          "purpose": {
            "$ref": "#/components/schemas/TimerPurpose",
            "description": "What the timer wakes the session for."
          },
          "timer_id": {
            "type": "string",
            "description": "Timer identity. For a schedule, the schedule id.",
            "example": "sched_01933b5a00007000800000000000001"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "IANA timezone the cron expression is read in.",
            "example": "UTC"
          }
        }
      },
      "TokenUsage": {
        "type": "object",
        "description": "Token usage statistics\n\nTracks token consumption per LLM call including cache tokens for cost\noptimization.\n\n## Disjoint bucket convention\n\nPrompt token buckets are **disjoint** (non-overlapping). Drivers normalize\nprovider wire formats at the boundary so this holds for every provider:\n\n```text\ntotal_prompt = input_tokens + cache_read_tokens + cache_creation_tokens\n```\n\n- `input_tokens` — non-cached prompt tokens only.\n- `cache_read_tokens` — tokens served from cache, never counted in\n  `input_tokens`.\n- `cache_creation_tokens` — tokens written to cache, never counted in\n  `input_tokens`.\n\nInclusive providers (OpenAI Responses / Chat Completions, Gemini) report a\nprompt count that *includes* cached reads; their drivers subtract the cached\nsubset so the value stored here is the non-cached remainder. Anthropic /\nBedrock already report disjoint buckets. Cost is therefore uniform across\nproviders (`input·in + cache_read·cr + cache_creation·cw + output·out`);\nconsumers must not re-derive a non-cached input by subtracting cache reads.",
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "properties": {
          "actual_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Actual cost of this generation in USD, as reported by the provider inline\n(e.g. OpenRouter's `usage.cost`, which reflects real post-routing/BYOK/cache\npricing). `None` for providers that do not return a cost."
          },
          "cache_creation_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of tokens written to cache, disjoint from `input_tokens`",
            "minimum": 0
          },
          "cache_read_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of tokens read from cache (reduces cost), disjoint from `input_tokens`",
            "minimum": 0
          },
          "effective_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Best-effort USD cost when it cannot be derived from actual/estimated\nalone: already-aggregated usage, or a generation carrying a cost that\nbelongs to neither slot. Per-generation usage normally leaves this unset\nand derives the effective cost from actual-else-estimated; the exception\nis a turn whose compaction cost is folded in, where the combined total\nhas to live here precisely so the generation's own actual-vs-estimated\ndistinction survives (EVE-895)."
          },
          "estimated_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Estimated cost of this generation in USD, derived from the model's static\nprice-table profile. Computed whenever a profile with cost data exists,\nindependently of `actual_cost_usd`, so estimate-vs-actual drift can be\nreconciled. `None` when there is no profile cost data for the model."
          },
          "input_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Number of non-cached prompt tokens (cached reads/writes are tracked\nseparately; see the disjoint bucket convention on the struct)",
            "minimum": 0
          },
          "output_tokens": {
            "type": "integer",
            "format": "int32",
            "description": "Number of output/completion tokens",
            "minimum": 0
          }
        }
      },
      "ToolApprovalAnswer": {
        "type": "object",
        "description": "One decision in a submission.",
        "required": [
          "tool_call_id",
          "decision"
        ],
        "properties": {
          "decision": {
            "$ref": "#/components/schemas/ToolApprovalDecision",
            "description": "The person's decision."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The pending approval being answered.",
            "example": "tool_approval_toolu_01933b5a00007000800000000000001"
          }
        }
      },
      "ToolApprovalDecision": {
        "type": "string",
        "description": "What a person decided about one gated tool call.",
        "enum": [
          "allow",
          "allow_always",
          "reject",
          "reject_always"
        ]
      },
      "ToolApprovalResolution": {
        "type": "object",
        "description": "How one pending request was settled.",
        "required": [
          "tool_call_id",
          "tool",
          "outcome"
        ],
        "properties": {
          "outcome": {
            "type": "string",
            "description": "`allow`, `allow_always`, `reject`, `reject_always`, `not_approved`\n(left out of the submission) or `expired`.",
            "example": "allow"
          },
          "tool": {
            "type": "string",
            "description": "The gated tool."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The approval that was answered."
          }
        }
      },
      "ToolApprovalRule": {
        "type": "object",
        "description": "A rule over tool names. `tool` is an exact name or a pattern with `*`\nstanding for any run of characters (`github__merge_*`, `*delete*`).",
        "required": [
          "tool",
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ToolRuleAction",
            "description": "What happens to a matching call."
          },
          "tool": {
            "type": "string",
            "description": "Tool name or `*` pattern."
          }
        },
        "additionalProperties": false
      },
      "ToolCall": {
        "type": "object",
        "description": "Tool call from LLM response",
        "required": [
          "id",
          "name",
          "arguments"
        ],
        "properties": {
          "arguments": {
            "type": "object",
            "description": "Arguments as JSON"
          },
          "id": {
            "type": "string",
            "description": "Unique ID for this tool call"
          },
          "name": {
            "type": "string",
            "description": "Tool name to execute"
          }
        }
      },
      "ToolCallContentPart": {
        "type": "object",
        "description": "Tool call content part (assistant requesting tool execution)",
        "required": [
          "id",
          "name",
          "arguments"
        ],
        "properties": {
          "arguments": {},
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "native": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NativeToolCall",
                "description": "Original native call, including raw custom input and async metadata."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ToolCallRepairedData": {
        "type": "object",
        "description": "Data for the `tool.call_repaired` event (EVE-600).\n\nEmitted once per malformed tool call handled by the opt-in\n`tool_call_repair` capability. `outcome` is the stable label\n(`local-salvage` | `re-prompt` | `gave-up`).",
        "required": [
          "turn_id",
          "tool_call_id",
          "tool_name",
          "outcome"
        ],
        "properties": {
          "outcome": {
            "type": "string",
            "description": "Stable outcome label: `local-salvage`, `re-prompt`, or `gave-up`."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The tool call ID that was inspected/repaired."
          },
          "tool_name": {
            "type": "string",
            "description": "The tool name the malformed call targeted."
          },
          "turn_id": {
            "type": "string",
            "description": "Turn this repair belongs to.",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "ToolCallRequestedData": {
        "type": "object",
        "description": "Data for tool.call_requested event\n\nEmitted when the agent needs client-side tool calls executed.\nThe turn parks until the client submits results via the API.",
        "required": [
          "tool_calls"
        ],
        "properties": {
          "completed_headline": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable headline after the requested batch completes"
          },
          "headline": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable headline for the requested batch"
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolCall"
            },
            "description": "Tool calls that need to be executed by the client"
          },
          "tool_summaries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolCallSummary"
            },
            "description": "Optional summaries with display names and narration for UI rendering"
          }
        }
      },
      "ToolCallSummary": {
        "type": "object",
        "description": "Summary of a tool call (compact form without arguments)",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "completed_narration": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable narration after the call completes"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for UI rendering"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "narration": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable narration for timeline rendering"
          }
        }
      },
      "ToolCompletedData": {
        "type": "object",
        "description": "Data for tool.completed event",
        "required": [
          "tool_call_id",
          "tool_name",
          "success",
          "status"
        ],
        "properties": {
          "acted_as": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerActsAs",
                "description": "Account an MCP tool call ran as: `user` (the invoking person's own\ngrant) or `service` (the agent's). Set only for MCP calls that resolved\na credential, so a `user_or_service` attachment's fallback is visible."
              },
              {
                "type": "null"
              }
            ]
          },
          "capability_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capability that contributed the tool definition, when known."
          },
          "capability_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable capability name snapshot, when known."
          },
          "command_outcome": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CommandOutcome",
                "description": "Outcome of the shell command, independent of the tool's invocation status."
              },
              {
                "type": "null"
              }
            ]
          },
          "details": {
            "description": "Details for people reading the run (chat details view, Session\nTrace) that the model never saw. Web search puts the provider that\nanswered, every attempt and the raw provider responses here."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for UI rendering"
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Wall-clock duration of the tool call in milliseconds",
            "minimum": 0
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if failed"
          },
          "executed_arguments": {
            "description": "Arguments the tool actually ran with, present only when `pre_tool_use`\nhooks rewrote the model-authored arguments (which `tool.started`\ncarries). Values under credential-named keys (`password`, `*_token`,\n`authorization`, ...) read `[REDACTED]`. Bounded like the approval\npreview: past the budget this is a truncated JSON string and\n`executed_arguments_truncated` is set."
          },
          "executed_arguments_truncated": {
            "type": "boolean",
            "description": "True when `executed_arguments` is a truncated preview."
          },
          "narration": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable narration for timeline rendering"
          },
          "result": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ContentPart"
            },
            "description": "Result content (for successful calls)"
          },
          "severity": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FailureSeverity",
                "description": "Severity of a failed call; absent when `success` is true. A failed\ntool call is returned to the model, which carries on, so it is an\n`issue`. Whether the turn itself failed is reported by `turn.failed`.\nEvents recorded before this field existed omit it; read a failure\nwithout it as an `issue`."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "Status: \"success\", \"error\", \"timeout\", \"cancelled\""
          },
          "success": {
            "type": "boolean",
            "description": "Whether the tool call succeeded"
          },
          "tool_call_fingerprint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable fingerprint of tool name + normalized arguments."
          },
          "tool_call_id": {
            "type": "string",
            "description": "Tool call ID"
          },
          "tool_name": {
            "type": "string",
            "description": "Tool name"
          },
          "tool_result_fingerprint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable fingerprint of tool name + normalized result/error."
          },
          "worker_thread_cpu_ns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Actual worker-thread CPU nanoseconds consumed while polling the invoked\ntool executor future, including clock-bracketing overhead. Excludes async\nwaiting, child processes, separately spawned/blocking tasks and remote\ncompute. Missing means unobserved/unsupported, not zero or total tool CPU.",
            "minimum": 0
          }
        }
      },
      "ToolDefinition": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/BuiltinTool",
                "description": "Built-in tool - executed by the worker via ToolRegistry"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "builtin"
                    ]
                  }
                }
              }
            ],
            "description": "Built-in tool - executed by the worker via ToolRegistry"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ClientSideTool",
                "description": "Client-side tool - executed by the client, not the server"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "client_side"
                    ]
                  }
                }
              }
            ],
            "description": "Client-side tool - executed by the client, not the server"
          }
        ],
        "description": "Tool definition in agent configuration"
      },
      "ToolDefinitionSummary": {
        "type": "object",
        "description": "Summary of a tool definition (compact form for events)",
        "required": [
          "name",
          "description"
        ],
        "properties": {
          "capability_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capability that contributed the tool definition, when known."
          },
          "capability_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable capability name snapshot, when known."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tool category for namespace grouping."
          },
          "description": {
            "type": "string",
            "description": "Tool description"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for UI rendering"
          },
          "name": {
            "type": "string",
            "description": "Tool name"
          }
        }
      },
      "ToolFixture": {
        "type": "object",
        "description": "A tool the case gives the agent, answered with a canned response.",
        "required": [
          "name",
          "response"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the tool does, as the agent reads it.",
            "example": "Open a support ticket"
          },
          "name": {
            "type": "string",
            "description": "Tool name the agent calls.",
            "example": "create_ticket"
          },
          "parameters": {
            "description": "JSON Schema of the arguments. Omitted: an object with any fields."
          },
          "response": {
            "description": "What every call returns."
          }
        }
      },
      "ToolHints": {
        "type": "object",
        "description": "Semantic hints describing a tool's behavioral properties.\n\nFollows the MCP tool annotations convention (readOnlyHint, destructiveHint,\nidempotentHint, openWorldHint) plus everruns-specific hints. All fields are\noptional booleans — `None` means \"unknown/unspecified\". Consumers should\ntreat `None` as the conservative default (e.g., assume not readonly, assume\nnot idempotent).\n\nThese hints are informational — they do not enforce policy. Use `ToolPolicy`\nfor execution gating (auto vs requires_approval).",
        "properties": {
          "capability_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Declared capability description for source-aware tool discovery.\nNever populate this with system prompts, conversation state or secrets."
          },
          "capability_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capability that contributed this tool definition.\n\nReporting uses this attribution only as metadata. It must never contain\ntool arguments, results, prompts, or any other sensitive payload."
          },
          "capability_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable capability name snapshot for reporting."
          },
          "concurrency_class": {
            "type": [
              "string",
              "null"
            ],
            "description": "Scheduling conflict key. Tool calls within the same act batch that share\na non-empty `concurrency_class` are executed sequentially in arrival\norder; calls in different classes (or with no class) run concurrently.\n\nSet this on tools that mutate shared session state so that, e.g., two\nfile writes or two SQL mutations in one batch do not race. Read-only\ntools should leave this `None` so they always parallelize. See\n`everruns-engine`'s tool scheduler for how the act phase consumes it."
          },
          "cpu_bound": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool performs significant CPU-bound or otherwise non-yielding work in\nprocess (e.g. an in-process interpreter). When true, the act scheduler\nruns the call on its own task (`tokio::spawn`) so a long CPU burst does\nnot starve the cooperative polling of I/O-bound tools in the same batch.\n\nDistinct from `long_running`, which describes wall-clock time for\nI/O-bound work (those tools yield at await points and need no offload)."
          },
          "destructive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool may irreversibly destroy or delete data.\nSubset of non-readonly — a tool can be non-readonly (writes) without\nbeing destructive (e.g., create/update operations)."
          },
          "idempotent": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Calling the tool repeatedly with the same arguments produces the same\neffect. Safe to retry on transient failures."
          },
          "long_running": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool may take significant time to complete (> ~5s typical).\nUseful for clients to show progress indicators and set timeouts."
          },
          "metadata": {
            "description": "Host-owned annotations that core does not interpret.\n\nThe typed hints above are the vocabulary core itself reasons about. This\nis the escape hatch for everything a *host* wants to carry alongside a\ntool — risk tiers for an approval UI, presentation hints, an embedder's\nrouting keys — without adding a field to core for each one. Core reads\nnothing here and no driver sends it to a provider; it travels with the\ndefinition so a consumer sees it at the point of decision (e.g. a\n`PreToolUseHook` gating on what the tool declared).\n\nThe schema belongs to whoever writes it. Never put credentials or other\nsensitive payload here: like the rest of the definition, it is persisted\nand surfaced to clients."
          },
          "narration_noun": {
            "type": [
              "string",
              "null"
            ],
            "description": "Entity noun for operation-based narration (e.g. \"agent\", \"harness\").\nWhen set, the narration system reads the `operation` argument and\nproduces verb-based narration like \"Created agent: Neon Cartographer\"\ninstead of the generic \"Ran Manage Agents\"."
          },
          "open_world": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool interacts with external entities beyond the local system\n(network calls, third-party APIs, cloud services)."
          },
          "persist_output": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool output should be persisted to session VFS before truncation.\nWhen set, the `tool_output_persistence` capability (EVE-222, EVE-245) writes\nstdout to `/outputs/{tool_call_id}.stdout` and stderr to\n`/outputs/{tool_call_id}.stderr`, injecting `full_output`, `total_lines`,\nand `output_files` into the result."
          },
          "readonly": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool does not modify any state (read-only queries, lookups).\nWhen true: safe to call speculatively, result can be cached."
          },
          "requires_secrets": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool requires API keys, credentials, or other secrets to function.\nUseful for UI to show connection prompts and for LLMs to anticipate\nauthentication failures."
          },
          "side_effect_class": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SideEffectClass",
                "description": "Replay-safety class used when recovering an unfinished tool call.\n\nWhen the journal records a start but no completed result,\n`Pure`/`Idempotent` tools may be re-executed; `AtMostOnce` tools are\nsettled as `interrupted` to avoid repeating an uncertain external effect.\n\n`None` is treated conservatively as `AtMostOnce`."
              },
              {
                "type": "null"
              }
            ]
          },
          "stays_direct": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool must stay a direct tool call and never runs from inside a shell\nscript (`shell_code_mode`): it pauses or shapes the turn, or its result\nonly makes sense to the model directly."
          },
          "supports_background": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Tool supports detached background execution via `spawn_background`.\nWhen true, the tool may be executed asynchronously outside the current\nforeground tool call and report status back later."
          }
        }
      },
      "ToolNestedCallData": {
        "type": "object",
        "description": "Data for the `tool.nested_call` event (Shell Code Mode).\n\nA shell script called one of the agent's tools through the `tools` command,\ninside the `bash` call named by `parent_tool_call_id`. Informational: the\nmodel did not make this call, so there is no matching `tool.started` /\n`tool.completed` or tool-result message; the `bash` result carries what the\nscript printed.",
        "required": [
          "parent_tool_call_id",
          "call_id",
          "tool_name",
          "command",
          "status",
          "input_preview"
        ],
        "properties": {
          "call_id": {
            "type": "string",
            "description": "This call's id: unique within the parent call."
          },
          "command": {
            "type": "string",
            "description": "How the script spelled it, e.g. `github list-pulls`."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Wall-clock time the tool ran, in milliseconds; absent when it did not run.",
            "minimum": 0
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "What went wrong, for `failed` and `refused`."
          },
          "input_preview": {
            "type": "string",
            "description": "The call's input, shortened for display."
          },
          "parent_tool_call_id": {
            "type": "string",
            "description": "The `bash` tool call the script ran in."
          },
          "status": {
            "type": "string",
            "description": "`completed`, `failed`, `needs_approval` (the script stopped here and a\nperson is asked), or `refused` (a pre-tool hook blocked the call)."
          },
          "tool_name": {
            "type": "string",
            "description": "Registry name of the tool that was called, e.g. `mcp_github__list_pulls`."
          }
        }
      },
      "ToolOutputDeltaData": {
        "type": "object",
        "description": "Data for tool.output.delta event.\n\nEmitted by tools during execution to stream incremental output chunks.\nThis enables live output rendering (e.g., bash stdout/stderr, command output)\nbetween tool.started and tool.completed. Generic — usable by any tool that\nproduces streamed output (bashkit, Daytona exec, subagent speech, etc.).\n\nThe consumer accumulates deltas by tool_call_id for display. The final\ntool.completed result is authoritative — deltas are informational only.",
        "required": [
          "tool_call_id",
          "tool_name",
          "delta",
          "stream"
        ],
        "properties": {
          "delta": {
            "type": "string",
            "description": "Incremental output chunk"
          },
          "stream": {
            "type": "string",
            "description": "Output stream identifier (e.g., \"stdout\", \"stderr\")"
          },
          "tool_call_id": {
            "type": "string",
            "description": "Tool call ID this output belongs to"
          },
          "tool_name": {
            "type": "string",
            "description": "Tool name"
          }
        }
      },
      "ToolPolicy": {
        "type": "string",
        "description": "Tool policy determines how tool calls are handled",
        "enum": [
          "auto",
          "requires_approval",
          "client_side"
        ]
      },
      "ToolProgressData": {
        "type": "object",
        "description": "Data for tool.progress event.\n\nEmitted by tools during execution to report interim status updates.\nThis allows long-running tools (e.g., browser operations, sandbox setup)\nto stream progress feedback between tool.started and tool.completed.",
        "required": [
          "tool_call_id",
          "tool_name",
          "message"
        ],
        "properties": {
          "current": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Items done so far, when the tool knows a count (\"3\" of \"12 files\").\nSet together with `total`; the message stays readable on its own.",
            "minimum": 0
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for UI rendering"
          },
          "message": {
            "type": "string",
            "description": "Human-readable status message (e.g., \"Connecting to browser…\")"
          },
          "tool_call_id": {
            "type": "string",
            "description": "Tool call ID this progress belongs to"
          },
          "tool_name": {
            "type": "string",
            "description": "Tool name"
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Items in total, when the tool knows a count.",
            "minimum": 0
          }
        }
      },
      "ToolResultContentPart": {
        "type": "object",
        "description": "Tool result content part (result of tool execution)",
        "required": [
          "tool_call_id"
        ],
        "properties": {
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "result": {},
          "tool_call_id": {
            "type": "string",
            "description": "ID of the tool call this result corresponds to"
          }
        }
      },
      "ToolReviewedData": {
        "type": "object",
        "description": "Data for the `tool.reviewed` event.\n\nEmitted once per call the `tool_approval` gate's auto reviewer decided on,\nin `auto` mode. Carries no tool output and no model prose: only what was\nasked, the verdict and the one-line reason, so the review log can be shown\nto anyone who can see the session.",
        "required": [
          "tool_call_id",
          "tool_name",
          "verdict",
          "stage",
          "reason",
          "fingerprint"
        ],
        "properties": {
          "fingerprint": {
            "type": "string",
            "description": "Digest of the tool name and exact arguments, as the approval gate\ncomputes it, so a person's later approval binds to this exact call."
          },
          "reason": {
            "type": "string",
            "description": "One-line reason, written by the reviewer."
          },
          "rule": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short label of the rule a block matched, such as `Data Exfiltration`."
          },
          "stage": {
            "type": "string",
            "description": "Which check decided: `fast` (first pass), `careful` (second pass),\n`paused` (too many blocks, handed to a person) or `unavailable`\n(no reviewer answer, handed to a person)."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The reviewed call's id."
          },
          "tool_name": {
            "type": "string",
            "description": "The tool the call targeted."
          },
          "turn_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Turn the call belongs to, when the host knows it.",
            "example": "turn_01933b5a00007000800000000000001"
          },
          "verdict": {
            "type": "string",
            "description": "`allowed`, `blocked` or `asked_person`."
          }
        }
      },
      "ToolRuleAction": {
        "type": "string",
        "description": "What a rule does with a matching tool call.",
        "enum": [
          "allow",
          "ask",
          "never"
        ]
      },
      "ToolStartedData": {
        "type": "object",
        "description": "Data for tool.started event",
        "required": [
          "tool_call"
        ],
        "properties": {
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for UI rendering"
          },
          "narration": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable narration for timeline rendering"
          },
          "side_effect_class": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SideEffectClass",
                "description": "How many times the call may safely run, from its tool's definition;\n`None` when the tool is unknown. A host stores the `tool.started` of\nan `AtMostOnce` call before the tool runs, so a log without it proves\nthe call never ran and resume may run it."
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_call": {
            "$ref": "#/components/schemas/ToolCall",
            "description": "The tool call being executed"
          },
          "tool_call_fingerprint": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable fingerprint of tool name + normalized arguments."
          }
        }
      },
      "TopUpRequest": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "description": "Amount credited back to the budget balance."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages."
          }
        }
      },
      "TraceBatch": {
        "type": "object",
        "description": "Consecutive calls of one tool, folded.",
        "required": [
          "turn",
          "name",
          "first_step",
          "last_step",
          "count",
          "succeeded",
          "failed",
          "running",
          "started_at",
          "offset_ms",
          "failures"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Calls in the batch.",
            "example": 60
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "description": "Calls that failed.",
            "example": 2
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            },
            "description": "The first failed calls, at most 20; page the rest with the steps list."
          },
          "first_step": {
            "type": "integer",
            "format": "int32",
            "description": "First step number in the batch.",
            "example": 4
          },
          "last_step": {
            "type": "integer",
            "format": "int32",
            "description": "Last step number in the batch.",
            "example": 63
          },
          "name": {
            "type": "string",
            "description": "Tool name shared by every call.",
            "example": "web_fetch"
          },
          "offset_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Start relative to the turn's start."
          },
          "p50_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Median call duration.",
            "example": 410
          },
          "p95_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "95th percentile call duration.",
            "example": 1830
          },
          "running": {
            "type": "integer",
            "format": "int64",
            "description": "Calls still running.",
            "example": 0
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the first call started."
          },
          "succeeded": {
            "type": "integer",
            "format": "int64",
            "description": "Calls that succeeded.",
            "example": 58
          },
          "turn": {
            "type": "integer",
            "format": "int32",
            "description": "Turn the batch belongs to."
          },
          "wall_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "From the first start to the last end."
          }
        }
      },
      "TraceBucket": {
        "type": "object",
        "description": "A range of turns on the minimap.",
        "required": [
          "from_turn",
          "to_turn",
          "steps",
          "duration_ms",
          "errors"
        ],
        "properties": {
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Summed turn durations.",
            "example": 421000
          },
          "errors": {
            "type": "integer",
            "format": "int64",
            "description": "Failed steps and turns in the bucket.",
            "example": 2
          },
          "from_turn": {
            "type": "integer",
            "format": "int32",
            "description": "First turn in the bucket.",
            "example": 1
          },
          "steps": {
            "type": "integer",
            "format": "int64",
            "description": "Steps across the bucket's turns.",
            "example": 142
          },
          "to_turn": {
            "type": "integer",
            "format": "int32",
            "description": "Last turn in the bucket.",
            "example": 10
          }
        }
      },
      "TraceCacheReset": {
        "type": "object",
        "description": "A prompt-cache reset: the cache read fell to under half of what the\nprevious model call left cached.",
        "required": [
          "previous_cached_tokens",
          "lost_tokens",
          "reason",
          "idle_seconds"
        ],
        "properties": {
          "idle_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds between the end of the previous call and the start of this one.",
            "example": 42
          },
          "lost_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "How many of those this call did not read back.",
            "example": 18420
          },
          "previous_cached_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Prompt tokens the previous call left in the cache (read plus written).",
            "example": 18420
          },
          "reason": {
            "type": "string",
            "description": "Likely cause, the first difference found: `model_changed`,\n`tools_changed`, `system_changed`, `history_changed`, `expired` (idle\nlonger than the cache retention), or `unknown`.",
            "example": "tools_changed"
          }
        }
      },
      "TraceEventRef": {
        "type": "object",
        "description": "An event in the session log.",
        "required": [
          "id",
          "sequence",
          "type",
          "ts",
          "size_bytes"
        ],
        "properties": {
          "data": {
            "description": "Payload, when small enough to inline."
          },
          "id": {
            "type": "string",
            "description": "Event identifier.",
            "example": "event_01a124cd8a1b7f02a5c4e6d1b2f3a4c5"
          },
          "sequence": {
            "type": "integer",
            "format": "int32",
            "description": "Sequence in the session event log.",
            "example": 14
          },
          "size_bytes": {
            "type": "integer",
            "format": "int32",
            "description": "Size of the serialized payload.",
            "example": 512
          },
          "ts": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened."
          },
          "type": {
            "type": "string",
            "description": "Event type, such as `tool.call_completed`.",
            "example": "tool.started"
          }
        }
      },
      "TraceEventsPage": {
        "type": "object",
        "description": "Events of a turn, for the lifecycle rows.",
        "required": [
          "events"
        ],
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceEventRef"
            },
            "description": "Events in sequence order."
          },
          "next_after_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Sequence to continue after, when more remain.",
            "example": 31
          }
        }
      },
      "TraceGap": {
        "type": "object",
        "description": "Steps of a long turn not returned inline.",
        "required": [
          "turn",
          "first_step",
          "last_step",
          "count",
          "errors"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Steps not returned.",
            "example": 376
          },
          "errors": {
            "type": "integer",
            "format": "int64",
            "description": "Failed steps among them.",
            "example": 4
          },
          "first_step": {
            "type": "integer",
            "format": "int32",
            "description": "First step number not returned.",
            "example": 13
          },
          "last_step": {
            "type": "integer",
            "format": "int32",
            "description": "Last step number not returned.",
            "example": 388
          },
          "turn": {
            "type": "integer",
            "format": "int32",
            "description": "Turn the gap belongs to."
          }
        }
      },
      "TraceItem": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TraceStep"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "step"
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TraceBatch"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "batch"
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TraceGap"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "gap"
                    ]
                  }
                }
              }
            ]
          }
        ],
        "description": "One row of a turn."
      },
      "TraceOverview": {
        "type": "object",
        "description": "Session-wide trace summary and minimap.",
        "required": [
          "turn_count",
          "step_count",
          "error_count",
          "input_tokens",
          "output_tokens",
          "bucket_size",
          "buckets",
          "error_turns"
        ],
        "properties": {
          "bucket_size": {
            "type": "integer",
            "format": "int32",
            "description": "Turns per minimap bucket.",
            "example": 10
          },
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceBucket"
            },
            "description": "Minimap buckets in turn order."
          },
          "error_count": {
            "type": "integer",
            "format": "int64",
            "description": "Steps and turns that failed, across the session.",
            "example": 27
          },
          "error_turns": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Turns with errors, newest first, at most 500."
          },
          "first_started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start of the first turn."
          },
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Prompt tokens across all model calls.",
            "example": 4812330
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Latest start or end of any turn."
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Completion tokens across all model calls.",
            "example": 91204
          },
          "step_count": {
            "type": "integer",
            "format": "int64",
            "description": "Steps across all turns.",
            "example": 18311
          },
          "turn_count": {
            "type": "integer",
            "format": "int64",
            "description": "Turns in the session.",
            "example": 1240
          }
        }
      },
      "TracePayload": {
        "type": "object",
        "description": "A JSON payload, cut when over the inline limit.",
        "required": [
          "size_bytes",
          "truncated"
        ],
        "properties": {
          "preview": {
            "type": [
              "string",
              "null"
            ],
            "description": "The first part of the serialized value, when it was cut."
          },
          "size_bytes": {
            "type": "integer",
            "description": "Size of the serialized value.",
            "example": 221,
            "minimum": 0
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether the value was cut to `preview`.",
            "example": false
          },
          "value": {
            "description": "The value, when it fits or `full` was asked for."
          }
        }
      },
      "TraceProvider": {
        "type": "string",
        "description": "Receiver protocol used for customer trace delivery.",
        "enum": [
          "braintrust",
          "langfuse",
          "langsmith",
          "otlp"
        ]
      },
      "TraceRequestMessage": {
        "type": "object",
        "description": "One message of a model request.",
        "required": [
          "index",
          "role",
          "preview",
          "size_bytes"
        ],
        "properties": {
          "content": {
            "description": "The whole message, when asked for and within the limit."
          },
          "index": {
            "type": "integer",
            "format": "int32",
            "description": "Position in the request.",
            "example": 12
          },
          "preview": {
            "type": "string",
            "description": "Start of the message text."
          },
          "role": {
            "type": "string",
            "description": "Role as handed to the provider driver: `system`, `user`, `assistant`\nor `tool`. Stored messages say `agent` and `tool_result`; each driver\nthen maps these four onto its own wire format.",
            "example": "tool"
          },
          "size_bytes": {
            "type": "integer",
            "description": "Size of the serialized message.",
            "example": 244,
            "minimum": 0
          }
        }
      },
      "TraceRequestPage": {
        "type": "object",
        "description": "A page of a model request's messages.",
        "required": [
          "message_count",
          "new_from",
          "messages",
          "tools",
          "has_native_request"
        ],
        "properties": {
          "has_native_request": {
            "type": "boolean",
            "description": "Whether the provider request body was recorded for this call.",
            "example": true
          },
          "message_count": {
            "type": "integer",
            "format": "int32",
            "description": "Messages sent in the call.",
            "example": 14
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceRequestMessage"
            },
            "description": "Requested messages, in order."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model that served the call."
          },
          "native_request": {
            "description": "The request body exactly as the driver sent it to the provider, with\ninline media and reasoning replay state replaced; only when asked for\nwith `native`, on the first page."
          },
          "new_from": {
            "type": "integer",
            "format": "int32",
            "description": "Messages before this index were already in the previous call.",
            "example": 12
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider that served the call.",
            "example": "openrouter"
          },
          "request_options": {
            "description": "Request options sent with the call (temperature, caching, ...); on\nthe first page only."
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceRequestTool"
            },
            "description": "Tools offered in the call; on the first page only."
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TraceRequestUsage",
                "description": "Token usage of the call, split by prompt cache."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TraceRequestSummary": {
        "type": "object",
        "description": "What one model call was sent.",
        "required": [
          "message_count",
          "new_from",
          "tool_count",
          "new_messages"
        ],
        "properties": {
          "message_count": {
            "type": "integer",
            "format": "int32",
            "description": "Messages sent in the call.",
            "example": 14
          },
          "new_from": {
            "type": "integer",
            "format": "int32",
            "description": "Messages before this index were already in the previous call.",
            "example": 12
          },
          "new_messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceRequestMessage"
            },
            "description": "The new messages, at most 50."
          },
          "system_index": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Position of the system message in the full request."
          },
          "system_preview": {
            "type": [
              "string",
              "null"
            ],
            "description": "Start of the system prompt."
          },
          "tool_changes": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TraceToolChanges",
                "description": "How the call's tool list changed; absent when it did not."
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_count": {
            "type": "integer",
            "format": "int32",
            "description": "Tools offered in the call.",
            "example": 9
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TraceRequestUsage",
                "description": "Token usage of the call, split by prompt cache."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TraceRequestTool": {
        "type": "object",
        "description": "A tool offered to a model call.",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tool description the model sees.",
            "example": "Read a file from the workspace."
          },
          "name": {
            "type": "string",
            "description": "Tool name the model sees.",
            "example": "read_file"
          }
        }
      },
      "TraceRequestUsage": {
        "type": "object",
        "description": "Prompt and completion tokens of one model call, with the prompt split the\nway providers bill it: read from cache, written to cache, and uncached.",
        "required": [
          "input_tokens",
          "cache_read_tokens",
          "cache_creation_tokens",
          "output_tokens"
        ],
        "properties": {
          "cache_creation_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Prompt tokens written to the provider's cache.",
            "example": 0
          },
          "cache_read_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Prompt tokens read from the provider's cache.",
            "example": 12529
          },
          "cache_reset": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TraceCacheReset",
                "description": "Set when this call lost most of the prompt prefix the previous model\ncall had cached."
              },
              {
                "type": "null"
              }
            ]
          },
          "cached_through": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Estimated index of the last message inside the cached prefix: the\ncache-read share of the prompt laid over the messages by size. `-1`\nwhen only the tools fit; absent when nothing was read from cache.",
            "example": 11
          },
          "caching_would_help": {
            "type": "boolean",
            "description": "A long prompt sent with caching off that neither read nor wrote the\ncache: turning on prompt caching would likely make calls like it\ncheaper."
          },
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Prompt tokens neither read from nor written to the cache.",
            "example": 10295
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Completion tokens.",
            "example": 197
          },
          "prompt_cache": {
            "type": [
              "string",
              "null"
            ],
            "description": "How prompt caching was requested, such as `auto` or\n`anthropic_cache_control`; absent when caching was off.",
            "example": "auto"
          }
        }
      },
      "TraceScore": {
        "type": "object",
        "description": "One score produced by an observer scorer for one trace slice. Linked back\nto the exact session/turn it graded; agent/harness identifiers are\ndenormalized at scoring time for aggregation.",
        "required": [
          "id",
          "observer_id",
          "scorer_key",
          "session_id",
          "turn_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent active in the session at scoring time."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error details if errored."
          },
          "evidence_ref": {
            "description": "Bounded runtime metadata and source-event references for system checks."
          },
          "harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Harness of the session."
          },
          "id": {
            "type": "string",
            "description": "External identifier (score_<32-hex>). Shown as \"id\" in API.",
            "example": "score_01933b5a000070008000000000000001"
          },
          "judge_cost_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Judge call cost in USD when the provider reports it (llm_judge only)."
          },
          "judge_input_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Judge LLM input tokens (llm_judge scores only).",
            "minimum": 0
          },
          "judge_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Judge LLM output tokens (llm_judge scores only).",
            "minimum": 0
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional categorical label from an LLM judge (e.g. `missing_source`)."
          },
          "observer_id": {
            "type": "string",
            "description": "Observer that produced this score.",
            "example": "observer_01933b5a000070008000000000000001"
          },
          "pass": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the scorer passed (set when completed)."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable explanation (set when completed). For LLM judges this is\nthe judge's reasoning — retained as the raw material for the Phase 2\nimprovement loop."
          },
          "review": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScoreReview",
                "description": "A person's review of this score."
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/ObserverScope",
            "description": "Trace slice this score grades."
          },
          "scorer_key": {
            "type": "string",
            "description": "Scorer key within the observer.",
            "example": "grounded"
          },
          "session_id": {
            "type": "string",
            "description": "Session this score grades.",
            "example": "session_01933b5a000070008000000000000001"
          },
          "status": {
            "$ref": "#/components/schemas/TraceScoreStatus"
          },
          "turn_id": {
            "type": "string",
            "description": "What was graded: the turn id (turn scope), `session` (session scope)\nor the tool call id (tool scope)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "value": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Score value 0.0–1.0 (set when completed).",
            "example": 0.85
          }
        }
      },
      "TraceScoreStatus": {
        "type": "string",
        "description": "Lifecycle of one trace score. `pending` rows double as the scoring queue.",
        "enum": [
          "pending",
          "scoring",
          "completed",
          "errored",
          "skipped"
        ]
      },
      "TraceSecrets": {
        "type": "object",
        "description": "Write-only receiver authentication, encrypted at rest and never returned.",
        "properties": {
          "headers": {
            "type": "object",
            "description": "Authentication headers: Authorization, X-API-Key, or Api-Key. Values are write-only.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "TraceStep": {
        "type": "object",
        "description": "A model call, tool call, approval, sub-agent or message. Empty fields are\nleft out: a page carries hundreds of these.",
        "required": [
          "turn",
          "step",
          "kind",
          "status",
          "started_at",
          "offset_ms",
          "start_sequence"
        ],
        "properties": {
          "child_session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session a `spawn_agent` call started."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Wall time of the step; absent while running.",
            "example": 269
          },
          "end_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Last event sequence of the step.",
            "example": 21
          },
          "input_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Prompt tokens of a model call."
          },
          "kind": {
            "type": "string",
            "description": "`model`, `answer`, `tool`, `approval`, `agent` or `send`.",
            "example": "tool"
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model that served the call, for model steps.",
            "example": "gpt-6.2-sol"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tool name, or model for model calls.",
            "example": "bash"
          },
          "narration": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the model said alongside this call (model calls and answers)."
          },
          "offset_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Start relative to the turn's start.",
            "example": 3010
          },
          "output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Completion tokens of a model call."
          },
          "requested_tool_call_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tool calls this model call asked for."
          },
          "result": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short result or error."
          },
          "retry_attempts": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Retries a model call made before it succeeded or gave up.",
            "example": 3
          },
          "retry_wait_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Time spent waiting between those retries.",
            "example": 42000
          },
          "start_sequence": {
            "type": "integer",
            "format": "int32",
            "description": "First event sequence of the step.",
            "example": 14
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the step started."
          },
          "status": {
            "type": "string",
            "description": "`running`, `success`, `error` or `cancelled`.",
            "example": "success"
          },
          "step": {
            "type": "integer",
            "format": "int32",
            "description": "Per-turn step number, 1-based.",
            "example": 2
          },
          "target": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the call acted on, from the tool's narration."
          },
          "tool_call_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tool call identifier, for tool steps.",
            "example": "call_PzDcvnFaUll8os3tPhWj"
          },
          "turn": {
            "type": "integer",
            "format": "int32",
            "description": "Turn the step belongs to.",
            "example": 1240
          }
        }
      },
      "TraceStepDetail": {
        "type": "object",
        "description": "Everything about one step, for the inspector.",
        "required": [
          "step",
          "events"
        ],
        "properties": {
          "command_outcome": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CommandOutcome",
                "description": "Exit outcome for a completed shell command, independent of tool status."
              },
              {
                "type": "null"
              }
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceEventRef"
            },
            "description": "Raw events of the step, in sequence order."
          },
          "input": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TracePayload",
                "description": "Tool arguments."
              },
              {
                "type": "null"
              }
            ]
          },
          "output": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TracePayload",
                "description": "Tool result, or error."
              },
              {
                "type": "null"
              }
            ]
          },
          "request": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TraceRequestSummary",
                "description": "The request of a model call: what changed since the previous call."
              },
              {
                "type": "null"
              }
            ]
          },
          "step": {
            "$ref": "#/components/schemas/TraceStep",
            "description": "The step itself."
          }
        }
      },
      "TraceStepsPage": {
        "type": "object",
        "description": "A page of plain steps of one turn.",
        "required": [
          "steps"
        ],
        "properties": {
          "next_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Step number to continue from, when more remain in the range.",
            "example": 101
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            },
            "description": "Steps in step order."
          }
        }
      },
      "TraceToolChanges": {
        "type": "object",
        "description": "A tool change recorded for one model call. Models that take changes\ninline keep the request's tool list fixed and receive these as messages;\nothers get the new tool list.",
        "required": [
          "added",
          "redefined",
          "removed"
        ],
        "properties": {
          "added": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tools that became callable."
          },
          "baseline_tools": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Tools fixed when this call started a new tool epoch (the first call, or\nthe first after a model switch or compaction).",
            "example": 9
          },
          "redefined": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tools whose definition changed, such as a searched tool's full schema."
          },
          "removed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tools no longer callable."
          }
        }
      },
      "TraceTurn": {
        "type": "object",
        "description": "One turn: what the user asked, how it went, and what happened.",
        "required": [
          "turn",
          "turn_id",
          "status",
          "started_at",
          "step_count",
          "model_calls",
          "tool_calls",
          "subagent_calls",
          "error_count",
          "input_tokens",
          "output_tokens",
          "start_sequence",
          "items"
        ],
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Wall time of the turn.",
            "example": 4998
          },
          "end_sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Last event sequence of the turn; absent while running.",
            "example": 31
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the turn ended; absent while running."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the turn failed, when it did."
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Classified failure (`provider_quota_exhausted`, `provider_rate_limited`,\n`provider_unavailable`, ...), when the turn failed with one.",
            "example": "provider_quota_exhausted"
          },
          "error_count": {
            "type": "integer",
            "format": "int32",
            "description": "Failed steps in the turn.",
            "example": 0
          },
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Prompt tokens across the turn's model calls.",
            "example": 4210
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceItem"
            },
            "description": "Steps, with repeated calls folded into batches and the middle of very\nlong turns folded into a gap."
          },
          "model_calls": {
            "type": "integer",
            "format": "int32",
            "description": "Model calls in the turn.",
            "example": 2
          },
          "origin": {
            "type": [
              "object",
              "null"
            ],
            "description": "Who wrote the input when no person did: `kind` (`schedule`,\n`agent_trigger`, `channel_schedule`, `webhook`, `task_wake`, `system`),\nand when known `source_id`, `name` and `run` (`number`, `limit`,\n`ends_at`, `stop_when`). Absent when a person started the turn."
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Completion tokens across the turn's model calls.",
            "example": 129
          },
          "prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user message that started the turn.",
            "example": "Check the links on the docs site"
          },
          "start_sequence": {
            "type": "integer",
            "format": "int32",
            "description": "First and last event sequence of the turn, for links into Events.",
            "example": 12
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the turn started."
          },
          "status": {
            "type": "string",
            "description": "`running`, `completed`, `failed`, `cancelled` or `sealed`.",
            "example": "completed"
          },
          "step_count": {
            "type": "integer",
            "format": "int32",
            "description": "Steps in the turn.",
            "example": 3
          },
          "subagent_calls": {
            "type": "integer",
            "format": "int32",
            "description": "Sub-agent calls in the turn.",
            "example": 0
          },
          "tool_calls": {
            "type": "integer",
            "format": "int32",
            "description": "Tool calls in the turn.",
            "example": 1
          },
          "turn": {
            "type": "integer",
            "format": "int32",
            "description": "Per-session turn number, 1-based.",
            "example": 1240
          },
          "turn_id": {
            "type": "string",
            "description": "Public turn identifier.",
            "example": "turn_01a124cd7e9571ac95c312b3c6d0cd82"
          }
        }
      },
      "TraceTurnInput": {
        "type": "object",
        "description": "Full text recorded when a trace turn starts.",
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "The recorded input, when present."
          }
        }
      },
      "TraceTurnsPage": {
        "type": "object",
        "description": "A page of turns with their steps.",
        "required": [
          "turns",
          "has_earlier",
          "has_later",
          "turn_count"
        ],
        "properties": {
          "has_earlier": {
            "type": "boolean",
            "description": "Turns exist before the first one returned.",
            "example": true
          },
          "has_later": {
            "type": "boolean",
            "description": "Turns exist after the last one returned.",
            "example": false
          },
          "turn_count": {
            "type": "integer",
            "format": "int64",
            "description": "Turns in the session.",
            "example": 1240
          },
          "turns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceTurn"
            },
            "description": "Turns in turn order."
          }
        }
      },
      "TracingDestinationMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DestinationConfig",
            "description": "Non-secret destination settings, including capture consent and pause state."
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Destination identifier owned by the current organization.",
                "example": "00000000-0000-0000-0000-000000000001"
              }
            }
          }
        ],
        "description": "Safe destination settings used by native reads and change history."
      },
      "TracingPolicyMetadata": {
        "type": "object",
        "description": "Safe organization or agent routing metadata returned by native commands.",
        "required": [
          "id",
          "mode",
          "destination_ids"
        ],
        "properties": {
          "destination_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Distinct destination identifiers from this organization; at most eight selections."
          },
          "id": {
            "type": "string",
            "description": "Organization public ID or agent public ID whose routing policy is selected.",
            "example": "agent_01933b5a000070008000000000000001"
          },
          "mode": {
            "$ref": "#/components/schemas/RoutingMode",
            "description": "Use organization defaults, add selections, replace defaults, or disable customer exports."
          }
        }
      },
      "TracingPolicyView": {
        "type": "object",
        "description": "Current routing policy and the revision required for a guarded save.",
        "required": [
          "policy",
          "revision"
        ],
        "properties": {
          "policy": {
            "$ref": "#/components/schemas/RoutingPolicy",
            "description": "Routing mode and the organization-owned destination selections to save."
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "Current revision used to reject stale saves and deletes.",
            "example": 1
          }
        }
      },
      "TranscriptRepairAction": {
        "type": "string",
        "description": "Action taken during transcript repair for a dangling tool call.",
        "enum": [
          "replay",
          "synthesize"
        ]
      },
      "TranscriptRepairedData": {
        "type": "object",
        "description": "Data for transcript.repaired event (EVE-533).\n\nEmitted once per dangling tool call when transcript repair runs before a `reason` call.\nA dangling call is an assistant `tool_call` with no matching `ToolResult` in the\nmessage history. Repair makes the transcript well-formed so the next LLM call succeeds.",
        "required": [
          "tool_call_id",
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/TranscriptRepairAction",
            "description": "Action taken: `replay` (settled result reused) or `synthesize` (interrupted placeholder added)."
          },
          "tool_call_id": {
            "type": "string",
            "description": "The tool call ID that was repaired."
          },
          "tool_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tool name, if known."
          }
        }
      },
      "TriggerAgentChannelOutput": {
        "type": "object",
        "description": "Result of running an Agent schedule channel immediately.",
        "required": [
          "session_id",
          "created_session"
        ],
        "properties": {
          "created_session": {
            "type": "boolean",
            "description": "Whether the invocation created a new session."
          },
          "session_id": {
            "$ref": "#/components/schemas/sessionId",
            "description": "Session started or reused by the invocation."
          }
        }
      },
      "TriggerAgentEndpointOutput": {
        "type": "object",
        "description": "Result of running an Agent schedule channel immediately.",
        "required": [
          "session_id",
          "created_session"
        ],
        "properties": {
          "created_session": {
            "type": "boolean",
            "description": "Whether the invocation created a new session."
          },
          "session_id": {
            "$ref": "#/components/schemas/sessionId",
            "description": "Session started or reused by the invocation."
          }
        }
      },
      "TriggerAgentTriggerOutput": {
        "type": "object",
        "required": [
          "status",
          "created_session"
        ],
        "properties": {
          "created_session": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a filtered or duplicate event did not run."
          },
          "session_id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/sessionId",
                "description": "Session's prefixed public identifier; absent when nothing ran."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ManualFireStatus",
            "description": "`filtered` and `duplicate` happen only for a fire with an event."
          }
        }
      },
      "TriggerChangesOnly": {
        "type": "object",
        "description": "\"Only when it changes\": the trigger remembers the last value at `path` per\nevent subject and filters out events that repeat it. The first event for a\nsubject only records its value, and an event with no value there (a\ncancelled CI run has no outcome) is filtered without touching the record.",
        "required": [
          "path"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Dotted path into the event context, e.g. `github.ci.outcome`."
          }
        }
      },
      "TriggerDeliveryStatus": {
        "type": "string",
        "description": "What happened to one event delivered to a trigger.",
        "enum": [
          "dispatched",
          "filtered",
          "duplicate",
          "failed"
        ]
      },
      "TriggerEventFilter": {
        "type": "object",
        "description": "Conditions an incoming event must satisfy before a trigger runs.\n\nEvery condition must hold. A condition reads one dotted path of the event's\ntemplate context (`payload.action`, `event.type`, ...) and passes when the\nvalue there equals any of `any_of`. Events that do not match are recorded as\n`filtered` deliveries and start no session.",
        "properties": {
          "changes_only": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TriggerChangesOnly",
                "description": "Pass only events whose value at a path differs from the last one seen\nfor the same subject, such as a CI outcome flipping between `success`\nand `failure`."
              },
              {
                "type": "null"
              }
            ]
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TriggerFilterCondition"
            },
            "description": "Conditions that must all hold."
          }
        }
      },
      "TriggerFilterCondition": {
        "type": "object",
        "description": "One filter condition: the value at `path` must equal one of `any_of`.",
        "required": [
          "path",
          "any_of"
        ],
        "properties": {
          "any_of": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Accepted values. Strings compare exactly; other JSON values compare by\nequality."
          },
          "path": {
            "type": "string",
            "description": "Dotted path into the event context, e.g. `payload.action`."
          }
        }
      },
      "TriggerResponse": {
        "type": "object",
        "description": "Manual trigger response",
        "required": [
          "execution_id"
        ],
        "properties": {
          "execution_id": {
            "type": "string",
            "format": "uuid",
            "description": "Schedule execution's identifier."
          }
        }
      },
      "TurnCancelledData": {
        "type": "object",
        "description": "Data for turn.cancelled event",
        "required": [
          "turn_id"
        ],
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason for cancellation"
          },
          "turn_id": {
            "type": "string",
            "description": "Turn identifier",
            "example": "turn_01933b5a00007000800000000000001"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Token usage before cancellation (if available)"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TurnCompletedData": {
        "type": "object",
        "description": "Data for turn.completed event",
        "required": [
          "turn_id",
          "iterations"
        ],
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Duration in milliseconds",
            "minimum": 0
          },
          "final_answer_preview": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bounded preview of the final visible assistant answer."
          },
          "final_message_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Canonical assistant message emitted by `output.message.completed`.",
            "example": "message_01933b5a00007000800000000000001"
          },
          "input_content": {
            "type": [
              "string",
              "null"
            ],
            "description": "Input message content (for observability, passed through from turn.started)"
          },
          "issue_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of issues the turn recovered from: tool calls the runtime ran\nthat failed and went back to the model as results. A completed turn\nwith issues still succeeded; a turn that stops on a failure emits\n`turn.failed` instead. Absent when the host does not track it.",
            "minimum": 0
          },
          "iterations": {
            "type": "integer",
            "format": "int32",
            "description": "Number of iterations in this turn",
            "minimum": 0
          },
          "llm_call_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of LLM generation calls executed during the turn.",
            "minimum": 0
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional explicit completion status for consumers that summarize turns."
          },
          "stop_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Normalized finish reason of the turn's final LLM generation (`stop`,\n`length`, `content_filter`, `refusal`, ...). A turn that \"completed\" on\n`length` ended because the model ran out of output budget, not because\nit was done. `None` when the provider reported no reason.",
            "example": "stop"
          },
          "termination_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TurnStopReason",
                "description": "Provider-neutral reason execution ended. Persisted with termination so\nhosts can recover the same outcome after losing their in-memory result."
              },
              {
                "type": "null"
              }
            ]
          },
          "time_to_first_token_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "First-token latency for the turn, usually from the first LLM generation.",
            "minimum": 0
          },
          "tool_call_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of tool calls completed during the turn.",
            "minimum": 0
          },
          "turn_id": {
            "type": "string",
            "description": "Turn identifier",
            "example": "turn_01933b5a00007000800000000000001"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Aggregated token usage for all LLM calls in this turn"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TurnCompletionCheckedData": {
        "type": "object",
        "description": "Data for turn.completion_checked event.\n\nA turn about to finish was reviewed for whether it did what was asked\n(the agent's `completion_check` setting). One event per check, emitted\nbefore the continuation input it may add.",
        "required": [
          "turn_id",
          "reason",
          "action",
          "continuations_used",
          "max_continuations",
          "tokens_used",
          "elapsed_ms"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/CompletionCheckAction",
            "description": "What the runtime did next."
          },
          "continuation_message_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The automatic continuation input, when one was added.",
            "example": "message_01933b5a00007000800000000000001"
          },
          "continuations_used": {
            "type": "integer",
            "format": "int32",
            "description": "Automatic continuations this turn has used, this one included.",
            "minimum": 0
          },
          "elapsed_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Milliseconds since the turn's first automatic continuation.",
            "minimum": 0
          },
          "max_continuations": {
            "type": "integer",
            "format": "int32",
            "description": "Most automatic continuations one turn may use.",
            "minimum": 0
          },
          "reason": {
            "type": "string",
            "description": "The review's short explanation, or why the review failed."
          },
          "tokens_used": {
            "type": "integer",
            "format": "int64",
            "description": "Tokens the turn spent since its first automatic continuation.",
            "minimum": 0
          },
          "turn_id": {
            "type": "string",
            "description": "Turn identifier",
            "example": "turn_01933b5a00007000800000000000001"
          },
          "verdict": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CompletionVerdict",
                "description": "The review's verdict. Absent when the review failed."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TurnCreditShortfallData": {
        "type": "object",
        "description": "Data for turn.credit_shortfall event.\n\nThe provider refused a request because the account could not pay for it.\nOne event per decision: a smaller retry, the start of a wait, each check\nduring it, the resume, and giving up.",
        "required": [
          "turn_id",
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/CreditShortfallAction",
            "description": "What the runtime did."
          },
          "affordable_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Output tokens the balance covered, when the provider said.",
            "example": 283,
            "minimum": 0
          },
          "balance_checked": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the provider's balance was read (without spending tokens).\n`false`: the provider has no balance API and the request itself is\nthe check.",
            "example": true
          },
          "max_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Max output tokens of the smaller retry (`shrunk` only).",
            "example": 7680,
            "minimum": 0
          },
          "next_check_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the next check runs, when one was scheduled.",
            "example": "2026-11-03T07:01:00Z"
          },
          "requested_max_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Max output tokens the refused request asked for, when the provider said.",
            "example": 65536,
            "minimum": 0
          },
          "turn_id": {
            "type": "string",
            "description": "Turn identifier",
            "example": "turn_01933b5a00007000800000000000001"
          },
          "wait_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the wait for credits ends at the latest.",
            "example": "2026-11-03T08:00:00Z"
          }
        }
      },
      "TurnFailedData": {
        "type": "object",
        "description": "Data for turn.failed event. A failed turn is always an error (severity\n`error`): the work stopped. Recoverable tool failures never produce this\nevent; they surface as `tool.completed` issues.",
        "required": [
          "turn_id",
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error code"
          },
          "error_disclosure": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error-disclosure mode applied to `error_code`/`error_fields`\n(\"generic\" | \"standard\" | \"detailed\"). Full diagnostic detail remains\navailable to operators via reason.completed failure events and tracing."
          },
          "error_fields": {
            "type": [
              "object",
              "null"
            ],
            "description": "Structured interpolation fields for localized error rendering."
          },
          "turn_id": {
            "type": "string",
            "description": "Turn identifier",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "TurnSealedData": {
        "type": "object",
        "description": "Data for turn.sealed event (EVE-534).\n\nA sealed turn was deliberately stopped to prevent waste. It is observably\ndistinct from `turn.completed` (success) and `turn.failed` (error). The\n`reason` is the durable engine's stable seal-reason wire value.\n(`\"no_progress\"` or `\"budget\"`).",
        "required": [
          "turn_id",
          "reason"
        ],
        "properties": {
          "detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable detail for operators (optional)."
          },
          "iterations": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Iterations completed before the turn was sealed (if known).",
            "minimum": 0
          },
          "reason": {
            "type": "string",
            "description": "Why the turn was sealed: `\"no_progress\"` (crash-loop with no forward\nprogress) or `\"budget\"` (work budget exhausted)."
          },
          "turn_id": {
            "type": "string",
            "description": "Turn identifier",
            "example": "turn_01933b5a00007000800000000000001"
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TokenUsage",
                "description": "Aggregated token usage before sealing, if available."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "TurnStartedData": {
        "type": "object",
        "description": "Data for turn.started event",
        "required": [
          "turn_id",
          "input_message_id"
        ],
        "properties": {
          "agent_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent description snapshot at turn start."
          },
          "agent_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent the turn runs as, when the session is bound to one. Carried on\nthe turn root so trace exporters can label the `invoke_agent` span\nwithout a store lookup (the Gen-AI conventions want the agent name in\nthe span name and `gen_ai.agent.*` attributes).",
            "example": "agent_01933b5a00007000800000000000001"
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable agent name snapshot at turn start."
          },
          "input_content": {
            "type": [
              "string",
              "null"
            ],
            "description": "Input message content (for observability)"
          },
          "input_message_id": {
            "type": "string",
            "description": "Input message ID that triggered this turn",
            "example": "message_01933b5a00007000800000000000001"
          },
          "origin": {
            "type": [
              "object",
              "null"
            ],
            "description": "Who wrote the input message when no person did (a schedule run, a\ntrigger, a thread wake-up, a platform notice). Absent when a person\nstarted the turn."
          },
          "turn_id": {
            "type": "string",
            "description": "Turn identifier",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "TurnStopReason": {
        "type": "string",
        "description": "Stable reason a turn stopped, independent of provider-specific strings.",
        "enum": [
          "end_turn",
          "max_tokens",
          "max_turn_requests",
          "refusal",
          "error",
          "cancelled"
        ]
      },
      "TurnWaitResponse": {
        "type": "object",
        "description": "Waited result for `POST /v1/sessions/{session_id}/messages?wait=true`.",
        "required": [
          "status",
          "message",
          "messages"
        ],
        "properties": {
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Turn failure detail when `status` is `failed`.",
            "example": "turn failed: upstream model error"
          },
          "message": {
            "$ref": "#/components/schemas/Message",
            "description": "The accepted user message (same body as the `201` path)."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "description": "Messages appended after the accepted message: assistant output on\ncompletion, whatever exists so far on timeout, empty on failure."
          },
          "status": {
            "$ref": "#/components/schemas/TurnWaitStatus",
            "description": "Wait outcome for the triggered turn."
          }
        }
      },
      "TurnWaitStatus": {
        "type": "string",
        "description": "Terminal-or-pending outcome of a waited turn.",
        "enum": [
          "completed",
          "failed",
          "timeout"
        ],
        "example": "completed"
      },
      "UndoModelSelection": {
        "type": "object",
        "description": "Restore reviewed model selections atomically while their revisions remain current.",
        "required": [
          "changes"
        ],
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UndoModelSelectionItem"
            }
          }
        }
      },
      "UndoModelSelectionItem": {
        "type": "object",
        "description": "A saved model selection change to restore at an expected current revision.",
        "required": [
          "id",
          "from_revision",
          "expected_revision"
        ],
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64"
          },
          "from_revision": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "UpdateAgentChannelRequest": {
        "type": "object",
        "description": "Request to update an ingress channel owned by an Agent.",
        "properties": {
          "channel_config": {
            "description": "Replacement transport-specific channel configuration."
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the channel can accept ingress traffic."
          }
        }
      },
      "UpdateAgentEndpointRequest": {
        "type": "object",
        "description": "Request to update an ingress channel owned by an Agent.",
        "properties": {
          "channel_config": {
            "description": "Replacement transport-specific channel configuration."
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the channel can accept ingress traffic."
          }
        }
      },
      "UpdateAgentRequest": {
        "type": "object",
        "description": "Request to update an agent. Only provided fields will be updated.",
        "properties": {
          "capabilities": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Capabilities to enable for this agent with per-agent configuration.\nReplaces existing capabilities. Each has a `ref` (capability ID) and optional `config`.",
            "example": [
              {
                "config": {},
                "ref": "current_time"
              },
              {
                "config": {},
                "ref": "web_fetch"
              }
            ]
          },
          "communication": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Communication",
                "description": "How the agent talks to people: `direct` or `explicit`. Omit to leave\nunchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "completion_check": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CompletionCheck",
                "description": "When a finishing turn is checked and continued: `off`, `unattended`\nor `always`. Omit to leave unchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The ID of the default LLM model to use for this agent.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "A human-readable description of what the agent does.",
            "example": "Updated description for the agent"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name shown in UI.",
            "example": "Updated Support Agent"
          },
          "harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Harness ID used as this agent's base execution environment. Omit to leave unchanged.",
            "example": "harness_01933b5a00007000800000000000001"
          },
          "harness_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Addressable harness name. Alternative to `harness_id`; omit to leave unchanged.",
            "example": "conversation"
          },
          "initial_files": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Starter files copied into each new session for this agent.",
            "example": [
              {
                "content": "Always respond in formal English.\n",
                "path": "INSTRUCTIONS.md"
              }
            ]
          },
          "intro_markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Markdown intro for fresh Platform Chat threads. Outer `None` leaves\nunchanged; inner `None` clears.",
            "example": "Hey, I'm Ava. Ask me anything about your account."
          },
          "localizations": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EntityLocalizations",
                "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "max_iterations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum number of LLM iterations per turn for this agent.",
            "example": 20,
            "minimum": 0
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Ceiling on output tokens per model response (sent as `max_tokens`).\nOmit to leave unchanged; `null` clears it back to the provider default.",
            "example": 4096,
            "minimum": 1
          },
          "mcpServers": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BTreeMap",
                "description": "Remote MCP servers scoped to this agent."
              },
              {
                "type": "null"
              }
            ]
          },
          "model_preset": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model preset the agent takes its job models from. Null returns to the\norganization defaults; omit to leave unchanged.",
            "example": "provider:gemini"
          },
          "model_role": {
            "type": [
              "string",
              "null"
            ],
            "description": "Follow an organization model instead of pinning one: `research` uses\nthe organization research model and clears `default_model_id`. Null\nstops following it; setting `default_model_id` also clears it."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name, unique per org. Lowercase alphanumeric and hyphens.",
            "example": "updated-support"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list controlling which hosts/URLs this agent's sessions can reach.\nSend `{}` (empty object) to clear restrictions. Omit to leave unchanged.\nExample shape is defined on `NetworkAccessList`."
              },
              {
                "type": "null"
              }
            ]
          },
          "parallel_tool_calls": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Request-level parallel tool calling preference (EVE-598). `true` signals\nthe provider that parallel tool calls are wanted; `false` requests at\nmost one tool call per turn and forces serial execution. Omit to leave\nunchanged.",
            "example": true
          },
          "sandbox_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SandboxPolicy",
                "description": "Replace or clear the Agent's Sandbox policy."
              },
              {
                "type": "null"
              }
            ]
          },
          "service_virtual_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "short_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "One-line description in simplified Markdown. Outer `None` leaves\nunchanged; inner `None` clears.",
            "example": "Answers account questions in seconds."
          },
          "starters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ConversationStarter"
            },
            "description": "Conversation starters as `[{\"text\": \"...\"}]`; omit to keep, `[]` to clear.\nAn optional `icon` reuses the harness icon name set.",
            "example": [
              {
                "text": "Who does the dishes today?"
              }
            ]
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentStatus",
                "description": "The status of the agent. Set to \"archived\" to soft-delete."
              },
              {
                "type": "null"
              }
            ]
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The system prompt that defines the agent's behavior and capabilities.",
            "example": "You are an updated helpful assistant."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing and filtering agents.",
            "example": [
              "updated-tag"
            ]
          },
          "tools": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            },
            "description": "Client-side tools for this agent.\nReplaces existing tools if provided.",
            "example": [
              {
                "description": "Open URL in the user's browser",
                "name": "open_url",
                "parameters": {
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "type": "object"
                },
                "type": "client_side"
              }
            ]
          }
        }
      },
      "UpdateAgentScriptRequest": {
        "type": "object",
        "description": "Request to update a saved script. Only provided fields change; the name is\nimmutable.",
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement script source."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement description."
          },
          "input_schema": {
            "type": [
              "object",
              "null"
            ],
            "description": "Replacement input schema (an object schema)."
          }
        }
      },
      "UpdateAgentTriggerRequest": {
        "type": "object",
        "description": "Request to update a trigger. Only provided fields change; the rest are\npreserved from the stored config.",
        "properties": {
          "auth": {
            "description": "Shared endpoint auth is not supported by webhook triggers."
          },
          "cron_expression": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement cron expression.",
            "example": "0 9 * * 1-5"
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Replacement enabled state.",
            "example": true
          },
          "event_id_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement idempotency-key template. An empty string removes it.",
            "example": "{{webhook.headers.x-github-delivery}}"
          },
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TriggerEventFilter",
                "description": "Replacement filter. A filter with no conditions removes it."
              },
              {
                "type": "null"
              }
            ]
          },
          "github_events": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Replacement GitHub event subscriptions.",
            "example": [
              "pull_request.opened"
            ]
          },
          "mcp_event": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement MCP event name.",
            "example": "issue.created"
          },
          "mcp_event_arguments": {
            "type": [
              "object",
              "null"
            ],
            "description": "Replacement MCP event subscription arguments."
          },
          "mcp_server": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement MCP server attachment name.",
            "example": "tracker"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement message sent when the trigger fires.",
            "example": "Run the daily digest"
          },
          "rate_limit_per_minute": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Replacement per-ingress, per-IP webhook request limit.",
            "example": 60,
            "minimum": 0
          },
          "repositories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Replacement GitHub repository scope. An empty list accepts all.",
            "example": [
              "everruns/everruns"
            ]
          },
          "script": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScriptRun",
                "description": "Replacement saved script. An empty script name removes it, so the\ntrigger asks the model again."
              },
              {
                "type": "null"
              }
            ]
          },
          "session_mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SessionBinding",
                "description": "Replacement session reuse strategy."
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement subject template. An empty string removes it.",
            "example": "{{webhook.json.action}}"
          },
          "target_binding_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement target conversation; given with `target_channel_id`.",
            "example": "slack:user:U0123ABCD"
          },
          "target_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement target channel. An empty string removes the target, so\nruns use a session of the trigger's own again.",
            "example": "appchan_01933b5a000070008000000000000001"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement IANA timezone identifier.",
            "example": "UTC"
          },
          "token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replacement webhook token."
          }
        }
      },
      "UpdateBudgetRequest": {
        "type": "object",
        "description": "Request body for changing a spending budget.",
        "properties": {
          "limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Replacement hard spending ceiling.",
            "example": 150
          },
          "metadata": {
            "description": "Free-form metadata attached to this resource."
          },
          "policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UsagePolicy",
                "description": "Replacement name, steps and filter."
              },
              {
                "type": "null"
              }
            ]
          },
          "soft_limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Replacement soft threshold, or null to remove the threshold."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Current lifecycle status."
          }
        }
      },
      "UpdateCostSettings": {
        "type": "object",
        "properties": {
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "IANA timezone, or null for UTC."
          }
        }
      },
      "UpdateDeclarativeCapabilityRequest": {
        "type": "object",
        "description": "Request body for the `update_declarative_capability` operation.",
        "properties": {
          "definition": {
            "type": "object",
            "description": "Replacement declarative definition. Changing `name` updates the canonical capability ref after uniqueness validation."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional lifecycle state update. Use `disabled` to hide from runtime selection without archiving.",
            "example": "disabled"
          }
        }
      },
      "UpdateEvalCaseRequest": {
        "type": "object",
        "description": "Request to update an eval case",
        "properties": {
          "artifacts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ArtifactSpec"
            },
            "description": "Session files to capture after scoring completes.",
            "example": [
              {
                "name": "patch",
                "path": "/workspace/fix.patch"
              }
            ]
          },
          "conversation": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EvalInputMessage"
            },
            "description": "Input messages sent to the agent sequentially.",
            "example": [
              {
                "content": "Fix the failing test in src/lib.rs"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Agent fixes a failing unit test"
          },
          "max_turns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum agent turns before the case stops.",
            "example": 10,
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "fix-failing-test"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Display order within the eval.",
            "example": 0
          },
          "post": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EvalInputMessage"
            },
            "description": "Verification messages sent after conversation completes.",
            "example": [
              {
                "content": "Run the tests again and report the result"
              }
            ]
          },
          "scorers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Scorer"
            },
            "description": "Scoring rules applied to the case output.",
            "example": [
              {
                "text": "tests pass",
                "type": "contains"
              }
            ]
          },
          "simulated_user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SimulatedUser",
                "description": "Simulated user. `null` removes it, back to scripted messages only."
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Free-form tags attached to this resource.",
            "example": [
              "regression",
              "nightly"
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Optional per-case target override."
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Per-case timeout in seconds.",
            "example": 120,
            "minimum": 0
          },
          "tool_fixtures": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ToolFixture"
            },
            "description": "Tool fixtures, replacing the stored ones. `null` removes them."
          }
        }
      },
      "UpdateEvalRequest": {
        "type": "object",
        "description": "Request to update an eval",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Regression suite for the support agent"
          },
          "model_override": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default model override applied to runs of this eval.",
            "example": "gpt-5.1"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Support agent regression"
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Free-form tags attached to this resource.",
            "example": [
              "regression",
              "nightly"
            ]
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EvalTarget",
                "description": "Session setup target (harness+agent, app, or full session params)."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateEvalResultScoresRequest": {
        "type": "object",
        "description": "Request to write external scores to one eval case result.",
        "required": [
          "scores"
        ],
        "properties": {
          "metadata": {
            "description": "Free-form metadata attached to this resource."
          },
          "scores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Score"
            },
            "description": "Externally computed scores to store on the result."
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExternalScoreStatus",
                "description": "Current lifecycle status."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateFileRequest": {
        "type": "object",
        "description": "Request to update a file",
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "New file content",
            "example": "# Project notes (rev 2)\n\nUpdated migration plan with rollback steps.\n"
          },
          "encoding": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content encoding: \"text\" or \"base64\". Defaults to text.",
            "example": "text"
          },
          "expected_content": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content the file must currently hold for the write to happen.\n\nWhen set, the update is a compare-and-swap: the write lands only if the\nstored bytes equal these, and a mismatch is reported as a conflict\nrather than overwriting a concurrent writer."
          },
          "expected_encoding": {
            "type": [
              "string",
              "null"
            ],
            "description": "Encoding of `expected_content`. Defaults to `text` when omitted."
          },
          "is_readonly": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether file is read-only",
            "example": false
          }
        }
      },
      "UpdateFindingFixRequest": {
        "type": "object",
        "description": "New text for a fix. It must be checked again.",
        "required": [
          "addition"
        ],
        "properties": {
          "addition": {
            "type": "string",
            "description": "The text to add to the agent's instructions."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "One line on what the change does. Unchanged when omitted."
          }
        }
      },
      "UpdateHarnessRequest": {
        "type": "object",
        "description": "Request to update a harness. Only provided fields will be updated.",
        "properties": {
          "capabilities": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityConfig"
            },
            "description": "Replace the capability list entirely; omit to leave unchanged.",
            "example": [
              {
                "config": {},
                "ref": "current_time"
              },
              {
                "config": {},
                "ref": "web_fetch"
              }
            ]
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "New default model selected when sessions inherit from this harness; omit to leave unchanged.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Research harness with web tools"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name.",
            "example": "Updated Research Harness"
          },
          "embedder_metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "Replace the embedder metadata map entirely; omit to leave unchanged.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "initial_files": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/InitialFile"
            },
            "description": "Replace the initial-files list entirely; omit to leave unchanged.",
            "example": [
              {
                "content": "Cite sources verbatim.\n",
                "path": "INSTRUCTIONS.md"
              }
            ]
          },
          "intro_markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Deprecated: configure conversation presentation on the Agent instead.",
            "deprecated": true,
            "example": "I triage incidents, dig through logs, and draft the update."
          },
          "localizations": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EntityLocalizations",
                "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "mcpServers": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BTreeMap",
                "description": "Replace the scoped MCP server set entirely; omit to leave unchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name, unique per org.",
            "example": "updated-research"
          },
          "network_access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NetworkAccessList",
                "description": "Network access list. Send `{}` (empty object) to clear. Omit to leave unchanged.\nExample shape is defined on `NetworkAccessList`."
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "New parent harness for inheritance. Outer `None` leaves unchanged; inner `None` removes inheritance (becomes a root harness)."
          },
          "short_description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Deprecated: configure conversation presentation on the Agent instead.",
            "deprecated": true,
            "example": "Triage incidents, dig through logs, draft the update."
          },
          "starters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ConversationStarter"
            },
            "description": "Deprecated: configure conversation presentation on the Agent instead.",
            "deprecated": true
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HarnessStatus",
                "description": "Current lifecycle status. Example shape is defined on `HarnessStatus`."
              },
              {
                "type": "null"
              }
            ]
          },
          "system_prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "New system prompt the harness contributes to sessions; omit to leave unchanged.",
            "example": "You are a research assistant. Cite sources verbatim."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Replace the tag list entirely; omit to leave unchanged.",
            "example": [
              "research",
              "web-tools"
            ]
          }
        }
      },
      "UpdateInstalledPluginRequest": {
        "type": "object",
        "description": "Request body for updating an installed plugin.",
        "properties": {
          "mcp_server_identities": {
            "type": [
              "object",
              "null"
            ],
            "description": "Explicit acting-identity choices for legacy authenticated MCP servers.\nOnly `user` and `service` are accepted.",
            "additionalProperties": {
              "$ref": "#/components/schemas/McpServerActsAs"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "New lifecycle status: `active` or `disabled`."
          }
        }
      },
      "UpdateMcpServerRequest": {
        "type": "object",
        "description": "Request to update an MCP server. Only provided fields will be updated.",
        "properties": {
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key for authentication. Set to update.",
            "example": "mcp-api-key-redacted-1234567890abcdef"
          },
          "auth_mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerAuthMode",
                "description": "Authentication mode."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "A human-readable description of what the MCP server provides.",
            "example": "Updated description"
          },
          "elicitation_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpElicitationPolicy",
                "description": "Elicitation modes the server may use (`url`, `url_and_form`, `none`)."
              },
              {
                "type": "null"
              }
            ]
          },
          "headers": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional HTTP headers for authentication.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            },
            "example": {
              "X-Atlassian-Cloud-Id": "00000000-0000-0000-0000-000000000000"
            }
          },
          "interactive_views": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpInteractiveViews",
                "description": "Where the server's MCP App views are shown (`on`, `console_only`,\n`off`). Defaults to `on`."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the MCP server.",
            "example": "updated-mcp-server"
          },
          "protocol_mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpProtocolMode",
                "description": "Protocol-era policy (`auto`, `legacy`, `stable`, `rc`)."
              },
              {
                "type": "null"
              }
            ]
          },
          "service_connection_provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Connection provider whose connection on an agent's service virtual user\nsupplies the service credential (`github`). An empty string clears it.",
            "example": "github"
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerStatus",
                "description": "The status of the MCP server. Set to \"disabled\" to disable."
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_timeout_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How long one tool call may take, in milliseconds (1000 to 1800000).\n`0` clears it back to the 60000 default.",
            "example": 300000,
            "minimum": 0
          },
          "transport_type": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerTransportType",
                "description": "Transport type."
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The URL of the MCP server endpoint.",
            "example": "https://mcp.example.com/v1/mcp"
          }
        }
      },
      "UpdateMemoryFileRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ]
          },
          "encoding": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateMemoryRequest": {
        "type": "object",
        "description": "Request body for the `update_memory` operation.",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "design-docs"
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CreateMemorySourceRequest",
                "description": "Source configuration. Example shape is defined on `CreateMemorySourceRequest`."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateModelPresetRequest": {
        "type": "object",
        "description": "Change a custom preset. Omit a field to keep it; null clears a job back to\nthe organization default.",
        "properties": {
          "chat_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for the built-in Everruns Chat."
          },
          "coding_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for coding-harness agents and coding helpers."
          },
          "decision_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for quick gate checks and the Auto helper pick."
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for agents and sessions with no model of their own."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the preset is for."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name."
          },
          "research_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for research-role agents and deep helpers."
          },
          "small_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for titles, summaries and fast helpers."
          }
        }
      },
      "UpdateModelRequest": {
        "type": "object",
        "description": "Request to update an LLM model. Only provided fields will be updated.",
        "properties": {
          "capabilities": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "List of capabilities this model supports.",
            "example": [
              "chat",
              "tools"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable display name for the model.",
            "example": "GPT-4o Mini"
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this model should be enabled (visible in UI model pickers).",
            "example": true
          },
          "is_favorite": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this model should be marked as a favorite for quick access.",
            "example": true
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The model identifier used by the provider's API.",
            "example": "gpt-5.4-mini"
          },
          "profile_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explicitly reassign the stable profile; preference-only edits preserve it."
          },
          "provider_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider that owns this model.",
            "example": "provider_019df670b5af7db7a5685a4ad18a544a"
          },
          "service": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ServiceKind",
                "description": "Change the selected service; it must match the assigned profile."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateObserverRequest": {
        "type": "object",
        "description": "Request to update an observer. Omitted fields are unchanged.",
        "properties": {
          "alert": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ObserverAlert",
                "description": "Pass-rate alert. `null` removes it."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Score replies from the support agent"
          },
          "match": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ObserverMatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Support quality"
          },
          "sampling_rate": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Fraction of matching turns to score (0.0–1.0).",
            "example": 0.5
          },
          "scorers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ObserverScorerConfig"
            }
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ObserverStatus",
                "description": "New lifecycle status (`active`, `paused`, or `archived`)."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateOrgEgressAllowlistGrantRequest": {
        "type": "object",
        "description": "Body of `PUT /v1/orgs/{org}/egress-allowlist/grant`. Omitted fields keep\ntheir current value; at least one is required.",
        "properties": {
          "granted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Allow (`true`) or stop (`false`) this organization extending the\nallowlist. Revoking keeps its patterns but stops enforcing them."
          },
          "open": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Give (`true`) or take back (`false`) open egress: any public host the\ndeny list allows, reads and writes."
          }
        }
      },
      "UpdateOrgEgressAllowlistRequest": {
        "type": "object",
        "description": "Body of `PUT /v1/orgs/{org}/egress-allowlist`.",
        "required": [
          "patterns"
        ],
        "properties": {
          "patterns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The full list of host patterns; replaces the stored list. Blank entries\nare ignored and duplicates collapsed."
          }
        }
      },
      "UpdateOrgFeatureFlagsRequest": {
        "type": "object",
        "required": [
          "flags"
        ],
        "properties": {
          "flags": {
            "type": "object",
            "description": "Map of flag name -> enabled. Omitted flags are unchanged.",
            "additionalProperties": {
              "type": "boolean"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "UpdateOrganizationRequest": {
        "type": "object",
        "description": "Request to update an organization",
        "properties": {
          "agentid_agents_per_owner": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How many agents one AgentID owner may sign in to this organization's\nPublic Chat channels. Pass null to use the platform default (5).",
            "example": 5,
            "minimum": 0
          },
          "background_limits": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BackgroundLimits",
                "description": "Limits on unattended background work; replaces the stored limits as a\nwhole. Omitted fields take the code default. Lifetime is 1 to 7 days,\nruns 1 to 96, budgets positive with the default not above the largest,\nand `org_unattended_daily_usd` positive or null for no daily cap."
              },
              {
                "type": "null"
              }
            ]
          },
          "base_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base harness to use when a session is started without an explicit harness_id.",
            "example": "harness_01933b5a000070008000000000000601"
          },
          "chat_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Independent model for the built-in Everruns Chat. Omit to preserve; null inherits\nthe agents/sessions default. Must be an available shared chat model with tools."
          },
          "coding_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default model for coding work (coding-harness agents and `coding` helpers).\nOmit to preserve; null falls back to the default model."
          },
          "default_harness_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default harness to preselect in the UI for new sessions.\nMutually exclusive with `default_harness_name`.",
            "example": "harness_01933b5a000070008000000000000602"
          },
          "default_harness_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Alternative to `default_harness_id` — looked up by stable name within the org.\nMutually exclusive with `default_harness_id`.",
            "example": "conversation"
          },
          "default_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default LLM model for this organization. Must be enabled; pass null to use the platform\ndefault.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "default_provider_per_service": {
            "type": [
              "object",
              "null"
            ],
            "description": "Org-level default provider per service (EVE-569). Maps a service kind\n(`chat`, `embeddings`, `realtime`, `images`, `rerank`) to the provider id\nused as that service's default, consulted after an explicit binding and\nbefore the single-active-provider fallback. When present it **replaces**\nthe whole map; each referenced provider must exist in the org.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "monthly_agent_limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum agents this organization can create per UTC calendar month.",
            "maximum": 100000,
            "minimum": 1
          },
          "monthly_session_limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Maximum sessions this organization can create per UTC calendar month.",
            "maximum": 100000,
            "minimum": 1
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The display name of the organization.",
            "example": "Acme Corporation"
          },
          "quality_monitoring": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/QualityMonitoringPolicy",
                "description": "Replaces the monitoring policy. Enabling paid checks requires a model\nand a positive daily budget; zero permits mechanical checks only."
              },
              {
                "type": "null"
              }
            ]
          },
          "research_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Research model for agents set to \"Organization research model\". Omit to\npreserve; null returns to Automatic. Must be an enabled shared chat model."
          },
          "self_healing": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SelfHealingPolicy",
                "description": "Self-healing policy; replaces the stored policy as a whole. Omitted\nfields take the code default. `agent_fixes` cannot be `auto`."
              },
              {
                "type": "null"
              }
            ]
          },
          "small_model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shared small chat model for lightweight work. Omit to preserve the selection;\npass null to clear it. Does not change the main chat or decision default."
          },
          "system_decisions": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SystemDecisions",
                "description": "Who answers deployment-owned decision checks (guardrail `jev` checks\nand the Slack relevance check). `organization` uses the org's default\ndecision model (`PUT /v1/models/decision-default`) on its own provider\naccount; when that model is missing or failing, guardrail checks fail\nopen and Slack stays silent, never falling back to the deployment."
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_approval_policy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrgToolApprovalPolicy",
                "description": "Tool approval policy; replaces the stored policy as a whole. Modes are\n`off`, `auto`, `normal` and `protective` (empty allows all), at most 50\nrules and 20 trust notes of up to 1000 bytes."
              },
              {
                "type": "null"
              }
            ]
          },
          "web_search_defaults": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebSearchDefaults",
                "description": "Web search defaults; replaces the stored defaults as a whole. Omitted\nfields take their built-in default. `provider` cannot be\n`org_default`, `account_id` and `automatic_order` entries must name\nthis organization's search accounts, free search is always last in\nthe Automatic order, and `results_per_search` is 1 to 20."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdatePaymentAccountRequest": {
        "type": "object",
        "description": "Request body for the `update_payment_account` operation.",
        "properties": {
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "New label, if changing.",
            "example": "Refund agent · USDC on Base (prod)"
          },
          "metadata": {
            "description": "New free-form metadata. Replaces the existing metadata blob entirely when set.\nExample: `{\"team\": \"support\", \"cost_center\": \"ops-2026\"}`."
          },
          "private_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "New private key material. Set to `Some(...)` to rotate; omit to leave unchanged.\nExample shown as an obvious placeholder — supply a real 32-byte hex value when rotating.",
            "example": "0x<your-32-byte-hex-private-key>"
          },
          "public_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "New public address. The outer `Option` indicates whether to update; the inner allows clearing the field."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "New lifecycle status. Valid values: `active`, `disabled`.",
            "example": "disabled"
          }
        }
      },
      "UpdatePaymentPolicyRequest": {
        "type": "object",
        "description": "Request body for the `update_payment_policy` operation.",
        "properties": {
          "allowed_capabilities": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "New capability allowlist. Outer `None` leaves the field unchanged.",
            "example": [
              "weather.lookup",
              "shipping.quote",
              "currency.convert"
            ]
          },
          "allowed_hosts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "New host allowlist. Outer `None` leaves the field unchanged.",
            "example": [
              "api.shippo.com",
              "api.openweathermap.org",
              "api.exchangerate.host"
            ]
          },
          "max_amount_usd_per_day": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "New per-day cap (USD). Outer `None` leaves the field unchanged; inner `None` clears the cap."
          },
          "max_amount_usd_per_request": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "New per-request cap (USD). **Enforced** by the payment authority. Outer `None` leaves the field unchanged; inner `None` clears the cap."
          },
          "max_amount_usd_per_turn": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "New per-turn cap (USD). Outer `None` leaves the field unchanged; inner `None` clears the cap."
          },
          "metadata": {
            "description": "New free-form metadata. Replaces the existing metadata blob entirely when set.\nExample: `{\"owner_team\": \"ops\", \"ticket\": \"OPS-1248\", \"review_due\": \"2026-09-01\"}`."
          },
          "rail_preference": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "New rail preference order. Outer `None` leaves the field unchanged.",
            "example": [
              "mpp_tempo",
              "x402_base"
            ]
          },
          "require_approval_above_usd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "New approval threshold (USD). **Advisory only — not yet enforced.** Outer `None` leaves the field unchanged; inner `None` disables the (future) gate."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "New lifecycle status. Valid values: `active`, `disabled`.",
            "example": "disabled"
          }
        }
      },
      "UpdatePluginMarketplaceRequest": {
        "type": "object",
        "description": "Request body for updating a plugin marketplace.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "New marketplace name."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "New lifecycle status, e.g. `active` or `disabled`."
          }
        }
      },
      "UpdateProfileRequest": {
        "type": "object",
        "description": "Request to update current user's profile",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "New display name",
            "example": "Jane Doe"
          }
        }
      },
      "UpdateProviderRequest": {
        "type": "object",
        "description": "Request to update an LLM provider. Only provided fields will be updated.",
        "properties": {
          "api": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chat API declared by the provider driver; \"default\" restores its default."
          },
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key for authenticating with the provider.\nWill be encrypted at rest if encryption is configured.\n\nSingle-field convenience for simple providers and programmatic clients.\nMulti-field drivers (Bedrock, MAI) should send `credentials` instead."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL for the provider's API.",
            "example": "https://api.openai.com/v1"
          },
          "credentials": {
            "type": [
              "object",
              "null"
            ],
            "description": "Typed credential fields keyed by the driver's declared credential-schema\nfield names. Validated against the schema and assembled into the stored\ncredential document. Takes precedence over `api_key` when present.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name for the provider.",
            "example": "OpenAI Development"
          },
          "provider_type": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DriverId",
                "description": "The type of LLM provider (e.g., openai, anthropic)."
              },
              {
                "type": "null"
              }
            ]
          },
          "request_options": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderRequestOptions",
                "description": "Extra headers and diagnostics options applied to every request sent to\nthis provider. Replaces the stored options wholesale; omit to leave them\nunchanged."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderStatus",
                "description": "The status of the provider. Set to \"inactive\" to disable."
              },
              {
                "type": "null"
              }
            ]
          },
          "trace": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderTraceConfig",
                "description": "Trace/observability link configuration override. Merged into the\nprovider's stored settings, preserving other settings keys."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateScheduleRequest": {
        "type": "object",
        "description": "Update schedule request",
        "properties": {
          "catch_up_missed": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Catch up missed triggers",
            "example": true
          },
          "cron_expression": {
            "type": [
              "string",
              "null"
            ],
            "description": "New cron expression. Standard `min hour day-of-month month day-of-week` form.",
            "example": "0 8 * * 1-5"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "New description",
            "example": "Fires the support-triage agent every weekday at 08:00 UTC"
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable/disable",
            "example": true
          },
          "max_catch_up": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Max catch-up executions",
            "example": 3,
            "minimum": 0
          },
          "max_concurrent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Max concurrent executions",
            "example": 1,
            "minimum": 0
          },
          "retry_policy": {
            "description": "Retry policy (provider-specific JSON; see the durable engine's `RetryPolicy`).\nExample: `{\"max_attempts\": 3, \"initial_backoff_secs\": 30, \"backoff_multiplier\": 2.0}`."
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScheduleTarget",
                "description": "New target. Variant shape is defined on `ScheduleTarget`."
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "New timezone (IANA name).",
            "example": "America/New_York"
          }
        }
      },
      "UpdateSessionRequest": {
        "type": "object",
        "description": "Request to update a session. Only provided fields will be updated.",
        "properties": {
          "goal": {
            "type": [
              "string",
              "null"
            ],
            "description": "Updated session objective.",
            "example": "Summarize the incident and list remediations"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session locale (BCP 47, e.g. `uk-UA`).",
            "example": "uk-UA"
          },
          "model_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model for this session's turns. `null` clears it so turns follow the\nagent's default model again.",
            "example": "model_01933b5a00007000800000000000001"
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Tags for organizing and filtering sessions.",
            "example": [
              "resolved"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable title for the session.",
            "example": "Updated session title"
          },
          "virtual_user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional resident virtual user used for unattended/background execution.",
            "example": "identity_01933b5a00007000800000000000001"
          }
        }
      },
      "UpdateSkillRequest": {
        "type": "object",
        "description": "Request to update a skill",
        "properties": {
          "skill_md": {
            "type": [
              "string",
              "null"
            ],
            "description": "Updated SKILL.md content (re-parses frontmatter)"
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SkillStatus",
                "description": "Update status"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateTaskWebhookRequest": {
        "type": "object",
        "description": "Request body for updating a task webhook.",
        "properties": {
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable or disable the webhook."
          },
          "secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replace the signing secret. Pass null to remove the existing secret."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "New target URL."
          }
        }
      },
      "UpdateUserMcpServerRequest": {
        "type": "object",
        "description": "Change a user MCP server. The URL cannot change; remove and re-add the\nserver instead.",
        "properties": {
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replace the API key of an `api_key` server."
          },
          "deferred": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Load the server's tools on demand (true) or list them from the start\nof every turn (false)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateVirtualUserRequest": {
        "type": "object",
        "description": "Update a runtime account profile or its management lifecycle.",
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Profile image URL.",
            "example": "https://example.com/avatar.png"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description. Safe to render in user-facing messages.",
            "example": "Support team member"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Locale used for agent-facing defaults."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name. Safe to render in user-facing messages.",
            "example": "Alex"
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/VirtualUserStatus",
                "description": "Current lifecycle status."
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "IANA time zone used for agent-facing defaults."
          }
        }
      },
      "UpdateWorkspaceRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UsagePolicy": {
        "type": "object",
        "description": "Name, steps and filter of a usage policy, stored on `budgets.policy`.\n\nDecision: steps are data on the existing budget row rather than a new\ntable, so the hierarchy lookup, period rollover and gate keep working\nunchanged. Empty steps mean the legacy shape (see [`UsagePolicy::effective_steps`]).",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the policy."
          },
          "source": {
            "$ref": "#/components/schemas/PolicySource",
            "description": "Which usage the policy counts."
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyStep"
            },
            "description": "Steps by percent of the limit. Empty: notify at 80%, ask at the soft\nlimit, stop at the limit."
          }
        }
      },
      "UseEverrunsAppRequest": {
        "type": "object",
        "description": "Which org link to act through.",
        "required": [
          "connection_id"
        ],
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection id of one of the org's linked installations, from the\nagent's GitHub status (`everruns_app_installations`)."
          }
        }
      },
      "User": {
        "type": "object",
        "description": "User response for listing",
        "required": [
          "id",
          "email",
          "name",
          "roles",
          "created_at"
        ],
        "properties": {
          "auth_provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/)."
          },
          "name": {
            "type": "string",
            "description": "Human-readable name. Safe to render in user-facing messages."
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UserMcpConnectionResponse": {
        "type": "object",
        "description": "Current user's MCP OAuth connection to a preset in the selected organization.",
        "required": [
          "provider",
          "server_id",
          "server_name",
          "server_url",
          "server_status",
          "connected_at"
        ],
        "properties": {
          "connected_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time when the user authorized the connection.",
            "example": "2026-09-19T12:00:00Z"
          },
          "provider": {
            "type": "string",
            "description": "Stored connection provider key used to revoke the grant.",
            "example": "mcp_oauth_01933b5a-0000-7000-8000-000000000001"
          },
          "provider_username": {
            "type": [
              "string",
              "null"
            ],
            "description": "Account name reported by the MCP OAuth provider, when available.",
            "example": "alex@example.com"
          },
          "scopes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Space-delimited OAuth scopes granted to this connection, when available.",
            "example": "tools:read tools:execute"
          },
          "server_id": {
            "type": "string",
            "description": "UUID of the MCP server preset associated with the connection.",
            "example": "01933b5a-0000-7000-8000-000000000001"
          },
          "server_name": {
            "type": "string",
            "description": "Display name of the MCP server preset.",
            "example": "microsoft_learn"
          },
          "server_status": {
            "type": "string",
            "description": "Current lifecycle status of the MCP server preset.",
            "example": "active"
          },
          "server_url": {
            "type": "string",
            "description": "MCP server endpoint URL.",
            "example": "https://learn.microsoft.com/api/mcp"
          }
        }
      },
      "UserMcpConnectionStatus": {
        "type": "string",
        "description": "Whether the person has signed in to a user MCP server.",
        "enum": [
          "connected",
          "not_connected",
          "not_needed"
        ]
      },
      "UserMcpConnectionsResponse": {
        "type": "object",
        "description": "One page of the current user's MCP connections in the selected organization.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserMcpConnectionResponse"
            },
            "description": "MCP connections in this page.",
            "example": [
              {
                "connected_at": "2026-09-19T12:00:00Z",
                "provider": "mcp_oauth_01933b5a-0000-7000-8000-000000000001",
                "provider_username": "alex@example.com",
                "scopes": "tools:read tools:execute",
                "server_id": "01933b5a-0000-7000-8000-000000000001",
                "server_name": "microsoft_learn",
                "server_status": "active",
                "server_url": "https://learn.microsoft.com/api/mcp"
              }
            ]
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor for the next page, or null when this is the final page.",
            "example": "01933b5a-0000-7000-8000-000000000002"
          }
        }
      },
      "UserMcpServer": {
        "type": "object",
        "description": "An MCP server a person added for themselves.",
        "required": [
          "id",
          "name",
          "url",
          "source",
          "auth_mode",
          "enabled",
          "deferred",
          "connection",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "auth_mode": {
            "$ref": "#/components/schemas/McpServerAuthMode"
          },
          "catalog_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Catalog preset name, for servers added from the catalog."
          },
          "connection": {
            "$ref": "#/components/schemas/UserMcpServerConnection"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deferred": {
            "type": "boolean",
            "description": "Whether the server loads on demand: agents see one line for it and\nlist its tools only once they search for them. Off lists its tools\nfrom the start of every turn."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean",
            "description": "Disabled servers are kept but never offered to agents."
          },
          "header_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the literal headers sent with each request. Values are\nwrite-only."
          },
          "id": {
            "type": "string",
            "example": "mcp_01933b5a00007000800000000000001"
          },
          "name": {
            "type": "string"
          },
          "presentation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpServerPresentation",
                "description": "Title, icon, and links published by the remote server."
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "$ref": "#/components/schemas/UserMcpServerSource"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "UserMcpServerConnection": {
        "type": "object",
        "description": "Sign-in state of a user MCP server.",
        "required": [
          "status"
        ],
        "properties": {
          "connected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ],
            "description": "Connection provider to pass to the authorize endpoint\n(`/v1/virtual-users/{id}/connections/{provider}/authorize`) when the\nserver signs in with OAuth."
          },
          "status": {
            "$ref": "#/components/schemas/UserMcpConnectionStatus"
          }
        }
      },
      "UserMcpServerSource": {
        "type": "string",
        "description": "Where a user MCP server came from.",
        "enum": [
          "catalog",
          "custom"
        ]
      },
      "UserMcpServerToolsResponse": {
        "type": "object",
        "description": "List response for the tools of a user MCP server.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpServerTool"
            }
          }
        }
      },
      "UserMcpServersResponse": {
        "type": "object",
        "description": "List response for user MCP servers.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserMcpServer"
            }
          }
        }
      },
      "ValidateSkillRequest": {
        "type": "object",
        "description": "Request to validate a SKILL.md",
        "required": [
          "skill_md"
        ],
        "properties": {
          "skill_md": {
            "type": "string",
            "description": "Full SKILL.md content to validate, including the YAML frontmatter and the markdown body.",
            "example": "---\nname: refund-policy\ndescription: Issue refunds inside the policy window.\n---\n\nUse this when a customer asks for a refund within 30 days of purchase."
          }
        }
      },
      "VariantVerdict": {
        "type": "object",
        "description": "A variant against the baseline.",
        "required": [
          "label",
          "paired_cases",
          "fixed",
          "broke",
          "verdict"
        ],
        "properties": {
          "broke": {
            "type": "integer",
            "format": "int32",
            "description": "Cases the baseline passes every trial of and this variant does not.",
            "example": 1,
            "minimum": 0
          },
          "fixed": {
            "type": "integer",
            "format": "int32",
            "description": "Cases this variant passes every trial of and the baseline did not.",
            "example": 4,
            "minimum": 0
          },
          "interval_high_points": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "example": 9
          },
          "interval_low_points": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "95% interval of that difference (paired bootstrap), in points.",
            "example": 1
          },
          "label": {
            "type": "string",
            "example": "candidate"
          },
          "paired_cases": {
            "type": "integer",
            "format": "int32",
            "description": "Cases both ran.",
            "example": 42,
            "minimum": 0
          },
          "pass_rate_delta_points": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Mean per-case pass rate difference, in percentage points.",
            "example": 5
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          }
        }
      },
      "Verbosity": {
        "type": "string",
        "description": "Verbosity level for models that support output-length control.\nWire values map 1:1 to the OpenAI `verbosity` request parameter:\n`low` (terse), `medium` (balanced, provider default), `high`\n(comprehensive). Independent of `ReasoningEffort`, which tunes the\namount of reasoning rather than the length of the final answer.",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "VerbosityConfig": {
        "type": "object",
        "description": "Verbosity configuration for a model",
        "required": [
          "values",
          "default"
        ],
        "properties": {
          "default": {
            "$ref": "#/components/schemas/Verbosity",
            "description": "Default verbosity for this model"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VerbosityValue"
            },
            "description": "Available verbosity values for this model"
          }
        }
      },
      "VerbosityValue": {
        "type": "object",
        "description": "Named verbosity value for UI display",
        "required": [
          "value",
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name (e.g., \"Low\", \"High\")"
          },
          "value": {
            "$ref": "#/components/schemas/Verbosity",
            "description": "The API value (e.g., \"low\", \"high\")"
          }
        }
      },
      "Verdict": {
        "type": "string",
        "description": "How a variant compares with the baseline.",
        "enum": [
          "improvement",
          "regression",
          "within_noise",
          "not_enough_data"
        ]
      },
      "VerificationStatus": {
        "type": "string",
        "description": "Whether a cited source entails the claim it is attached to.",
        "enum": [
          "entailed",
          "unsupported",
          "uncertain"
        ],
        "example": "entailed"
      },
      "VerificationVerdict": {
        "type": "object",
        "description": "Outcome of citation verification (see the `citation_verification` capability).",
        "required": [
          "status"
        ],
        "properties": {
          "score": {
            "type": [
              "number",
              "null"
            ],
            "format": "float",
            "description": "Entailment confidence in `[0, 1]`, when the verifier produced one.",
            "example": 0.92
          },
          "status": {
            "$ref": "#/components/schemas/VerificationStatus",
            "description": "Whether the cited source supports the claim."
          }
        }
      },
      "VerifyConnectionResponse": {
        "type": "object",
        "description": "Response for connection verification",
        "required": [
          "valid"
        ],
        "properties": {
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider verification failure without credential details.",
            "example": "Credential expired"
          },
          "valid": {
            "type": "boolean",
            "description": "Whether the provider accepted the saved credential.",
            "example": true
          }
        }
      },
      "VirtualUser": {
        "type": "object",
        "description": "Organization-scoped runtime account with its own profile and connections.",
        "required": [
          "id",
          "organization_id",
          "usage",
          "name",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Archive timestamp."
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional avatar URL for UI surfaces."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Delete timestamp."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description shown in management UI."
          },
          "effective_owner": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PrincipalSummary",
                "description": "Effective human owner summary derived from the principal lineage."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "External identifier (identity_<32-hex>). Shown as `id` in API.",
            "example": "identity_01933b5a000070008000000000000001"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default locale for unattended runs."
          },
          "name": {
            "type": "string",
            "description": "Display name used when the identity acts autonomously."
          },
          "organization_id": {
            "type": "string",
            "description": "Organization that owns the runtime account.",
            "example": "org_example"
          },
          "principal": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PrincipalSummary",
                "description": "Principal row representing this identity as a durable owner/executor."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VirtualUserStatus",
            "description": "Lifecycle status."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default timezone for unattended runs."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp."
          },
          "usage": {
            "$ref": "#/components/schemas/VirtualUserUsage",
            "description": "Immutable runtime account purpose."
          }
        }
      },
      "VirtualUserStatus": {
        "type": "string",
        "description": "Virtual user lifecycle status.",
        "enum": [
          "active",
          "archived",
          "deleted"
        ]
      },
      "VirtualUserUsage": {
        "type": "string",
        "description": "VirtualUser is a durable virtual principal.",
        "enum": [
          "end_user",
          "service"
        ]
      },
      "VoiceCallRequest": {
        "type": "object",
        "description": "Request body for a session voice call (the chat microphone).",
        "required": [
          "sdp"
        ],
        "properties": {
          "channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Voice channel whose settings the call uses (`appchan_…`). Must belong\nto the session's agent. When omitted, the agent's first voice channel\nis used, or the defaults when it has none.",
            "example": "appchan_01933b5a000070008000000000000001"
          },
          "provider_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Realtime provider binding: the public id of the provider connection\nthat serves the call (`prov_…`). When omitted, the org's default (or\nsingle) realtime provider is used.",
            "example": "prov_01h…"
          },
          "sdp": {
            "type": "string",
            "description": "The browser's WebRTC SDP offer."
          }
        }
      },
      "VoiceCallResponse": {
        "type": "object",
        "description": "A started voice call.",
        "required": [
          "voice_connection_id",
          "provider",
          "model",
          "voice",
          "expires_at",
          "answer_sdp"
        ],
        "properties": {
          "answer_sdp": {
            "type": "string",
            "description": "SDP answer that completes the browser's WebRTC handshake."
          },
          "channel_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Voice channel whose settings the call uses, when there is one."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the call's lease expires (RFC 3339)."
          },
          "model": {
            "type": "string",
            "description": "Speech model."
          },
          "provider": {
            "type": "string",
            "description": "Realtime provider type serving the call (e.g. `openai`)."
          },
          "provider_call_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-side call identifier."
          },
          "voice": {
            "type": "string",
            "description": "Provider voice."
          },
          "voice_connection_id": {
            "type": "string",
            "description": "Prefixed public identifier of the voice connection."
          }
        }
      },
      "VoiceEndRequest": {
        "type": "object",
        "description": "Request body for ending a call.",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free-text reason recorded with the session-ended event.",
            "example": "User hung up after refund confirmed."
          }
        }
      },
      "VoiceEndResponse": {
        "type": "object",
        "description": "Response body for ending a call.",
        "required": [
          "voice_connection_id",
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "Current lifecycle status."
          },
          "voice_connection_id": {
            "type": "string",
            "description": "Prefixed public identifier of the voice connection that was ended."
          }
        }
      },
      "VoiceOutputInterruptedData": {
        "type": "object",
        "description": "Data for voice.output.interrupted: the caller talked over a spoken answer.",
        "required": [
          "voice_connection_id",
          "heard",
          "unspoken",
          "policy"
        ],
        "properties": {
          "heard": {
            "type": "string",
            "description": "What the caller heard of the answer before speech stopped, from the\nprovider's output transcript.",
            "example": "Kyiv is the"
          },
          "policy": {
            "type": "string",
            "description": "What the interruption did to the running turn: `steer` (the caller's\nnext words steer it) or `cancel`.",
            "example": "steer"
          },
          "unspoken": {
            "type": "string",
            "description": "Answer text that was dropped and never spoken.",
            "example": "capital of Ukraine."
          },
          "voice_connection_id": {
            "type": "string",
            "description": "Prefixed voice connection identifier."
          }
        }
      },
      "VoiceSessionEndedData": {
        "type": "object",
        "description": "Data for voice.session.ended.",
        "required": [
          "voice_connection_id"
        ],
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Total wall-clock duration of the connection in milliseconds. `None` when the connection\nnever completed an audio handshake.",
            "example": 184500,
            "minimum": 0
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free-text end reason captured from the client or server. `None` when no reason was supplied.",
            "example": "User hung up after refund confirmed."
          },
          "voice_connection_id": {
            "type": "string",
            "description": "Prefixed voice connection identifier for the ended session.",
            "example": "voice_01933b5a00007000800000000000001"
          }
        }
      },
      "VoiceSessionFailedData": {
        "type": "object",
        "description": "Data for voice.session.failed.",
        "required": [
          "voice_connection_id",
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message captured at failure. Provider-formatted; not stable for parsing.",
            "example": "realtime provider closed stream: 1011 internal_error"
          },
          "voice_connection_id": {
            "type": "string",
            "description": "Prefixed voice connection identifier for the failed session.",
            "example": "voice_01933b5a00007000800000000000001"
          }
        }
      },
      "VoiceSessionResponse": {
        "type": "object",
        "description": "A channel call: the session it talks to and the call itself.",
        "required": [
          "session",
          "voice"
        ],
        "properties": {
          "session": {
            "$ref": "#/components/schemas/Session",
            "description": "The session the call is attached to."
          },
          "voice": {
            "$ref": "#/components/schemas/VoiceCallResponse",
            "description": "The started call."
          }
        }
      },
      "VoiceSessionStartedData": {
        "type": "object",
        "description": "Data for voice.session.started.",
        "required": [
          "voice_connection_id",
          "model",
          "voice",
          "reasoning_effort",
          "transport"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Provider-side realtime model identifier negotiated for this session.",
            "example": "gpt-realtime"
          },
          "reasoning_effort": {
            "type": "string",
            "description": "Reasoning effort applied to the realtime model. One of `low`, `medium`, `high`.",
            "example": "medium"
          },
          "transport": {
            "type": "string",
            "description": "Transport carrying the audio stream. One of `webrtc`, `sip`, `websocket`.",
            "example": "webrtc"
          },
          "voice": {
            "type": "string",
            "description": "Realtime voice preset selected for this session.",
            "example": "alloy"
          },
          "voice_connection_id": {
            "type": "string",
            "description": "Prefixed voice connection identifier for the started session.",
            "example": "voice_01933b5a00007000800000000000001"
          }
        }
      },
      "VoiceTranscriptData": {
        "type": "object",
        "description": "Data for voice transcript delta/completed events.",
        "required": [
          "voice_connection_id",
          "accumulated"
        ],
        "properties": {
          "accumulated": {
            "type": "string",
            "description": "Full transcript accumulated for this item up to and including `delta`."
          },
          "delta": {
            "type": "string",
            "description": "Newly transcribed text chunk delivered in this event. Empty for \"final\" events that only mark completion."
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-specific identifier of the conversation item being transcribed. `None` when not yet assigned."
          },
          "phase": {
            "type": [
              "string",
              "null"
            ],
            "description": "Transcript phase: `user_partial`, `user_final`, `assistant_partial`, `assistant_final`. `None` when not yet classified."
          },
          "response_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-specific identifier of the response stream emitting this transcript. `None` for user-side transcripts."
          },
          "voice_connection_id": {
            "type": "string",
            "description": "Prefixed voice connection identifier this transcript belongs to."
          }
        }
      },
      "WakeMode": {
        "type": "string",
        "description": "When an agent member is woken.",
        "enum": [
          "mentions",
          "everything",
          "relevant",
          "never"
        ]
      },
      "WebSearchDefaults": {
        "type": "object",
        "description": "An organization's web search defaults.",
        "properties": {
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The search account when `provider` is `account`."
          },
          "allow_native": {
            "type": "boolean",
            "description": "Whether agents may use the model provider's own search (billed by the\nmodel provider)."
          },
          "automatic_order": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Automatic order: `native`, search account ids, `hosted` (the\ndeployment's own search, when it offers one) and `free`, which is\nalways last. Entries left out keep their natural place."
          },
          "blocked_domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sites no search in this organization returns, on top of each agent's."
          },
          "fallback": {
            "$ref": "#/components/schemas/SearchFallbackMode",
            "description": "When a provider cannot answer: `next` falls back (free search last),\n`none` stops. An agent's own `fallback` wins."
          },
          "provider": {
            "$ref": "#/components/schemas/SearchProviderSetting",
            "description": "Provider for agents set to the organization default: `auto`, `native`,\n`brave`, `account` (with `account_id`) or `free`."
          },
          "results_per_search": {
            "type": "integer",
            "format": "int32",
            "description": "Results per search when neither the model nor the agent asks (1 to 20).",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "WebhookInvocationResponse": {
        "type": "object",
        "description": "Response body for webhook invocation.",
        "required": [
          "accepted",
          "created_session",
          "delivery"
        ],
        "properties": {
          "accepted": {
            "type": "boolean"
          },
          "created_session": {
            "type": "boolean"
          },
          "delivery": {
            "type": "string",
            "description": "What happened to the event: `dispatched`, `filtered` or `duplicate`."
          },
          "session_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Session's prefixed public identifier. Absent when the event was\nfiltered out or was a duplicate delivery."
          }
        }
      },
      "WithUrls_Agent": {
        "allOf": [
          {
            "type": "object",
            "description": "Agent configuration for agentic loop.\nAn agent defines the behavior and capabilities of an AI assistant.",
            "required": [
              "id",
              "name",
              "system_prompt",
              "harness_id",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the agent was archived.",
                "example": "2026-05-26T00:00:00Z"
              },
              "avatar": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AgentAvatar",
                    "description": "Avatar shown wherever the agent appears: the UI, the A2A Agent Card and\nits Slack app. Set with `PUT /v1/agents/{agent_id}/avatar`."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "capabilities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AgentCapabilityConfig"
                },
                "description": "Capabilities enabled for this agent with per-agent configuration.\nCapabilities add tools and system prompt modifications."
              },
              "communication": {
                "$ref": "#/components/schemas/Communication",
                "description": "How the agent talks to people. `direct` (default): its replies are\nwhat it writes. `explicit`: what it writes is private working notes,\nand people see only the messages it sends with `send_message`. Applies\non every surface: web chat, API, Slack, A2A, AG-UI, MCP."
              },
              "completion_check": {
                "$ref": "#/components/schemas/CompletionCheck",
                "description": "When a turn about to finish is checked for whether it did what was\nasked, and continued automatically when it did not. `unattended`\n(default): sessions started by triggers and schedules, where no person\nis watching. `always`: chat too. `off`: never."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the agent was created.",
                "example": "2026-04-01T10:00:00Z"
              },
              "default_model_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Default LLM model ID for this agent.\nCan be overridden at the session level.",
                "example": "model_01933b5a00007000800000000000001"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the agent was deleted.",
                "example": "2026-05-26T00:00:00Z"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable description of what the agent does.",
                "example": "Handles refund and shipping questions; escalates billing disputes."
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable display name shown in UI (e.g. \"Customer Support Agent\").\nFalls back to `name` when absent.",
                "example": "Customer Support Agent"
              },
              "exposed": {
                "type": "boolean",
                "description": "Whether any endpoint on this agent is currently live. Derived from the\nendpoint rows on read and never stored: a stored flag would be a second\nwriter for state the endpoints already own."
              },
              "exposures_suspended": {
                "type": "boolean",
                "description": "Incident switch: when true, no endpoint on this agent accepts traffic\n(EVE-1007). Distinct from archiving — it leaves per-endpoint status\nuntouched so clearing it restores exactly the previously live set."
              },
              "forked_from_agent_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Source agent for a forked agent.",
                "example": "agent_01933b5a00007000800000000000001"
              },
              "harness_id": {
                "type": "string",
                "description": "Harness that supplies the base execution environment for this agent.",
                "example": "harness_01933b5a00007000800000000000001"
              },
              "id": {
                "type": "string",
                "description": "External identifier (agent_<32-hex>). Shown as \"id\" in API.\nClient-supplied or auto-generated.",
                "example": "agent_01933b5a000070008000000000000001"
              },
              "initial_files": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InitialFile"
                },
                "description": "Starter files copied into each new session for this agent."
              },
              "intro_markdown": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional Markdown intro rendered as an intro box at the top of a fresh\nPlatform Chat thread. Images are allowed. Wins over the harness intro.\nHidden once the user inputs.",
                "example": "Hey, I'm Ava. Ask me anything about your account."
              },
              "is_built_in": {
                "type": "boolean",
                "description": "Built-in agents (Platform Chat) are provisioned by the platform and\nare read-only: they cannot be modified or deleted via the API. Copy\none to get an editable version.",
                "example": false
              },
              "localizations": {
                "$ref": "#/components/schemas/EntityLocalizations",
                "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
              },
              "max_iterations": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Maximum number of LLM iterations per turn for this agent.",
                "example": 50,
                "minimum": 0
              },
              "max_output_tokens": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Ceiling on output tokens per model response, sent to the provider as\n`max_tokens`. Unset keeps the provider default. Clamped to the model's\noutput limit when known. Lower it when a provider rejects calls because\nthe balance can only afford fewer tokens.",
                "example": 4096,
                "minimum": 1
              },
              "mcpServers": {
                "$ref": "#/components/schemas/BTreeMap",
                "description": "Remote MCP servers scoped to this agent and inherited by its sessions."
              },
              "model_preset": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Model preset the agent takes its job models from (`automatic`,\n`provider:gemini` or a custom preset id). Unset = organization defaults.\nA pinned `default_model_id` still wins for the agent's own turns.",
                "example": "provider:gemini"
              },
              "model_role": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AgentModelRole",
                    "description": "Organization model the agent follows instead of `default_model_id`.\n`research` uses the organization research model."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": "string",
                "description": "Name, unique per org (e.g. \"customer-support\").",
                "example": "customer-support"
              },
              "network_access": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/NetworkAccessList",
                    "description": "Network access list controlling which hosts/URLs agent sessions can reach.\nMerged with harness and session layers (allowed: intersect, blocked: union)."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "owner_agent_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Agent this one was created as part of, shown as \"Created here\" on\nthat agent's Agents tab and bundled into its export.",
                "example": "agent_01933b5a00007000800000000000001"
              },
              "parallel_tool_calls": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                "example": true
              },
              "root_agent_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Root agent lineage identifier for grouping fork families.",
                "example": "agent_01933b5a00007000800000000000001"
              },
              "sandbox_policy": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SandboxPolicy",
                    "description": "Policy for selecting the primary Sandbox Template for new Sessions."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "service_virtual_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Org-scoped service account used when a tool acts as the agent."
              },
              "short_description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional one-line description in simplified Markdown, shown below the\nchat title once the intro is hidden. Wins over the harness value.",
                "example": "Answers account questions in seconds."
              },
              "starters": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ConversationStarter"
                },
                "description": "Conversation starters for a fresh Platform Chat thread. Win over the\nharness starters when non-empty."
              },
              "status": {
                "$ref": "#/components/schemas/AgentStatus",
                "description": "Current lifecycle status of the agent."
              },
              "system_prompt": {
                "type": "string",
                "description": "System prompt that defines the agent's behavior.\nSent as the first message in every conversation.",
                "example": "You are a friendly customer support agent for Acme Corp. Verify orders before issuing refunds. Escalate any billing disputes to a human."
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tags for organizing and filtering agents.",
                "example": [
                  "support",
                  "production"
                ]
              },
              "tools": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ToolDefinition"
                },
                "description": "Client-side tools registered for this agent.\nThese tools are executed by the client, not the server."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the agent was last updated.",
                "example": "2026-05-20T14:00:00Z"
              },
              "usage": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TokenUsage",
                    "description": "Cumulative token usage across all sessions for this agent."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`.",
        "x-sdk-response-wrapper": {
          "kind": "resource",
          "model": "#/components/schemas/Agent"
        }
      },
      "WithUrls_AgentWithCounts": {
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Agent"
              },
              {
                "type": "object",
                "required": [
                  "session_count",
                  "app_count",
                  "effective_harness",
                  "channels"
                ],
                "properties": {
                  "app_count": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 0
                  },
                  "channels": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/AgentChannelSummary"
                    }
                  },
                  "effective_harness": {
                    "$ref": "#/components/schemas/AgentHarnessSummary"
                  },
                  "session_count": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 0
                  }
                }
              }
            ],
            "description": "Agent list/detail payload with relationship counts and resolved harness metadata."
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`.",
        "x-sdk-response-wrapper": {
          "kind": "resource",
          "model": "#/components/schemas/Agent"
        }
      },
      "WithUrls_App": {
        "allOf": [
          {
            "type": "object",
            "description": "App configuration for deploying agents to channels.\nAn app binds a harness and optional agent to distribution channels with a\npublish lifecycle.",
            "required": [
              "id",
              "name",
              "harness_id",
              "owner_principal_id",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "agent_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional ID of the agent to use (format: agent_{32-hex}).",
                "example": "agent_01933b5a00007000800000000000001"
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the app was archived."
              },
              "channels": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AgentChannel"
                },
                "description": "Distribution channels attached to this app."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the app was created."
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the app was deleted."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable description of what the app does."
              },
              "effective_owner": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PrincipalSummary",
                    "description": "Effective human owner summary."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "harness_id": {
                "type": "string",
                "description": "ID of the harness to use (format: harness_{32-hex}).",
                "example": "harness_01933b5a00007000800000000000001"
              },
              "id": {
                "type": "string",
                "description": "External identifier (app_<32-hex>). Shown as \"id\" in API.",
                "example": "app_01933b5a000070008000000000000001"
              },
              "name": {
                "type": "string",
                "description": "Display name of the app."
              },
              "owner": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PrincipalSummary",
                    "description": "Owning principal summary."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "owner_principal_id": {
                "type": "string",
                "description": "Owning principal for this app.",
                "example": "principal_01933b5a000070008000000000000001"
              },
              "published_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the app was last published."
              },
              "resolved_owner_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Denormalized effective human owner of the owning principal lineage."
              },
              "status": {
                "$ref": "#/components/schemas/AppStatus",
                "description": "Current lifecycle status."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the app was last updated."
              },
              "virtual_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional virtual identity that represents the app in unattended/channel execution.",
                "example": "identity_01933b5a00007000800000000000001"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_Budget": {
        "allOf": [
          {
            "type": "object",
            "description": "Budget — a stored spending cap for a platform subject.",
            "required": [
              "id",
              "organization_id",
              "subject_type",
              "subject_id",
              "currency",
              "limit",
              "balance",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "balance": {
                "type": "number",
                "format": "double",
                "description": "Current remaining balance (limit minus consumed)."
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "currency": {
                "type": "string",
                "description": "What the limit is measured in: \"usd\" (cost from the org's price\nlist) or \"tokens\"."
              },
              "id": {
                "type": "string",
                "example": "bdgt_01933b5a00007000800000000000001"
              },
              "limit": {
                "type": "number",
                "format": "double",
                "description": "Hard limit — budget ceiling."
              },
              "metadata": {
                "description": "Arbitrary metadata."
              },
              "organization_id": {
                "type": "string"
              },
              "period": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BudgetPeriod",
                    "description": "Optional period for recurring budgets."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "period_started_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the current period started (used to detect period rollover for\n`Duration` / `Rolling` periods, and to display \"resets at\" in the UI).\n`None` for budgets without a period."
              },
              "policy": {
                "$ref": "#/components/schemas/UsagePolicy",
                "description": "Name, steps (notify, ask to continue, stop) and which usage counts.\nEmpty steps mean the legacy shape: notify at 80%, ask at the soft\nlimit, stop at the limit."
              },
              "soft_limit": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double",
                "description": "Soft limit — triggers pause/warn when balance drops below this."
              },
              "status": {
                "$ref": "#/components/schemas/BudgetStatus"
              },
              "subject_id": {
                "type": "string",
                "description": "Public ID of the subject entity."
              },
              "subject_type": {
                "$ref": "#/components/schemas/BudgetSubjectType"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_CapabilityInfo": {
        "allOf": [
          {
            "type": "object",
            "description": "Public capability information (without internal details)\nThis is what gets returned from the API\nNamed CapabilityInfo to distinguish from the Capability trait",
            "required": [
              "id",
              "name",
              "description",
              "status"
            ],
            "properties": {
              "agent_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of active agents referencing this capability in the org.",
                "example": 42,
                "minimum": 0
              },
              "category": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Category for grouping in UI",
                "example": "filesystem"
              },
              "config_schema": {
                "type": "object",
                "description": "JSON Schema for capability-specific per-agent config."
              },
              "config_ui_schema": {
                "type": "object",
                "description": "react-jsonschema-form uiSchema hints for rendering config_schema."
              },
              "dependencies": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "IDs of capabilities that this capability depends on.\nWhen this capability is selected, its dependencies are automatically included.",
                "example": [
                  "approval"
                ]
              },
              "description": {
                "type": "string",
                "description": "Description of what this capability provides",
                "example": "Read, write, edit, list, grep, delete, and stat files in the session workspace."
              },
              "docs_slug": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Slug under the [capability documentation](https://everruns.com/docs/capabilities/) when public docs exist.",
                "example": "session_file_system"
              },
              "feature_flag": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Rollout flag that gates this capability, when one is required.\nPresent whether or not the flag is on, so a management screen can name\nan attached capability and avoid offering it for new selection.",
                "example": "skills"
              },
              "features": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "UI feature strings this capability contributes to.\nMultiple capabilities can contribute the same feature.",
                "example": [
                  "file_browser"
                ]
              },
              "harness_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of active harnesses referencing this capability in the org.",
                "example": 7,
                "minimum": 0
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Icon name (for UI rendering)",
                "example": "Folder"
              },
              "id": {
                "type": "string",
                "description": "Unique capability identifier",
                "example": "session_file_system"
              },
              "is_guardrail": {
                "type": "boolean",
                "description": "Whether this capability is a guardrail (constrains agent behavior\nrather than granting abilities). Used for UI grouping and filtering.",
                "example": false
              },
              "is_mcp": {
                "type": "boolean",
                "description": "Whether this is an MCP server capability (for UI badge)",
                "example": false
              },
              "is_skill": {
                "type": "boolean",
                "description": "Whether this is an Agent Skill capability (for UI badge)",
                "example": false
              },
              "localizations": {
                "type": "object",
                "description": "Localized display strings keyed by lowercase language tag (e.g. \"uk\").\nThe \"en\" entry carries only `config_description`, since the base\nname/description/config_schema strings are already English.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/CapabilityLocalizationInfo"
                },
                "propertyNames": {
                  "type": "string"
                },
                "example": {
                  "uk": {
                    "description": "Монтує спільні файли пам'яті в сесії.",
                    "name": "Пам'ять"
                  }
                }
              },
              "name": {
                "type": "string",
                "description": "Display name",
                "example": "Session File System"
              },
              "risk_level": {
                "$ref": "#/components/schemas/RiskLevel",
                "description": "TM-AGENT-005: Risk level. High-risk capabilities require admin approval."
              },
              "status": {
                "type": "string",
                "description": "Current status",
                "example": "active"
              },
              "system_prompt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "System prompt addition contributed by this capability",
                "example": "You can read and write files in /workspace via the session_file_system tools."
              },
              "tool_definitions": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "Tool definitions provided by this capability",
                "example": [
                  {
                    "description": "Read a file from the session workspace.",
                    "name": "read_file"
                  },
                  {
                    "description": "Write or overwrite a file in the session workspace.",
                    "name": "write_file"
                  }
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`.",
        "x-sdk-response-wrapper": {
          "kind": "resource",
          "model": "#/components/schemas/CapabilityInfo"
        }
      },
      "WithUrls_DeclarativeCapability": {
        "allOf": [
          {
            "type": "object",
            "description": "Persisted, org-scoped declarative capability — a YAML/JSON-defined\nbundle of skills, files, and tool defs that an agent or harness can\nreference by `capability_id` or name.",
            "required": [
              "id",
              "capability_id",
              "name",
              "description",
              "status",
              "definition",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when this resource was archived, if any (RFC 3339)."
              },
              "capability_id": {
                "type": "string",
                "description": "Runtime capability reference. Agents and harnesses may use this or the plain unique name.",
                "example": "declarative:research_pack"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this resource was created (RFC 3339)."
              },
              "definition": {
                "type": "object",
                "description": "Declarative capability payload: system prompt, skills, starter files, MCP servers, and metadata."
              },
              "definition_error": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the stored definition could not be parsed, when it could not be.\n\nPresent only for a corrupt row. The capability keeps its identity\ncolumns so a surface can name what is broken, but `definition` is the\ninert default and `definition.status` reports `retired`, so nothing\nreads it as a usable capability.",
                "example": "missing field `acts_as` at line 1 column 84"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when this resource was soft-deleted, if any (RFC 3339)."
              },
              "description": {
                "type": "string",
                "description": "Short summary shown in pickers, search results, and API listings.",
                "example": "Adds research instructions, starter files, and MCP tools."
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-facing label shown in the UI. Defaults to `name` when omitted.",
                "example": "Research Pack"
              },
              "id": {
                "type": "string",
                "description": "Public resource ID for this persisted declarative capability.",
                "example": "cap_01933b5a000070008000000000000001"
              },
              "name": {
                "type": "string",
                "description": "Stable unique name used in capability refs. Lowercase letters, numbers, and underscores.",
                "example": "research_pack"
              },
              "status": {
                "type": "string",
                "description": "Lifecycle state for the resource: active, disabled, archived, or deleted.",
                "example": "active"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this resource was last updated (RFC 3339)."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_Harness": {
        "allOf": [
          {
            "type": "object",
            "description": "Harness configuration for sessions.\nA harness defines the base behavior and capabilities that apply to all sessions.",
            "required": [
              "id",
              "name",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the harness was archived.",
                "example": "2026-05-26T00:00:00Z"
              },
              "capabilities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AgentCapabilityConfig"
                },
                "description": "Capabilities enabled for this harness with per-harness configuration."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the harness was created.",
                "example": "2026-04-01T10:00:00Z"
              },
              "default_model_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Default LLM model ID for this harness.\nLowest priority in chain: controls > session > agent > harness.",
                "example": "model_01933b5a00007000800000000000001"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the harness was deleted.",
                "example": "2026-05-26T00:00:00Z"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable description of what the harness does.",
                "example": "Default harness with file-system + secrets capabilities; safe baseline for new agents."
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable display name shown in UI.",
                "example": "Conversation"
              },
              "embedder_metadata": {
                "type": "object",
                "description": "Arbitrary key-value metadata injected into LLM requests for observability.\nKeys from system context (session_id, org_id, etc.) always take precedence.",
                "additionalProperties": {
                  "type": "string"
                },
                "propertyNames": {
                  "type": "string"
                },
                "example": {
                  "env": "production",
                  "team": "platform"
                }
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display glyph name rendered by the UI (e.g. \"message-circle\").\n\nBuilt-in harnesses declare it in their definition; custom harnesses\nleave it unset and fall back to the UI's generic harness glyph.",
                "example": "message-circle"
              },
              "id": {
                "type": "string",
                "description": "Unique identifier for the harness (format: harness_{32-hex}).",
                "example": "harness_01933b5a00007000800000000000001"
              },
              "initial_files": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InitialFile"
                },
                "description": "Starter files copied into each new session for this harness."
              },
              "is_built_in": {
                "type": "boolean",
                "description": "Whether this harness is built-in (system-managed, readonly).\nBuilt-in harnesses are provisioned during org initialization and\ncannot be modified or deleted via the API. Users can copy them.",
                "example": false
              },
              "localizations": {
                "$ref": "#/components/schemas/EntityLocalizations",
                "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
              },
              "mcpServers": {
                "$ref": "#/components/schemas/BTreeMap",
                "description": "Remote MCP servers scoped to this harness and inherited by descendant layers."
              },
              "name": {
                "type": "string",
                "description": "Name, unique per org (e.g. \"conversation\").",
                "example": "conversation"
              },
              "network_access": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/NetworkAccessList",
                    "description": "Network access list controlling which hosts/URLs sessions can reach.\nMerged with agent and session layers (allowed: intersect, blocked: union)."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "parallel_tool_calls": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                "example": true
              },
              "parent_harness_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional parent harness that this harness inherits from.",
                "example": "harness_01933b5a000070008000000000000602"
              },
              "status": {
                "$ref": "#/components/schemas/HarnessStatus",
                "description": "Current lifecycle status of the harness."
              },
              "system_prompt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "System prompt that defines the harness's base behavior.\n\nForms the foundation of the prompt stack. Optional: when absent the\nharness contributes no base prompt, so the effective prompt comes\nentirely from the parent harness (if any), the agent, the session, and\ncapability contributions. Empty/whitespace-only values normalize to\n`None`.",
                "example": "You are an Everruns agent. Be concise, cite sources when possible, and decline tasks outside your assigned scope."
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tags for organizing and filtering harnesses.",
                "example": [
                  "baseline",
                  "production"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the harness was last updated.",
                "example": "2026-05-20T14:00:00Z"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_McpServer": {
        "allOf": [
          {
            "type": "object",
            "description": "MCP Server configuration.\nRepresents a remote MCP server that can provide tools and resources.",
            "required": [
              "id",
              "name",
              "url",
              "transport_type",
              "status",
              "api_key_set",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "api_key_set": {
                "type": "boolean",
                "description": "Whether an API key has been configured."
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the MCP server was archived."
              },
              "auth_mode": {
                "$ref": "#/components/schemas/McpServerAuthMode",
                "description": "Authentication mode for this MCP server."
              },
              "connection_check": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/McpConnectionCheck",
                    "description": "Whether this OAuth preset's sign-in service was reachable when it was\nlast checked. Present only on OAuth presets."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the MCP server was created."
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the MCP server was deleted."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable description of the MCP server.",
                "example": "Atlassian MCP Server for Jira and Confluence"
              },
              "elicitation_policy": {
                "$ref": "#/components/schemas/McpElicitationPolicy",
                "description": "Which elicitation modes this server may use (`url` by default)."
              },
              "headers": {
                "type": "object",
                "description": "Additional HTTP headers for authentication.\nKeys are header names, values are header values.",
                "additionalProperties": {
                  "type": "string"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "id": {
                "type": "string",
                "description": "Unique identifier for the MCP server.",
                "example": "mcp_01933b5a00007000800000000000001"
              },
              "interactive_views": {
                "$ref": "#/components/schemas/McpInteractiveViews",
                "description": "Where this server's MCP App views are shown: `on` (console and a\npicture in Slack), `console_only`, or `off`."
              },
              "name": {
                "type": "string",
                "description": "Display name of the MCP server.",
                "example": "atlassian-mcp-server"
              },
              "oauth_provider_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Stable provider id used for user-scoped OAuth connections."
              },
              "presentation": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/McpServerPresentation",
                    "description": "Title, icon, and links published by the remote server.\nThe operator `name` and `description` are unchanged."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "protocol_mode": {
                "$ref": "#/components/schemas/McpProtocolMode",
                "description": "Protocol-era adoption policy for the MCP client (`auto` negotiates)."
              },
              "service_connection_provider": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Connection provider whose connection on an agent's service virtual user\nsupplies the service credential instead of an MCP OAuth grant.",
                "example": "github"
              },
              "status": {
                "$ref": "#/components/schemas/McpServerStatus",
                "description": "Current lifecycle status of the MCP server."
              },
              "tool_timeout_ms": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "How long one tool call may take, in milliseconds. Absent means the\n60000 default.",
                "example": 300000,
                "minimum": 0
              },
              "transport_type": {
                "$ref": "#/components/schemas/McpServerTransportType",
                "description": "Transport type (currently only HTTP supported)."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the MCP server was last updated."
              },
              "url": {
                "type": "string",
                "description": "URL of the MCP server endpoint.",
                "example": "https://mcp.atlassian.com/v1/mcp"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_Model": {
        "allOf": [
          {
            "type": "object",
            "description": "LLM Model entity",
            "required": [
              "id",
              "provider_id",
              "model_id",
              "profile_key",
              "service",
              "display_name",
              "capabilities",
              "is_favorite",
              "enabled",
              "source",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "capabilities": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Capability tags supported by this model (e.g. `chat`, `tools`, `vision`)."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this model was created (RFC 3339)."
              },
              "display_name": {
                "type": "string",
                "description": "Human-readable display name. Safe to render in user-facing messages."
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether this model is selectable. Controls UI visibility AND server-side resolution: `ProviderResolverService` requires `enabled = true`, and org default-model validation rejects disabled models. Disabled models stay visible in raw list endpoints (so admins can re-enable them) but cannot be used in active sessions or as a session/agent default."
              },
              "id": {
                "type": "string",
                "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                "example": "model_01933b5a00007000800000000000001"
              },
              "is_favorite": {
                "type": "boolean",
                "description": "Whether this model is starred in the UI for quick access."
              },
              "model_id": {
                "type": "string",
                "description": "Provider-side model identifier as sent on the wire (e.g. `gpt-5.2`, `claude-sonnet-5`)."
              },
              "profile_key": {
                "type": "string",
                "description": "Stable assigned profile identity."
              },
              "provider_id": {
                "type": "string",
                "description": "Owning provider's prefixed public identifier.",
                "example": "provider_01933b5a00007000800000000000001"
              },
              "service": {
                "$ref": "#/components/schemas/ServiceKind",
                "description": "The typed service selected by this model."
              },
              "source": {
                "$ref": "#/components/schemas/ModelSource",
                "description": "How this model entry was added (manually, discovered, or seeded as predefined)."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this model was last updated (RFC 3339)."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_ModelWithProvider": {
        "allOf": [
          {
            "type": "object",
            "description": "LLM Model with provider info",
            "required": [
              "id",
              "provider_id",
              "model_id",
              "profile_key",
              "service",
              "display_name",
              "capabilities",
              "is_favorite",
              "enabled",
              "source",
              "created_at",
              "updated_at",
              "provider_name",
              "provider_type",
              "healthy"
            ],
            "properties": {
              "capabilities": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Capability tags supported by this model.",
                "example": [
                  "text",
                  "tools",
                  "vision",
                  "thinking"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this model was created (RFC 3339).",
                "example": "2026-01-04T11:23:00Z"
              },
              "display_name": {
                "type": "string",
                "description": "Human-readable display name.",
                "example": "Claude Sonnet 5.5"
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether this model is selectable. Controls UI visibility AND server-side resolution: `ProviderResolverService` requires `enabled = true`, and org default-model validation rejects disabled models.",
                "example": true
              },
              "healthy": {
                "type": "boolean",
                "description": "Derived: model is configured and ready for use. Currently means the\njoined provider is active and has an API key set; over time this may\nalso incorporate live reachability checks. Not persisted.",
                "example": true
              },
              "id": {
                "type": "string",
                "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                "example": "model_01933b5a00007000800000000000001"
              },
              "is_favorite": {
                "type": "boolean",
                "description": "Whether this model is starred in the UI for quick access.",
                "example": true
              },
              "is_new": {
                "type": "boolean",
                "description": "Derived: a discovered model that is still disabled and appeared after\nthe provider's models were last reviewed. Not persisted."
              },
              "model_id": {
                "type": "string",
                "description": "Provider-side model identifier as sent on the wire (e.g. `gpt-5.2`).",
                "example": "claude-sonnet-5-5"
              },
              "model_vendor": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ModelVendor",
                    "description": "Vendor/brand of the model, derived from the model registry. Drives UI\nbranding (icons). `None` when the model id is not in the registry. Not persisted."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profile": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ModelProfile",
                    "description": "Readonly profile with model capabilities (limits, pricing, modalities). Not persisted."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profile_key": {
                "type": "string",
                "description": "Stable assigned profile identity."
              },
              "provider_id": {
                "type": "string",
                "description": "Owning provider's prefixed public identifier.",
                "example": "provider_01933b5a00007000800000000000001"
              },
              "provider_name": {
                "type": "string",
                "description": "Joined provider display name.",
                "example": "Anthropic"
              },
              "provider_type": {
                "$ref": "#/components/schemas/DriverId",
                "description": "Joined provider implementation type."
              },
              "service": {
                "$ref": "#/components/schemas/ServiceKind",
                "description": "The typed service selected by this model."
              },
              "source": {
                "$ref": "#/components/schemas/ModelSource",
                "description": "How this model entry was added (manually, discovered, or seeded as predefined)."
              },
              "stale": {
                "type": "boolean",
                "description": "Derived: a discovered model the provider no longer lists (not seen in\nits most recent sync). Kept, not deleted, so defaults and agents that\nuse it can be fixed first. Not persisted."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this model was last updated (RFC 3339).",
                "example": "2026-05-27T15:24:00Z"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_Provider": {
        "allOf": [
          {
            "type": "object",
            "description": "LLM Provider entity (API keys never exposed)\nThis is the persisted provider entity, separate from the runtime provider trait.",
            "required": [
              "id",
              "name",
              "provider_type",
              "api_key_set",
              "status",
              "managed",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "api": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Chat API declared by the provider driver; \"default\" restores its default."
              },
              "api_key_set": {
                "type": "boolean",
                "description": "Whether an API key is configured. The key itself is never returned."
              },
              "base_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Custom base URL for self-hosted / proxied providers. `None` means use the provider's default endpoint."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this provider was created (RFC 3339)."
              },
              "id": {
                "type": "string",
                "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                "example": "provider_01933b5a00007000800000000000001"
              },
              "last_synced_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp of the most recent successful model sync from the provider's API (RFC 3339)."
              },
              "managed": {
                "type": "boolean",
                "description": "Whether this provider is host-managed (EVE-810). A managed provider is\nprovisioned by the host/embedder; the OSS API rejects tenant PATCH/DELETE\non it (403). Read-only to org admins. Defaults to `false`."
              },
              "models_reviewed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When someone last reviewed this provider's discovered models (RFC 3339).\nA discovered model created later that is still disabled is reported as\n`is_new` on the model. `None` means never reviewed."
              },
              "name": {
                "type": "string",
                "description": "Human-readable provider name. Safe to render in user-facing messages."
              },
              "provider_type": {
                "$ref": "#/components/schemas/DriverId",
                "description": "Provider implementation type (OpenAI, Anthropic, Gemini, etc.)."
              },
              "request_options": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ProviderRequestOptions",
                    "description": "Extra headers and diagnostics options applied to every request sent to\nthis provider. `None` when the org configured nothing."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "$ref": "#/components/schemas/ProviderStatus",
                "description": "Current lifecycle status of this provider."
              },
              "trace": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ProviderTraceConfig",
                    "description": "Resolved trace/observability link configuration: the driver's default\ntemplates overlaid with this provider's stored overrides. `None` when the\ndriver exposes no dashboard and the org configured nothing."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this provider was last updated (RFC 3339)."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_ResourceWithCounts_Harness": {
        "allOf": [
          {
            "allOf": [
              {
                "type": "object",
                "description": "Harness configuration for sessions.\nA harness defines the base behavior and capabilities that apply to all sessions.",
                "required": [
                  "id",
                  "name",
                  "status",
                  "created_at",
                  "updated_at"
                ],
                "properties": {
                  "archived_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Timestamp when the harness was archived.",
                    "example": "2026-05-26T00:00:00Z"
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/AgentCapabilityConfig"
                    },
                    "description": "Capabilities enabled for this harness with per-harness configuration."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Timestamp when the harness was created.",
                    "example": "2026-04-01T10:00:00Z"
                  },
                  "default_model_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Default LLM model ID for this harness.\nLowest priority in chain: controls > session > agent > harness.",
                    "example": "model_01933b5a00007000800000000000001"
                  },
                  "deleted_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Timestamp when the harness was deleted.",
                    "example": "2026-05-26T00:00:00Z"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Human-readable description of what the harness does.",
                    "example": "Default harness with file-system + secrets capabilities; safe baseline for new agents."
                  },
                  "display_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Human-readable display name shown in UI.",
                    "example": "Conversation"
                  },
                  "embedder_metadata": {
                    "type": "object",
                    "description": "Arbitrary key-value metadata injected into LLM requests for observability.\nKeys from system context (session_id, org_id, etc.) always take precedence.",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "propertyNames": {
                      "type": "string"
                    },
                    "example": {
                      "env": "production",
                      "team": "platform"
                    }
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Display glyph name rendered by the UI (e.g. \"message-circle\").\n\nBuilt-in harnesses declare it in their definition; custom harnesses\nleave it unset and fall back to the UI's generic harness glyph.",
                    "example": "message-circle"
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique identifier for the harness (format: harness_{32-hex}).",
                    "example": "harness_01933b5a00007000800000000000001"
                  },
                  "initial_files": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/InitialFile"
                    },
                    "description": "Starter files copied into each new session for this harness."
                  },
                  "is_built_in": {
                    "type": "boolean",
                    "description": "Whether this harness is built-in (system-managed, readonly).\nBuilt-in harnesses are provisioned during org initialization and\ncannot be modified or deleted via the API. Users can copy them.",
                    "example": false
                  },
                  "localizations": {
                    "$ref": "#/components/schemas/EntityLocalizations",
                    "description": "Locale-keyed display overlays; identifiers and execution instructions are unchanged."
                  },
                  "mcpServers": {
                    "$ref": "#/components/schemas/BTreeMap",
                    "description": "Remote MCP servers scoped to this harness and inherited by descendant layers."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name, unique per org (e.g. \"conversation\").",
                    "example": "conversation"
                  },
                  "network_access": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/NetworkAccessList",
                        "description": "Network access list controlling which hosts/URLs sessions can reach.\nMerged with agent and session layers (allowed: intersect, blocked: union)."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parallel_tool_calls": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                    "example": true
                  },
                  "parent_harness_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional parent harness that this harness inherits from.",
                    "example": "harness_01933b5a000070008000000000000602"
                  },
                  "status": {
                    "$ref": "#/components/schemas/HarnessStatus",
                    "description": "Current lifecycle status of the harness."
                  },
                  "system_prompt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "System prompt that defines the harness's base behavior.\n\nForms the foundation of the prompt stack. Optional: when absent the\nharness contributes no base prompt, so the effective prompt comes\nentirely from the parent harness (if any), the agent, the session, and\ncapability contributions. Empty/whitespace-only values normalize to\n`None`.",
                    "example": "You are an Everruns agent. Be concise, cite sources when possible, and decline tasks outside your assigned scope."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Tags for organizing and filtering harnesses.",
                    "example": [
                      "baseline",
                      "production"
                    ]
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Timestamp when the harness was last updated.",
                    "example": "2026-05-20T14:00:00Z"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "session_count",
                  "app_count"
                ],
                "properties": {
                  "app_count": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Number of non-deleted apps using this resource.",
                    "minimum": 0
                  },
                  "session_count": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Number of sessions using this resource.",
                    "minimum": 0
                  }
                }
              }
            ],
            "description": "Wrapper that flattens lightweight relationship counts into resource responses."
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WithUrls_Session": {
        "allOf": [
          {
            "type": "object",
            "description": "Session - instance of agentic loop execution.\nA session represents a single conversation with an agent.",
            "required": [
              "id",
              "organization_id",
              "workspace_id",
              "harness_id",
              "owner_principal_id",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "active_schedule_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Number of active (enabled) schedules for this session.\nPopulated when the session is fetched for API responses.",
                "example": 2,
                "minimum": 0
              },
              "activity": {
                "$ref": "#/components/schemas/SessionActivity",
                "description": "Outcome-oriented status derived from `status` and the last turn result.\nThis is the value the sessions list groups by and the facet rail counts."
              },
              "agent_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ID of the agent working in this session (format: agent_{32-hex}). Optional.",
                "example": "agent_01933b5a00007000800000000000001"
              },
              "agent_revision": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "Revision of the agent's history this session started on, when the\nagent had one. `everruns history show <agent> --revision N` shows the\nconfiguration that ran.",
                "example": 4
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When this session was archived; `None` means active. Archived sessions\nare hidden from default list results and shown by opting in\n(`include_archived=true`). Unlike `is_pinned`, archive is a property of\nthe session itself rather than of the viewer.",
                "example": "2026-05-25T10:14:32Z"
              },
              "blueprint_config": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Validated config passed by host at blueprint spawn time.\nExample: `{\"target_repo\": \"acme/everruns\"}`."
              },
              "blueprint_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Blueprint ID. When set, reason_activity and act_activity build TurnAgent\nfrom the blueprint definition instead of from harness_id/agent_id.",
                "example": "blueprint_research_pack"
              },
              "capabilities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AgentCapabilityConfig"
                },
                "description": "Session-level capabilities (additive to agent capabilities).\nApplied after agent capabilities when building TurnAgent."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the session was created.",
                "example": "2026-05-25T10:00:00Z"
              },
              "effective_owner": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PrincipalSummary",
                    "description": "Effective human owner summary."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "event_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Total events recorded for this session (EVE-868). Derived from the\nsession's event sequence rather than counted, so the session detail\ntab bar costs no extra scan over `events`.\n`None` on payloads built outside the database read path.",
                "example": 42,
                "minimum": 0
              },
              "features": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Aggregated UI features from all active capabilities (harness + agent + session).\nComputed at read time from the capability registry.\nKnown features: \"file_system\", \"schedules\", \"secrets\", \"key_value\",\n\"sql_database\", \"leased_resources\".",
                "example": [
                  "file_system",
                  "secrets"
                ]
              },
              "file_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Non-directory files in this session's workspace (EVE-868). Read from\n`workspaces.file_count`. Counts persisted files only: capability-provided\nvirtual mounts are served from memory and are not included.",
                "example": 6,
                "minimum": 0
              },
              "finished_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the session finished (completed or failed).",
                "example": "2026-05-25T10:14:32Z"
              },
              "forked_from_sequence": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Parent event sequence the fork was taken at (the fork point). NULL unless\nthis session is a fork.",
                "example": 42
              },
              "forked_from_session_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Session this one was forked from. NULL for sessions that were not forked.\nDistinct from `parent_session_id` (subagent nesting): forking is a\nuser-initiated \"branch from here\" relationship."
              },
              "goal": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Session objective visible to the runtime agent at system-prompt level.",
                "example": "Investigate the queue latency regression"
              },
              "harness_id": {
                "type": "string",
                "description": "ID of the harness for this session (format: harness_{32-hex}).",
                "example": "harness_01933b5a00007000800000000000001"
              },
              "hints": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Session-level client hints — arbitrary key-value pairs declared by the\nclient at session creation time. These are defaults for every turn;\nper-message `controls.hints` override these key-by-key (shallow merge).\n\nExamples: `{\"setup_connection\": true, \"rich_media\": true}`",
                "additionalProperties": {},
                "propertyNames": {
                  "type": "string"
                }
              },
              "id": {
                "type": "string",
                "description": "Unique identifier for the session (format: session_{32-hex}).",
                "example": "session_01933b5a00007000800000000000001"
              },
              "initial_files": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InitialFile"
                },
                "description": "Starting files for a new file tree (additive to agent/harness files).\nMatching paths override earlier layers. Rejected when attaching workspace_id."
              },
              "is_pinned": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether this session is pinned by the current user.\nOnly populated when the request has an authenticated user context.",
                "example": false
              },
              "last_message_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp of the latest input or completed assistant message.\nPopulated on session lists; session edits and tool events do not advance it."
              },
              "last_turn_status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Outcome of the latest terminal turn, distinguishing cancellation from failure."
              },
              "locale": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Locale for localized agent behavior and formatting (BCP 47, e.g. `uk-UA`).",
                "example": "en-US"
              },
              "max_iterations": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Maximum number of LLM iterations per turn for this session.",
                "example": 50,
                "minimum": 0
              },
              "mcpServers": {
                "$ref": "#/components/schemas/BTreeMap",
                "description": "Remote MCP servers scoped to this session only."
              },
              "mcp_creator": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/McpClientAttribution",
                    "description": "Server-recorded MCP client that created this session. Not the author of later inputs."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "model_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "LLM model ID to use for this session (format: model_{32-hex}).\nOverrides the agent's default model if set.",
                "example": "model_01933b5a00007000800000000000001"
              },
              "network_access": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/NetworkAccessList",
                    "description": "Network access list controlling which hosts/URLs this session can reach.\nMerged with harness and agent layers (allowed: intersect, blocked: union)."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "organization_id": {
                "type": "string",
                "description": "Organization this session belongs to (format: org_{32-hex}).",
                "example": "org_00000000000000000000000000000001"
              },
              "output_preview": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Preview text from the last assistant response (truncated).",
                "example": "Here is a Q3 plan covering the three pillars we discussed..."
              },
              "owner": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PrincipalSummary",
                    "description": "Owning principal summary."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "owner_principal_id": {
                "type": "string",
                "description": "Owning principal for this session.",
                "example": "principal_01933b5a000070008000000000000001"
              },
              "parallel_tool_calls": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Request-level parallel tool calling preference (EVE-598).\n\n`None` (default) preserves provider defaults. `Some(true)` signals the\nprovider that parallel tool calls are wanted; `Some(false)` requests at\nmost one tool call per turn and forces serial execution. Merged across\nharness/agent/session layers (overlay wins).",
                "example": true
              },
              "parent_session_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Parent session that spawned this subagent. NULL for top-level sessions.\nUsed to compute governed subagent delegation depth."
              },
              "playground_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Fixed end-user identity for a Playground conversation; independent of the resident service."
              },
              "preview": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Preview text from the first user message (truncated).",
                "example": "Help me draft the Q3 marketing plan"
              },
              "resolved_owner_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Denormalized effective human owner of the owning principal lineage.",
                "example": "550e8400-e29b-41d4-a716-446655440000"
              },
              "run_summary": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Generated one-sentence description of what the run did, and where it\nfailed (EVE-867). Absent until a terminal turn has been summarised, and\nalways absent for chat threads and for deployments with no utility LLM,\nso a reader must have a fallback rather than treating this as required.",
                "example": "Ran the nightly report and failed posting it to Slack: channel_not_found."
              },
              "source": {
                "$ref": "#/components/schemas/SessionSource",
                "description": "How this session was started. Server-owned for every ingress path."
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when the session started executing.",
                "example": "2026-05-25T10:00:01Z"
              },
              "status": {
                "$ref": "#/components/schemas/SessionStatus",
                "description": "Current execution status of the session."
              },
              "system_prompt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Session-level system prompt override.\nPrepended to the agent's system prompt when building TurnAgent."
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tags for organizing and filtering sessions.",
                "example": [
                  "marketing",
                  "q3",
                  "draft"
                ]
              },
              "task_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Background work owned by this session — subagents, external agents and\nbackground tools (EVE-868). Read from `sessions.task_count`. This is\nwhat the Work tab holds; `active_schedule_count` describes only the\nschedules it also lists.",
                "example": 3,
                "minimum": 0
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Human-readable title for the session.",
                "example": "Q3 marketing brief"
              },
              "tools": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ToolDefinition"
                },
                "description": "Client-side tools for this session (additive to agent tools)."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the session was last updated.",
                "example": "2026-05-25T10:14:32Z"
              },
              "usage": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TokenUsage",
                    "description": "Cumulative token usage for all LLM calls in this session."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "virtual_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Optional resident virtual user for unattended/background execution.",
                "example": "identity_01933b5a00007000800000000000001"
              },
              "workspace_id": {
                "type": "string",
                "description": "Workspace this session is attached to (format: wsp_{32-hex}). Owns the\nsession's virtual filesystem. For the default 1:1 case this mirrors the\nsession id, but clients should read it here rather than deriving it.",
                "example": "wsp_01933b5a00007000800000000000001"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`.",
        "x-sdk-response-wrapper": {
          "kind": "resource",
          "model": "#/components/schemas/Session"
        }
      },
      "WithUrls_Skill": {
        "allOf": [
          {
            "type": "object",
            "description": "Skill entity (API response type)",
            "required": [
              "id",
              "name",
              "description",
              "source_type",
              "status",
              "version",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "allowed_tools": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Comma-separated list of tool patterns this skill may invoke. `None` means inherit from the harness."
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when this skill was archived, if any (RFC 3339). Archived skills are hidden from default list views."
              },
              "compatibility": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Compatibility marker describing host-runtime requirements declared by the skill (e.g. min platform version). Informational."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this skill was created (RFC 3339)."
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp when this skill was hard-deleted, if any (RFC 3339)."
              },
              "description": {
                "type": "string",
                "description": "Short, agent- and user-readable summary of what the skill does and when to use it.",
                "example": "Extract text and tables from PDF files."
              },
              "disable_model_invocation": {
                "type": "boolean",
                "description": "When `true`, the LLM is prevented from auto-invoking this skill; only the user can trigger it explicitly."
              },
              "id": {
                "type": "string",
                "description": "Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).",
                "example": "skill_01933b5a00007000800000000000001"
              },
              "license": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "License string as declared by the skill author (e.g. `MIT`, `Apache-2.0`). Informational; not enforced."
              },
              "metadata": {
                "type": "object",
                "description": "Free-form metadata declared by the skill author.",
                "additionalProperties": {},
                "propertyNames": {
                  "type": "string"
                }
              },
              "name": {
                "type": "string",
                "description": "Stable kebab-case slug used to invoke the skill (e.g. `/pdf-processing` in chat). Safe to render in user-facing messages.",
                "example": "pdf-processing"
              },
              "source_type": {
                "$ref": "#/components/schemas/SkillSourceType",
                "description": "How the skill content is sourced (filesystem, URL, embedded). Determines reload semantics."
              },
              "status": {
                "$ref": "#/components/schemas/SkillStatus",
                "description": "Current lifecycle status (`active`, `archived`, `deleted`)."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when this skill was last updated (RFC 3339)."
              },
              "user_invocable": {
                "type": "boolean",
                "description": "Whether this skill appears as a `/`-prefixed slash command for end users in chat UIs."
              },
              "version": {
                "type": "string",
                "description": "Semver string declared by the skill author. Free-form; sorted lexicographically when comparing."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "self_url",
              "view_url",
              "ui_link"
            ],
            "properties": {
              "allowed_actions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AllowedAction"
                },
                "description": "State-aware hypermedia actions the caller can take on this resource\nnext (e.g. `cancel`, `events`, `update`). Omitted from the wire\nshape when empty so resources that haven't opted into the\nconvention don't grow their payloads."
              },
              "self_url": {
                "type": "string",
                "description": "Full API endpoint URL for this resource."
              },
              "ui_link": {
                "type": "string",
                "description": "Alias for `view_url`, used by command and MCP outputs."
              },
              "view_url": {
                "type": "string",
                "description": "Full UI URL for viewing this resource."
              }
            }
          }
        ],
        "description": "Wrapper that adds API and UI links to a serialized resource.\n\nUses `self_url` (not `url`) for the API link to avoid collision with\nresources that already have a `url` field (e.g. McpServer). The\n`allowed_actions` array carries state-aware hypermedia links — empty\n(and omitted from the wire shape) until the underlying resource opts\ninto the convention by overriding `ResourceUrlable::allowed_actions`."
      },
      "WorkAttention": {
        "type": "object",
        "description": "The open request a person has to answer. Answering still goes through the\nendpoint that owns the request; the report only points at it.",
        "required": [
          "kind",
          "prompt",
          "tool_call_ids"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/WorkAttentionKind",
            "description": "What kind of answer is needed."
          },
          "prompt": {
            "type": "string",
            "description": "One line naming what is asked (\"Run git push\").",
            "example": "Deploy to staging"
          },
          "tool_call_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Open client-side call ids that carry the request."
          }
        }
      },
      "WorkAttentionKind": {
        "type": "string",
        "description": "What the work waits on a person for.",
        "enum": [
          "approval",
          "question",
          "action"
        ]
      },
      "WorkFact": {
        "type": "object",
        "description": "One measured fact.",
        "required": [
          "kind",
          "value"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/WorkFactKind",
            "description": "Which fact."
          },
          "value": {
            "type": "integer",
            "format": "int64",
            "description": "Its value.",
            "example": 3,
            "minimum": 0
          }
        }
      },
      "WorkFactKind": {
        "type": "string",
        "description": "A measured fact about finished work.",
        "enum": [
          "files_changed",
          "issues",
          "tasks_started",
          "steps"
        ]
      },
      "WorkOutcome": {
        "type": "string",
        "description": "How the agent itself judged the work, when it reported.",
        "enum": [
          "done",
          "failed"
        ]
      },
      "WorkPlan": {
        "type": "object",
        "description": "The plan the agent shared, from its latest plan tool call.",
        "required": [
          "items",
          "done",
          "total"
        ],
        "properties": {
          "current": {
            "type": [
              "string",
              "null"
            ],
            "description": "The item in progress, in its \"doing\" form when the tool has one.",
            "example": "Run the tests"
          },
          "done": {
            "type": "integer",
            "format": "int32",
            "description": "Items done or skipped.",
            "example": 2,
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProgressStep"
            },
            "description": "Plan items in order."
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "description": "Items in total.",
            "example": 4,
            "minimum": 0
          }
        }
      },
      "WorkProgress": {
        "type": "object",
        "description": "Live progress inside one step, reported by the tool while it runs.",
        "properties": {
          "current": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Items done so far, when the tool knows a count.",
            "example": 7,
            "minimum": 0
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tool's latest status line.",
            "example": "Rendering image 7 of 12"
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Items in total, when the tool knows a count.",
            "example": 12,
            "minimum": 0
          }
        }
      },
      "WorkReport": {
        "type": "object",
        "description": "One piece of work, as every surface shows it.",
        "required": [
          "turn_id",
          "state",
          "headline",
          "steps"
        ],
        "properties": {
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Agent name snapshot at turn start.",
            "example": "Billing fixer"
          },
          "attention": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkAttention",
                "description": "The open request when the work waits on a person."
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Elapsed time: to the end when finished, to the read time while running.",
            "example": 133000,
            "minimum": 0
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the work ended.",
            "example": "2026-10-23T12:02:13Z"
          },
          "headline": {
            "type": "string",
            "description": "One line, always present: the current step while working, the request\nwhile waiting, the result when finished.",
            "example": "Step 3 of 4 · Running `cargo test`"
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Model of the latest generation.",
            "example": "gpt-6.2-sol"
          },
          "omitted_steps": {
            "type": "integer",
            "format": "int32",
            "description": "Steps run but no longer listed.",
            "example": 0,
            "minimum": 0
          },
          "plan": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkPlan",
                "description": "The plan the agent shared, if any."
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkResult",
                "description": "What finished work produced. Absent while working."
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the work started.",
            "example": "2026-10-23T12:00:00Z"
          },
          "state": {
            "$ref": "#/components/schemas/WorkState",
            "description": "Where the work stands."
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkStep"
            },
            "description": "Steps in order, newest last, bounded by [`MAX_REPORT_STEPS`]."
          },
          "turn_id": {
            "type": "string",
            "description": "The turn the report describes.",
            "example": "turn_01933b5a00007000800000000000001"
          }
        }
      },
      "WorkResult": {
        "type": "object",
        "description": "What finished work produced.",
        "properties": {
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskArtifact"
            },
            "description": "Files, links, pull requests and sessions the work produced."
          },
          "checks": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the agent checked the work (\"ran the 12 billing tests\"), when it\nreported.",
            "example": "Ran the 12 billing tests"
          },
          "facts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkFact"
            },
            "description": "Measured facts, in display order."
          },
          "outcome": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkOutcome",
                "description": "The agent's own verdict, when it reported."
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "One or two sentences on what changed.",
            "example": "Fixed the proration rounding and added a test."
          },
          "summary_source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkSummarySource",
                "description": "Where the summary came from."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WorkState": {
        "type": "string",
        "description": "Where a piece of work stands.",
        "enum": [
          "working",
          "needs_you",
          "done",
          "failed",
          "stopped"
        ]
      },
      "WorkStep": {
        "type": "object",
        "description": "One step of the work: a tool call, labelled by its narration.",
        "required": [
          "id",
          "tool_name",
          "label",
          "state"
        ],
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How long the step took, once finished.",
            "example": 4200,
            "minimum": 0
          },
          "id": {
            "type": "string",
            "description": "The tool call id.",
            "example": "call_01"
          },
          "label": {
            "type": "string",
            "description": "What the step is doing (\"Running tests\") or what came out of it\n(\"Read AGENTS.md\").",
            "example": "Ran `cargo test`, 12 tests passed"
          },
          "progress": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkProgress",
                "description": "Live progress while running."
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the step started.",
            "example": "2026-10-23T12:00:00Z"
          },
          "state": {
            "$ref": "#/components/schemas/WorkStepState",
            "description": "Where the step stands."
          },
          "tool_name": {
            "type": "string",
            "description": "Tool name.",
            "example": "bash"
          }
        }
      },
      "WorkStepState": {
        "type": "string",
        "description": "Where one step stands.",
        "enum": [
          "running",
          "done",
          "issue"
        ]
      },
      "WorkSummarySource": {
        "type": "string",
        "description": "Where [`WorkResult::summary`] came from.",
        "enum": [
          "agent",
          "reply"
        ]
      },
      "WorkerResponse": {
        "type": "object",
        "description": "Worker response",
        "required": [
          "id",
          "activity_types",
          "max_concurrency",
          "current_load",
          "status",
          "accepting_tasks",
          "started_at",
          "last_heartbeat_at",
          "tasks_completed",
          "tasks_failed"
        ],
        "properties": {
          "accepting_tasks": {
            "type": "boolean",
            "description": "Whether the worker is currently accepting new task assignments. Disabled briefly during drains or backpressure.",
            "example": true
          },
          "activity_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Activity types this worker accepts. Tasks with other activity types skip this worker.",
            "example": [
              "agent_loop",
              "tool_call"
            ]
          },
          "avg_task_duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Average task duration in milliseconds across recent activity.",
            "example": 184,
            "minimum": 0
          },
          "backpressure_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable reason the worker is rejecting tasks, when `accepting_tasks` is `false`.",
            "example": "draining for deploy"
          },
          "current_load": {
            "type": "integer",
            "format": "int32",
            "description": "Number of tasks currently executing on this worker.",
            "example": 3,
            "minimum": 0
          },
          "hostname": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hostname / pod name the worker is running on. Operator hint; not used for routing.",
            "example": "worker-prod-7c8b9d-r2x4p"
          },
          "id": {
            "type": "string",
            "description": "Opaque durable worker identifier (defaults to `worker-<uuid>`).",
            "example": "worker-7f3a9b2e-1c4d-4a5f-8b6c-9d0e1f2a3b4c"
          },
          "last_heartbeat_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the most recent heartbeat from this worker (RFC 3339).",
            "example": "2026-05-27T15:30:42Z"
          },
          "max_concurrency": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum number of tasks the worker will run concurrently.",
            "example": 8,
            "minimum": 0
          },
          "metadata": {
            "type": "object",
            "description": "Free-form worker-reported metadata (deployment, capabilities flag set, etc.)."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this worker started accepting tasks (RFC 3339).",
            "example": "2026-05-27T08:00:00Z"
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle status (`running`, `draining`, `stopped`, etc.).",
            "example": "running"
          },
          "tasks_completed": {
            "type": "integer",
            "format": "int64",
            "description": "Total tasks this worker has completed successfully.",
            "example": 12843,
            "minimum": 0
          },
          "tasks_failed": {
            "type": "integer",
            "format": "int64",
            "description": "Total tasks this worker has failed (including retries that were ultimately abandoned).",
            "example": 17,
            "minimum": 0
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "Build version of the worker binary.",
            "example": "0.8.35"
          },
          "worker_group": {
            "type": [
              "string",
              "null"
            ],
            "description": "Logical group this worker belongs to (used for routing). `None` for ungrouped workers.",
            "example": "session-agents"
          }
        }
      },
      "WorkersListResponse": {
        "type": "object",
        "description": "Workers list response",
        "required": [
          "data",
          "total",
          "summary"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkerResponse"
            },
            "description": "Page of items returned by this query."
          },
          "summary": {
            "$ref": "#/components/schemas/WorkersSummaryResponse"
          },
          "total": {
            "type": "integer",
            "description": "Total number of items matching the query, across all pages.",
            "minimum": 0
          }
        }
      },
      "WorkersSummaryResponse": {
        "type": "object",
        "description": "Workers summary stats",
        "required": [
          "active",
          "draining",
          "stopped",
          "total_capacity",
          "total_load"
        ],
        "properties": {
          "active": {
            "type": "integer",
            "description": "Workers in `running` state, accepting tasks.",
            "minimum": 0
          },
          "draining": {
            "type": "integer",
            "description": "Workers in `draining` state, finishing in-flight tasks but not accepting new ones.",
            "minimum": 0
          },
          "stopped": {
            "type": "integer",
            "description": "Workers in `stopped` state, neither running nor draining.",
            "minimum": 0
          },
          "total_capacity": {
            "type": "integer",
            "description": "Sum of `max_concurrency` across `active` workers only.",
            "minimum": 0
          },
          "total_load": {
            "type": "integer",
            "description": "Total tasks currently in flight across all workers.",
            "minimum": 0
          }
        }
      },
      "WorkflowEventResponse": {
        "type": "object",
        "description": "Workflow event response",
        "required": [
          "id",
          "workflow_id",
          "sequence_num",
          "event_type",
          "event_data",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339)."
          },
          "event_data": {},
          "event_type": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Monotonically-assigned internal event identifier."
          },
          "sequence_num": {
            "type": "integer",
            "format": "int32"
          },
          "workflow_id": {
            "type": "string",
            "format": "uuid",
            "description": "Durable workflow's identifier."
          }
        }
      },
      "WorkflowEventsListResponse": {
        "type": "object",
        "description": "Workflow events list response",
        "required": [
          "data",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowEventResponse"
            },
            "description": "Page of items returned by this query."
          },
          "total": {
            "type": "integer",
            "description": "Total number of items matching the query, across all pages.",
            "minimum": 0
          }
        }
      },
      "WorkflowResponse": {
        "type": "object",
        "description": "Workflow response",
        "required": [
          "id",
          "workflow_type",
          "status",
          "input",
          "created_at"
        ],
        "properties": {
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this resource completed, if any (RFC 3339).",
            "example": "2026-05-27T15:24:42Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when this resource was created (RFC 3339).",
            "example": "2026-05-27T15:24:00Z"
          },
          "error": {
            "type": "object",
            "description": "Human-readable error message, populated when this resource is in a failed state."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the workflow.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "input": {
            "type": "object",
            "description": "Initial input the workflow was started with. Shape varies by `workflow_type`."
          },
          "result": {
            "type": "object",
            "description": "Terminal result, populated when the workflow has completed successfully."
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when this resource started, if any (RFC 3339).",
            "example": "2026-05-27T15:24:01Z"
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle status.",
            "example": "running"
          },
          "workflow_type": {
            "type": "string",
            "description": "Workflow type identifier registered with the durable executor.",
            "example": "session_agent_loop"
          }
        }
      },
      "WorkflowsListResponse": {
        "type": "object",
        "description": "Workflows list response",
        "required": [
          "data",
          "total"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowResponse"
            },
            "description": "Page of items returned by this query."
          },
          "total": {
            "type": "integer",
            "description": "Total number of items matching the query, across all pages.",
            "minimum": 0
          }
        }
      },
      "Workspace": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Shared workspace for the Q4 research project"
          },
          "id": {
            "type": "string",
            "example": "wsp_01933b5a000070008000000000000001"
          },
          "name": {
            "type": "string",
            "example": "team-research"
          },
          "status": {
            "type": "string",
            "example": "active"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "agentId": {
        "type": "string",
        "description": "Prefixed identifier with 'agent' prefix",
        "example": "agent_01933b5a000070008000000000000001",
        "pattern": "^agent_[0-9a-f]{32}$"
      },
      "eventId": {
        "type": "string",
        "description": "Prefixed identifier with 'event' prefix",
        "example": "event_01933b5a000070008000000000000001",
        "pattern": "^event_[0-9a-f]{32}$"
      },
      "harnessId": {
        "type": "string",
        "description": "Prefixed identifier with 'harness' prefix",
        "example": "harness_01933b5a000070008000000000000001",
        "pattern": "^harness_[0-9a-f]{32}$"
      },
      "modelId": {
        "type": "string",
        "description": "Prefixed identifier with 'model' prefix",
        "example": "model_01933b5a000070008000000000000001",
        "pattern": "^model_[0-9a-f]{32}$"
      },
      "payacctId": {
        "type": "string",
        "description": "Prefixed identifier with 'payacct' prefix",
        "example": "payacct_01933b5a000070008000000000000001",
        "pattern": "^payacct_[0-9a-f]{32}$"
      },
      "payattId": {
        "type": "string",
        "description": "Prefixed identifier with 'payatt' prefix",
        "example": "payatt_01933b5a000070008000000000000001",
        "pattern": "^payatt_[0-9a-f]{32}$"
      },
      "paypolId": {
        "type": "string",
        "description": "Prefixed identifier with 'paypol' prefix",
        "example": "paypol_01933b5a000070008000000000000001",
        "pattern": "^paypol_[0-9a-f]{32}$"
      },
      "sbxtplId": {
        "type": "string",
        "description": "Prefixed identifier with 'sbxtpl' prefix",
        "example": "sbxtpl_01933b5a000070008000000000000001",
        "pattern": "^sbxtpl_[0-9a-f]{32}$"
      },
      "sessionId": {
        "type": "string",
        "description": "Prefixed identifier with 'session' prefix",
        "example": "session_01933b5a000070008000000000000001",
        "pattern": "^session_[0-9a-f]{32}$"
      }
    },
    "securitySchemes": {
      "AgentCredential": {
        "type": "http",
        "scheme": "bearer",
        "description": "Agent key (evr_ak_…), channel runtime token, or a token accepted by the channel's configured identity provider. Personal access tokens require org_members. Runtime-auth accepts an agent key with End-User or a configured identity-provider token; runtime tokens cannot renew themselves."
      }
    }
  },
  "tags": [
    {
      "name": "agent-execution",
      "x-displayName": "Agent API"
    },
    {
      "name": "agents",
      "description": "Agent management endpoints",
      "x-displayName": "Agents"
    },
    {
      "name": "agent-channels",
      "x-displayName": "Agent channels"
    },
    {
      "name": "harnesses",
      "description": "Harness management endpoints",
      "x-displayName": "Harnesses"
    },
    {
      "name": "capabilities",
      "description": "Capability management endpoints",
      "x-displayName": "Capabilities"
    },
    {
      "name": "skills",
      "description": "Skills registry endpoints",
      "x-displayName": "Skills"
    },
    {
      "name": "agent-scripts",
      "description": "Agent-owned saved shell script endpoints",
      "x-displayName": "Agent scripts"
    },
    {
      "name": "agent_views",
      "x-displayName": "Agent views"
    },
    {
      "name": "agent-triggers",
      "description": "Agent-owned schedule trigger endpoints",
      "x-displayName": "Agent triggers"
    },
    {
      "name": "agent-examples",
      "x-displayName": "Agent examples"
    },
    {
      "name": "harness-examples",
      "x-displayName": "Harness examples"
    },
    {
      "name": "history",
      "description": "Recorded changes to entities (who changed what, through which surface, and why) and the manager context their managers keep about them",
      "x-displayName": "History"
    },
    {
      "name": "apps",
      "x-displayName": "Apps"
    },
    {
      "name": "voice",
      "description": "Voice calls to agents through voice channels",
      "x-displayName": "Voice"
    },
    {
      "name": "sessions",
      "description": "Session management endpoints",
      "x-displayName": "Sessions"
    },
    {
      "name": "messages",
      "description": "Message management endpoints",
      "x-displayName": "Messages"
    },
    {
      "name": "rooms",
      "description": "Rooms: org-owned conversations where people, agents and guests talk, and addressed agents are woken",
      "x-displayName": "Rooms"
    },
    {
      "name": "events",
      "description": "Event streaming endpoints (SSE)",
      "x-displayName": "Events"
    },
    {
      "name": "Files",
      "x-displayName": "Files"
    },
    {
      "name": "images",
      "description": "Image upload and management endpoints",
      "x-displayName": "Images"
    },
    {
      "name": "session-resources",
      "description": "Session leased-resource visibility endpoints",
      "x-displayName": "Session resources"
    },
    {
      "name": "session-sandbox",
      "description": "Managed session sandbox lifecycle endpoints",
      "x-displayName": "Session sandbox"
    },
    {
      "name": "session-databases",
      "description": "Session-scoped SQL database endpoints",
      "x-displayName": "Session databases"
    },
    {
      "name": "session-storage",
      "description": "Session key-value storage endpoints",
      "x-displayName": "Session storage"
    },
    {
      "name": "session-tasks",
      "x-displayName": "Session tasks"
    },
    {
      "name": "Session Git",
      "x-displayName": "Session Git"
    },
    {
      "name": "workspace",
      "x-displayName": "Workspace"
    },
    {
      "name": "workspace-filesystem",
      "x-displayName": "Workspace filesystem"
    },
    {
      "name": "memory",
      "description": "Org-scoped named Memory management endpoints",
      "x-displayName": "Memory"
    },
    {
      "name": "knowledge",
      "x-displayName": "Knowledge"
    },
    {
      "name": "providers",
      "description": "Provider management endpoints. Providers and their models share the models permission (`org:models:*`).",
      "x-displayName": "Providers"
    },
    {
      "name": "models",
      "description": "LLM Model management endpoints",
      "x-displayName": "Models"
    },
    {
      "name": "extractions",
      "x-displayName": "Extractions"
    },
    {
      "name": "mcp-servers",
      "description": "MCP Server management endpoints",
      "x-displayName": "MCP servers"
    },
    {
      "name": "mcp_servers",
      "x-displayName": "MCP servers"
    },
    {
      "name": "web-search",
      "description": "Web search providers, organization search accounts and plan previews",
      "x-displayName": "Web search"
    },
    {
      "name": "plugins",
      "x-displayName": "Plugins"
    },
    {
      "name": "users",
      "description": "User management endpoints",
      "x-displayName": "Users"
    },
    {
      "name": "virtual-users",
      "x-displayName": "Virtual users"
    },
    {
      "name": "credentials",
      "x-displayName": "Credentials"
    },
    {
      "name": "Organizations",
      "x-displayName": "Organizations"
    },
    {
      "name": "organization invitations",
      "x-displayName": "Organization invitations"
    },
    {
      "name": "evals",
      "x-displayName": "Evals"
    },
    {
      "name": "observers",
      "x-displayName": "Observers"
    },
    {
      "name": "health-issues",
      "x-displayName": "Health issues"
    },
    {
      "name": "notifications",
      "x-displayName": "Notifications"
    },
    {
      "name": "durable",
      "x-displayName": "Durable"
    },
    {
      "name": "monitoring",
      "x-displayName": "Monitoring"
    },
    {
      "name": "tracing",
      "x-displayName": "Tracing"
    },
    {
      "name": "system",
      "description": "Whole-install health checks for platform operators",
      "x-displayName": "System"
    },
    {
      "name": "durable-schedules",
      "description": "Durable scheduled tasks management endpoints",
      "x-displayName": "Durable schedules"
    },
    {
      "name": "sandbox-templates",
      "x-displayName": "Sandbox templates"
    },
    {
      "name": "sandboxes",
      "x-displayName": "Sandboxes"
    },
    {
      "name": "budgets",
      "x-displayName": "Budgets"
    },
    {
      "name": "payments",
      "description": "Machine payment wallet, policy, and attempt endpoints",
      "x-displayName": "Payments"
    },
    {
      "name": "task-webhooks",
      "description": "Outbound HTTP webhooks fired on terminal task transitions",
      "x-displayName": "Task webhooks"
    },
    {
      "name": "audit_logs",
      "x-displayName": "Audit logs"
    },
    {
      "name": "commands",
      "description": "Generic command dispatch over the shared command contract",
      "x-displayName": "Commands"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Agent API",
      "tags": [
        "agent-execution"
      ],
      "x-description": "Call one agent: start sessions, send messages, stream results and respond to questions or tool approvals.",
      "x-slug": "agent-api"
    },
    {
      "name": "Agents & authoring",
      "tags": [
        "agents",
        "agent-channels",
        "harnesses",
        "capabilities",
        "skills",
        "agent-scripts",
        "agent_views",
        "agent-triggers",
        "agent-examples",
        "harness-examples",
        "history",
        "apps",
        "voice"
      ],
      "x-description": "Configure agents, harnesses, capabilities, skills and channels. Manage keys, triggers and recorded changes.",
      "x-slug": "agents-authoring"
    },
    {
      "name": "Sessions & workspaces",
      "tags": [
        "sessions",
        "messages",
        "rooms",
        "events",
        "Files",
        "images",
        "session-resources",
        "session-sandbox",
        "session-databases",
        "session-storage",
        "session-tasks",
        "Session Git",
        "workspace",
        "workspace-filesystem"
      ],
      "x-description": "Manage execution sessions and rooms, and their files, tasks, storage, databases and managed sandboxes.",
      "x-slug": "sessions-workspaces"
    },
    {
      "name": "Knowledge & memory",
      "tags": [
        "memory",
        "knowledge"
      ],
      "x-description": "Give agents persistent memory and versioned file collections. Manage sources, files and optional search indexes.",
      "x-slug": "knowledge-memory"
    },
    {
      "name": "Models & integrations",
      "tags": [
        "providers",
        "models",
        "extractions",
        "mcp-servers",
        "mcp_servers",
        "web-search",
        "plugins"
      ],
      "x-description": "Connect model providers, discover models and configure MCP servers, search providers and plugins.",
      "x-slug": "models-integrations"
    },
    {
      "name": "Identity & access",
      "tags": [
        "users",
        "virtual-users",
        "credentials",
        "Organizations",
        "organization invitations"
      ],
      "x-description": "Manage organizations, members, end users, invitations and connected identities.",
      "x-slug": "identity-access"
    },
    {
      "name": "Evaluation & reporting",
      "tags": [
        "evals",
        "observers",
        "health-issues",
        "notifications"
      ],
      "x-description": "Inspect agent quality, health, observers and notifications.",
      "x-slug": "evaluation-reporting"
    },
    {
      "name": "Operations & billing",
      "tags": [
        "durable",
        "monitoring",
        "tracing",
        "system",
        "durable-schedules",
        "sandbox-templates",
        "sandboxes",
        "budgets",
        "payments",
        "task-webhooks",
        "audit_logs",
        "commands"
      ],
      "x-description": "Operate durable execution, schedules, sandbox infrastructure, budgets, payments and audit logs.",
      "x-slug": "operations-billing"
    }
  ]
}
