{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/anthropic/main/json-schema/anthropic-beta-managed-agents-list-sessions-schema.json",
  "title": "BetaManagedAgentsListSessions",
  "description": "Paginated list of sessions.",
  "x-generated": "2026-09-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anthropic-sessions-beta-true-api-openapi.yml#/components/schemas/BetaManagedAgentsListSessions",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "description": "List of sessions.",
      "x-stainless-pagination-property": {
        "purpose": "items"
      },
      "type": "array",
      "items": {
        "$ref": "#/$defs/BetaManagedAgentsSession"
      }
    },
    "next_page": {
      "description": "Opaque cursor for the next page. Null when no more results.",
      "x-stainless-pagination-property": {
        "purpose": "next_cursor_field"
      },
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "prev_page": {
      "description": "Opaque cursor for the previous page. Null when on the first page. Pass as the `page` parameter to navigate backward.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "x-anthropic-beta-required": [
        "managed-agents-2026-04-01"
      ]
    }
  },
  "$defs": {
    "BetaCurrency": {
      "type": "string",
      "enum": [
        "USD"
      ]
    },
    "BetaManagedAgentsAdvisor": {
      "description": "Platform advisor roster entry: a model the session's primary thread may consult mid-turn.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "model"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "advisor"
          ]
        },
        "model": {
          "description": "The advisor model id.",
          "type": "string"
        }
      }
    },
    "BetaManagedAgentsAgentTool": {
      "description": "Union type for tool configurations returned in API responses.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsAgentToolset20260401"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsMCPToolset"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsCustomTool"
        }
      ]
    },
    "BetaManagedAgentsAgentToolConfigUnion": {
      "description": "Configuration for a specific agent tool.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsBashToolConfig"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsEditToolConfig"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsReadToolConfig"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsWriteToolConfig"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsGlobToolConfig"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsGrepToolConfig"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsWebFetchToolConfig"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsWebSearchToolConfig"
        }
      ]
    },
    "BetaManagedAgentsAgentToolset20260401": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "default_config",
        "configs"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "agent_toolset_20260401"
          ]
        },
        "default_config": {
          "$ref": "#/$defs/BetaManagedAgentsAgentToolsetDefaultConfig"
        },
        "configs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsAgentToolConfigUnion"
          }
        }
      }
    },
    "BetaManagedAgentsAgentToolsetDefaultConfig": {
      "description": "Resolved default configuration for agent tools.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsAlwaysAllowPolicy": {
      "description": "Tool calls are automatically approved without user confirmation.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "always_allow"
          ]
        }
      }
    },
    "BetaManagedAgentsAlwaysAskPolicy": {
      "description": "Tool calls require user confirmation before execution.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "always_ask"
          ]
        }
      }
    },
    "BetaManagedAgentsAnthropicSkill": {
      "description": "A resolved Anthropic-managed skill.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "skill_id",
        "version"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "anthropic"
          ]
        },
        "skill_id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "BetaManagedAgentsBashToolConfig": {
      "description": "Configuration for the bash tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "bash"
        },
        "name": {
          "type": "string",
          "const": "bash"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsBranchCheckout": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "branch"
          ]
        },
        "name": {
          "description": "Branch name to check out.",
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        }
      }
    },
    "BetaManagedAgentsBudget": {
      "description": "An enforced spend ceiling on a session. Discriminated on `type`; `limit` is the only kind currently supported.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsBudgetLimit"
        }
      ]
    },
    "BetaManagedAgentsBudgetLimit": {
      "description": "A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "max_list_cost"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "limit"
          ]
        },
        "max_list_cost": {
          "description": "Maximum list cost the session may accrue. List price is used regardless of any negotiated discount, so the cap fires at or before the actual charge.",
          "allOf": [
            {
              "$ref": "#/$defs/BetaMonetaryAmount"
            }
          ]
        }
      }
    },
    "BetaManagedAgentsCacheCreationUsage": {
      "description": "Prompt-cache creation token usage broken down by cache lifetime.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ephemeral_1h_input_tokens": {
          "description": "Tokens used to create 1-hour ephemeral cache entries.",
          "type": "integer",
          "format": "int32"
        },
        "ephemeral_5m_input_tokens": {
          "description": "Tokens used to create 5-minute ephemeral cache entries.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "BetaManagedAgentsCommitCheckout": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "sha"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "commit"
          ]
        },
        "sha": {
          "description": "Full commit SHA to check out.",
          "type": "string",
          "minLength": 7,
          "maxLength": 64
        }
      }
    },
    "BetaManagedAgentsCustomSkill": {
      "description": "A resolved user-created custom skill.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "skill_id",
        "version"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "custom"
          ]
        },
        "skill_id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "BetaManagedAgentsCustomTool": {
      "description": "A custom tool as returned in API responses.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "description",
        "input_schema"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "custom"
          ]
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "input_schema": {
          "$ref": "#/$defs/BetaManagedAgentsCustomToolInputSchema"
        }
      }
    },
    "BetaManagedAgentsCustomToolInputSchema": {
      "additionalProperties": true,
      "description": "JSON Schema for custom tool input parameters.",
      "properties": {
        "properties": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Properties",
          "x-stainless-skip": [
            "terraform"
          ]
        },
        "required": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Required"
        },
        "type": {
          "const": "object",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "BetaManagedAgentsEditToolConfig": {
      "description": "Configuration for the edit tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "edit"
        },
        "name": {
          "type": "string",
          "const": "edit"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsEffort": {
      "description": "How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsEffortLow"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsEffortMedium"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsEffortHigh"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsEffortXhigh"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsEffortMax"
        }
      ]
    },
    "BetaManagedAgentsEffortHigh": {
      "description": "High effort. Favors reasoning depth.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "high"
          ]
        }
      }
    },
    "BetaManagedAgentsEffortLow": {
      "description": "Low effort. Favors latency over reasoning depth.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "low"
          ]
        }
      }
    },
    "BetaManagedAgentsEffortMax": {
      "description": "Maximum effort. Favors reasoning depth over latency.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "max"
          ]
        }
      }
    },
    "BetaManagedAgentsEffortMedium": {
      "description": "Medium effort. Balances latency and reasoning depth.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "medium"
          ]
        }
      }
    },
    "BetaManagedAgentsEffortXhigh": {
      "description": "Extra-high effort. Not all models accept this level.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "xhigh"
          ]
        }
      }
    },
    "BetaManagedAgentsFileResource": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "id",
        "file_id",
        "mount_path",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "file"
          ]
        },
        "id": {
          "type": "string"
        },
        "file_id": {
          "type": "string"
        },
        "mount_path": {
          "type": "string"
        },
        "created_at": {
          "$ref": "#/$defs/BetaTimestamp"
        },
        "updated_at": {
          "$ref": "#/$defs/BetaTimestamp"
        }
      }
    },
    "BetaManagedAgentsGitHubRepositoryResource": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "id",
        "url",
        "mount_path",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "github_repository"
          ]
        },
        "id": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "mount_path": {
          "type": "string"
        },
        "checkout": {
          "anyOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsRepositoryCheckout"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "$ref": "#/$defs/BetaTimestamp"
        },
        "updated_at": {
          "$ref": "#/$defs/BetaTimestamp"
        }
      }
    },
    "BetaManagedAgentsGlobToolConfig": {
      "description": "Configuration for the glob tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "glob"
        },
        "name": {
          "type": "string",
          "const": "glob"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsGrepToolConfig": {
      "description": "Configuration for the grep tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "grep"
        },
        "name": {
          "type": "string",
          "const": "grep"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsMCPServer": {
      "description": "Union type for MCP server connection definitions returned in API responses.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsMCPServerURLDefinition"
        }
      ]
    },
    "BetaManagedAgentsMCPServerURLDefinition": {
      "description": "URL-based MCP server connection as returned in API responses.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "url"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "url"
          ]
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "BetaManagedAgentsMCPToolConfig": {
      "description": "Resolved configuration for a specific MCP tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsMCPToolset": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "mcp_server_name",
        "default_config",
        "configs"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "mcp_toolset"
          ]
        },
        "mcp_server_name": {
          "type": "string"
        },
        "default_config": {
          "$ref": "#/$defs/BetaManagedAgentsMCPToolsetDefaultConfig"
        },
        "configs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsMCPToolConfig"
          }
        }
      }
    },
    "BetaManagedAgentsMCPToolsetDefaultConfig": {
      "description": "Resolved default configuration for all tools from an MCP server.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsMemoryStoreResource": {
      "description": "A memory store attached to an agent session.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "memory_store_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "memory_store"
          ]
        },
        "memory_store_id": {
          "description": "The memory store ID (memstore_...). Must belong to the caller's organization and workspace.",
          "type": "string"
        },
        "access": {
          "description": "Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsMountMode"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "description": "Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "agent-memory-2026-07-22",
            "managed-agents-2026-04-01"
          ]
        },
        "description": {
          "description": "Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.",
          "type": "string",
          "x-anthropic-beta-required": [
            "agent-memory-2026-07-22",
            "managed-agents-2026-04-01"
          ]
        },
        "instructions": {
          "description": "Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.",
          "anyOf": [
            {
              "type": "string",
              "maxLength": 4096
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "agent-memory-2026-07-22",
            "managed-agents-2026-04-01"
          ]
        },
        "mount_path": {
          "description": "Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "agent-memory-2026-07-22",
            "managed-agents-2026-04-01"
          ]
        }
      }
    },
    "BetaManagedAgentsModel": {
      "title": "BetaManagedAgentsModel",
      "description": "The model that will power your agent.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "const": "claude-sonnet-5",
          "description": "High-performance model for coding and agents",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-fable-5",
          "description": "Next generation of intelligence for the hardest knowledge work and coding problems",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-opus-5",
          "description": "Powerful intelligence for long-running agents and coding",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-opus-4-8",
          "description": "Powerful intelligence for long-running agents and coding",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-opus-4-7",
          "description": "Powerful intelligence for long-running agents and coding",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-opus-4-6",
          "description": "Powerful intelligence for long-running agents and coding",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-sonnet-4-6",
          "description": "Best combination of speed and intelligence",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-haiku-4-5",
          "description": "Fastest model with near-frontier intelligence",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-haiku-4-5-20251001",
          "description": "Fastest model with near-frontier intelligence",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-opus-4-5",
          "description": "Powerful intelligence for long-running agents and coding",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-opus-4-5-20251101",
          "description": "Powerful intelligence for long-running agents and coding",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-sonnet-4-5",
          "description": "High-performance model for agents and coding",
          "x-stainless-nominal": false
        },
        {
          "const": "claude-sonnet-4-5-20250929",
          "description": "High-performance model for agents and coding",
          "x-stainless-nominal": false
        }
      ]
    },
    "BetaManagedAgentsModelConfig": {
      "description": "Model identifier and configuration.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/BetaManagedAgentsModel"
        },
        "speed": {
          "description": "Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Defaults to `standard`. Not all models support `fast`; invalid combinations are rejected at create time.",
          "allOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsSpeed"
            }
          ],
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01",
            "fast-mode-2026-02-01"
          ]
        },
        "effort": {
          "description": "How hard Claude works on each inference call. One of `low`, `medium`, `high`, `xhigh`, `max`. Always present; resolved to the per-model default at save time when not supplied.",
          "allOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsEffort"
            }
          ],
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        },
        "inference_geo": {
          "description": "Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.",
          "type": "string",
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        }
      }
    },
    "BetaManagedAgentsMountMode": {
      "type": "string",
      "description": "Access mode for an attached memory store.",
      "enum": [
        "read_write",
        "read_only"
      ]
    },
    "BetaManagedAgentsOutcomeEvaluationResource": {
      "description": "Evaluation state for a single outcome defined via a define_outcome event.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "outcome_id",
        "description",
        "result",
        "iteration",
        "completed_at",
        "explanation"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "outcome_evaluation"
          ]
        },
        "outcome_id": {
          "description": "Server-generated outc_ ID for this outcome.",
          "type": "string"
        },
        "description": {
          "description": "What the agent should produce.",
          "type": "string"
        },
        "result": {
          "description": "Current evaluation state. `pending` before the agent begins work; `running` while producing or revising; `evaluating` while the grader scores; `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.",
          "type": "string"
        },
        "iteration": {
          "description": "0-indexed revision cycle the outcome is currently on.",
          "type": "integer",
          "format": "int32"
        },
        "completed_at": {
          "description": "When the outcome reached a terminal result. Null while pending/running/evaluating.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaTimestamp"
            },
            {
              "type": "null"
            }
          ]
        },
        "explanation": {
          "description": "Grader's verdict text from the most recent evaluation. For satisfied, explains why criteria are met; for needs_revision (intermediate), what's missing; for failed, why unrecoverable.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "BetaManagedAgentsPermissionPolicy": {
      "description": "Permission policy for tool execution.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsAlwaysAllowPolicy"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsAlwaysAskPolicy"
        }
      ]
    },
    "BetaManagedAgentsReadToolConfig": {
      "description": "Configuration for the read tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "read"
        },
        "name": {
          "type": "string",
          "const": "read"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaManagedAgentsRepositoryCheckout": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsBranchCheckout"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsCommitCheckout"
        }
      ]
    },
    "BetaManagedAgentsServerToolUsage": {
      "description": "Cumulative count of server-executed tool invocations, broken down by tool.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "web_search_requests": {
          "description": "Number of server-executed web search requests.",
          "type": "integer",
          "format": "int32"
        },
        "web_fetch_requests": {
          "description": "Number of server-executed web fetch requests.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "BetaManagedAgentsSession": {
      "description": "A Managed Agents `session`.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "id",
        "status",
        "created_at",
        "updated_at",
        "environment_id",
        "title",
        "metadata",
        "agent",
        "resources",
        "vault_ids",
        "outcome_evaluations",
        "usage",
        "stats",
        "archived_at",
        "budget"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "session"
          ]
        },
        "id": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/BetaManagedAgentsSessionStatus"
        },
        "created_at": {
          "$ref": "#/$defs/BetaTimestamp"
        },
        "updated_at": {
          "$ref": "#/$defs/BetaTimestamp"
        },
        "environment_id": {
          "type": "string"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "agent": {
          "$ref": "#/$defs/BetaManagedAgentsSessionAgent"
        },
        "resources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsSessionResource"
          }
        },
        "vault_ids": {
          "description": "Vault IDs attached to the session at creation. Empty when no vaults were supplied.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "outcome_evaluations": {
          "description": "Per-outcome evaluation state. One entry per define_outcome event sent to the session.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsOutcomeEvaluationResource"
          },
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        },
        "usage": {
          "description": "Cumulative token usage for the session.",
          "allOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsSessionUsage"
            }
          ]
        },
        "stats": {
          "description": "Timing statistics for the session.",
          "allOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsSessionStats"
            }
          ]
        },
        "archived_at": {
          "description": "When the session was archived. Null if not archived.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaTimestamp"
            },
            {
              "type": "null"
            }
          ]
        },
        "deployment_id": {
          "description": "Deployment ID when the session was created from a deployment reference. Null otherwise.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        },
        "budget": {
          "description": "The session's enforced spend ceiling, or null when no budget is set.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsBudget"
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        }
      }
    },
    "BetaManagedAgentsSessionAgent": {
      "description": "Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "id",
        "version",
        "name",
        "description",
        "model",
        "system",
        "tools",
        "mcp_servers",
        "skills",
        "multiagent"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "agent"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "model": {
          "$ref": "#/$defs/BetaManagedAgentsModelConfig"
        },
        "system": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsAgentTool"
          }
        },
        "mcp_servers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsMCPServer"
          }
        },
        "skills": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsSkill"
          }
        },
        "multiagent": {
          "description": "Resolved multiagent orchestration configuration. Null when the agent is single-threaded.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsSessionMultiagent"
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        }
      }
    },
    "BetaManagedAgentsSessionMultiagent": {
      "description": "Resolved multiagent orchestration configuration as returned on a `session`.",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsSessionMultiagentCoordinator"
        }
      ]
    },
    "BetaManagedAgentsSessionMultiagentCoordinator": {
      "description": "Resolved coordinator topology with full agent definitions for each roster member.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "agents"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "coordinator"
          ]
        },
        "agents": {
          "description": "Full `agent` definitions the coordinator may spawn as session threads.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsSessionRosterEntry"
          }
        }
      }
    },
    "BetaManagedAgentsSessionResource": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsGitHubRepositoryResource"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsFileResource"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsMemoryStoreResource"
        }
      ]
    },
    "BetaManagedAgentsSessionRosterEntry": {
      "description": "A session-resolved multiagent roster entry.",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsSessionThreadAgent"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsAdvisor"
        }
      ]
    },
    "BetaManagedAgentsSessionStats": {
      "description": "Timing statistics for a session.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "duration_seconds": {
          "description": "Elapsed time since session creation in seconds. For terminated sessions, frozen at the final update.",
          "type": "number",
          "format": "double"
        },
        "active_seconds": {
          "description": "Cumulative time in seconds the session spent in running status. Excludes idle time.",
          "type": "number",
          "format": "double"
        }
      }
    },
    "BetaManagedAgentsSessionStatus": {
      "type": "string",
      "description": "SessionStatus enum",
      "enum": [
        "rescheduling",
        "running",
        "idle",
        "terminated"
      ]
    },
    "BetaManagedAgentsSessionThreadAgent": {
      "description": "Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "id",
        "version",
        "name",
        "description",
        "model",
        "system",
        "tools",
        "mcp_servers",
        "skills"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "agent"
          ]
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "model": {
          "$ref": "#/$defs/BetaManagedAgentsModelConfig"
        },
        "system": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsAgentTool"
          }
        },
        "mcp_servers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsMCPServer"
          }
        },
        "skills": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BetaManagedAgentsSkill"
          }
        }
      }
    },
    "BetaManagedAgentsSessionUsage": {
      "description": "Cumulative token usage for a session across all turns.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "input_tokens": {
          "description": "Total input tokens consumed across all turns.",
          "type": "integer",
          "format": "int32"
        },
        "output_tokens": {
          "description": "Total output tokens generated across all turns.",
          "type": "integer",
          "format": "int32"
        },
        "cache_read_input_tokens": {
          "description": "Total tokens read from prompt cache.",
          "type": "integer",
          "format": "int32"
        },
        "cache_creation": {
          "description": "Tokens used to create prompt cache entries, broken down by cache TTL.",
          "allOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsCacheCreationUsage"
            }
          ]
        },
        "list_cost": {
          "description": "Cumulative list cost of the session across all turns, priced at public list rates. Absent until cost tracking is available for the session.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaMonetaryAmount"
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        },
        "server_tool_use": {
          "description": "Cumulative server-executed tool usage across all turns. Absent until server-tool tracking is available for the session.",
          "anyOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsServerToolUsage"
            },
            {
              "type": "null"
            }
          ],
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        },
        "active_seconds": {
          "description": "Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike `stats.active_seconds`, which sums each thread's own active time. This is the duration the session's runtime cost is priced on.",
          "type": "number",
          "format": "double",
          "x-anthropic-beta-required": [
            "managed-agents-2026-04-01"
          ]
        }
      }
    },
    "BetaManagedAgentsSkill": {
      "description": "Resolved skill as returned in API responses.",
      "oneOf": [
        {
          "$ref": "#/$defs/BetaManagedAgentsAnthropicSkill"
        },
        {
          "$ref": "#/$defs/BetaManagedAgentsCustomSkill"
        }
      ]
    },
    "BetaManagedAgentsSpeed": {
      "type": "string",
      "description": "Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.",
      "enum": [
        "standard",
        "fast"
      ]
    },
    "BetaManagedAgentsUserLocation": {
      "description": "Approximate user location for search result localization.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "Location precision. Only \"approximate\" is supported.",
          "type": "string",
          "const": "approximate"
        },
        "city": {
          "description": "City name.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ]
        },
        "region": {
          "description": "Region or state name.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ]
        },
        "country": {
          "description": "Two-letter ISO 3166-1 country code, uppercase.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "description": "IANA timezone identifier, e.g. \"America/Los_Angeles\".",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "BetaManagedAgentsWebFetchToolConfig": {
      "description": "Configuration for the web_fetch tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "web_fetch"
        },
        "name": {
          "type": "string",
          "const": "web_fetch"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        },
        "allowed_domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "blocked_domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "max_content_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "format": "int32"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "BetaManagedAgentsWebSearchToolConfig": {
      "description": "Configuration for the web_search tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "web_search"
        },
        "name": {
          "type": "string",
          "const": "web_search"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        },
        "allowed_domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "blocked_domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "user_location": {
          "anyOf": [
            {
              "$ref": "#/$defs/BetaManagedAgentsUserLocation"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "BetaManagedAgentsWriteToolConfig": {
      "description": "Configuration for the write tool.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "enabled",
        "permission_policy"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "write"
        },
        "name": {
          "type": "string",
          "const": "write"
        },
        "enabled": {
          "type": "boolean"
        },
        "permission_policy": {
          "$ref": "#/$defs/BetaManagedAgentsPermissionPolicy"
        }
      }
    },
    "BetaMonetaryAmount": {
      "description": "A monetary amount in a specific currency.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "currency",
        "amount"
      ],
      "properties": {
        "currency": {
          "description": "Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.",
          "allOf": [
            {
              "$ref": "#/$defs/BetaCurrency"
            }
          ]
        },
        "amount": {
          "description": "Amount in minor units of the currency, as an integer decimal string with no leading zeros: \"2500\" is $25.00 and \"50\" is fifty cents. A string rather than a number so no float rounding is ever applied.",
          "type": "string"
        }
      }
    },
    "BetaTimestamp": {
      "description": "A timestamp in RFC 3339 format",
      "type": "string",
      "format": "date-time"
    }
  }
}