{
  "components": {
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        },
        "description": "The failure, in the one error envelope",
        "headers": {
          "X-Request-Id": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "AccountDisable": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "format": "password",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Current Password",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "current_password"
        ],
        "title": "AccountDisable",
        "type": "object"
      },
      "Agent": {
        "properties": {
          "archived_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "default_revision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Revision Id"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/AgentSource"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "name",
          "description",
          "labels",
          "default_revision_id",
          "source",
          "image_url",
          "archived_at",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Agent",
        "type": "object"
      },
      "AgentConfig-Input": {
        "additionalProperties": false,
        "properties": {
          "client_tools": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ClientToolDefinition"
            },
            "maxItems": 128,
            "title": "Client Tools",
            "type": "array"
          },
          "connection_tools": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ConnectionSelection"
            },
            "maxItems": 128,
            "title": "Connection Tools",
            "type": "array"
          },
          "default_environment_template_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Environment Template Id"
          },
          "instructions": {
            "default": "",
            "maxLength": 262144,
            "title": "Instructions",
            "type": "string"
          },
          "media_understanding": {
            "$ref": "#/components/schemas/MediaUnderstandingSelection"
          },
          "memory_mounts": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MemoryMount"
            },
            "maxItems": 32,
            "title": "Memory Mounts",
            "type": "array"
          },
          "model": {
            "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
            "title": "Model",
            "type": "string"
          },
          "model_characteristics": {
            "$ref": "#/components/schemas/AgentModelCharacteristics"
          },
          "model_settings": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Model Settings",
            "type": "object"
          },
          "output_spec": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "plugins": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PluginSelection"
            },
            "maxItems": 128,
            "title": "Plugins",
            "type": "array"
          },
          "retries": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentReviewer"
              },
              {
                "type": "null"
              }
            ]
          },
          "skills": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SkillSelection"
            },
            "maxItems": 512,
            "title": "Skills",
            "type": "array"
          },
          "subagent_mode": {
            "default": "inline",
            "enum": [
              "inline",
              "async"
            ],
            "title": "Subagent Mode",
            "type": "string"
          },
          "subagents": {
            "maxProperties": 128,
            "patternProperties": {
              "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$": {
                "$ref": "#/components/schemas/SubagentSelection-Input"
              }
            },
            "title": "Subagents",
            "type": "object"
          },
          "toolsets": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ToolsetSelection"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/ToolsetKey"
            },
            "title": "Toolsets",
            "type": "object"
          },
          "user_questions": {
            "default": false,
            "title": "User Questions",
            "type": "boolean"
          }
        },
        "required": [
          "model"
        ],
        "title": "AgentConfig",
        "type": "object"
      },
      "AgentConfig-Output": {
        "additionalProperties": false,
        "properties": {
          "client_tools": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ClientToolDefinition"
            },
            "maxItems": 128,
            "title": "Client Tools",
            "type": "array"
          },
          "connection_tools": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ConnectionSelection"
            },
            "maxItems": 128,
            "title": "Connection Tools",
            "type": "array"
          },
          "default_environment_template_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Environment Template Id"
          },
          "instructions": {
            "default": "",
            "maxLength": 262144,
            "title": "Instructions",
            "type": "string"
          },
          "media_understanding": {
            "$ref": "#/components/schemas/MediaUnderstandingSelection"
          },
          "memory_mounts": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MemoryMount"
            },
            "maxItems": 32,
            "title": "Memory Mounts",
            "type": "array"
          },
          "model": {
            "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
            "title": "Model",
            "type": "string"
          },
          "model_characteristics": {
            "$ref": "#/components/schemas/AgentModelCharacteristics"
          },
          "model_settings": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Model Settings",
            "type": "object"
          },
          "output_spec": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "plugins": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PluginSelection"
            },
            "maxItems": 128,
            "title": "Plugins",
            "type": "array"
          },
          "retries": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentReviewer"
              },
              {
                "type": "null"
              }
            ]
          },
          "skills": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/SkillSelection"
            },
            "maxItems": 512,
            "title": "Skills",
            "type": "array"
          },
          "subagent_mode": {
            "default": "inline",
            "enum": [
              "inline",
              "async"
            ],
            "title": "Subagent Mode",
            "type": "string"
          },
          "subagents": {
            "maxProperties": 128,
            "patternProperties": {
              "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$": {
                "$ref": "#/components/schemas/SubagentSelection-Output"
              }
            },
            "title": "Subagents",
            "type": "object"
          },
          "toolsets": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ToolsetSelection"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/ToolsetKey"
            },
            "title": "Toolsets",
            "type": "object"
          },
          "user_questions": {
            "default": false,
            "title": "User Questions",
            "type": "boolean"
          }
        },
        "required": [
          "model"
        ],
        "title": "AgentConfig",
        "type": "object"
      },
      "AgentCreate": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Input"
          },
          "description": {
            "default": "",
            "maxLength": 8192,
            "title": "Description",
            "type": "string"
          },
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "config"
        ],
        "title": "AgentCreate",
        "type": "object"
      },
      "AgentDuplicate": {
        "additionalProperties": false,
        "description": "A new head whose first revision copies `revision_id`, by default the source's default revision.",
        "properties": {
          "description": {
            "default": "",
            "maxLength": 8192,
            "title": "Description",
            "type": "string"
          },
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "AgentDuplicate",
        "type": "object"
      },
      "AgentModelCharacteristics": {
        "additionalProperties": false,
        "description": "The agent's context policy, layered over what the model declares.",
        "properties": {
          "compact_threshold": {
            "default": 0.9,
            "exclusiveMinimum": 0.0,
            "maximum": 1.0,
            "title": "Compact Threshold",
            "type": "number"
          },
          "context_window_tokens": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Window Tokens"
          },
          "proactive_context_management_threshold": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": 0.65,
            "title": "Proactive Context Management Threshold"
          }
        },
        "title": "AgentModelCharacteristics",
        "type": "object"
      },
      "AgentOverride-Input": {
        "additionalProperties": false,
        "description": "What one run changes of its revision's configuration; an omitted or null field keeps the revision's.\n\n`toolsets` replaces whole toolsets; `retries` and each subagent edge replace the fields they set, and a null\nedge removes it; every other field replaces the revision's value.",
        "properties": {
          "client_tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ClientToolDefinition"
                },
                "maxItems": 128,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Tools"
          },
          "connection_tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ConnectionSelection"
                },
                "maxItems": 128,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connection Tools"
          },
          "instructions": {
            "anyOf": [
              {
                "maxLength": 262144,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "media_understanding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MediaUnderstandingSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "model_characteristics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentModelCharacteristics"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_settings": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Settings"
          },
          "output_spec": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "plugins": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PluginSelection"
                },
                "maxItems": 128,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plugins"
          },
          "retries": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryOverride"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentReviewer"
              },
              {
                "type": "null"
              }
            ]
          },
          "skills": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillSelection"
                },
                "maxItems": 512,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skills"
          },
          "subagents": {
            "anyOf": [
              {
                "maxProperties": 128,
                "patternProperties": {
                  "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/SubagentOverride-Input"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subagents"
          },
          "toolsets": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/ToolsetSelection"
                },
                "propertyNames": {
                  "$ref": "#/components/schemas/ToolsetKey"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Toolsets"
          }
        },
        "title": "AgentOverride",
        "type": "object"
      },
      "AgentOverride-Output": {
        "additionalProperties": false,
        "description": "What one run changes of its revision's configuration; an omitted or null field keeps the revision's.\n\n`toolsets` replaces whole toolsets; `retries` and each subagent edge replace the fields they set, and a null\nedge removes it; every other field replaces the revision's value.",
        "properties": {
          "client_tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ClientToolDefinition"
                },
                "maxItems": 128,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Tools"
          },
          "connection_tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ConnectionSelection"
                },
                "maxItems": 128,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connection Tools"
          },
          "instructions": {
            "anyOf": [
              {
                "maxLength": 262144,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "media_understanding": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MediaUnderstandingSelection"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "model_characteristics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentModelCharacteristics"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_settings": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Settings"
          },
          "output_spec": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "plugins": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PluginSelection"
                },
                "maxItems": 128,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plugins"
          },
          "retries": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryOverride"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentReviewer"
              },
              {
                "type": "null"
              }
            ]
          },
          "skills": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillSelection"
                },
                "maxItems": 512,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skills"
          },
          "subagents": {
            "anyOf": [
              {
                "maxProperties": 128,
                "patternProperties": {
                  "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/SubagentOverride-Output"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subagents"
          },
          "toolsets": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/ToolsetSelection"
                },
                "propertyNames": {
                  "$ref": "#/components/schemas/ToolsetKey"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Toolsets"
          }
        },
        "title": "AgentOverride",
        "type": "object"
      },
      "AgentPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Agent"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "AgentPage",
        "type": "object"
      },
      "AgentReviewer": {
        "additionalProperties": false,
        "description": "The model reviewing calls whose permission is `review`, selected by model key.",
        "properties": {
          "instruction": {
            "anyOf": [
              {
                "maxLength": 32768,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instruction"
          },
          "model": {
            "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
            "title": "Model",
            "type": "string"
          },
          "model_settings": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Settings"
          },
          "on_error": {
            "default": "approval_required",
            "enum": [
              "deny",
              "approval_required",
              "allow"
            ],
            "title": "On Error",
            "type": "string"
          },
          "on_flagged": {
            "default": "deny",
            "enum": [
              "deny",
              "approval_required"
            ],
            "title": "On Flagged",
            "type": "string"
          },
          "risk_threshold": {
            "$ref": "#/components/schemas/ToolRiskLevel",
            "default": "extra_high"
          },
          "rules": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ToolReviewRule"
            },
            "maxProperties": 1024,
            "title": "Rules",
            "type": "object"
          },
          "shell_instruction": {
            "anyOf": [
              {
                "maxLength": 32768,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shell Instruction"
          },
          "timeout_seconds": {
            "default": 120,
            "exclusiveMinimum": 0.0,
            "maximum": 120.0,
            "title": "Timeout Seconds",
            "type": "number"
          }
        },
        "required": [
          "model"
        ],
        "title": "AgentReviewer",
        "type": "object"
      },
      "AgentRevision": {
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Output"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "agent_id",
          "number",
          "config",
          "digest",
          "note",
          "created_by_id",
          "created_at"
        ],
        "title": "AgentRevision",
        "type": "object"
      },
      "AgentRevisionCreate": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Input"
          },
          "make_default": {
            "default": true,
            "title": "Make Default",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "required": [
          "config"
        ],
        "title": "AgentRevisionCreate",
        "type": "object"
      },
      "AgentRevisionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentRevision"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "AgentRevisionPage",
        "type": "object"
      },
      "AgentSource": {
        "enum": [
          "custom",
          "builtin"
        ],
        "type": "string"
      },
      "AgentUpdate": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 8192,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "maxLength": 128,
                  "type": "string"
                },
                "maxProperties": 32,
                "propertyNames": {
                  "maxLength": 128,
                  "minLength": 1
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labels"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "AgentUpdate",
        "type": "object"
      },
      "AgentUsage": {
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "runs": {
            "$ref": "#/components/schemas/RunMetrics"
          },
          "usage": {
            "$ref": "#/components/schemas/ModelMetrics"
          }
        },
        "required": [
          "agent_id",
          "name",
          "usage",
          "runs"
        ],
        "title": "AgentUsage",
        "type": "object"
      },
      "AgentUsagePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentUsage"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "AgentUsagePage",
        "type": "object"
      },
      "AgentValidate": {
        "additionalProperties": false,
        "description": "A configuration to check as creating a revision would, storing nothing.\n\n`agent_id` names the agent it would become a revision of, whose inline subagents may not lead back to it;\nomit it for a new agent.",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Input"
          }
        },
        "required": [
          "config"
        ],
        "title": "AgentValidate",
        "type": "object"
      },
      "ApiKey": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "principal": {
            "$ref": "#/components/schemas/PrincipalSummary"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "principal",
          "name",
          "expires_at",
          "last_used_at",
          "revoked_at",
          "created_by_id",
          "version",
          "created_at"
        ],
        "title": "ApiKey",
        "type": "object"
      },
      "ApiKeyPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ApiKey"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ApiKeyPage",
        "type": "object"
      },
      "ApprovalDecision": {
        "discriminator": {
          "mapping": {
            "approve": "#/components/schemas/Approve",
            "deny": "#/components/schemas/Deny"
          },
          "propertyName": "action"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/Approve"
          },
          {
            "$ref": "#/components/schemas/Deny"
          }
        ]
      },
      "Approve": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "const": "approve",
            "title": "Action",
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "title": "Approve",
        "type": "object"
      },
      "Asset": {
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "retired_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retired At"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "source": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "content_type",
          "size",
          "digest",
          "source",
          "retired_at",
          "version",
          "created_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Asset",
        "type": "object"
      },
      "AssetCreate": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "pattern": "^[^\\x00-\\x1f\\x7f]+$",
            "title": "Name",
            "type": "string"
          },
          "upload_id": {
            "pattern": "^upl_[a-f0-9]{64}$",
            "title": "Upload Id",
            "type": "string"
          }
        },
        "required": [
          "upload_id",
          "name"
        ],
        "title": "AssetCreate",
        "type": "object"
      },
      "AssetPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Asset"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "AssetPage",
        "type": "object"
      },
      "AssetPart": {
        "additionalProperties": false,
        "properties": {
          "asset_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Asset Id",
            "type": "string"
          },
          "type": {
            "const": "asset",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "asset_id"
        ],
        "title": "AssetPart",
        "type": "object"
      },
      "AttemptView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Failure"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "harness_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Harness Run Id"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "replaces_attempt_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replaces Attempt Id"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "start_reason": {
            "enum": [
              "initial",
              "recovery",
              "handoff"
            ],
            "title": "Start Reason",
            "type": "string"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "leased",
              "running",
              "succeeded",
              "yielded",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "worker_build": {
            "title": "Worker Build",
            "type": "string"
          },
          "yield_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Yield Reason"
          }
        },
        "required": [
          "id",
          "run_id",
          "number",
          "status",
          "start_reason",
          "replaces_attempt_id",
          "worker_build",
          "harness_run_id",
          "yield_reason",
          "failure",
          "created_at",
          "started_at",
          "finished_at"
        ],
        "title": "AttemptView",
        "type": "object"
      },
      "Attempts": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AttemptView"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "Attempts",
        "type": "object"
      },
      "AuditEvent": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PrincipalSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "actor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "details": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Details",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "outcome": {
            "title": "Outcome",
            "type": "string"
          },
          "target_id": {
            "title": "Target Id",
            "type": "string"
          },
          "target_kind": {
            "title": "Target Kind",
            "type": "string"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "actor_id",
          "actor",
          "action",
          "target_kind",
          "target_id",
          "outcome",
          "details",
          "occurred_at"
        ],
        "title": "AuditEvent",
        "type": "object"
      },
      "AuditPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditEvent"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "AuditPage",
        "type": "object"
      },
      "AuthConfiguration": {
        "properties": {
          "email_delivery": {
            "title": "Email Delivery",
            "type": "boolean"
          },
          "initialized": {
            "title": "Initialized",
            "type": "boolean"
          }
        },
        "required": [
          "email_delivery",
          "initialized"
        ],
        "title": "AuthConfiguration",
        "type": "object"
      },
      "Authentication": {
        "additionalProperties": false,
        "properties": {
          "cases": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AuthenticationCase"
            },
            "title": "Cases",
            "type": "array"
          },
          "mode": {
            "$ref": "#/components/schemas/CredentialMode",
            "default": "required"
          }
        },
        "title": "Authentication",
        "type": "object"
      },
      "AuthenticationCase": {
        "additionalProperties": false,
        "description": "Override credential presence for one declared configuration field value.",
        "properties": {
          "equals": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Equals"
          },
          "field": {
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
            "title": "Field",
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/CredentialMode"
          }
        },
        "required": [
          "field",
          "equals",
          "mode"
        ],
        "title": "AuthenticationCase",
        "type": "object"
      },
      "AuthorizationRequest": {
        "additionalProperties": false,
        "properties": {
          "return_url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          }
        },
        "title": "AuthorizationRequest",
        "type": "object"
      },
      "AuthorizationResult": {
        "description": "A browser flow to follow, or none when the grant obtained the credential directly.",
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "redirect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Url"
          }
        },
        "required": [
          "redirect_url",
          "expires_at"
        ],
        "title": "AuthorizationResult",
        "type": "object"
      },
      "BearerCredential": {
        "additionalProperties": false,
        "properties": {
          "token": {
            "format": "password",
            "maxLength": 4096,
            "minLength": 1,
            "title": "Token",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "token"
        ],
        "title": "BearerCredential",
        "type": "object"
      },
      "BootstrapInput": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "password": {
            "format": "password",
            "maxLength": 1024,
            "minLength": 12,
            "title": "Password",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "email",
          "password"
        ],
        "title": "BootstrapInput",
        "type": "object"
      },
      "CallResult": {
        "discriminator": {
          "mapping": {
            "failed": "#/components/schemas/Failed",
            "returned": "#/components/schemas/Returned"
          },
          "propertyName": "status"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/Returned"
          },
          {
            "$ref": "#/components/schemas/Failed"
          }
        ]
      },
      "CallbackOutcome": {
        "properties": {
          "connection_id": {
            "title": "Connection Id",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          }
        },
        "required": [
          "connection_id",
          "status",
          "error"
        ],
        "title": "CallbackOutcome",
        "type": "object"
      },
      "CatalogModel": {
        "description": "A catalog model, with the characteristics and pricing a model created from it starts with.",
        "properties": {
          "characteristics": {
            "$ref": "#/components/schemas/HarnessModelCharacteristics-Output"
          },
          "identity": {
            "title": "Identity",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pricing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelPricingEntry-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "pricing_warning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Warning"
          },
          "provider_name": {
            "title": "Provider Name",
            "type": "string"
          },
          "ref": {
            "$ref": "#/components/schemas/CatalogRef"
          },
          "release_date": {
            "format": "date",
            "title": "Release Date",
            "type": "string"
          }
        },
        "required": [
          "ref",
          "identity",
          "name",
          "provider_name",
          "release_date",
          "characteristics",
          "pricing",
          "pricing_warning"
        ],
        "title": "CatalogModel",
        "type": "object"
      },
      "CatalogRef": {
        "additionalProperties": false,
        "description": "A models.dev channel and the model ID it lists there.",
        "properties": {
          "model": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "provider": {
            "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$",
            "title": "Provider",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "model"
        ],
        "title": "CatalogRef",
        "type": "object"
      },
      "Certainty": {
        "enum": [
          "not_dispatched",
          "known",
          "unknown"
        ],
        "type": "string"
      },
      "ChildEnvironmentPolicy": {
        "additionalProperties": false,
        "description": "What a child run mounts: no environment, the parent's, or a new one from `template_id`.",
        "properties": {
          "mode": {
            "default": "shared",
            "enum": [
              "none",
              "shared",
              "dedicated"
            ],
            "title": "Mode",
            "type": "string"
          },
          "template_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          }
        },
        "title": "ChildEnvironmentPolicy",
        "type": "object"
      },
      "ClientAuthentication": {
        "enum": [
          "none",
          "client_secret_post",
          "client_secret_basic"
        ],
        "type": "string"
      },
      "ClientToolDefinition": {
        "additionalProperties": false,
        "description": "Portable model guidance for one externally executed client tool.",
        "properties": {
          "description": {
            "maxLength": 16384,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "instruction": {
            "anyOf": [
              {
                "maxLength": 16384,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instruction"
          },
          "metadata": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Metadata",
            "type": "object"
          },
          "name": {
            "maxLength": 256,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_.:-]*$",
            "title": "Name",
            "type": "string"
          },
          "parameters_json_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Parameters Json Schema",
            "type": "object"
          },
          "permission": {
            "default": "inherit",
            "enum": [
              "inherit",
              "allow",
              "deny"
            ],
            "title": "Permission",
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "parameters_json_schema"
        ],
        "title": "ClientToolDefinition",
        "type": "object"
      },
      "Connection": {
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/ConnectionAuth"
          },
          "authorization_pending": {
            "title": "Authorization Pending",
            "type": "boolean"
          },
          "client_secret_configured": {
            "title": "Client Secret Configured",
            "type": "boolean"
          },
          "config": {
            "$ref": "#/components/schemas/ConnectionConfig"
          },
          "connector_provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Provider Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "credential_configured": {
            "title": "Credential Configured",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_test": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionTestOutcome"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "type",
          "name",
          "config",
          "auth",
          "connector_provider_id",
          "status",
          "failure",
          "credential_configured",
          "client_secret_configured",
          "authorization_pending",
          "last_test",
          "enabled",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Connection",
        "type": "object"
      },
      "ConnectionAuth": {
        "enum": [
          "none",
          "bearer",
          "headers",
          "oauth",
          "account"
        ],
        "type": "string"
      },
      "ConnectionConfig": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/McpConfig"
          },
          {
            "$ref": "#/components/schemas/ConnectorConfig"
          }
        ]
      },
      "ConnectionCreate": {
        "additionalProperties": false,
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/ConnectionAuth",
            "default": "none"
          },
          "client_secret": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 4096,
                "minLength": 1,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret",
            "writeOnly": true
          },
          "config": {
            "$ref": "#/components/schemas/ConnectionConfig"
          },
          "connector_provider_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Provider Id"
          },
          "credential": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnteredCredential"
              },
              {
                "type": "null"
              }
            ],
            "writeOnly": true
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "type": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "name",
          "config"
        ],
        "title": "ConnectionCreate",
        "type": "object"
      },
      "ConnectionFailure": {
        "description": "Why the last remote operation failed; `outcome_unknown` means it may have taken effect.",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "operation_id": {
            "title": "Operation Id",
            "type": "string"
          },
          "operation_kind": {
            "$ref": "#/components/schemas/OperationKind"
          },
          "reason": {
            "enum": [
              "rejected",
              "outcome_unknown"
            ],
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "operation_id",
          "operation_kind",
          "reason",
          "code"
        ],
        "title": "ConnectionFailure",
        "type": "object"
      },
      "ConnectionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Connection"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ConnectionPage",
        "type": "object"
      },
      "ConnectionSelection": {
        "additionalProperties": false,
        "description": "An agent's use of one connection: all the tools it exposes, or a subset, and their permissions.",
        "properties": {
          "connection_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Connection Id",
            "type": "string"
          },
          "defer_loading": {
            "default": false,
            "title": "Defer Loading",
            "type": "boolean"
          },
          "permission": {
            "$ref": "#/components/schemas/ToolPermissionSetting",
            "default": "inherit"
          },
          "permissions": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ToolPermissionSetting"
            },
            "maxProperties": 128,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Permissions",
            "type": "object"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 128,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          }
        },
        "required": [
          "connection_id"
        ],
        "title": "ConnectionSelection",
        "type": "object"
      },
      "ConnectionStatus": {
        "enum": [
          "pending",
          "ready",
          "reauthorization_required"
        ],
        "type": "string"
      },
      "ConnectionTest": {
        "properties": {
          "connection_id": {
            "title": "Connection Id",
            "type": "string"
          },
          "connection_version": {
            "title": "Connection Version",
            "type": "integer"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "status": {
            "enum": [
              "succeeded",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          },
          "tested_at": {
            "format": "date-time",
            "title": "Tested At",
            "type": "string"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolInfo"
            },
            "title": "Tools",
            "type": "array"
          }
        },
        "required": [
          "connection_version",
          "status",
          "message",
          "tested_at",
          "connection_id",
          "tools"
        ],
        "title": "ConnectionTest",
        "type": "object"
      },
      "ConnectionTestOutcome": {
        "description": "What a test found for the connection version it tested.",
        "properties": {
          "connection_version": {
            "title": "Connection Version",
            "type": "integer"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "status": {
            "enum": [
              "succeeded",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          },
          "tested_at": {
            "format": "date-time",
            "title": "Tested At",
            "type": "string"
          }
        },
        "required": [
          "connection_version",
          "status",
          "message",
          "tested_at"
        ],
        "title": "ConnectionTestOutcome",
        "type": "object"
      },
      "ConnectionUpdate": {
        "additionalProperties": false,
        "properties": {
          "auth": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionAuth"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_secret": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 4096,
                "minLength": 1,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret",
            "writeOnly": true
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "credential": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnteredCredential"
              },
              {
                "type": "null"
              }
            ],
            "writeOnly": true
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "ConnectionUpdate",
        "type": "object"
      },
      "ConnectorActionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ToolInfo"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ConnectorActionPage",
        "type": "object"
      },
      "ConnectorApp": {
        "properties": {
          "authentication_methods": {
            "items": {
              "type": "string"
            },
            "title": "Authentication Methods",
            "type": "array"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "setup_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Setup Schema",
            "type": "object"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unavailable Reason"
          }
        },
        "required": [
          "key",
          "name",
          "description",
          "logo_url",
          "unavailable_reason",
          "authentication_methods",
          "setup_schema"
        ],
        "title": "ConnectorApp",
        "type": "object"
      },
      "ConnectorAppPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConnectorApp"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ConnectorAppPage",
        "type": "object"
      },
      "ConnectorConfig": {
        "additionalProperties": false,
        "description": "One app of a connector provider and the actions it exposes; `setup` is validated by the provider type.",
        "properties": {
          "actions": {
            "items": {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 128,
            "minItems": 1,
            "title": "Actions",
            "type": "array"
          },
          "app": {
            "pattern": "^[a-z0-9_][a-z0-9._-]{0,127}$",
            "title": "App",
            "type": "string"
          },
          "setup": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Setup",
            "type": "object"
          }
        },
        "required": [
          "app",
          "actions"
        ],
        "title": "ConnectorConfig",
        "type": "object"
      },
      "CreatedSubscription": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "filter": {
            "$ref": "#/components/schemas/SubscriptionFilter"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kinds": {
            "items": {
              "type": "string"
            },
            "title": "Kinds",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "signing_secret": {
            "title": "Signing Secret",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "url",
          "kinds",
          "filter",
          "enabled",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at",
          "signing_secret"
        ],
        "title": "CreatedSubscription",
        "type": "object"
      },
      "CredentialMode": {
        "enum": [
          "required",
          "optional",
          "forbidden"
        ],
        "title": "CredentialMode",
        "type": "string"
      },
      "DailyUsage": {
        "properties": {
          "date": {
            "format": "date",
            "title": "Date",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/ModelMetrics"
          }
        },
        "required": [
          "date",
          "usage"
        ],
        "title": "DailyUsage",
        "type": "object"
      },
      "DelegationContextPolicy": {
        "additionalProperties": false,
        "properties": {
          "history": {
            "default": "none",
            "enum": [
              "none",
              "summary",
              "selected"
            ],
            "title": "History",
            "type": "string"
          },
          "include_task": {
            "default": true,
            "title": "Include Task",
            "type": "boolean"
          },
          "task_state": {
            "default": "shared",
            "enum": [
              "shared",
              "isolated"
            ],
            "title": "Task State",
            "type": "string"
          }
        },
        "title": "DelegationContextPolicy",
        "type": "object"
      },
      "Delivery": {
        "enum": [
          "steer",
          "next_run"
        ],
        "type": "string"
      },
      "DeliveryPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "DeliveryPage",
        "type": "object"
      },
      "Deny": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "const": "deny",
            "title": "Action",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "action"
        ],
        "title": "Deny",
        "type": "object"
      },
      "EmailChangeConfirm": {
        "additionalProperties": false,
        "properties": {
          "token": {
            "maxLength": 512,
            "minLength": 16,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "EmailChangeConfirm",
        "type": "object"
      },
      "EnteredCredential": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/BearerCredential"
          },
          {
            "$ref": "#/components/schemas/HeadersCredential"
          }
        ]
      },
      "EntryPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EntryView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "EntryPage",
        "type": "object"
      },
      "EntryStatus": {
        "enum": [
          "pending",
          "assigned",
          "consumed",
          "failed",
          "withdrawn"
        ],
        "type": "string"
      },
      "EntryUpdate": {
        "additionalProperties": false,
        "description": "Pending entries only; the original request digest never changes.",
        "properties": {
          "agent_revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Revision Id"
          },
          "delivery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Delivery"
              },
              {
                "type": "null"
              }
            ]
          },
          "options": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunOptions-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "payload": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessagePayload"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "EntryUpdate",
        "type": "object"
      },
      "EntryView": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_revision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Revision Id"
          },
          "assigned_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Run Id"
          },
          "child_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Child Run Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivery": {
            "$ref": "#/components/schemas/Delivery"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Failure"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "incorporated_checkpoint_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Incorporated Checkpoint Seq"
          },
          "kind": {
            "enum": [
              "message",
              "child_result"
            ],
            "title": "Kind",
            "type": "string"
          },
          "options": {
            "$ref": "#/components/schemas/RunOptions-Output"
          },
          "origin_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Run Id"
          },
          "payload": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Payload",
            "type": "object"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          },
          "principal_id": {
            "title": "Principal Id",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus"
          },
          "thread_id": {
            "title": "Thread Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "thread_id",
          "kind",
          "delivery",
          "position",
          "status",
          "principal_id",
          "payload",
          "agent_id",
          "agent_revision_id",
          "options",
          "child_run_id",
          "origin_run_id",
          "assigned_run_id",
          "incorporated_checkpoint_seq",
          "failure",
          "created_at",
          "finished_at"
        ],
        "title": "EntryView",
        "type": "object"
      },
      "EnvironmentFailure": {
        "additionalProperties": false,
        "description": "The last error of the outstanding operation or, on a ready instance, of its last renewal.\n\n`unknown` means the call may have taken effect: only the same operation may continue. `permanent` failures\nrefuse new mounts and acceptance until the cause is fixed or the instance is deleted; `environment_lost` means\nthe provider no longer has the sandbox.",
        "properties": {
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "certainty": {
            "$ref": "#/components/schemas/Certainty"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Id"
          },
          "permanent": {
            "title": "Permanent",
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "message",
          "certainty",
          "permanent",
          "operation_id",
          "at"
        ],
        "title": "EnvironmentFailure",
        "type": "object"
      },
      "EnvironmentMount": {
        "additionalProperties": false,
        "properties": {
          "environment_id": {
            "title": "Environment Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "working_directory": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Working Directory"
          }
        },
        "required": [
          "name",
          "environment_id"
        ],
        "title": "EnvironmentMount",
        "type": "object"
      },
      "EnvironmentPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EnvironmentView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "EnvironmentPage",
        "type": "object"
      },
      "EnvironmentUpdate": {
        "additionalProperties": false,
        "description": "Fields left out stay unchanged. Only an external target has an endpoint and token; a new endpoint comes with\nits token, so a stored token never reaches an endpoint it was not entered for.",
        "properties": {
          "endpoint": {
            "anyOf": [
              {
                "maxLength": 2048,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "token": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 4096,
                "minLength": 1,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Token"
          }
        },
        "title": "EnvironmentUpdate",
        "type": "object"
      },
      "EnvironmentView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "device_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Id"
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Id"
          },
          "operation_started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Started At"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "owner_principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Principal Id"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "provider_id",
          "template_id",
          "device_id",
          "endpoint",
          "owner_principal_id",
          "name",
          "status",
          "operation_id",
          "operation_started_at",
          "failure",
          "last_used_at",
          "version",
          "created_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "EnvironmentView",
        "type": "object"
      },
      "ErrorBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "details": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Details",
            "type": "object"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          }
        },
        "required": [
          "code",
          "message",
          "details",
          "request_id"
        ],
        "title": "ErrorBody",
        "type": "object"
      },
      "ErrorCode": {
        "enum": [
          "invalid_argument",
          "invalid_cursor",
          "unauthenticated",
          "forbidden",
          "not_found",
          "already_exists",
          "conflict",
          "precondition_failed",
          "precondition_required",
          "payload_too_large",
          "request_timeout",
          "disabled",
          "unavailable",
          "rate_limited",
          "internal"
        ],
        "type": "string"
      },
      "ErrorEnvelope": {
        "description": "How every failure answers, whatever its status.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorEnvelope",
        "type": "object"
      },
      "ExternalTargetCreate": {
        "additionalProperties": false,
        "description": "An envd daemon someone runs, registered by its endpoint and the token it accepts.",
        "properties": {
          "endpoint": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Endpoint",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "token": {
            "format": "password",
            "maxLength": 4096,
            "minLength": 1,
            "title": "Token",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "endpoint",
          "token"
        ],
        "title": "ExternalTargetCreate",
        "type": "object"
      },
      "Failed": {
        "additionalProperties": false,
        "description": "An explicit external tool failure, including an intentional unanswered question.",
        "properties": {
          "message": {
            "maxLength": 4096,
            "minLength": 1,
            "pattern": "\\S",
            "title": "Message",
            "type": "string"
          },
          "status": {
            "const": "failed",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "message"
        ],
        "title": "Failed",
        "type": "object"
      },
      "Failure": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "message": {
            "maxLength": 4096,
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "Failure",
        "type": "object"
      },
      "Fork": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Revision Id"
          },
          "delivery": {
            "$ref": "#/components/schemas/Delivery",
            "default": "steer"
          },
          "environments": {
            "$ref": "#/components/schemas/InitialMounts",
            "default": []
          },
          "fresh_environments": {
            "default": false,
            "title": "Fresh Environments",
            "type": "boolean"
          },
          "kind": {
            "const": "message",
            "default": "message",
            "title": "Kind",
            "type": "string"
          },
          "memories": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MemoryMount"
            },
            "maxItems": 32,
            "title": "Memories",
            "type": "array"
          },
          "options": {
            "$ref": "#/components/schemas/RunOptions-Input"
          },
          "payload": {
            "$ref": "#/components/schemas/MessagePayload"
          }
        },
        "required": [
          "payload",
          "agent_id"
        ],
        "title": "Fork",
        "type": "object"
      },
      "GitHubSource": {
        "additionalProperties": false,
        "description": "A directory of a public GitHub repository.\n\n`ref` defaults to the default branch. On a request `commit` is an optional expectation the resolved ref\nmust meet; in a manifest it records the commit the package was read from.",
        "properties": {
          "commit": {
            "anyOf": [
              {
                "pattern": "^[0-9a-f]{40}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commit"
          },
          "kind": {
            "const": "github",
            "title": "Kind",
            "type": "string"
          },
          "path": {
            "default": "",
            "maxLength": 1024,
            "title": "Path",
            "type": "string"
          },
          "ref": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x20~^:?*\\[\\\\]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref"
          },
          "repository": {
            "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,38}/[A-Za-z0-9._-]{1,100}$",
            "title": "Repository",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "repository"
        ],
        "title": "GitHubSource",
        "type": "object"
      },
      "GrantCreate": {
        "additionalProperties": false,
        "properties": {
          "principal_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Principal Id",
            "type": "string"
          },
          "role": {
            "pattern": "^[a-z][a-z0-9_]{0,31}$",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "principal_id",
          "role"
        ],
        "title": "GrantCreate",
        "type": "object"
      },
      "GrantPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/GrantView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "GrantPage",
        "type": "object"
      },
      "GrantUpdate": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "pattern": "^[a-z][a-z0-9_]{0,31}$",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "title": "GrantUpdate",
        "type": "object"
      },
      "GrantView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "principal": {
            "$ref": "#/components/schemas/PrincipalSummary"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "principal",
          "role",
          "created_by_id",
          "created_at"
        ],
        "title": "GrantView",
        "type": "object"
      },
      "HarnessModelCharacteristics-Input": {
        "additionalProperties": false,
        "description": "Resolved Harness characteristics of the active Agent model.",
        "properties": {
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/ModelCapability"
            },
            "title": "Capabilities",
            "type": "array",
            "uniqueItems": true
          },
          "compact_threshold": {
            "default": 0.9,
            "exclusiveMinimum": 0.0,
            "maximum": 1.0,
            "title": "Compact Threshold",
            "type": "number"
          },
          "context_window_tokens": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Window Tokens"
          },
          "proactive_context_management_threshold": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": 0.65,
            "title": "Proactive Context Management Threshold"
          }
        },
        "title": "HarnessModelCharacteristics",
        "type": "object"
      },
      "HarnessModelCharacteristics-Output": {
        "additionalProperties": false,
        "description": "Resolved Harness characteristics of the active Agent model.",
        "properties": {
          "capabilities": {
            "items": {
              "type": "string"
            },
            "title": "Capabilities",
            "type": "array"
          },
          "compact_threshold": {
            "default": 0.9,
            "exclusiveMinimum": 0.0,
            "maximum": 1.0,
            "title": "Compact Threshold",
            "type": "number"
          },
          "context_window_tokens": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Window Tokens"
          },
          "proactive_context_management_threshold": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": 0.65,
            "title": "Proactive Context Management Threshold"
          }
        },
        "title": "HarnessModelCharacteristics",
        "type": "object"
      },
      "HeadersCredential": {
        "additionalProperties": false,
        "properties": {
          "headers": {
            "additionalProperties": {
              "format": "password",
              "type": "string",
              "writeOnly": true
            },
            "maxProperties": 32,
            "minProperties": 1,
            "title": "Headers",
            "type": "object"
          }
        },
        "required": [
          "headers"
        ],
        "title": "HeadersCredential",
        "type": "object"
      },
      "HistoryPurge": {
        "properties": {
          "purged": {
            "title": "Purged",
            "type": "integer"
          }
        },
        "required": [
          "purged"
        ],
        "title": "HistoryPurge",
        "type": "object"
      },
      "InboxOrder": {
        "additionalProperties": false,
        "properties": {
          "entry_ids": {
            "items": {
              "maxLength": 41,
              "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
              "type": "string"
            },
            "maxItems": 512,
            "minItems": 1,
            "title": "Entry Ids",
            "type": "array"
          }
        },
        "required": [
          "entry_ids"
        ],
        "title": "InboxOrder",
        "type": "object"
      },
      "InitialMounts": {
        "items": {
          "$ref": "#/components/schemas/MountCreate"
        },
        "maxItems": 32,
        "type": "array"
      },
      "InstrumentationScope": {
        "description": "The instrumentation library that recorded the span.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "name",
          "version"
        ],
        "title": "InstrumentationScope",
        "type": "object"
      },
      "Invitation": {
        "properties": {
          "accepted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "invited_by_id": {
            "title": "Invited By Id",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal Id"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "email",
          "role",
          "invited_by_id",
          "principal_id",
          "expires_at",
          "accepted_at",
          "revoked_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "Invitation",
        "type": "object"
      },
      "InvitationAccept": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "password": {
            "format": "password",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string",
            "writeOnly": true
          },
          "token": {
            "maxLength": 512,
            "minLength": 16,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "password"
        ],
        "title": "InvitationAccept",
        "type": "object"
      },
      "InvitationCreate": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "role": {
            "pattern": "^[a-z][a-z0-9_]{0,31}$",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "email",
          "role"
        ],
        "title": "InvitationCreate",
        "type": "object"
      },
      "InvitationPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Invitation"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "InvitationPage",
        "type": "object"
      },
      "InvitationReceipt": {
        "properties": {
          "delivery": {
            "enum": [
              "queued",
              "manual"
            ],
            "title": "Delivery",
            "type": "string"
          },
          "invitation": {
            "$ref": "#/components/schemas/Invitation"
          },
          "invitation_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invitation Url"
          }
        },
        "required": [
          "invitation",
          "delivery",
          "invitation_url"
        ],
        "title": "InvitationReceipt",
        "type": "object"
      },
      "IssuedKey": {
        "properties": {
          "key": {
            "$ref": "#/components/schemas/ApiKey"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "key",
          "secret"
        ],
        "title": "IssuedKey",
        "type": "object"
      },
      "Item": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Content",
            "type": "object"
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "first_stream_id": {
            "title": "First Stream Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ItemKind"
          },
          "last_stream_id": {
            "title": "Last Stream Id",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/ItemState"
          }
        },
        "required": [
          "id",
          "kind",
          "state",
          "first_stream_id",
          "last_stream_id",
          "started_at",
          "content"
        ],
        "title": "Item",
        "type": "object"
      },
      "ItemKind": {
        "enum": [
          "text_message",
          "reasoning_message",
          "tool_call",
          "observation"
        ],
        "type": "string"
      },
      "ItemState": {
        "enum": [
          "in_progress",
          "completed",
          "interrupted",
          "failed"
        ],
        "type": "string"
      },
      "JsonPart": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "const": "json",
            "title": "Type",
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/JsonValue"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "title": "JsonPart",
        "type": "object"
      },
      "JsonValue": {},
      "KeyCreate": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "KeyCreate",
        "type": "object"
      },
      "LifecycleKind": {
        "enum": [
          "run.accepted",
          "run.running",
          "run.waiting",
          "run.completed",
          "run.failed",
          "run.cancelled",
          "run_attempt.leased",
          "run_attempt.running",
          "run_attempt.succeeded",
          "run_attempt.yielded",
          "run_attempt.failed",
          "run_attempt.cancelled"
        ],
        "type": "string"
      },
      "Lineage": {
        "enum": [
          "root",
          "continue",
          "fork"
        ],
        "type": "string"
      },
      "LoginInput": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "password": {
            "format": "password",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "email",
          "password"
        ],
        "title": "LoginInput",
        "type": "object"
      },
      "LoginOutput": {
        "properties": {
          "csrf_token": {
            "title": "Csrf Token",
            "type": "string"
          },
          "principal_id": {
            "title": "Principal Id",
            "type": "string"
          }
        },
        "required": [
          "principal_id",
          "csrf_token"
        ],
        "title": "LoginOutput",
        "type": "object"
      },
      "LoginSession": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "current": {
            "title": "Current",
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "expires_at",
          "current"
        ],
        "title": "LoginSession",
        "type": "object"
      },
      "LoginSessionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/LoginSession"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "LoginSessionPage",
        "type": "object"
      },
      "ManagedEnvironmentCreate": {
        "additionalProperties": false,
        "description": "A workspace-managed sandbox reserved from a template, for threads to mount; maintenance creates it.",
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "template_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Template Id",
            "type": "string"
          }
        },
        "required": [
          "template_id"
        ],
        "title": "ManagedEnvironmentCreate",
        "type": "object"
      },
      "McpAuth": {
        "enum": [
          "none",
          "bearer",
          "headers",
          "oauth"
        ],
        "type": "string"
      },
      "McpConfig": {
        "additionalProperties": false,
        "properties": {
          "headers": {
            "default": [],
            "items": {
              "pattern": "^[!#$%&'*+.^_`|~0-9a-z-]{1,128}$",
              "type": "string"
            },
            "maxItems": 32,
            "title": "Headers",
            "type": "array"
          },
          "oauth": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OAuthSettings"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "maxLength": 128,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 128,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "url": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "McpConfig",
        "type": "object"
      },
      "McpHeaders": {
        "maxProperties": 32,
        "patternProperties": {
          "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "propertyNames": {
          "maxLength": 41
        },
        "type": "object"
      },
      "McpServer": {
        "additionalProperties": false,
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/McpAuth"
          },
          "description": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "documentation_url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "pattern": "^https?://\\S+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentation Url"
          },
          "header_names": {
            "default": [],
            "items": {
              "pattern": "^[!#$%&'*+.^_`|~0-9a-z-]{1,128}$",
              "type": "string"
            },
            "maxItems": 32,
            "title": "Header Names",
            "type": "array"
          },
          "key": {
            "pattern": "^[a-z][a-z0-9-]{0,63}$",
            "title": "Key",
            "type": "string"
          },
          "logo_url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "pattern": "^https?://\\S+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "requirements": {
            "default": "",
            "maxLength": 2048,
            "title": "Requirements",
            "type": "string"
          },
          "url": {
            "maxLength": 2048,
            "pattern": "^https?://\\S+$",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "key",
          "name",
          "description",
          "url",
          "auth"
        ],
        "title": "McpServer",
        "type": "object"
      },
      "McpServerPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/McpServer"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "McpServerPage",
        "type": "object"
      },
      "MediaDefaults": {
        "additionalProperties": false,
        "description": "A workspace's media-understanding models for agents that select none for a kind; `id` is the workspace's.",
        "properties": {
          "audio": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audio"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "image": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "video": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video"
          }
        },
        "required": [
          "id",
          "version"
        ],
        "title": "MediaDefaults",
        "type": "object"
      },
      "MediaUnderstandingSelection": {
        "additionalProperties": false,
        "description": "The model, by key, describing each media kind a model cannot read; a kind without one is unavailable.",
        "properties": {
          "audio": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audio"
          },
          "image": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image"
          },
          "video": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video"
          }
        },
        "title": "MediaUnderstandingSelection",
        "type": "object"
      },
      "MemberPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PrincipalSummary"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "MemberPage",
        "type": "object"
      },
      "Memory": {
        "properties": {
          "always_load": {
            "items": {
              "type": "string"
            },
            "title": "Always Load",
            "type": "array"
          },
          "content_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Bytes"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "file_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Count"
          },
          "guide": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guide"
          },
          "history_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "History Bytes"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "inherited_guide": {
            "title": "Inherited Guide",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/MemoryKind"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Namespace"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "name",
          "description",
          "kind",
          "type",
          "provider_id",
          "namespace",
          "guide",
          "inherited_guide",
          "always_load",
          "labels",
          "file_count",
          "content_bytes",
          "history_bytes",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Memory",
        "type": "object"
      },
      "MemoryAccess": {
        "enum": [
          "read",
          "write"
        ],
        "type": "string"
      },
      "MemoryCreate": {
        "additionalProperties": false,
        "description": "`postgres` makes a file memory the Service stores; a Memory Provider's type makes a record memory in that\nprovider's backend, under a new namespace or the existing one `namespace` adopts.",
        "properties": {
          "always_load": {
            "default": [],
            "items": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 64,
            "title": "Always Load",
            "type": "array"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "guide": {
            "anyOf": [
              {
                "maxLength": 65536,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guide"
          },
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "namespace": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "pattern": "^[^\\s*]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Namespace"
          },
          "provider_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          },
          "type": {
            "default": "postgres",
            "maxLength": 64,
            "minLength": 1,
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "MemoryCreate",
        "type": "object"
      },
      "MemoryFile": {
        "properties": {
          "content": {
            "title": "Content",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By Principal Id"
          },
          "updated_by_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By Run Id"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "path",
          "version",
          "size",
          "description",
          "updated_by_run_id",
          "updated_by_principal_id",
          "created_at",
          "updated_at",
          "content"
        ],
        "title": "MemoryFile",
        "type": "object"
      },
      "MemoryFileCreate": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "title": "Content",
            "type": "string"
          },
          "path": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Path",
            "type": "string"
          }
        },
        "required": [
          "path",
          "content"
        ],
        "title": "MemoryFileCreate",
        "type": "object"
      },
      "MemoryFileEntry": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By Principal Id"
          },
          "updated_by_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By Run Id"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "path",
          "version",
          "size",
          "description",
          "updated_by_run_id",
          "updated_by_principal_id",
          "created_at",
          "updated_at"
        ],
        "title": "MemoryFileEntry",
        "type": "object"
      },
      "MemoryFileMove": {
        "additionalProperties": false,
        "description": "Moves the file `If-Match` names to a free path; it keeps its ID.",
        "properties": {
          "destination": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Destination",
            "type": "string"
          },
          "source": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "source",
          "destination"
        ],
        "title": "MemoryFileMove",
        "type": "object"
      },
      "MemoryFilePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MemoryFileEntry"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "MemoryFilePage",
        "type": "object"
      },
      "MemoryFileReplace": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "title": "Content",
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "title": "MemoryFileReplace",
        "type": "object"
      },
      "MemoryFileState": {
        "description": "A path after a restore: its file, or null when the restored state is no file.",
        "properties": {
          "file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemoryFile"
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "title": "Path",
            "type": "string"
          }
        },
        "required": [
          "path",
          "file"
        ],
        "title": "MemoryFileState",
        "type": "object"
      },
      "MemoryKind": {
        "enum": [
          "file",
          "record"
        ],
        "type": "string"
      },
      "MemoryMount": {
        "additionalProperties": false,
        "description": "A memory under the name the model addresses it by, exposing the tools its access allows. `recall` lets a\nrecord memory recall records into each run's first input; file memories ignore it.",
        "properties": {
          "access": {
            "$ref": "#/components/schemas/MemoryAccess"
          },
          "memory_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Memory Id",
            "type": "string"
          },
          "name": {
            "pattern": "^[a-z][a-z0-9-]{0,62}$",
            "title": "Name",
            "type": "string"
          },
          "recall": {
            "default": true,
            "title": "Recall",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "memory_id",
          "access"
        ],
        "title": "MemoryMount",
        "type": "object"
      },
      "MemoryMountPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MemoryMount"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "MemoryMountPage",
        "type": "object"
      },
      "MemoryMountUpdate": {
        "additionalProperties": false,
        "description": "Fields left out stay unchanged.",
        "properties": {
          "access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemoryAccess"
              },
              {
                "type": "null"
              }
            ]
          },
          "recall": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recall"
          }
        },
        "title": "MemoryMountUpdate",
        "type": "object"
      },
      "MemoryPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Memory"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "MemoryPage",
        "type": "object"
      },
      "MemoryRecordPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MemoryRecordView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "MemoryRecordPage",
        "type": "object"
      },
      "MemoryRecordSearch": {
        "additionalProperties": false,
        "properties": {
          "limit": {
            "default": 10,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "query": {
            "maxLength": 8000,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          }
        },
        "required": [
          "query"
        ],
        "title": "MemoryRecordSearch",
        "type": "object"
      },
      "MemoryRecordText": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "maxLength": 8000,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "MemoryRecordText",
        "type": "object"
      },
      "MemoryRecordView": {
        "description": "A record as the memory's provider returns it; `score` is its similarity to a search query.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "text"
        ],
        "title": "MemoryRecordView",
        "type": "object"
      },
      "MemoryRevision": {
        "description": "One change to one path. A move is two: `move_out` at the source and `move_in` at the destination.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "moved_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Moved Path"
          },
          "op": {
            "enum": [
              "create",
              "update",
              "delete",
              "move_out",
              "move_in"
            ],
            "title": "Op",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal Id"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "seq": {
            "title": "Seq",
            "type": "integer"
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id"
          }
        },
        "required": [
          "seq",
          "path",
          "op",
          "moved_path",
          "run_id",
          "tool_call_id",
          "principal_id",
          "created_at"
        ],
        "title": "MemoryRevision",
        "type": "object"
      },
      "MemoryRevisionDetail": {
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "hunks": {
            "items": {
              "type": "string"
            },
            "title": "Hunks",
            "type": "array"
          },
          "moved_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Moved Path"
          },
          "op": {
            "enum": [
              "create",
              "update",
              "delete",
              "move_out",
              "move_in"
            ],
            "title": "Op",
            "type": "string"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "previous_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Content"
          },
          "principal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal Id"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "seq": {
            "title": "Seq",
            "type": "integer"
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id"
          }
        },
        "required": [
          "seq",
          "path",
          "op",
          "moved_path",
          "run_id",
          "tool_call_id",
          "principal_id",
          "created_at",
          "previous_content",
          "content",
          "hunks"
        ],
        "title": "MemoryRevisionDetail",
        "type": "object"
      },
      "MemoryRevisionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MemoryRevision"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "MemoryRevisionPage",
        "type": "object"
      },
      "MemoryUpdate": {
        "additionalProperties": false,
        "description": "Fields left out stay unchanged; `description: null` clears it and `guide: null` inherits the default.",
        "properties": {
          "always_load": {
            "anyOf": [
              {
                "items": {
                  "maxLength": 1024,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 64,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Always Load"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "guide": {
            "anyOf": [
              {
                "maxLength": 65536,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guide"
          },
          "labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "maxLength": 128,
                  "type": "string"
                },
                "maxProperties": 32,
                "propertyNames": {
                  "maxLength": 128,
                  "minLength": 1
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labels"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "MemoryUpdate",
        "type": "object"
      },
      "Message": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Revision Id"
          },
          "delivery": {
            "$ref": "#/components/schemas/Delivery",
            "default": "steer"
          },
          "kind": {
            "const": "message",
            "default": "message",
            "title": "Kind",
            "type": "string"
          },
          "options": {
            "$ref": "#/components/schemas/RunOptions-Input"
          },
          "payload": {
            "$ref": "#/components/schemas/MessagePayload"
          }
        },
        "required": [
          "payload",
          "agent_id"
        ],
        "title": "Message",
        "type": "object"
      },
      "MessageHistory": {
        "description": "Pydantic AI ModelMessage JSON objects, validated by the Service. Imports completed user text, model text and closed tool-call/JSON-result exchanges; no instructions, media or suspended execution. At most 256 messages and 256 KiB of normalized JSON.",
        "items": {
          "additionalProperties": {
            "$ref": "#/components/schemas/JsonValue"
          },
          "type": "object"
        },
        "maxItems": 256,
        "type": "array"
      },
      "MessagePayload": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "items": {
              "$ref": "#/components/schemas/Part"
            },
            "maxItems": 32,
            "minItems": 1,
            "title": "Content",
            "type": "array"
          }
        },
        "required": [
          "content"
        ],
        "title": "MessagePayload",
        "type": "object"
      },
      "Model": {
        "properties": {
          "catalog_ref": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CatalogRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "$ref": "#/components/schemas/ModelConfig-Output"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "pricing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelPricingEntry-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "organization_id",
          "workspace_id",
          "provider_id",
          "key",
          "name",
          "description",
          "config",
          "pricing",
          "catalog_ref",
          "enabled",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Model",
        "type": "object"
      },
      "ModelCapability": {
        "description": "Harness-owned capabilities of the active Agent model.",
        "enum": [
          "image_understanding",
          "video_understanding",
          "audio_understanding",
          "document_understanding"
        ],
        "title": "ModelCapability",
        "type": "string"
      },
      "ModelCatalog": {
        "description": "`ready` is fresh, `stale` the last catalog after a failed refresh, `unavailable` none fetched yet.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CatalogModel"
            },
            "title": "Items",
            "type": "array"
          },
          "status": {
            "enum": [
              "ready",
              "stale",
              "unavailable"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "items",
          "status"
        ],
        "title": "ModelCatalog",
        "type": "object"
      },
      "ModelConfig-Input": {
        "additionalProperties": false,
        "properties": {
          "characteristics": {
            "$ref": "#/components/schemas/HarnessModelCharacteristics-Input"
          },
          "extra_body": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Extra Body",
            "type": "object"
          },
          "extra_headers": {
            "maxProperties": 32,
            "patternProperties": {
              "^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,128}$": {
                "maxLength": 2048,
                "pattern": "^[\\x20-\\x7e]*$",
                "type": "string"
              }
            },
            "title": "Extra Headers",
            "type": "object"
          },
          "max_tokens": {
            "anyOf": [
              {
                "maximum": 1000000.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "model_api": {
            "maxLength": 96,
            "pattern": "^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)+$",
            "title": "Model Api",
            "type": "string"
          },
          "model_name": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Model Name",
            "type": "string"
          },
          "temperature": {
            "anyOf": [
              {
                "maximum": 2.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          }
        },
        "required": [
          "model_name",
          "model_api"
        ],
        "title": "ModelConfig",
        "type": "object"
      },
      "ModelConfig-Output": {
        "additionalProperties": false,
        "properties": {
          "characteristics": {
            "$ref": "#/components/schemas/HarnessModelCharacteristics-Output"
          },
          "extra_body": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Extra Body",
            "type": "object"
          },
          "extra_headers": {
            "maxProperties": 32,
            "patternProperties": {
              "^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,128}$": {
                "maxLength": 2048,
                "pattern": "^[\\x20-\\x7e]*$",
                "type": "string"
              }
            },
            "title": "Extra Headers",
            "type": "object"
          },
          "max_tokens": {
            "anyOf": [
              {
                "maximum": 1000000.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "model_api": {
            "maxLength": 96,
            "pattern": "^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)+$",
            "title": "Model Api",
            "type": "string"
          },
          "model_name": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Model Name",
            "type": "string"
          },
          "temperature": {
            "anyOf": [
              {
                "maximum": 2.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          }
        },
        "required": [
          "model_name",
          "model_api"
        ],
        "title": "ModelConfig",
        "type": "object"
      },
      "ModelCreate": {
        "additionalProperties": false,
        "properties": {
          "catalog_ref": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CatalogRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "$ref": "#/components/schemas/ModelConfig-Input"
          },
          "description": {
            "default": "",
            "maxLength": 2048,
            "title": "Description",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "key": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9.-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "pricing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelPricingEntry-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Provider Id",
            "type": "string"
          }
        },
        "required": [
          "provider_id",
          "name",
          "config"
        ],
        "title": "ModelCreate",
        "type": "object"
      },
      "ModelMetrics": {
        "properties": {
          "cache_hit_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Hit Rate"
          },
          "cache_read_tokens": {
            "title": "Cache Read Tokens",
            "type": "integer"
          },
          "cost": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "requests": {
            "title": "Requests",
            "type": "integer"
          },
          "unpriced_requests": {
            "title": "Unpriced Requests",
            "type": "integer"
          }
        },
        "required": [
          "requests",
          "input_tokens",
          "output_tokens",
          "cache_read_tokens",
          "cache_hit_rate",
          "cost",
          "unpriced_requests"
        ],
        "title": "ModelMetrics",
        "type": "object"
      },
      "ModelPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Model"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ModelPage",
        "type": "object"
      },
      "ModelPriceRule-Input": {
        "additionalProperties": false,
        "description": "One complete set of prices and the condition selecting it.",
        "properties": {
          "constraint": {
            "$ref": "#/components/schemas/PricingConstraint"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "prices": {
            "items": {
              "$ref": "#/components/schemas/PriceComponent-Input"
            },
            "maxItems": 128,
            "minItems": 1,
            "title": "Prices",
            "type": "array"
          },
          "rule_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Rule Id",
            "type": "string"
          },
          "service_tier": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "pattern": "^[a-z][a-z0-9_-]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Tier"
          }
        },
        "required": [
          "rule_id",
          "prices"
        ],
        "title": "ModelPriceRule",
        "type": "object"
      },
      "ModelPriceRule-Output": {
        "additionalProperties": false,
        "description": "One complete set of prices and the condition selecting it.",
        "properties": {
          "constraint": {
            "$ref": "#/components/schemas/PricingConstraint"
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "prices": {
            "items": {
              "$ref": "#/components/schemas/PriceComponent-Output"
            },
            "maxItems": 128,
            "minItems": 1,
            "title": "Prices",
            "type": "array"
          },
          "rule_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Rule Id",
            "type": "string"
          },
          "service_tier": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "pattern": "^[a-z][a-z0-9_-]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Tier"
          }
        },
        "required": [
          "rule_id",
          "prices"
        ],
        "title": "ModelPriceRule",
        "type": "object"
      },
      "ModelPricingEntry-Input": {
        "additionalProperties": false,
        "description": "Complete pricing declaration for one provider-qualified model.",
        "properties": {
          "context_window": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Window"
          },
          "model": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "provider": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Provider",
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/ModelPriceRule-Input"
            },
            "maxItems": 128,
            "minItems": 1,
            "title": "Rules",
            "type": "array"
          },
          "source": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Source",
            "type": "string"
          },
          "source_revision": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Source Revision",
            "type": "string"
          },
          "source_url": {
            "anyOf": [
              {
                "format": "uri",
                "maxLength": 2083,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          }
        },
        "required": [
          "provider",
          "model",
          "rules",
          "source",
          "source_revision"
        ],
        "title": "ModelPricingEntry",
        "type": "object"
      },
      "ModelPricingEntry-Output": {
        "additionalProperties": false,
        "description": "Complete pricing declaration for one provider-qualified model.",
        "properties": {
          "context_window": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Window"
          },
          "model": {
            "maxLength": 512,
            "minLength": 1,
            "title": "Model",
            "type": "string"
          },
          "provider": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Provider",
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/ModelPriceRule-Output"
            },
            "maxItems": 128,
            "minItems": 1,
            "title": "Rules",
            "type": "array"
          },
          "source": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Source",
            "type": "string"
          },
          "source_revision": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Source Revision",
            "type": "string"
          },
          "source_url": {
            "anyOf": [
              {
                "format": "uri",
                "maxLength": 2083,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          }
        },
        "required": [
          "provider",
          "model",
          "rules",
          "source",
          "source_revision"
        ],
        "title": "ModelPricingEntry",
        "type": "object"
      },
      "ModelUpdate": {
        "additionalProperties": false,
        "properties": {
          "catalog_ref": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CatalogRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelConfig-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "pricing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelPricingEntry-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ModelUpdate",
        "type": "object"
      },
      "ModelUsage": {
        "properties": {
          "cache_read_tokens": {
            "title": "Cache Read Tokens",
            "type": "integer"
          },
          "cache_write_tokens": {
            "title": "Cache Write Tokens",
            "type": "integer"
          },
          "cost": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "requests": {
            "title": "Requests",
            "type": "integer"
          }
        },
        "required": [
          "model",
          "requests",
          "input_tokens",
          "output_tokens",
          "cache_read_tokens",
          "cache_write_tokens",
          "cost"
        ],
        "title": "ModelUsage",
        "type": "object"
      },
      "ModelUsageGroup": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "usage": {
            "$ref": "#/components/schemas/ModelMetrics"
          }
        },
        "required": [
          "model",
          "name",
          "usage"
        ],
        "title": "ModelUsageGroup",
        "type": "object"
      },
      "ModelUsagePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ModelUsageGroup"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ModelUsagePage",
        "type": "object"
      },
      "MountCreate": {
        "additionalProperties": false,
        "properties": {
          "environment_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Environment Id",
            "type": "string"
          },
          "name": {
            "pattern": "^[a-z][a-z0-9-]{0,62}$",
            "title": "Name",
            "type": "string"
          },
          "working_directory": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Working Directory"
          }
        },
        "required": [
          "name",
          "environment_id"
        ],
        "title": "MountCreate",
        "type": "object"
      },
      "MountPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MountView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items"
        ],
        "title": "MountPage",
        "type": "object"
      },
      "MountView": {
        "properties": {
          "environment_id": {
            "title": "Environment Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "working_directory": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Working Directory"
          }
        },
        "required": [
          "name",
          "environment_id",
          "working_directory"
        ],
        "title": "MountView",
        "type": "object"
      },
      "NewThread": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Revision Id"
          },
          "delivery": {
            "$ref": "#/components/schemas/Delivery",
            "default": "steer"
          },
          "environments": {
            "$ref": "#/components/schemas/InitialMounts",
            "default": []
          },
          "kind": {
            "const": "message",
            "default": "message",
            "title": "Kind",
            "type": "string"
          },
          "mcp_headers": {
            "$ref": "#/components/schemas/McpHeaders"
          },
          "memories": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MemoryMount"
            },
            "maxItems": 32,
            "title": "Memories",
            "type": "array"
          },
          "message_history": {
            "$ref": "#/components/schemas/MessageHistory"
          },
          "options": {
            "$ref": "#/components/schemas/RunOptions-Input"
          },
          "payload": {
            "$ref": "#/components/schemas/MessagePayload"
          },
          "session_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          }
        },
        "required": [
          "payload",
          "agent_id"
        ],
        "title": "NewThread",
        "type": "object"
      },
      "OAuthGrant": {
        "enum": [
          "authorization_code",
          "client_credentials"
        ],
        "type": "string"
      },
      "OAuthRedirect": {
        "properties": {
          "redirect_uri": {
            "title": "Redirect Uri",
            "type": "string"
          }
        },
        "required": [
          "redirect_uri"
        ],
        "title": "OAuthRedirect",
        "type": "object"
      },
      "OAuthSettings": {
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "anyOf": [
              {
                "maxLength": 512,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "grant_type": {
            "$ref": "#/components/schemas/OAuthGrant",
            "default": "authorization_code"
          },
          "scopes": {
            "default": [],
            "items": {
              "pattern": "^[!#-\\[\\]-~]{1,256}$",
              "type": "string"
            },
            "maxItems": 64,
            "title": "Scopes",
            "type": "array"
          },
          "token_endpoint_auth_method": {
            "$ref": "#/components/schemas/ClientAuthentication",
            "default": "none"
          }
        },
        "title": "OAuthSettings",
        "type": "object"
      },
      "OperationKind": {
        "enum": [
          "setup",
          "complete",
          "refresh",
          "revoke"
        ],
        "type": "string"
      },
      "Organization": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/Verb"
            },
            "title": "Permissions",
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "image_url",
          "version",
          "created_at",
          "updated_at",
          "permissions"
        ],
        "title": "Organization",
        "type": "object"
      },
      "OrganizationPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Organization"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "OrganizationPage",
        "type": "object"
      },
      "OrganizationUpdate": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "OrganizationUpdate",
        "type": "object"
      },
      "OutputSpec": {
        "additionalProperties": false,
        "description": "Plain text without a schema, one structured output, or at least two named variants.\n\n`resources` are the schemas `$ref`s may name besides the schema's own definitions.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "resources": {
            "maxProperties": 128,
            "patternProperties": {
              "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              }
            },
            "title": "Resources",
            "type": "object"
          },
          "schema": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schema"
          },
          "variants": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/OutputVariant"
                },
                "maxItems": 32,
                "minItems": 2,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variants"
          }
        },
        "title": "OutputSpec",
        "type": "object"
      },
      "OutputVariant": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "pattern": "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$",
            "title": "Name",
            "type": "string"
          },
          "resources": {
            "maxProperties": 128,
            "patternProperties": {
              "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              }
            },
            "title": "Resources",
            "type": "object"
          },
          "schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Schema",
            "type": "object"
          }
        },
        "required": [
          "name",
          "schema"
        ],
        "title": "OutputVariant",
        "type": "object"
      },
      "Part": {
        "discriminator": {
          "mapping": {
            "asset": "#/components/schemas/AssetPart",
            "json": "#/components/schemas/JsonPart",
            "text": "#/components/schemas/TextPart",
            "url": "#/components/schemas/UrlPart"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextPart"
          },
          {
            "$ref": "#/components/schemas/AssetPart"
          },
          {
            "$ref": "#/components/schemas/UrlPart"
          },
          {
            "$ref": "#/components/schemas/JsonPart"
          }
        ]
      },
      "PasswordChange": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "format": "password",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Current Password",
            "type": "string",
            "writeOnly": true
          },
          "password": {
            "format": "password",
            "maxLength": 1024,
            "minLength": 12,
            "title": "Password",
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "current_password",
          "password"
        ],
        "title": "PasswordChange",
        "type": "object"
      },
      "PasswordReset": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "PasswordReset",
        "type": "object"
      },
      "PasswordResetConfirm": {
        "additionalProperties": false,
        "properties": {
          "password": {
            "format": "password",
            "maxLength": 1024,
            "minLength": 12,
            "title": "Password",
            "type": "string",
            "writeOnly": true
          },
          "token": {
            "maxLength": 512,
            "minLength": 16,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "password"
        ],
        "title": "PasswordResetConfirm",
        "type": "object"
      },
      "Pending": {
        "additionalProperties": false,
        "description": "Public projection; complete native requests and private metadata stay in the checkpoint.",
        "properties": {
          "approvals": {
            "items": {
              "$ref": "#/components/schemas/PendingCall"
            },
            "title": "Approvals",
            "type": "array"
          },
          "calls": {
            "items": {
              "$ref": "#/components/schemas/PendingCall"
            },
            "title": "Calls",
            "type": "array"
          }
        },
        "required": [
          "approvals",
          "calls"
        ],
        "title": "Pending",
        "type": "object"
      },
      "PendingCall": {
        "additionalProperties": false,
        "properties": {
          "arguments": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Arguments",
            "type": "object"
          },
          "presentation": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presentation"
          },
          "tool_call_id": {
            "$ref": "#/components/schemas/ToolCallId"
          },
          "tool_name": {
            "title": "Tool Name",
            "type": "string"
          }
        },
        "required": [
          "tool_call_id",
          "tool_name",
          "arguments"
        ],
        "title": "PendingCall",
        "type": "object"
      },
      "PluginSelection": {
        "additionalProperties": false,
        "description": "One instance of a Harness plugin factory the deployment installed.",
        "properties": {
          "config": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Config",
            "type": "object"
          },
          "instance_name": {
            "pattern": "^[A-Za-z_][A-Za-z0-9_.:-]{0,127}$",
            "title": "Instance Name",
            "type": "string"
          },
          "plugin_key": {
            "pattern": "^[a-z][a-z0-9_.-]{1,127}$",
            "title": "Plugin Key",
            "type": "string"
          }
        },
        "required": [
          "instance_name",
          "plugin_key"
        ],
        "title": "PluginSelection",
        "type": "object"
      },
      "PriceComponent-Input": {
        "additionalProperties": false,
        "description": "One genai-prices usage dimension and its USD unit price.",
        "properties": {
          "price": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Price"
          },
          "price_key": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Price Key",
            "type": "string"
          },
          "tiers": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PriceTier-Input"
            },
            "maxItems": 32,
            "title": "Tiers",
            "type": "array"
          }
        },
        "required": [
          "price_key",
          "price"
        ],
        "title": "PriceComponent",
        "type": "object"
      },
      "PriceComponent-Output": {
        "additionalProperties": false,
        "description": "One genai-prices usage dimension and its USD unit price.",
        "properties": {
          "price": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Price",
            "type": "string"
          },
          "price_key": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Price Key",
            "type": "string"
          },
          "tiers": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PriceTier-Output"
            },
            "maxItems": 32,
            "title": "Tiers",
            "type": "array"
          }
        },
        "required": [
          "price_key",
          "price"
        ],
        "title": "PriceComponent",
        "type": "object"
      },
      "PriceTier-Input": {
        "additionalProperties": false,
        "description": "One cliff-pricing threshold applied to the complete usage quantity.",
        "properties": {
          "price": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Price"
          },
          "start": {
            "minimum": 0.0,
            "title": "Start",
            "type": "integer"
          }
        },
        "required": [
          "start",
          "price"
        ],
        "title": "PriceTier",
        "type": "object"
      },
      "PriceTier-Output": {
        "additionalProperties": false,
        "description": "One cliff-pricing threshold applied to the complete usage quantity.",
        "properties": {
          "price": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Price",
            "type": "string"
          },
          "start": {
            "minimum": 0.0,
            "title": "Start",
            "type": "integer"
          }
        },
        "required": [
          "start",
          "price"
        ],
        "title": "PriceTier",
        "type": "object"
      },
      "PricingConstraint": {
        "additionalProperties": false,
        "description": "A stable condition selecting one ordered model price rule.",
        "properties": {
          "end_time": {
            "anyOf": [
              {
                "format": "time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Time"
          },
          "kind": {
            "$ref": "#/components/schemas/PricingConstraintKind",
            "default": "always"
          },
          "start_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "start_time": {
            "anyOf": [
              {
                "format": "time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Time"
          },
          "weekdays": {
            "default": [],
            "items": {
              "type": "integer"
            },
            "maxItems": 7,
            "title": "Weekdays",
            "type": "array"
          }
        },
        "title": "PricingConstraint",
        "type": "object"
      },
      "PricingConstraintKind": {
        "enum": [
          "always",
          "start_date",
          "daily_time"
        ],
        "type": "string"
      },
      "PrincipalSummary": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "email",
          "status",
          "image_url"
        ],
        "title": "PrincipalSummary",
        "type": "object"
      },
      "Profile": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "email",
          "status",
          "image_url",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "Profile",
        "type": "object"
      },
      "ProfileUpdate": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Password"
          },
          "email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "ProfileUpdate",
        "type": "object"
      },
      "Provider": {
        "properties": {
          "config": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Config",
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "credential_configured": {
            "title": "Credential Configured",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "header_names": {
            "items": {
              "type": "string"
            },
            "title": "Header Names",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By Id"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "type",
          "name",
          "config",
          "credential_configured",
          "header_names",
          "enabled",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Provider",
        "type": "object"
      },
      "ProviderCreate": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Config",
            "type": "object"
          },
          "credential": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential",
            "writeOnly": true
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "extra_headers": {
            "maxProperties": 32,
            "patternProperties": {
              "^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,128}$": {
                "maxLength": 2048,
                "pattern": "^[\\x20-\\x7e]*$",
                "type": "string"
              }
            },
            "title": "Extra Headers",
            "type": "object",
            "writeOnly": true
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "type": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "name"
        ],
        "title": "ProviderCreate",
        "type": "object"
      },
      "ProviderPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Provider"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ProviderPage",
        "type": "object"
      },
      "ProviderTest": {
        "properties": {
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "provider_version": {
            "title": "Provider Version",
            "type": "integer"
          },
          "status": {
            "enum": [
              "succeeded",
              "failed",
              "unsupported"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "provider_id",
          "provider_version",
          "status",
          "message"
        ],
        "title": "ProviderTest",
        "type": "object"
      },
      "ProviderType": {
        "properties": {
          "authentication": {
            "$ref": "#/components/schemas/Authentication"
          },
          "catalog_providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Catalog Providers"
          },
          "configuration_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Configuration Schema",
            "type": "object"
          },
          "credential_schema": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential Schema"
          },
          "default_model_api": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Model Api"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "environment_schema": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Schema"
          },
          "model_api_labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Api Labels"
          },
          "model_apis": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Apis"
          },
          "operations": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WebOperation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operations"
          },
          "settings_schemas": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": {
                    "$ref": "#/components/schemas/JsonValue"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings Schemas"
          },
          "setup_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Label"
          },
          "setup_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Url"
          },
          "supports_destroy": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supports Destroy"
          },
          "supports_stop": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supports Stop"
          },
          "supports_test": {
            "title": "Supports Test",
            "type": "boolean"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "display_name",
          "configuration_schema",
          "credential_schema",
          "authentication",
          "setup_url",
          "setup_label",
          "supports_test"
        ],
        "title": "ProviderType",
        "type": "object"
      },
      "ProviderTypePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProviderType"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ProviderTypePage",
        "type": "object"
      },
      "ProviderUpdate": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "credential": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credential",
            "writeOnly": true
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "extra_headers": {
            "maxProperties": 64,
            "patternProperties": {
              "^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,128}$": {
                "anyOf": [
                  {
                    "maxLength": 2048,
                    "pattern": "^[\\x20-\\x7e]*$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "title": "Extra Headers",
            "type": "object",
            "writeOnly": true
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "ProviderUpdate",
        "type": "object"
      },
      "Resume": {
        "additionalProperties": false,
        "description": "The complete result batch, submitted and stored on the successor without omission defaults.",
        "properties": {
          "approvals": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ApprovalDecision"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/ToolCallId"
            },
            "title": "Approvals",
            "type": "object"
          },
          "calls": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CallResult"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/ToolCallId"
            },
            "title": "Calls",
            "type": "object"
          },
          "input": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessagePayload"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "approvals",
          "calls"
        ],
        "title": "Resume",
        "type": "object"
      },
      "RetryConfig": {
        "additionalProperties": false,
        "properties": {
          "output": {
            "default": 0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Output",
            "type": "integer"
          },
          "tools": {
            "default": 0,
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Tools",
            "type": "integer"
          }
        },
        "title": "RetryConfig",
        "type": "object"
      },
      "RetryOverride": {
        "additionalProperties": false,
        "properties": {
          "output": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "tools": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          }
        },
        "title": "RetryOverride",
        "type": "object"
      },
      "Returned": {
        "additionalProperties": false,
        "description": "A JSON tool result. Built-in question values are validated by the Harness.",
        "properties": {
          "status": {
            "const": "returned",
            "title": "Status",
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/JsonValue"
          }
        },
        "required": [
          "status",
          "value"
        ],
        "title": "Returned",
        "type": "object"
      },
      "RevokedConnection": {
        "properties": {
          "auth": {
            "$ref": "#/components/schemas/ConnectionAuth"
          },
          "authorization_pending": {
            "title": "Authorization Pending",
            "type": "boolean"
          },
          "client_secret_configured": {
            "title": "Client Secret Configured",
            "type": "boolean"
          },
          "config": {
            "$ref": "#/components/schemas/ConnectionConfig"
          },
          "connector_provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Provider Id"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "credential_configured": {
            "title": "Credential Configured",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_test": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionTestOutcome"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "remote_revocation": {
            "enum": [
              "revoked",
              "failed",
              "skipped"
            ],
            "title": "Remote Revocation",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "type",
          "name",
          "config",
          "auth",
          "connector_provider_id",
          "status",
          "failure",
          "credential_configured",
          "client_secret_configured",
          "authorization_pending",
          "last_test",
          "enabled",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at",
          "remote_revocation"
        ],
        "title": "RevokedConnection",
        "type": "object"
      },
      "RunItems": {
        "description": "A run's committed display with the run it describes. Live output continues after `position`.",
        "properties": {
          "complete": {
            "title": "Complete",
            "type": "boolean"
          },
          "dropped": {
            "title": "Dropped",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "title": "Items",
            "type": "array"
          },
          "position": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "resume_after": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resume After"
          },
          "run": {
            "$ref": "#/components/schemas/RunView"
          }
        },
        "required": [
          "run",
          "items",
          "position",
          "dropped",
          "complete"
        ],
        "title": "RunItems",
        "type": "object"
      },
      "RunLabels": {
        "additionalProperties": false,
        "properties": {
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          }
        },
        "required": [
          "labels"
        ],
        "title": "RunLabels",
        "type": "object"
      },
      "RunMetrics": {
        "properties": {
          "average_duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Duration Seconds"
          },
          "runs": {
            "title": "Runs",
            "type": "integer"
          }
        },
        "required": [
          "runs",
          "average_duration_seconds"
        ],
        "title": "RunMetrics",
        "type": "object"
      },
      "RunOptions-Input": {
        "additionalProperties": false,
        "description": "What a message may choose for the run it starts. A steer joins a run with the defaults or equal options.",
        "properties": {
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          },
          "max_usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageLimit"
              },
              {
                "type": "null"
              }
            ]
          },
          "overrides": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentOverride-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "RunOptions",
        "type": "object"
      },
      "RunOptions-Output": {
        "additionalProperties": false,
        "description": "What a message may choose for the run it starts. A steer joins a run with the defaults or equal options.",
        "properties": {
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          },
          "max_usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageLimit"
              },
              {
                "type": "null"
              }
            ]
          },
          "overrides": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentOverride-Output"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "RunOptions",
        "type": "object"
      },
      "RunPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "RunPage",
        "type": "object"
      },
      "RunStatus": {
        "enum": [
          "accepted",
          "running",
          "waiting",
          "completed",
          "failed",
          "cancelled"
        ],
        "type": "string"
      },
      "RunView": {
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "agent_revision_id": {
            "title": "Agent Revision Id",
            "type": "string"
          },
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "cancel_requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Requested At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "current_attempt_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Attempt Id"
          },
          "environment_mounts": {
            "items": {
              "$ref": "#/components/schemas/EnvironmentMount"
            },
            "title": "Environment Mounts",
            "type": "array"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Failure"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "input": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "lineage": {
            "$ref": "#/components/schemas/Lineage"
          },
          "max_attempts": {
            "title": "Max Attempts",
            "type": "integer"
          },
          "memory_mounts": {
            "items": {
              "$ref": "#/components/schemas/MemoryMount"
            },
            "title": "Memory Mounts",
            "type": "array"
          },
          "options": {
            "$ref": "#/components/schemas/RunOptions-Output"
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JsonValue"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Run Id"
          },
          "pending": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Pending"
              },
              {
                "type": "null"
              }
            ]
          },
          "principal_id": {
            "title": "Principal Id",
            "type": "string"
          },
          "resume": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Resume"
              },
              {
                "type": "null"
              }
            ]
          },
          "resumed_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resumed By Id"
          },
          "revision_selection": {
            "enum": [
              "pinned",
              "default",
              "inherited"
            ],
            "title": "Revision Selection",
            "type": "string"
          },
          "sealed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sealed At"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "source_entry_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Entry Id"
          },
          "started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "$ref": "#/components/schemas/RunStatus"
          },
          "thread_id": {
            "title": "Thread Id",
            "type": "string"
          },
          "trigger": {
            "$ref": "#/components/schemas/Trigger"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "usage_at_seal": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usage At Seal"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "wait_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WaitReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "session_id",
          "thread_id",
          "agent_id",
          "agent_revision_id",
          "revision_selection",
          "principal_id",
          "status",
          "trigger",
          "lineage",
          "parent_run_id",
          "source_entry_id",
          "resume",
          "resumed_by_id",
          "wait_reason",
          "pending",
          "environment_mounts",
          "memory_mounts",
          "options",
          "current_attempt_id",
          "attempts",
          "max_attempts",
          "output",
          "failure",
          "usage_at_seal",
          "labels",
          "cancel_requested_at",
          "version",
          "created_at",
          "started_at",
          "sealed_at",
          "updated_at"
        ],
        "title": "RunView",
        "type": "object"
      },
      "ServiceAccount": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "status": {
            "enum": [
              "active",
              "disabled"
            ],
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "name",
          "description",
          "status",
          "role",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "ServiceAccount",
        "type": "object"
      },
      "ServiceAccountCreate": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "default": "",
            "maxLength": 2048,
            "title": "Description",
            "type": "string"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "role": {
            "default": "runner",
            "pattern": "^[a-z][a-z0-9_]{0,31}$",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "ServiceAccountCreate",
        "type": "object"
      },
      "ServiceAccountPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ServiceAccount"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ServiceAccountPage",
        "type": "object"
      },
      "ServiceAccountUpdate": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "pattern": "^[a-z][a-z0-9_]{0,31}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "active",
                  "disabled"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "title": "ServiceAccountUpdate",
        "type": "object"
      },
      "SessionCreate": {
        "additionalProperties": false,
        "properties": {
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          }
        },
        "title": "SessionCreate",
        "type": "object"
      },
      "SessionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SessionView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "SessionPage",
        "type": "object"
      },
      "SessionPreview": {
        "description": "The session's latest run, summarized for a list row.",
        "properties": {
          "agent_id": {
            "title": "Agent Id",
            "type": "string"
          },
          "agent_name": {
            "title": "Agent Name",
            "type": "string"
          },
          "input_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Text"
          },
          "output_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Text"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RunStatus"
          },
          "thread_id": {
            "title": "Thread Id",
            "type": "string"
          },
          "trigger": {
            "$ref": "#/components/schemas/Trigger"
          }
        },
        "required": [
          "run_id",
          "thread_id",
          "agent_id",
          "agent_name",
          "status",
          "trigger",
          "input_text",
          "output_text"
        ],
        "title": "SessionPreview",
        "type": "object"
      },
      "SessionProfile": {
        "description": "What a browser restores from its HttpOnly cookie: the account and the token it sends on mutations.",
        "properties": {
          "csrf_token": {
            "title": "Csrf Token",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/Profile"
          }
        },
        "required": [
          "user",
          "csrf_token"
        ],
        "title": "SessionProfile",
        "type": "object"
      },
      "SessionUpdate": {
        "additionalProperties": false,
        "properties": {
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          }
        },
        "required": [
          "labels"
        ],
        "title": "SessionUpdate",
        "type": "object"
      },
      "SessionView": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "last_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Id"
          },
          "preview": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionPreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_count": {
            "default": 0,
            "title": "Run Count",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "labels",
          "created_by_id",
          "last_run_id",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "SessionView",
        "type": "object"
      },
      "Skill": {
        "properties": {
          "archived_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "default_revision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkillRevisionSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "default_revision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Revision Id"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "name",
          "description",
          "labels",
          "default_revision_id",
          "default_revision",
          "archived_at",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Skill",
        "type": "object"
      },
      "SkillCreate": {
        "additionalProperties": false,
        "description": "`name` and `description` default to what the package's SKILL.md declares.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 16384,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "source": {
            "discriminator": {
              "mapping": {
                "github": "#/components/schemas/GitHubSource",
                "upload": "#/components/schemas/UploadSource"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/UploadSource"
              },
              {
                "$ref": "#/components/schemas/GitHubSource"
              }
            ],
            "title": "Source"
          }
        },
        "required": [
          "source"
        ],
        "title": "SkillCreate",
        "type": "object"
      },
      "SkillFile": {
        "additionalProperties": false,
        "properties": {
          "path": {
            "title": "Path",
            "type": "string"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "size"
        ],
        "title": "SkillFile",
        "type": "object"
      },
      "SkillManifest": {
        "additionalProperties": false,
        "description": "The frozen configuration of a skill revision: what its SKILL.md declares and the exact package bytes.",
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/SkillFile"
            },
            "title": "Files",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "package_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "title": "Package Digest",
            "type": "string"
          },
          "package_size": {
            "title": "Package Size",
            "type": "integer"
          },
          "root": {
            "description": "The archive directory holding SKILL.md: \"\" or \"<directory>/\"",
            "title": "Root",
            "type": "string"
          },
          "size": {
            "description": "Expanded bytes of all files",
            "title": "Size",
            "type": "integer"
          },
          "source": {
            "discriminator": {
              "mapping": {
                "github": "#/components/schemas/GitHubSource",
                "upload": "#/components/schemas/UploadSource"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/UploadSource"
              },
              {
                "$ref": "#/components/schemas/GitHubSource"
              }
            ],
            "title": "Source"
          }
        },
        "required": [
          "name",
          "description",
          "root",
          "files",
          "size",
          "package_digest",
          "package_size",
          "source"
        ],
        "title": "SkillManifest",
        "type": "object"
      },
      "SkillPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Skill"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "SkillPage",
        "type": "object"
      },
      "SkillRevision": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/SkillManifest"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "skill_id": {
            "title": "Skill Id",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "skill_id",
          "workspace_id",
          "number",
          "config",
          "digest",
          "note",
          "created_by_id",
          "created_at"
        ],
        "title": "SkillRevision",
        "type": "object"
      },
      "SkillRevisionCreate": {
        "additionalProperties": false,
        "properties": {
          "make_default": {
            "default": true,
            "title": "Make Default",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "source": {
            "discriminator": {
              "mapping": {
                "github": "#/components/schemas/GitHubSource",
                "upload": "#/components/schemas/UploadSource"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/UploadSource"
              },
              {
                "$ref": "#/components/schemas/GitHubSource"
              }
            ],
            "title": "Source"
          }
        },
        "required": [
          "source"
        ],
        "title": "SkillRevisionCreate",
        "type": "object"
      },
      "SkillRevisionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SkillRevision"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "SkillRevisionPage",
        "type": "object"
      },
      "SkillRevisionSummary": {
        "description": "What a skill's representation shows of its default revision.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "source": {
            "discriminator": {
              "mapping": {
                "github": "#/components/schemas/GitHubSource",
                "upload": "#/components/schemas/UploadSource"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/UploadSource"
              },
              {
                "$ref": "#/components/schemas/GitHubSource"
              }
            ],
            "title": "Source"
          }
        },
        "required": [
          "id",
          "number",
          "source"
        ],
        "title": "SkillRevisionSummary",
        "type": "object"
      },
      "SkillSelection": {
        "additionalProperties": false,
        "properties": {
          "revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Id"
          },
          "skill_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Skill Id",
            "type": "string"
          }
        },
        "required": [
          "skill_id"
        ],
        "title": "SkillSelection",
        "type": "object"
      },
      "SkillUpdate": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 16384,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "maxLength": 128,
                  "type": "string"
                },
                "maxProperties": 32,
                "propertyNames": {
                  "maxLength": 128,
                  "minLength": 1
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labels"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "SkillUpdate",
        "type": "object"
      },
      "SkillValidate": {
        "additionalProperties": false,
        "description": "A package to read and check as creating a skill or revision would, storing nothing.",
        "properties": {
          "source": {
            "discriminator": {
              "mapping": {
                "github": "#/components/schemas/GitHubSource",
                "upload": "#/components/schemas/UploadSource"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/UploadSource"
              },
              {
                "$ref": "#/components/schemas/GitHubSource"
              }
            ],
            "title": "Source"
          }
        },
        "required": [
          "source"
        ],
        "title": "SkillValidate",
        "type": "object"
      },
      "Span": {
        "description": "One span as the backend stored it; `attributes` are its OpenTelemetry attributes.\n\nFields a backend does not keep are null or empty.",
        "properties": {
          "attributes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Attributes",
            "type": "object"
          },
          "cost_usd": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Usd"
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/SpanEvent"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/JsonValue"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Level"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/SpanLink"
            },
            "title": "Links",
            "type": "array"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output": {
            "$ref": "#/components/schemas/JsonValue"
          },
          "parent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          },
          "resource_attributes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Resource Attributes",
            "type": "object"
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InstrumentationScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "enum": [
              "ok",
              "error"
            ],
            "title": "Status",
            "type": "string"
          },
          "status_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Message"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          },
          "usage": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Usage",
            "type": "object"
          }
        },
        "required": [
          "trace_id",
          "id",
          "parent_id",
          "name",
          "kind",
          "started_at",
          "ended_at",
          "status",
          "status_message",
          "level",
          "model",
          "usage",
          "cost_usd",
          "input",
          "output",
          "attributes",
          "resource_attributes",
          "scope",
          "events",
          "links",
          "source_url"
        ],
        "title": "Span",
        "type": "object"
      },
      "SpanEvent": {
        "description": "Something the span recorded at one moment, such as an exception.",
        "properties": {
          "attributes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Attributes",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "title": "Timestamp",
            "type": "string"
          }
        },
        "required": [
          "name",
          "timestamp",
          "attributes"
        ],
        "title": "SpanEvent",
        "type": "object"
      },
      "SpanLink": {
        "description": "Another span this one relates to, in its own trace or another.",
        "properties": {
          "attributes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Attributes",
            "type": "object"
          },
          "span_id": {
            "title": "Span Id",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "required": [
          "trace_id",
          "span_id",
          "attributes"
        ],
        "title": "SpanLink",
        "type": "object"
      },
      "SpanPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Span"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "SpanPage",
        "type": "object"
      },
      "SubagentOverride-Input": {
        "additionalProperties": false,
        "description": "Replaces the fields it sets of an edge; an edge the revision lacks sets at least `agent_id`.",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DelegationContextPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "environment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChildEnvironmentPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Id"
          },
          "usage_limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageLimits-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "SubagentOverride",
        "type": "object"
      },
      "SubagentOverride-Output": {
        "additionalProperties": false,
        "description": "Replaces the fields it sets of an edge; an edge the revision lacks sets at least `agent_id`.",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DelegationContextPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "environment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChildEnvironmentPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Id"
          },
          "usage_limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageLimits-Output"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "SubagentOverride",
        "type": "object"
      },
      "SubagentSelection-Input": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Agent Id",
            "type": "string"
          },
          "context": {
            "$ref": "#/components/schemas/DelegationContextPolicy"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "environment": {
            "$ref": "#/components/schemas/ChildEnvironmentPolicy"
          },
          "revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Id"
          },
          "usage_limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageLimits-Input"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "SubagentSelection",
        "type": "object"
      },
      "SubagentSelection-Output": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Agent Id",
            "type": "string"
          },
          "context": {
            "$ref": "#/components/schemas/DelegationContextPolicy"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 4096,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "environment": {
            "$ref": "#/components/schemas/ChildEnvironmentPolicy"
          },
          "revision_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision Id"
          },
          "usage_limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageLimits-Output"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "SubagentSelection",
        "type": "object"
      },
      "Submitted": {
        "description": "A submission receipt: the entry and, when the thread was idle, the run it started.",
        "properties": {
          "entry": {
            "$ref": "#/components/schemas/EntryView"
          },
          "run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunView"
              },
              {
                "type": "null"
              }
            ]
          },
          "thread": {
            "$ref": "#/components/schemas/ThreadView"
          }
        },
        "required": [
          "thread",
          "entry",
          "run"
        ],
        "title": "Submitted",
        "type": "object"
      },
      "Subscription": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "title": "Created By Id",
            "type": "string"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "filter": {
            "$ref": "#/components/schemas/SubscriptionFilter"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kinds": {
            "items": {
              "type": "string"
            },
            "title": "Kinds",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "title": "Updated By Id",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "url",
          "kinds",
          "filter",
          "enabled",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Subscription",
        "type": "object"
      },
      "SubscriptionCreate": {
        "additionalProperties": false,
        "description": "Without `signing_secret` the service generates one; either way it is returned only by this request.",
        "properties": {
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "filter": {
            "$ref": "#/components/schemas/SubscriptionFilter"
          },
          "kinds": {
            "items": {
              "$ref": "#/components/schemas/LifecycleKind"
            },
            "maxItems": 12,
            "minItems": 1,
            "title": "Kinds",
            "type": "array"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "signing_secret": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 256,
                "minLength": 16,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Signing Secret"
          },
          "url": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "name",
          "url",
          "kinds"
        ],
        "title": "SubscriptionCreate",
        "type": "object"
      },
      "SubscriptionFilter": {
        "additionalProperties": false,
        "description": "Absent fields match every run.",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "session_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "thread_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thread Id"
          }
        },
        "title": "SubscriptionFilter",
        "type": "object"
      },
      "SubscriptionPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Subscription"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "SubscriptionPage",
        "type": "object"
      },
      "SubscriptionUpdate": {
        "additionalProperties": false,
        "description": "`signing_secret` replaces the secret for deliveries queued after this change.",
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubscriptionFilter"
              },
              {
                "type": "null"
              }
            ]
          },
          "kinds": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/LifecycleKind"
                },
                "maxItems": 12,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kinds"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "signing_secret": {
            "anyOf": [
              {
                "format": "password",
                "maxLength": 256,
                "minLength": 16,
                "type": "string",
                "writeOnly": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Signing Secret"
          },
          "url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "SubscriptionUpdate",
        "type": "object"
      },
      "Template": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/TemplateConfig"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "updated_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated By Id"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "name",
          "description",
          "provider_id",
          "config",
          "enabled",
          "labels",
          "version",
          "created_by_id",
          "updated_by_id",
          "created_at",
          "updated_at"
        ],
        "title": "Template",
        "type": "object"
      },
      "TemplateConfig": {
        "additionalProperties": false,
        "properties": {
          "delete_after_seconds": {
            "anyOf": [
              {
                "maximum": 31536000.0,
                "minimum": 60.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delete After Seconds"
          },
          "recipe": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Recipe",
            "type": "object"
          },
          "stop_after_seconds": {
            "anyOf": [
              {
                "maximum": 2592000.0,
                "minimum": 60.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 1800,
            "title": "Stop After Seconds"
          }
        },
        "title": "TemplateConfig",
        "type": "object"
      },
      "TemplateCreate": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "$ref": "#/components/schemas/TemplateConfig"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "labels": {
            "additionalProperties": {
              "maxLength": 128,
              "type": "string"
            },
            "maxProperties": 32,
            "propertyNames": {
              "maxLength": 128,
              "minLength": 1
            },
            "title": "Labels",
            "type": "object"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "provider_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Provider Id",
            "type": "string"
          }
        },
        "required": [
          "name",
          "provider_id"
        ],
        "title": "TemplateCreate",
        "type": "object"
      },
      "TemplatePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Template"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "TemplatePage",
        "type": "object"
      },
      "TemplateUpdate": {
        "additionalProperties": false,
        "description": "Fields left out stay unchanged; `description: null` clears it.\n\nA new provider or recipe needs `write` on the provider and applies to environments created afterwards;\nexisting ones keep what they were built with, and the idle policy applies to all of them. `enabled: false`\nrefuses new environments, including reserved ones never created; created ones keep working.",
        "properties": {
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TemplateConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "maxLength": 128,
                  "type": "string"
                },
                "maxProperties": 32,
                "propertyNames": {
                  "maxLength": 128,
                  "minLength": 1
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labels"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "provider_id": {
            "anyOf": [
              {
                "maxLength": 41,
                "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Id"
          }
        },
        "title": "TemplateUpdate",
        "type": "object"
      },
      "TextPart": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "maxLength": 65536,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "text",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "title": "TextPart",
        "type": "object"
      },
      "ThreadPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ThreadView"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ThreadPage",
        "type": "object"
      },
      "ThreadUpdate": {
        "additionalProperties": false,
        "properties": {
          "labels": {
            "anyOf": [
              {
                "additionalProperties": {
                  "maxLength": 128,
                  "type": "string"
                },
                "maxProperties": 32,
                "propertyNames": {
                  "maxLength": 128,
                  "minLength": 1
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Labels"
          },
          "mcp_headers": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/McpHeaders"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ThreadUpdate",
        "type": "object"
      },
      "ThreadView": {
        "properties": {
          "archived_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "current_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Run Id"
          },
          "head_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Head Run Id"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Labels",
            "type": "object"
          },
          "last_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run Id"
          },
          "mcp_headers": {
            "additionalProperties": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Mcp Headers",
            "type": "object"
          },
          "message_history": {
            "$ref": "#/components/schemas/MessageHistory"
          },
          "origin": {
            "enum": [
              "new",
              "fork",
              "child"
            ],
            "title": "Origin",
            "type": "string"
          },
          "origin_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Run Id"
          },
          "origin_thread_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Thread Id"
          },
          "origin_tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Tool Call Id"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "subagent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subagent"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "message_history",
          "id",
          "workspace_id",
          "session_id",
          "origin",
          "origin_thread_id",
          "origin_run_id",
          "origin_tool_call_id",
          "subagent",
          "current_run_id",
          "head_run_id",
          "last_run_id",
          "mcp_headers",
          "labels",
          "archived_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "ThreadView",
        "type": "object"
      },
      "ToolCallId": {
        "maxLength": 1024,
        "minLength": 1,
        "pattern": "\\S",
        "type": "string"
      },
      "ToolDefinition": {
        "additionalProperties": false,
        "properties": {
          "config_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Config Schema",
            "type": "object"
          },
          "default_enabled": {
            "title": "Default Enabled",
            "type": "boolean"
          },
          "default_permission": {
            "$ref": "#/components/schemas/ToolPermissionMode"
          },
          "deployment_supported": {
            "title": "Deployment Supported",
            "type": "boolean"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "execution_id": {
            "title": "Execution Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "model_name": {
            "title": "Model Name",
            "type": "string"
          },
          "resource_selector": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolResourceSelector"
              },
              {
                "type": "null"
              }
            ]
          },
          "supported_permissions": {
            "items": {
              "enum": [
                "inherit",
                "allow",
                "ask",
                "deny",
                "review"
              ],
              "type": "string"
            },
            "title": "Supported Permissions",
            "type": "array"
          }
        },
        "required": [
          "key",
          "display_name",
          "execution_id",
          "model_name",
          "default_enabled",
          "default_permission",
          "config_schema",
          "supported_permissions",
          "resource_selector",
          "deployment_supported"
        ],
        "title": "ToolDefinition",
        "type": "object"
      },
      "ToolInfo": {
        "properties": {
          "annotations": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Annotations",
            "type": "object"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "input_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Input Schema",
            "type": "object"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "output_schema": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema"
          },
          "provider_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Version"
          }
        },
        "required": [
          "name",
          "description",
          "input_schema"
        ],
        "title": "ToolInfo",
        "type": "object"
      },
      "ToolPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ToolInfo"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "ToolPage",
        "type": "object"
      },
      "ToolPermissionMode": {
        "enum": [
          "allow",
          "deny",
          "ask",
          "review"
        ],
        "type": "string"
      },
      "ToolPermissionSetting": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ToolPermissionMode"
          },
          {
            "const": "inherit",
            "type": "string"
          }
        ]
      },
      "ToolResourceSelector": {
        "additionalProperties": false,
        "description": "The resource a tool needs before it can be enabled.",
        "properties": {
          "kind": {
            "const": "web_provider",
            "title": "Kind",
            "type": "string"
          },
          "operation": {
            "$ref": "#/components/schemas/WebOperation"
          }
        },
        "required": [
          "kind",
          "operation"
        ],
        "title": "ToolResourceSelector",
        "type": "object"
      },
      "ToolReviewRule": {
        "additionalProperties": false,
        "description": "A matching rule overrides the supplied fields of the global policy.",
        "properties": {
          "on_flagged": {
            "anyOf": [
              {
                "enum": [
                  "deny",
                  "approval_required"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "On Flagged"
          },
          "risk_threshold": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolRiskLevel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ToolReviewRule",
        "type": "object"
      },
      "ToolRiskLevel": {
        "enum": [
          "low",
          "medium",
          "high",
          "extra_high"
        ],
        "title": "ToolRiskLevel",
        "type": "string"
      },
      "ToolSelection": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Config",
            "type": "object"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "permission": {
            "$ref": "#/components/schemas/ToolPermissionSetting",
            "default": "inherit"
          }
        },
        "title": "ToolSelection",
        "type": "object"
      },
      "ToolsetCatalog": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ToolsetDefinition"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "ToolsetCatalog",
        "type": "object"
      },
      "ToolsetDefinition": {
        "additionalProperties": false,
        "properties": {
          "config_schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Config Schema",
            "type": "object"
          },
          "default_enabled": {
            "title": "Default Enabled",
            "type": "boolean"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "key": {
            "$ref": "#/components/schemas/ToolsetKey"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            },
            "title": "Tools",
            "type": "array"
          }
        },
        "required": [
          "key",
          "display_name",
          "default_enabled",
          "config_schema",
          "tools"
        ],
        "title": "ToolsetDefinition",
        "type": "object"
      },
      "ToolsetKey": {
        "enum": [
          "files",
          "shell",
          "web",
          "memory",
          "assets",
          "configuration"
        ],
        "type": "string"
      },
      "ToolsetSelection": {
        "additionalProperties": false,
        "properties": {
          "config": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Config",
            "type": "object"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "tools": {
            "maxProperties": 64,
            "patternProperties": {
              "^[a-z][a-z0-9_]{0,63}$": {
                "$ref": "#/components/schemas/ToolSelection"
              }
            },
            "title": "Tools",
            "type": "object"
          }
        },
        "title": "ToolsetSelection",
        "type": "object"
      },
      "TraceBackend": {
        "description": "The trace backend queries read; `type` is null when trace query is not configured.",
        "properties": {
          "queryable_since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queryable Since"
          },
          "type": {
            "anyOf": [
              {
                "enum": [
                  "langfuse",
                  "logfire"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          }
        },
        "required": [
          "type",
          "queryable_since"
        ],
        "title": "TraceBackend",
        "type": "object"
      },
      "Trigger": {
        "enum": [
          "input",
          "queued",
          "resume",
          "child_result",
          "spawned"
        ],
        "type": "string"
      },
      "Upload": {
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "digest": {
            "title": "Digest",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "upload_id": {
            "title": "Upload Id",
            "type": "string"
          }
        },
        "required": [
          "upload_id",
          "filename",
          "content_type",
          "size",
          "digest"
        ],
        "title": "Upload",
        "type": "object"
      },
      "UploadCreate": {
        "description": "The multipart form: one file part named `file`.",
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "UploadCreate",
        "type": "object"
      },
      "UploadSource": {
        "additionalProperties": false,
        "description": "A package archive staged through `/uploads`.",
        "properties": {
          "kind": {
            "const": "upload",
            "title": "Kind",
            "type": "string"
          },
          "upload_id": {
            "pattern": "^upl_[a-f0-9]{64}$",
            "title": "Upload Id",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "upload_id"
        ],
        "title": "UploadSource",
        "type": "object"
      },
      "UrlPart": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "const": "url",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "maxLength": 2048,
            "minLength": 8,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "type",
          "url"
        ],
        "title": "UrlPart",
        "type": "object"
      },
      "UsageLimit": {
        "additionalProperties": false,
        "properties": {
          "requests": {
            "maximum": 10000.0,
            "minimum": 1.0,
            "title": "Requests",
            "type": "integer"
          }
        },
        "required": [
          "requests"
        ],
        "title": "UsageLimit",
        "type": "object"
      },
      "UsageLimits-Input": {
        "description": "Limits on model usage.\n\nThe request count is tracked by pydantic_ai, and the request limit is checked before each request to the model.\nToken counts are provided in responses from the model, and the token limits are checked after each response.\n\nEach of the limits can be set to `None` to disable that limit.",
        "properties": {
          "cost_limit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Limit"
          },
          "count_tokens_before_request": {
            "default": false,
            "title": "Count Tokens Before Request",
            "type": "boolean"
          },
          "input_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens Limit"
          },
          "output_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens Limit"
          },
          "per_request_input_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Per Request Input Tokens Limit"
          },
          "request_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 50,
            "title": "Request Limit"
          },
          "tool_calls_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls Limit"
          },
          "total_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tokens Limit"
          }
        },
        "title": "UsageLimits",
        "type": "object"
      },
      "UsageLimits-Output": {
        "description": "Limits on model usage.\n\nThe request count is tracked by pydantic_ai, and the request limit is checked before each request to the model.\nToken counts are provided in responses from the model, and the token limits are checked after each response.\n\nEach of the limits can be set to `None` to disable that limit.",
        "properties": {
          "cost_limit": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost Limit"
          },
          "count_tokens_before_request": {
            "default": false,
            "title": "Count Tokens Before Request",
            "type": "boolean"
          },
          "input_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens Limit"
          },
          "output_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens Limit"
          },
          "per_request_input_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Per Request Input Tokens Limit"
          },
          "request_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 50,
            "title": "Request Limit"
          },
          "tool_calls_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls Limit"
          },
          "total_tokens_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tokens Limit"
          }
        },
        "title": "UsageLimits",
        "type": "object"
      },
      "UsageOverview": {
        "properties": {
          "daily": {
            "items": {
              "$ref": "#/components/schemas/DailyUsage"
            },
            "title": "Daily",
            "type": "array"
          },
          "runs": {
            "$ref": "#/components/schemas/RunMetrics"
          },
          "usage": {
            "$ref": "#/components/schemas/ModelMetrics"
          }
        },
        "required": [
          "usage",
          "runs",
          "daily"
        ],
        "title": "UsageOverview",
        "type": "object"
      },
      "UsageSummary": {
        "properties": {
          "models": {
            "items": {
              "$ref": "#/components/schemas/ModelUsage"
            },
            "title": "Models",
            "type": "array"
          }
        },
        "required": [
          "models"
        ],
        "title": "UsageSummary",
        "type": "object"
      },
      "UserKeyCreate": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "workspace_id": {
            "maxLength": 41,
            "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "name",
          "workspace_id"
        ],
        "title": "UserKeyCreate",
        "type": "object"
      },
      "Verb": {
        "enum": [
          "read",
          "run",
          "write",
          "admin"
        ],
        "type": "string"
      },
      "WaitReason": {
        "enum": [
          "approval",
          "call",
          "multiple"
        ],
        "type": "string"
      },
      "WebOperation": {
        "enum": [
          "search",
          "scrape"
        ],
        "type": "string"
      },
      "WebhookDelivery": {
        "description": "One webhook outbox row; its ID is the delivery ID receivers deduplicate by.",
        "properties": {
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "available_at": {
            "format": "date-time",
            "title": "Available At",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "payload": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Payload",
            "type": "object"
          },
          "status": {
            "enum": [
              "pending",
              "delivered",
              "dead"
            ],
            "title": "Status",
            "type": "string"
          },
          "subscription_id": {
            "title": "Subscription Id",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "subscription_id",
          "url",
          "status",
          "attempts",
          "available_at",
          "last_error",
          "created_at",
          "delivered_at",
          "payload"
        ],
        "title": "WebhookDelivery",
        "type": "object"
      },
      "Workspace": {
        "properties": {
          "archived_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/Verb"
            },
            "title": "Permissions",
            "type": "array"
          },
          "settings": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Settings",
            "type": "object"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "settings",
          "image_url",
          "archived_at",
          "version",
          "created_at",
          "updated_at",
          "permissions"
        ],
        "title": "Workspace",
        "type": "object"
      },
      "WorkspaceCreate": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "WorkspaceCreate",
        "type": "object"
      },
      "WorkspacePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Workspace"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "WorkspacePage",
        "type": "object"
      },
      "WorkspaceUpdate": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "WorkspaceUpdate",
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "description": "A workspace API key (`a13n_...`)",
        "scheme": "bearer",
        "type": "http"
      },
      "csrf": {
        "description": "The login session's CSRF token, sent with it on every unsafe method",
        "in": "header",
        "name": "X-CSRF-Token",
        "type": "apiKey"
      },
      "loginSession": {
        "description": "A browser login session; `a13n_session` when the public URL is plain HTTP",
        "in": "cookie",
        "name": "__Host-a13n_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "title": "a13n Service",
    "version": "0.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/agent-composer": {
      "post": {
        "description": "The workspace's Agent Composer, created or brought up to date with the deployment's definition.\n\nRefused with `model_required` while the workspace has no model the caller can use.",
        "operationId": "prepare_composer_api_v1_agent_composer_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Prepare Composer",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents": {
      "get": {
        "description": "Agents of the workspace. `q` matches the name or description, ignoring case; `archived` keeps only\narchived agents, or only open ones; `source=builtin` finds the Agent Composer; the skill filters keep those\nwith a revision pinning that skill or that skill revision.",
        "operationId": "list_agents_api_v1_agents_get",
        "parameters": [
          {
            "in": "query",
            "name": "label",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Archived"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AgentSource"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "in": "query",
            "name": "skill_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 72,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Skill Id"
            }
          },
          {
            "in": "query",
            "name": "skill_revision_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 72,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Skill Revision Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Agents",
        "tags": [
          "agents"
        ]
      },
      "post": {
        "operationId": "create_agent_api_v1_agents_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Agent",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/validate": {
      "post": {
        "description": "No content when creating a revision of the configuration would accept it, else the same `invalid_argument`\nerror with the field's path relative to `config`; nothing is stored.",
        "operationId": "validate_revision_api_v1_agents_validate_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentValidate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Validate Revision",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}": {
      "get": {
        "operationId": "get_agent_api_v1_agents__agent_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Agent",
        "tags": [
          "agents"
        ]
      },
      "patch": {
        "operationId": "update_agent_api_v1_agents__agent_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Agent",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/archive": {
      "post": {
        "operationId": "archive_agent_api_v1_agents__agent_id__archive_post",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Archive Agent",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/avatar": {
      "delete": {
        "operationId": "delete_avatar_api_v1_agents__agent_id__avatar_delete",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Avatar",
        "tags": [
          "agents"
        ]
      },
      "get": {
        "operationId": "get_avatar_api_v1_agents__agent_id__avatar_get",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/png": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/webp": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The image"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Avatar",
        "tags": [
          "agents"
        ]
      },
      "put": {
        "operationId": "put_avatar_api_v1_agents__agent_id__avatar_put",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/jpeg": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/png": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/webp": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Put Avatar",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/duplicate": {
      "post": {
        "operationId": "duplicate_agent_api_v1_agents__agent_id__duplicate_post",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDuplicate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Duplicate Agent",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/revisions": {
      "get": {
        "operationId": "list_revisions_api_v1_agents__agent_id__revisions_get",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRevisionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Revisions",
        "tags": [
          "agents"
        ]
      },
      "post": {
        "description": "A configuration that validates to the default revision's creates nothing and returns that revision.",
        "operationId": "create_revision_api_v1_agents__agent_id__revisions_post",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentRevisionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRevision"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Revision",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/revisions/{revision_id}": {
      "get": {
        "operationId": "get_revision_api_v1_agents__agent_id__revisions__revision_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision_id",
            "required": true,
            "schema": {
              "title": "Revision Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRevision"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Revision",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/revisions/{revision_id}/set-default": {
      "post": {
        "operationId": "set_default_api_v1_agents__agent_id__revisions__revision_id__set_default_post",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision_id",
            "required": true,
            "schema": {
              "title": "Revision Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Set Default",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/agents/{agent_id}/unarchive": {
      "post": {
        "operationId": "unarchive_agent_api_v1_agents__agent_id__unarchive_post",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Unarchive Agent",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/assets": {
      "get": {
        "operationId": "list_assets_api_v1_assets_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Assets",
        "tags": [
          "assets"
        ]
      },
      "post": {
        "operationId": "create_asset_api_v1_assets_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            },
            "description": "The asset already created from this upload"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Asset",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/assets/{asset_id}": {
      "delete": {
        "operationId": "retire_asset_api_v1_assets__asset_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Retire Asset",
        "tags": [
          "assets"
        ]
      },
      "get": {
        "operationId": "get_asset_api_v1_assets__asset_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Asset",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/assets/{asset_id}/content": {
      "get": {
        "operationId": "read_asset_content_api_v1_assets__asset_id__content_get",
        "parameters": [
          {
            "in": "path",
            "name": "asset_id",
            "required": true,
            "schema": {
              "title": "Asset Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The asset bytes, with their stored content type"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Read Asset Content",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/auth/bootstrap": {
      "post": {
        "description": "Public only until initialized: creates the first administrator, as the `bootstrap` command does, signed in.",
        "operationId": "bootstrap_administrator_api_v1_auth_bootstrap_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BootstrapInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginOutput"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Bootstrap Administrator",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/configuration": {
      "get": {
        "operationId": "auth_configuration_api_v1_auth_configuration_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfiguration"
                }
              }
            },
            "description": "Successful Response"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Auth Configuration",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/email-change/confirm": {
      "post": {
        "operationId": "confirm_email_change_api_v1_auth_email_change_confirm_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailChangeConfirm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Confirm Email Change",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "operationId": "password_login_api_v1_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginOutput"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Password Login",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "logout_api_v1_auth_logout_post",
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Logout",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/password-reset": {
      "post": {
        "operationId": "request_password_reset_api_v1_auth_password_reset_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordReset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Request Password Reset",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/password-reset/confirm": {
      "post": {
        "operationId": "confirm_password_reset_api_v1_auth_password_reset_confirm_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetConfirm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Confirm Password Reset",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/auth/session": {
      "get": {
        "description": "Restores a browser session; the CSRF token is stable for the session's lifetime.",
        "operationId": "session_profile_api_v1_auth_session_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionProfile"
                }
              }
            },
            "description": "Successful Response"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Session Profile",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/connections": {
      "get": {
        "operationId": "list_connections_api_v1_connections_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Connections",
        "tags": [
          "connections"
        ]
      },
      "post": {
        "operationId": "create_connection_api_v1_connections_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Connection",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connections/callback": {
      "get": {
        "description": "Public: the one-use state authenticates the browser that the authorization server sends back, and the flow\ncookie the browser that started the flow.\n\nAttempts per client address share the login flows' bound.",
        "operationId": "complete_authorization_api_v1_connections_callback_get",
        "parameters": [
          {
            "in": "query",
            "name": "state",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 16,
              "title": "State",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "in": "query",
            "name": "iss",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Iss"
            }
          },
          {
            "in": "query",
            "name": "session_uri",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Uri"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackOutcome"
                }
              }
            },
            "description": "Successful Response"
          },
          "303": {
            "description": "Back to the return URL the authorization named"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Complete Authorization",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connections/redirect-uri": {
      "get": {
        "description": "The deployment's callback, for registering an OAuth client in advance; the same for every connection.",
        "operationId": "get_redirect_uri_api_v1_connections_redirect_uri_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthRedirect"
                }
              }
            },
            "description": "Successful Response"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Redirect Uri",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connections/{connection_id}": {
      "get": {
        "operationId": "get_connection_api_v1_connections__connection_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "title": "Connection Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Connection",
        "tags": [
          "connections"
        ]
      },
      "patch": {
        "operationId": "update_connection_api_v1_connections__connection_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "title": "Connection Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Connection",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connections/{connection_id}/authorize": {
      "post": {
        "description": "A browser flow needs a login session and is bound to this browser by a cookie the callback checks; an API\nkey authorizes only a client-credentials client, without a browser.",
        "operationId": "authorize_connection_api_v1_connections__connection_id__authorize_post",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "title": "Connection Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthorizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizationResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Authorize Connection",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connections/{connection_id}/revoke": {
      "post": {
        "operationId": "revoke_connection_api_v1_connections__connection_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "title": "Connection Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokedConnection"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Revoke Connection",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connections/{connection_id}/test": {
      "post": {
        "operationId": "test_connection_api_v1_connections__connection_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "title": "Connection Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Test Connection",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connections/{connection_id}/tools": {
      "get": {
        "operationId": "list_tools_api_v1_connections__connection_id__tools_get",
        "parameters": [
          {
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "title": "Connection Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Tools",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connector-providers": {
      "get": {
        "operationId": "list_providers_api_v1_connector_providers_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List connector providers",
        "tags": [
          "providers"
        ]
      },
      "post": {
        "operationId": "create_provider_api_v1_connector_providers_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create connector provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/connector-providers/{provider_id}": {
      "get": {
        "operationId": "get_provider_api_v1_connector_providers__provider_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get connector provider",
        "tags": [
          "providers"
        ]
      },
      "patch": {
        "description": "A `config` change must also replace or remove a stored credential: it never follows a new endpoint.",
        "operationId": "update_provider_api_v1_connector_providers__provider_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update connector provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/connector-providers/{provider_id}/apps": {
      "get": {
        "operationId": "list_apps_api_v1_connector_providers__provider_id__apps_get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "refresh",
            "required": false,
            "schema": {
              "default": false,
              "title": "Refresh",
              "type": "boolean"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorAppPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Apps",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connector-providers/{provider_id}/apps/{app}": {
      "get": {
        "operationId": "get_app_api_v1_connector_providers__provider_id__apps__app__get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "title": "App",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorApp"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get App",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connector-providers/{provider_id}/apps/{app}/actions": {
      "get": {
        "operationId": "list_actions_api_v1_connector_providers__provider_id__apps__app__actions_get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "title": "App",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorActionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Actions",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/connector-providers/{provider_id}/test": {
      "post": {
        "operationId": "test_provider_api_v1_connector_providers__provider_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Test connector provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/environment-providers": {
      "get": {
        "operationId": "list_providers_api_v1_environment_providers_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List environment providers",
        "tags": [
          "providers"
        ]
      },
      "post": {
        "operationId": "create_provider_api_v1_environment_providers_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create environment provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/environment-providers/{provider_id}": {
      "get": {
        "operationId": "get_provider_api_v1_environment_providers__provider_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get environment provider",
        "tags": [
          "providers"
        ]
      },
      "patch": {
        "description": "A `config` change must also replace or remove a stored credential: it never follows a new endpoint.",
        "operationId": "update_provider_api_v1_environment_providers__provider_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update environment provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/environment-providers/{provider_id}/test": {
      "post": {
        "operationId": "test_provider_api_v1_environment_providers__provider_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Test environment provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/environment-templates": {
      "get": {
        "operationId": "list_templates_api_v1_environment_templates_get",
        "parameters": [
          {
            "in": "query",
            "name": "label",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Templates",
        "tags": [
          "environments"
        ]
      },
      "post": {
        "operationId": "create_template_api_v1_environment_templates_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Template",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/v1/environment-templates/{template_id}": {
      "get": {
        "operationId": "get_template_api_v1_environment_templates__template_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "template_id",
            "required": true,
            "schema": {
              "title": "Template Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Template",
        "tags": [
          "environments"
        ]
      },
      "patch": {
        "operationId": "update_template_api_v1_environment_templates__template_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "template_id",
            "required": true,
            "schema": {
              "title": "Template Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Template",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/v1/environments": {
      "get": {
        "operationId": "list_environments_api_v1_environments_get",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(creating|starting|ready|stopping|stopped|deleting|deleted)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Environments",
        "tags": [
          "environments"
        ]
      },
      "post": {
        "description": "Reserve a managed sandbox from a template (`creating`), or register an external envd target (`ready`).",
        "operationId": "create_environment_api_v1_environments_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ManagedEnvironmentCreate"
                  },
                  {
                    "$ref": "#/components/schemas/ExternalTargetCreate"
                  }
                ],
                "title": "Body"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Environment",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/v1/environments/{environment_id}": {
      "delete": {
        "operationId": "delete_environment_api_v1_environments__environment_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "title": "Environment Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Environment",
        "tags": [
          "environments"
        ]
      },
      "get": {
        "operationId": "get_environment_api_v1_environments__environment_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "title": "Environment Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Environment",
        "tags": [
          "environments"
        ]
      },
      "patch": {
        "operationId": "update_environment_api_v1_environments__environment_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "title": "Environment Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Environment",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/v1/environments/{environment_id}/stop": {
      "post": {
        "operationId": "stop_environment_api_v1_environments__environment_id__stop_post",
        "parameters": [
          {
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "title": "Environment Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Stop Environment",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/v1/invitations/{invitation_id}/accept": {
      "post": {
        "description": "Public by token: creates or joins the invited account and starts a login session.",
        "operationId": "accept_api_v1_invitations__invitation_id__accept_post",
        "parameters": [
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "title": "Invitation Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationAccept"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginOutput"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "summary": "Accept",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/v1/mcp-servers": {
      "get": {
        "description": "Suggested Remote MCP servers, packaged and from the deployment; readable by every signed-in principal.",
        "operationId": "list_mcp_servers_api_v1_mcp_servers_get",
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 128,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Mcp Servers",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/media-understanding-defaults": {
      "get": {
        "operationId": "get_media_defaults_api_v1_media_understanding_defaults_get",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaDefaults"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Media Defaults",
        "tags": [
          "models"
        ]
      },
      "put": {
        "description": "Replaces all three kinds; each model must declare it understands its kind. Requires workspace admin.",
        "operationId": "replace_media_defaults_api_v1_media_understanding_defaults_put",
        "parameters": [
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaUnderstandingSelection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaDefaults"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Replace Media Defaults",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/memories": {
      "get": {
        "operationId": "list_memories_api_v1_memories_get",
        "parameters": [
          {
            "in": "query",
            "name": "label",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MemoryKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Memories",
        "tags": [
          "memories"
        ]
      },
      "post": {
        "operationId": "create_memory_api_v1_memories_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Memory"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Memory",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}": {
      "delete": {
        "operationId": "delete_memory_api_v1_memories__memory_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Memory",
        "tags": [
          "memories"
        ]
      },
      "get": {
        "operationId": "get_memory_api_v1_memories__memory_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Memory"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Memory",
        "tags": [
          "memories"
        ]
      },
      "patch": {
        "operationId": "update_memory_api_v1_memories__memory_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Memory"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Memory",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/files": {
      "get": {
        "operationId": "list_files_api_v1_memories__memory_id__files_get",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "A directory ending in \"/\"; \"\" lists every file",
            "in": "query",
            "name": "prefix",
            "required": false,
            "schema": {
              "default": "",
              "description": "A directory ending in \"/\"; \"\" lists every file",
              "maxLength": 1024,
              "title": "Prefix",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFilePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Files",
        "tags": [
          "memories"
        ]
      },
      "post": {
        "operationId": "create_file_api_v1_memories__memory_id__files_post",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryFileCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFile"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create File",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/files/move": {
      "post": {
        "description": "Move the source file `If-Match` names; the destination must be free.",
        "operationId": "move_file_api_v1_memories__memory_id__files_move_post",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryFileMove"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFile"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Move File",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/files/{path}": {
      "delete": {
        "operationId": "delete_file_api_v1_memories__memory_id__files__path__delete",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete File",
        "tags": [
          "memories"
        ]
      },
      "get": {
        "operationId": "read_file_api_v1_memories__memory_id__files__path__get",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFile"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Read File",
        "tags": [
          "memories"
        ]
      },
      "put": {
        "operationId": "replace_file_api_v1_memories__memory_id__files__path__put",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryFileReplace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFile"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Replace File",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/records": {
      "get": {
        "operationId": "list_records_api_v1_memories__memory_id__records_get",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "The provider's own cursor",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 1024,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The provider's own cursor",
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryRecordPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Records",
        "tags": [
          "memories"
        ]
      },
      "post": {
        "operationId": "add_record_api_v1_memories__memory_id__records_post",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryRecordText"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryRecordView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Add Record",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/records/search": {
      "post": {
        "description": "The records most similar to the query; the query travels in the body, never the URL.",
        "operationId": "search_records_api_v1_memories__memory_id__records_search_post",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryRecordSearch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryRecordPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Search Records",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/records/{record_id}": {
      "delete": {
        "operationId": "delete_record_api_v1_memories__memory_id__records__record_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "maxLength": 256,
              "title": "Record Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Record",
        "tags": [
          "memories"
        ]
      },
      "put": {
        "description": "Replace the record's text; records carry no version, so the last writer wins.",
        "operationId": "update_record_api_v1_memories__memory_id__records__record_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "maxLength": 256,
              "title": "Record Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryRecordText"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryRecordView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Record",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/revisions": {
      "delete": {
        "description": "Delete every retained revision of one file path.",
        "operationId": "purge_history_api_v1_memories__memory_id__revisions_delete",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "maxLength": 1024,
              "minLength": 1,
              "title": "Path",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryPurge"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Purge History",
        "tags": [
          "memories"
        ]
      },
      "get": {
        "operationId": "list_revisions_api_v1_memories__memory_id__revisions_get",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 1024,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Path"
            }
          },
          {
            "in": "query",
            "name": "run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 72,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Run Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryRevisionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Revisions",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/revisions/{seq}": {
      "get": {
        "operationId": "get_revision_api_v1_memories__memory_id__revisions__seq__get",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "seq",
            "required": true,
            "schema": {
              "title": "Seq",
              "type": "integer"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryRevisionDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Revision",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memories/{memory_id}/revisions/{seq}/restore": {
      "post": {
        "description": "Set the path back to the content the change replaced; `If-Match` names the file there, if any.",
        "operationId": "restore_revision_api_v1_memories__memory_id__revisions__seq__restore_post",
        "parameters": [
          {
            "in": "path",
            "name": "memory_id",
            "required": true,
            "schema": {
              "title": "Memory Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "seq",
            "required": true,
            "schema": {
              "title": "Seq",
              "type": "integer"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryFileState"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Restore Revision",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/memory-providers": {
      "get": {
        "operationId": "list_providers_api_v1_memory_providers_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List memory providers",
        "tags": [
          "providers"
        ]
      },
      "post": {
        "operationId": "create_provider_api_v1_memory_providers_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create memory provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/memory-providers/{provider_id}": {
      "get": {
        "operationId": "get_provider_api_v1_memory_providers__provider_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get memory provider",
        "tags": [
          "providers"
        ]
      },
      "patch": {
        "description": "A `config` change must also replace or remove a stored credential: it never follows a new endpoint.",
        "operationId": "update_provider_api_v1_memory_providers__provider_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update memory provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/memory-providers/{provider_id}/test": {
      "post": {
        "operationId": "test_provider_api_v1_memory_providers__provider_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Test memory provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/model-catalog": {
      "get": {
        "description": "The models.dev models the registered model provider types serve, for any signed-in principal.",
        "operationId": "get_model_catalog_api_v1_model_catalog_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelCatalog"
                }
              }
            },
            "description": "Successful Response"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Model Catalog",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/model-providers": {
      "get": {
        "operationId": "list_providers_api_v1_model_providers_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List model providers",
        "tags": [
          "providers"
        ]
      },
      "post": {
        "operationId": "create_provider_api_v1_model_providers_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create model provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/model-providers/{provider_id}": {
      "get": {
        "operationId": "get_provider_api_v1_model_providers__provider_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get model provider",
        "tags": [
          "providers"
        ]
      },
      "patch": {
        "description": "A `config` change must also replace or remove a stored credential: it never follows a new endpoint.",
        "operationId": "update_provider_api_v1_model_providers__provider_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update model provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/model-providers/{provider_id}/test": {
      "post": {
        "operationId": "test_provider_api_v1_model_providers__provider_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Test model provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/models": {
      "get": {
        "operationId": "list_models_api_v1_models_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Models",
        "tags": [
          "models"
        ]
      },
      "post": {
        "description": "Needs `write` on the workspace and on the model's provider, whose credential the model spends.",
        "operationId": "create_model_api_v1_models_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Model",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/models/{key}": {
      "get": {
        "operationId": "get_model_api_v1_models__key__get",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Model",
        "tags": [
          "models"
        ]
      },
      "patch": {
        "description": "A configuration change also needs `write` on the model's provider.",
        "operationId": "update_model_api_v1_models__key__patch",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "title": "Key",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Model",
        "tags": [
          "models"
        ]
      }
    },
    "/api/v1/organizations": {
      "get": {
        "operationId": "list_organizations_api_v1_organizations_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Organizations",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}": {
      "get": {
        "operationId": "get_organization_api_v1_organizations__organization_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Organization",
        "tags": [
          "tenancy"
        ]
      },
      "patch": {
        "operationId": "update_organization_api_v1_organizations__organization_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Organization",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/audit-events": {
      "get": {
        "operationId": "list_organization_audit_events_api_v1_organizations__organization_id__audit_events_get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Organization Audit Events",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/grants": {
      "get": {
        "operationId": "list_organization_grants_api_v1_organizations__organization_id__grants_get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Organization Grants",
        "tags": [
          "tenancy"
        ]
      },
      "post": {
        "operationId": "create_organization_grant_api_v1_organizations__organization_id__grants_post",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Organization Grant",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/grants/{grant_id}": {
      "delete": {
        "operationId": "delete_organization_grant_api_v1_organizations__organization_id__grants__grant_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grant_id",
            "required": true,
            "schema": {
              "title": "Grant Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Organization Grant",
        "tags": [
          "tenancy"
        ]
      },
      "patch": {
        "description": "The grant is replaced: the result carries its new ID.",
        "operationId": "change_organization_grant_api_v1_organizations__organization_id__grants__grant_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grant_id",
            "required": true,
            "schema": {
              "title": "Grant Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Change Organization Grant",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/icon": {
      "delete": {
        "operationId": "delete_organization_icon_api_v1_organizations__organization_id__icon_delete",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Organization Icon",
        "tags": [
          "tenancy"
        ]
      },
      "get": {
        "operationId": "get_organization_icon_api_v1_organizations__organization_id__icon_get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/png": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/webp": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The image"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Organization Icon",
        "tags": [
          "tenancy"
        ]
      },
      "put": {
        "operationId": "put_organization_icon_api_v1_organizations__organization_id__icon_put",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/jpeg": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/png": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/webp": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Put Organization Icon",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/invitations": {
      "get": {
        "operationId": "list_organization_invitations_api_v1_organizations__organization_id__invitations_get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Organization Invitations",
        "tags": [
          "tenancy"
        ]
      },
      "post": {
        "operationId": "create_organization_invitation_api_v1_organizations__organization_id__invitations_post",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Organization Invitation",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/invitations/{invitation_id}/resend": {
      "post": {
        "operationId": "resend_organization_invitation_api_v1_organizations__organization_id__invitations__invitation_id__resend_post",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "title": "Invitation Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Resend Organization Invitation",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/invitations/{invitation_id}/revoke": {
      "post": {
        "operationId": "revoke_organization_invitation_api_v1_organizations__organization_id__invitations__invitation_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "title": "Invitation Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Revoke Organization Invitation",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/members": {
      "get": {
        "operationId": "list_members_api_v1_organizations__organization_id__members_get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "user",
                    "service_account"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Members",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/organizations/{organization_id}/workspaces": {
      "get": {
        "operationId": "list_organization_workspaces_api_v1_organizations__organization_id__workspaces_get",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspacePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Organization Workspaces",
        "tags": [
          "tenancy"
        ]
      },
      "post": {
        "operationId": "create_workspace_api_v1_organizations__organization_id__workspaces_post",
        "parameters": [
          {
            "in": "path",
            "name": "organization_id",
            "required": true,
            "schema": {
              "title": "Organization Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Workspace",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/provider-types/{kind}": {
      "get": {
        "operationId": "list_provider_types_api_v1_provider_types__kind__get",
        "parameters": [
          {
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "model",
                "environment",
                "connector",
                "web",
                "memory"
              ],
              "title": "Kind",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTypePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Provider Types",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/runs/{run_id}": {
      "get": {
        "operationId": "get_run_api_v1_runs__run_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Run",
        "tags": [
          "runs"
        ]
      },
      "patch": {
        "description": "Labels only.",
        "operationId": "update_run_api_v1_runs__run_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunLabels"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Run",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/attempts": {
      "get": {
        "operationId": "run_attempts_api_v1_runs__run_id__attempts_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attempts"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Run Attempts",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/attempts/{attempt_id}/trace": {
      "get": {
        "description": "The attempt's spans, including its inline child runs.",
        "operationId": "list_attempt_spans_api_v1_runs__run_id__attempts__attempt_id__trace_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpanPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Attempt Spans",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/fork": {
      "post": {
        "description": "A new thread in the run's session that continues from this run's committed history.",
        "operationId": "fork_run_api_v1_runs__run_id__fork_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Fork"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "The replayed submission in its current state"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Fork Run",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/interrupt": {
      "post": {
        "operationId": "interrupt_run_api_v1_runs__run_id__interrupt_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Interrupt Run",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/items": {
      "get": {
        "operationId": "run_items_api_v1_runs__run_id__items_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunItems"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Run Items",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/lineage": {
      "get": {
        "description": "The run and its ancestors, nearest first, across fork origins.",
        "operationId": "run_lineage_api_v1_runs__run_id__lineage_get",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Run Lineage",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/runs/{run_id}/resume": {
      "post": {
        "description": "Answer the exact waiting run's approvals, client tools and user questions; the successor continues from them.",
        "operationId": "resume_run_api_v1_runs__run_id__resume_post",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Resume"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunView"
                }
              }
            },
            "description": "The existing successor run in its current state"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Resume Run",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/sessions": {
      "get": {
        "operationId": "list_sessions_api_v1_sessions_get",
        "parameters": [
          {
            "description": "A session or thread ID",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 72,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A session or thread ID",
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 72,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": [],
              "items": {
                "$ref": "#/components/schemas/RunStatus"
              },
              "maxItems": 6,
              "title": "Status",
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "trigger",
            "required": false,
            "schema": {
              "default": [],
              "items": {
                "$ref": "#/components/schemas/Trigger"
              },
              "maxItems": 5,
              "title": "Trigger",
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "updated_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Updated After"
            }
          },
          {
            "in": "query",
            "name": "updated_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Updated Before"
            }
          },
          {
            "in": "query",
            "name": "label",
            "required": false,
            "schema": {
              "default": [],
              "items": {
                "type": "string"
              },
              "maxItems": 8,
              "title": "Label",
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Sessions",
        "tags": [
          "runs"
        ]
      },
      "post": {
        "operationId": "create_session_api_v1_sessions_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Session",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/sessions/{session_id}": {
      "get": {
        "operationId": "get_session_api_v1_sessions__session_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Session",
        "tags": [
          "runs"
        ]
      },
      "patch": {
        "operationId": "update_session_api_v1_sessions__session_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Session",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/skills": {
      "get": {
        "description": "Skills of the workspace. `q` matches the name or description, ignoring case; `source` the kind of\nsource the default revision was read from; `archived` keeps only archived skills, or only open ones.",
        "operationId": "list_skills_api_v1_skills_get",
        "parameters": [
          {
            "in": "query",
            "name": "label",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "upload",
                    "github"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Archived"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Skills",
        "tags": [
          "skills"
        ]
      },
      "post": {
        "operationId": "create_skill_api_v1_skills_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Skill",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/validate": {
      "post": {
        "description": "The manifest the package would give a new skill or revision, checked as creation checks it; nothing is\nstored.",
        "operationId": "validate_package_api_v1_skills_validate_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillValidate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillManifest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Validate Package",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}": {
      "get": {
        "operationId": "get_skill_api_v1_skills__skill_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Skill",
        "tags": [
          "skills"
        ]
      },
      "patch": {
        "description": "Name, description and labels; an archived skill changes only by unarchiving.",
        "operationId": "update_skill_api_v1_skills__skill_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Skill",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}/archive": {
      "post": {
        "description": "Archived skills keep their revisions readable and pinned; they refuse new revisions and new pins.",
        "operationId": "archive_skill_api_v1_skills__skill_id__archive_post",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Archive Skill",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}/revisions": {
      "get": {
        "operationId": "list_revisions_api_v1_skills__skill_id__revisions_get",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillRevisionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Revisions",
        "tags": [
          "skills"
        ]
      },
      "post": {
        "description": "A package whose manifest equals the default revision's creates nothing and returns that revision.",
        "operationId": "create_revision_api_v1_skills__skill_id__revisions_post",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillRevisionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillRevision"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Revision",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}/revisions/{revision_id}": {
      "get": {
        "operationId": "get_revision_api_v1_skills__skill_id__revisions__revision_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision_id",
            "required": true,
            "schema": {
              "title": "Revision Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillRevision"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Revision",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}/revisions/{revision_id}/content": {
      "get": {
        "description": "The revision's package as a zip archive.",
        "operationId": "read_archive_api_v1_skills__skill_id__revisions__revision_id__content_get",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision_id",
            "required": true,
            "schema": {
              "title": "Revision Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The revision's package as a zip archive"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Read Archive",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}/revisions/{revision_id}/files/{path}": {
      "get": {
        "description": "One package file, by the path the revision's manifest lists.",
        "operationId": "read_file_api_v1_skills__skill_id__revisions__revision_id__files__path__get",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision_id",
            "required": true,
            "schema": {
              "title": "Revision Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "One file of the revision's package"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Read File",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}/revisions/{revision_id}/set-default": {
      "post": {
        "operationId": "set_default_revision_api_v1_skills__skill_id__revisions__revision_id__set_default_post",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision_id",
            "required": true,
            "schema": {
              "title": "Revision Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Set Default Revision",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/skills/{skill_id}/unarchive": {
      "post": {
        "operationId": "unarchive_skill_api_v1_skills__skill_id__unarchive_post",
        "parameters": [
          {
            "in": "path",
            "name": "skill_id",
            "required": true,
            "schema": {
              "title": "Skill Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Unarchive Skill",
        "tags": [
          "skills"
        ]
      }
    },
    "/api/v1/subscriptions": {
      "get": {
        "operationId": "list_subscriptions_api_v1_subscriptions_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Subscriptions",
        "tags": [
          "subscriptions"
        ]
      },
      "post": {
        "description": "The response is the only time the signing secret is returned.",
        "operationId": "create_subscription_api_v1_subscriptions_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedSubscription"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Subscription",
        "tags": [
          "subscriptions"
        ]
      }
    },
    "/api/v1/subscriptions/{subscription_id}": {
      "delete": {
        "operationId": "delete_subscription_api_v1_subscriptions__subscription_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Subscription",
        "tags": [
          "subscriptions"
        ]
      },
      "get": {
        "operationId": "get_subscription_api_v1_subscriptions__subscription_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Subscription",
        "tags": [
          "subscriptions"
        ]
      },
      "patch": {
        "operationId": "update_subscription_api_v1_subscriptions__subscription_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Subscription",
        "tags": [
          "subscriptions"
        ]
      }
    },
    "/api/v1/subscriptions/{subscription_id}/deliveries": {
      "get": {
        "operationId": "list_deliveries_api_v1_subscriptions__subscription_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Deliveries",
        "tags": [
          "subscriptions"
        ]
      }
    },
    "/api/v1/subscriptions/{subscription_id}/deliveries/{delivery_id}/redeliver": {
      "post": {
        "operationId": "redeliver_api_v1_subscriptions__subscription_id__deliveries__delivery_id__redeliver_post",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "title": "Subscription Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "title": "Delivery Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Redeliver",
        "tags": [
          "subscriptions"
        ]
      }
    },
    "/api/v1/threads": {
      "get": {
        "operationId": "list_threads_api_v1_threads_get",
        "parameters": [
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "label",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Threads",
        "tags": [
          "runs"
        ]
      },
      "post": {
        "description": "Create a thread (and its session unless one is named) with its first message.",
        "operationId": "create_thread_api_v1_threads_post",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewThread"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "The replayed submission in its current state"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Thread",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/threads/{thread_id}": {
      "get": {
        "operationId": "get_thread_api_v1_threads__thread_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Thread",
        "tags": [
          "runs"
        ]
      },
      "patch": {
        "operationId": "update_thread_api_v1_threads__thread_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThreadUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Thread",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/archive": {
      "post": {
        "operationId": "archive_thread_api_v1_threads__thread_id__archive_post",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Archive Thread",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/environments": {
      "get": {
        "operationId": "list_mounts_api_v1_threads__thread_id__environments_get",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MountPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Mounts",
        "tags": [
          "environments"
        ]
      },
      "post": {
        "operationId": "add_mount_api_v1_threads__thread_id__environments_post",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MountCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MountView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Add Mount",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/environments/{name}": {
      "delete": {
        "operationId": "remove_mount_api_v1_threads__thread_id__environments__name__delete",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Remove Mount",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/inbox": {
      "get": {
        "description": "In inbox order.",
        "operationId": "list_inbox_api_v1_threads__thread_id__inbox_get",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/EntryStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Inbox",
        "tags": [
          "runs"
        ]
      },
      "post": {
        "description": "Append a message; it starts a run at once when the thread can accept it, or steers the active run.",
        "operationId": "submit_message_api_v1_threads__thread_id__inbox_post",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "The replayed submission in its current state"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Submit Message",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/inbox/order": {
      "put": {
        "operationId": "reorder_inbox_api_v1_threads__thread_id__inbox_order_put",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxOrder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Reorder Inbox",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/inbox/{entry_id}": {
      "delete": {
        "description": "Withdraw a pending entry; its tombstone keeps the request key.",
        "operationId": "withdraw_entry_api_v1_threads__thread_id__inbox__entry_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "title": "Entry Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Withdraw Entry",
        "tags": [
          "runs"
        ]
      },
      "get": {
        "description": "One entry and its disposition; edits name the thread's ETag.",
        "operationId": "get_entry_api_v1_threads__thread_id__inbox__entry_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "title": "Entry Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Entry",
        "tags": [
          "runs"
        ]
      },
      "patch": {
        "operationId": "edit_entry_api_v1_threads__thread_id__inbox__entry_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "title": "Entry Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntryUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Edit Entry",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/memories": {
      "get": {
        "operationId": "list_mounts_api_v1_threads__thread_id__memories_get",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryMountPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Mounts",
        "tags": [
          "memories"
        ]
      },
      "post": {
        "operationId": "add_mount_api_v1_threads__thread_id__memories_post",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryMount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryMount"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Add Mount",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/memories/{name}": {
      "delete": {
        "operationId": "remove_mount_api_v1_threads__thread_id__memories__name__delete",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Remove Mount",
        "tags": [
          "memories"
        ]
      },
      "patch": {
        "operationId": "update_mount_api_v1_threads__thread_id__memories__name__patch",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryMountUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryMount"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Mount",
        "tags": [
          "memories"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/runs": {
      "get": {
        "description": "Newest first.",
        "operationId": "list_thread_runs_api_v1_threads__thread_id__runs_get",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Thread Runs",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/threads/{thread_id}/stream": {
      "get": {
        "description": "Live output of the thread's runs over SSE: `delta` and `boundary` frames with `changed`, `reset`, `gap`.",
        "operationId": "thread_stream_api_v1_threads__thread_id__stream_get",
        "parameters": [
          {
            "in": "path",
            "name": "thread_id",
            "required": true,
            "schema": {
              "title": "Thread Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "run",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Run"
            }
          },
          {
            "in": "query",
            "name": "position",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(0|[1-9][0-9]{0,19})-(0|[1-9][0-9]{0,19})$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Position"
            }
          },
          {
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^\\d{1,20}-\\d{1,20}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Last-Event-Id"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {}
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Thread Stream",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/toolsets": {
      "get": {
        "operationId": "list_toolsets_api_v1_toolsets_get",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolsetCatalog"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Toolsets",
        "tags": [
          "agents"
        ]
      }
    },
    "/api/v1/trace-backend": {
      "get": {
        "description": "The backend trace queries read, and how far back they find a trace.",
        "operationId": "get_trace_backend_api_v1_trace_backend_get",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceBackend"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Trace Backend",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/traces": {
      "get": {
        "description": "Trace root spans, one per attempt. A cursor keeps the window of the first page.",
        "operationId": "list_traces_api_v1_traces_get",
        "parameters": [
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "thread_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Thread Id"
            }
          },
          {
            "in": "query",
            "name": "run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Run Id"
            }
          },
          {
            "description": "key:value, an exact root span attribute",
            "in": "query",
            "name": "attribute",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "key:value, an exact root span attribute",
              "title": "Attribute"
            }
          },
          {
            "in": "query",
            "name": "started_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Started After"
            }
          },
          {
            "in": "query",
            "name": "started_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Started Before"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpanPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Traces",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/traces/{trace_id}": {
      "get": {
        "description": "The trace's root span.",
        "operationId": "get_trace_api_v1_traces__trace_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{32}$",
              "title": "Trace Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Span"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Trace",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/traces/{trace_id}/spans": {
      "get": {
        "description": "The trace's spans.",
        "operationId": "list_trace_spans_api_v1_traces__trace_id__spans_get",
        "parameters": [
          {
            "in": "path",
            "name": "trace_id",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{32}$",
              "title": "Trace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpanPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Trace Spans",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v1/uploads": {
      "post": {
        "description": "Repeating a request with the same `Idempotency-Key` and bytes returns the same upload.",
        "operationId": "create_upload_api_v1_uploads_post",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[!-~]+$",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UploadCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Upload",
        "tags": [
          "assets"
        ]
      }
    },
    "/api/v1/usage": {
      "get": {
        "operationId": "summarize_usage_api_v1_usage_get",
        "parameters": [
          {
            "in": "query",
            "name": "run_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Run Id"
            }
          },
          {
            "in": "query",
            "name": "thread_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Thread Id"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "ingested_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ingested After"
            }
          },
          {
            "in": "query",
            "name": "ingested_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ingested Before"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSummary"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Summarize Usage",
        "tags": [
          "usage"
        ]
      }
    },
    "/api/v1/usage/agents": {
      "get": {
        "operationId": "usage_agents_api_v1_usage_agents_get",
        "parameters": [
          {
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date-time",
              "title": "Start",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date-time",
              "title": "End",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentUsagePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Usage Agents",
        "tags": [
          "usage"
        ]
      }
    },
    "/api/v1/usage/models": {
      "get": {
        "operationId": "usage_models_api_v1_usage_models_get",
        "parameters": [
          {
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date-time",
              "title": "Start",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date-time",
              "title": "End",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 2048,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelUsagePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Usage Models",
        "tags": [
          "usage"
        ]
      }
    },
    "/api/v1/usage/overview": {
      "get": {
        "operationId": "usage_overview_api_v1_usage_overview_get",
        "parameters": [
          {
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date-time",
              "title": "Start",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date-time",
              "title": "End",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "timezone",
            "required": false,
            "schema": {
              "default": "UTC",
              "maxLength": 128,
              "title": "Timezone",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageOverview"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Usage Overview",
        "tags": [
          "usage"
        ]
      }
    },
    "/api/v1/users/me": {
      "get": {
        "operationId": "get_profile_api_v1_users_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            },
            "description": "Successful Response"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Profile",
        "tags": [
          "auth",
          "tenancy"
        ]
      },
      "patch": {
        "operationId": "update_profile_api_v1_users_me_patch",
        "parameters": [
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Profile",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/audit-events": {
      "get": {
        "description": "The caller's own trail, account-wide events included; requires a login session.",
        "operationId": "list_account_audit_events_api_v1_users_me_audit_events_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Account Audit Events",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/avatar": {
      "delete": {
        "operationId": "delete_avatar_api_v1_users_me_avatar_delete",
        "parameters": [
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Avatar",
        "tags": [
          "auth",
          "tenancy"
        ]
      },
      "put": {
        "operationId": "put_avatar_api_v1_users_me_avatar_put",
        "parameters": [
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/jpeg": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/png": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/webp": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Put Avatar",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/disable": {
      "post": {
        "description": "Disable the caller's own account, proven by the current password; no route enables it again.",
        "operationId": "disable_account_api_v1_users_me_disable_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountDisable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Disable Account",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/keys": {
      "get": {
        "operationId": "list_user_keys_api_v1_users_me_keys_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List User Keys",
        "tags": [
          "auth",
          "tenancy"
        ]
      },
      "post": {
        "description": "Needs a login session: an API key never issues keys, so a leaked key cannot outlive its revocation.",
        "operationId": "create_user_key_api_v1_users_me_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserKeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedKey"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create User Key",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/keys/{key_id}": {
      "delete": {
        "operationId": "revoke_user_key_api_v1_users_me_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Revoke User Key",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/login-sessions": {
      "get": {
        "operationId": "list_login_sessions_api_v1_users_me_login_sessions_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginSessionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Login Sessions",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/login-sessions/{session_id}": {
      "delete": {
        "operationId": "revoke_login_session_api_v1_users_me_login_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Revoke Login Session",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/me/password": {
      "post": {
        "operationId": "change_password_api_v1_users_me_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Change Password",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/users/{user_id}/avatar": {
      "get": {
        "operationId": "get_avatar_api_v1_users__user_id__avatar_get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/png": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/webp": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The image"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Avatar",
        "tags": [
          "auth",
          "tenancy"
        ]
      }
    },
    "/api/v1/web-providers": {
      "get": {
        "operationId": "list_providers_api_v1_web_providers_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List web providers",
        "tags": [
          "providers"
        ]
      },
      "post": {
        "operationId": "create_provider_api_v1_web_providers_post",
        "parameters": [
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create web provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/web-providers/{provider_id}": {
      "get": {
        "operationId": "get_provider_api_v1_web_providers__provider_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get web provider",
        "tags": [
          "providers"
        ]
      },
      "patch": {
        "description": "A `config` change must also replace or remove a stored credential: it never follows a new endpoint.",
        "operationId": "update_provider_api_v1_web_providers__provider_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provider"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update web provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/web-providers/{provider_id}/test": {
      "post": {
        "operationId": "test_provider_api_v1_web_providers__provider_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "provider_id",
            "required": true,
            "schema": {
              "title": "Provider Id",
              "type": "string"
            }
          },
          {
            "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
            "in": "header",
            "name": "X-Workspace-ID",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 41,
                  "pattern": "^[a-z][a-z0-9]{1,7}_[0-9a-f]{20,32}$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.",
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTest"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Test web provider",
        "tags": [
          "providers"
        ]
      }
    },
    "/api/v1/workspaces": {
      "get": {
        "operationId": "list_workspaces_api_v1_workspaces_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspacePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Workspaces",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}": {
      "get": {
        "operationId": "get_workspace_api_v1_workspaces__workspace_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Workspace",
        "tags": [
          "tenancy"
        ]
      },
      "patch": {
        "operationId": "update_workspace_api_v1_workspaces__workspace_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Workspace",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/archive": {
      "post": {
        "operationId": "archive_workspace_api_v1_workspaces__workspace_id__archive_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Archive Workspace",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/audit-events": {
      "get": {
        "operationId": "list_workspace_audit_events_api_v1_workspaces__workspace_id__audit_events_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Workspace Audit Events",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/grants": {
      "get": {
        "operationId": "list_workspace_grants_api_v1_workspaces__workspace_id__grants_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Workspace Grants",
        "tags": [
          "tenancy"
        ]
      },
      "post": {
        "operationId": "create_workspace_grant_api_v1_workspaces__workspace_id__grants_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Workspace Grant",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/grants/{grant_id}": {
      "delete": {
        "operationId": "delete_workspace_grant_api_v1_workspaces__workspace_id__grants__grant_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grant_id",
            "required": true,
            "schema": {
              "title": "Grant Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Workspace Grant",
        "tags": [
          "tenancy"
        ]
      },
      "patch": {
        "description": "The grant is replaced: the result carries its new ID.",
        "operationId": "change_workspace_grant_api_v1_workspaces__workspace_id__grants__grant_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "grant_id",
            "required": true,
            "schema": {
              "title": "Grant Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantView"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Change Workspace Grant",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/icon": {
      "delete": {
        "operationId": "delete_workspace_icon_api_v1_workspaces__workspace_id__icon_delete",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Workspace Icon",
        "tags": [
          "tenancy"
        ]
      },
      "get": {
        "operationId": "get_workspace_icon_api_v1_workspaces__workspace_id__icon_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/jpeg": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/png": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/webp": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The image"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Workspace Icon",
        "tags": [
          "tenancy"
        ]
      },
      "put": {
        "operationId": "put_workspace_icon_api_v1_workspaces__workspace_id__icon_put",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/jpeg": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/png": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            },
            "image/webp": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Put Workspace Icon",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/invitations": {
      "get": {
        "operationId": "list_workspace_invitations_api_v1_workspaces__workspace_id__invitations_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Workspace Invitations",
        "tags": [
          "tenancy"
        ]
      },
      "post": {
        "operationId": "create_workspace_invitation_api_v1_workspaces__workspace_id__invitations_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Workspace Invitation",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/invitations/{invitation_id}/resend": {
      "post": {
        "operationId": "resend_workspace_invitation_api_v1_workspaces__workspace_id__invitations__invitation_id__resend_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "title": "Invitation Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationReceipt"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Resend Workspace Invitation",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/invitations/{invitation_id}/revoke": {
      "post": {
        "operationId": "revoke_workspace_invitation_api_v1_workspaces__workspace_id__invitations__invitation_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "invitation_id",
            "required": true,
            "schema": {
              "title": "Invitation Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Revoke Workspace Invitation",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/keys": {
      "get": {
        "operationId": "list_workspace_keys_api_v1_workspaces__workspace_id__keys_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "principal_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Principal Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Workspace Keys",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/keys/{key_id}": {
      "delete": {
        "operationId": "revoke_workspace_key_api_v1_workspaces__workspace_id__keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Revoke Workspace Key",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/service-accounts": {
      "get": {
        "operationId": "list_service_accounts_api_v1_workspaces__workspace_id__service_accounts_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Service Accounts",
        "tags": [
          "tenancy"
        ]
      },
      "post": {
        "operationId": "create_service_account_api_v1_workspaces__workspace_id__service_accounts_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccount"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Service Account",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/service-accounts/{account_id}": {
      "delete": {
        "operationId": "delete_service_account_api_v1_workspaces__workspace_id__service_accounts__account_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccount"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Delete Service Account",
        "tags": [
          "tenancy"
        ]
      },
      "get": {
        "operationId": "get_service_account_api_v1_workspaces__workspace_id__service_accounts__account_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccount"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "Get Service Account",
        "tags": [
          "tenancy"
        ]
      },
      "patch": {
        "operationId": "update_service_account_api_v1_workspaces__workspace_id__service_accounts__account_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          },
          {
            "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The resource's ETag: `\"{id}:{version}\"` of its current view, `\"{key}:{version}\"` for a model",
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccount"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Update Service Account",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/api/v1/workspaces/{workspace_id}/service-accounts/{account_id}/keys": {
      "get": {
        "operationId": "list_service_account_keys_api_v1_workspaces__workspace_id__service_accounts__account_id__keys_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "loginSession": []
          }
        ],
        "summary": "List Service Account Keys",
        "tags": [
          "tenancy"
        ]
      },
      "post": {
        "description": "Needs a login session: an API key never issues keys, so a leaked key cannot outlive its revocation.",
        "operationId": "create_service_account_key_api_v1_workspaces__workspace_id__service_accounts__account_id__keys_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedKey"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "csrf": [],
            "loginSession": []
          }
        ],
        "summary": "Create Service Account Key",
        "tags": [
          "tenancy"
        ]
      }
    },
    "/healthz": {
      "get": {
        "operationId": "health_healthz_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Health Healthz Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health"
      }
    },
    "/readyz": {
      "get": {
        "description": "Ready while started and the database holds a usable schema. Redis only speeds work up, so losing it\nis reported as degraded rather than taking the replica out of service.",
        "operationId": "ready_readyz_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ready"
      }
    }
  }
}
