{
  "openapi": "3.1.0",
  "info": {
    "title": "LibreChat Agents API",
    "version": "0.1.0",
    "description": "The public agent and skill management endpoints of the LibreChat Agents API. This API is in beta and may change."
  },
  "servers": [
    {
      "url": "agents/v1",
      "description": "Relative to where this document is served (`/api/openapi.json`), so it resolves under any deployment base path."
    }
  ],
  "paths": {
    "/agents": {
      "post": {
        "operationId": "createAgent",
        "summary": "Create an agent",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listAgents",
        "summary": "List agents",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of agents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/agents/{id}": {
      "get": {
        "operationId": "getAgent",
        "summary": "Get an agent",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The agent id"
            },
            "required": true,
            "description": "The agent id"
          }
        ],
        "responses": {
          "200": {
            "description": "The agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateAgent",
        "summary": "Update an agent",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The agent id"
            },
            "required": true,
            "description": "The agent id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAgent",
        "summary": "Delete an agent",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The agent id"
            },
            "required": true,
            "description": "The agent id"
          }
        ],
        "responses": {
          "200": {
            "description": "The agent was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDeleted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/agents/{id}/files": {
      "post": {
        "operationId": "uploadAgentFile",
        "summary": "Upload a file to an agent",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The agent id"
            },
            "required": true,
            "description": "The agent id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "purpose"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "file_search",
                      "execute_code",
                      "context"
                    ],
                    "description": "The tool resource the file is uploaded for."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The uploaded file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "429": {
            "description": "Too many upload requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listAgentFiles",
        "summary": "List an agent's files",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The agent id"
            },
            "required": true,
            "description": "The agent id"
          }
        ],
        "responses": {
          "200": {
            "description": "The agent's files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFileList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/agents/{id}/files/{fileId}": {
      "delete": {
        "operationId": "deleteAgentFile",
        "summary": "Delete an agent's file",
        "tags": [
          "Agents"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The agent id"
            },
            "required": true,
            "description": "The agent id"
          },
          {
            "in": "path",
            "name": "fileId",
            "schema": {
              "type": "string",
              "description": "The file id"
            },
            "required": true,
            "description": "The file id"
          }
        ],
        "responses": {
          "200": {
            "description": "The file was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentFileDeleted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/skills": {
      "get": {
        "operationId": "listSkills",
        "summary": "List skills",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of skills",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSkill",
        "summary": "Create a skill",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The Skill name already exists, or the bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/AccountDeletionConflict"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/skills/{id}": {
      "get": {
        "operationId": "getSkill",
        "summary": "Get a skill",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The skill id"
            },
            "required": true,
            "description": "The skill id"
          }
        ],
        "responses": {
          "200": {
            "description": "The skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateSkill",
        "summary": "Update a skill",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The skill id"
            },
            "required": true,
            "description": "The skill id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated skill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skill"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The skill changed since the provided expectedVersion, or the bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/AccountDeletionConflict"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSkill",
        "summary": "Delete an inline skill",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The skill id"
            },
            "required": true,
            "description": "The skill id"
          }
        ],
        "responses": {
          "200": {
            "description": "The skill was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillDeleted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/skills/{id}/files": {
      "get": {
        "operationId": "listSkillFiles",
        "summary": "List a skill's files",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The skill id"
            },
            "required": true,
            "description": "The skill id"
          }
        ],
        "responses": {
          "200": {
            "description": "The skill's files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillFileList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/skills/{id}/files/{relativePath}": {
      "get": {
        "operationId": "getSkillFile",
        "summary": "Get a skill's file",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The skill id"
            },
            "required": true,
            "description": "The skill id"
          },
          {
            "in": "path",
            "name": "relativePath",
            "schema": {
              "type": "string",
              "description": "The file path within the skill"
            },
            "required": true,
            "description": "The file path within the skill"
          }
        ],
        "responses": {
          "200": {
            "description": "The file content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillFileContent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSkillFile",
        "summary": "Delete a skill's file",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The skill id"
            },
            "required": true,
            "description": "The skill id"
          },
          {
            "in": "path",
            "name": "relativePath",
            "schema": {
              "type": "string",
              "description": "The file path within the skill"
            },
            "required": true,
            "description": "The file path within the skill"
          }
        ],
        "responses": {
          "200": {
            "description": "The file was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillFileDeleted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The file changed while it was being deleted, or the bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/AccountDeletionConflict"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateSkillFile",
        "summary": "Create or update a skill's file",
        "tags": [
          "Skills"
        ],
        "security": [
          {
            "oidcBearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "description": "The skill id"
            },
            "required": true,
            "description": "The skill id"
          },
          {
            "in": "path",
            "name": "relativePath",
            "schema": {
              "type": "string",
              "description": "The file path within the skill"
            },
            "required": true,
            "description": "The file path within the skill"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillFileUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The file was written",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillFileUpdated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, or a malformed JSON body",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/JsonParseError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied, the caller is banned, or the request fails tenant isolation",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/MessageError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The bound account is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletionConflict"
                }
              }
            }
          },
          "429": {
            "description": "Too many file-write requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Errors normalized by the route use JSON; the final application error controller sends a text body with the text/html media type.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    }
                  ]
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "An unknown error occurred.",
                    "Processing error in ErrorController."
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatar": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "filepath": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  }
                },
                "required": [
                  "filepath",
                  "source"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "model_parameters": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "tools": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills_enabled": {
            "type": "boolean"
          },
          "skill_authoring_enabled": {
            "type": "boolean"
          },
          "skills_scope": {
            "type": "string",
            "enum": [
              "all",
              "selected",
              "none"
            ]
          },
          "memory_scope": {
            "type": "string",
            "enum": [
              "user",
              "agent"
            ]
          },
          "agent_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "to": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "description": {
                  "type": "string"
                },
                "edgeType": {
                  "type": "string",
                  "enum": [
                    "handoff",
                    "direct"
                  ]
                },
                "prompt": {
                  "type": "string"
                },
                "excludeResults": {
                  "type": "boolean"
                },
                "promptKey": {
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to"
              ]
            }
          },
          "end_after_tools": {
            "type": "boolean"
          },
          "hide_sequential_outputs": {
            "type": "boolean"
          },
          "stateful_code_sessions": {
            "type": "boolean"
          },
          "stateful_code_environment": {
            "type": "string",
            "enum": [
              "user",
              "agent-user",
              "conversation"
            ]
          },
          "code_environment_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
          },
          "code_environment_ids": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
            }
          },
          "code_workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "const": ""
              },
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              }
            ]
          },
          "repositoryInstructions": {
            "type": "string",
            "enum": [
              "prefer",
              "defer",
              "off"
            ]
          },
          "git_identity": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "email": {
                "type": "string",
                "maxLength": 254
              }
            },
            "required": [
              "name",
              "email"
            ]
          },
          "artifacts": {
            "type": "string"
          },
          "recursion_limit": {
            "type": "number"
          },
          "conversation_starters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tool_resources": {
            "type": "object",
            "properties": {
              "image_edit": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "execute_code": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "file_search": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "vector_store_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "context": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "ocr": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "tool_options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "defer_loading": {
                  "type": "boolean"
                },
                "allowed_callers": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "direct",
                      "code_execution"
                    ]
                  }
                },
                "run_in_background": {
                  "type": "boolean"
                },
                "describe_intent": {
                  "type": "boolean"
                },
                "approval_mode": {
                  "type": "string",
                  "enum": [
                    "ask",
                    "allow",
                    "chat",
                    "always"
                  ]
                },
                "approval_revision": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              }
            }
          },
          "subagents": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "allowSelf": {
                "type": "boolean"
              },
              "shareFiles": {
                "type": "boolean"
              },
              "agent_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "graphs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    },
                    "agent_ids": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "edges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          },
                          "to": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          },
                          "description": {
                            "type": "string"
                          },
                          "edgeType": {
                            "type": "string",
                            "const": "direct"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "excludeResults": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "from",
                          "to",
                          "edgeType"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "entry_agent_id": {
                      "type": "string"
                    },
                    "result_agent_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "name",
                    "description",
                    "agent_ids",
                    "edges",
                    "entry_agent_id",
                    "result_agent_id"
                  ]
                }
              }
            }
          },
          "support_contact": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": ""
                  },
                  {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  }
                ]
              }
            }
          },
          "category": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "provider",
          "model"
        ],
        "additionalProperties": false
      },
      "AgentUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "avatar": {
            "type": "null"
          },
          "model_parameters": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills_enabled": {
            "type": "boolean"
          },
          "skill_authoring_enabled": {
            "type": "boolean"
          },
          "skills_scope": {
            "type": "string",
            "enum": [
              "all",
              "selected",
              "none"
            ]
          },
          "memory_scope": {
            "type": "string",
            "enum": [
              "user",
              "agent"
            ]
          },
          "agent_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "to": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "description": {
                  "type": "string"
                },
                "edgeType": {
                  "type": "string",
                  "enum": [
                    "handoff",
                    "direct"
                  ]
                },
                "prompt": {
                  "type": "string"
                },
                "excludeResults": {
                  "type": "boolean"
                },
                "promptKey": {
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to"
              ]
            }
          },
          "end_after_tools": {
            "type": "boolean"
          },
          "hide_sequential_outputs": {
            "type": "boolean"
          },
          "stateful_code_sessions": {
            "type": "boolean"
          },
          "stateful_code_environment": {
            "type": "string",
            "enum": [
              "user",
              "agent-user",
              "conversation"
            ]
          },
          "code_environment_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "code_environment_ids": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
            }
          },
          "code_workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "const": ""
              },
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              }
            ]
          },
          "repositoryInstructions": {
            "type": "string",
            "enum": [
              "prefer",
              "defer",
              "off"
            ]
          },
          "git_identity": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 254
                  }
                },
                "required": [
                  "name",
                  "email"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "artifacts": {
            "type": "string"
          },
          "recursion_limit": {
            "type": "number"
          },
          "conversation_starters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tool_resources": {
            "type": "object",
            "properties": {
              "image_edit": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "execute_code": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "file_search": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "vector_store_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "context": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "ocr": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "tool_options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "defer_loading": {
                  "type": "boolean"
                },
                "allowed_callers": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "direct",
                      "code_execution"
                    ]
                  }
                },
                "run_in_background": {
                  "type": "boolean"
                },
                "describe_intent": {
                  "type": "boolean"
                },
                "approval_mode": {
                  "type": "string",
                  "enum": [
                    "ask",
                    "allow",
                    "chat",
                    "always"
                  ]
                },
                "approval_revision": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              }
            }
          },
          "subagents": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "allowSelf": {
                "type": "boolean"
              },
              "shareFiles": {
                "type": "boolean"
              },
              "agent_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "graphs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    },
                    "agent_ids": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "edges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          },
                          "to": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          },
                          "description": {
                            "type": "string"
                          },
                          "edgeType": {
                            "type": "string",
                            "const": "direct"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "excludeResults": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "from",
                          "to",
                          "edgeType"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "entry_agent_id": {
                      "type": "string"
                    },
                    "result_agent_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "name",
                    "description",
                    "agent_ids",
                    "edges",
                    "entry_agent_id",
                    "result_agent_id"
                  ]
                }
              }
            }
          },
          "support_contact": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": ""
                  },
                  {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  }
                ]
              }
            }
          },
          "category": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Agent": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatar": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "filepath": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  }
                },
                "required": [
                  "filepath",
                  "source"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "model_parameters": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills_enabled": {
            "type": "boolean"
          },
          "skill_authoring_enabled": {
            "type": "boolean"
          },
          "skills_scope": {
            "type": "string",
            "enum": [
              "all",
              "selected",
              "none"
            ]
          },
          "memory_scope": {
            "type": "string",
            "enum": [
              "user",
              "agent"
            ]
          },
          "agent_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "to": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "description": {
                  "type": "string"
                },
                "edgeType": {
                  "type": "string",
                  "enum": [
                    "handoff",
                    "direct"
                  ]
                },
                "prompt": {
                  "type": "string"
                },
                "excludeResults": {
                  "type": "boolean"
                },
                "promptKey": {
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to"
              ]
            }
          },
          "end_after_tools": {
            "type": "boolean"
          },
          "hide_sequential_outputs": {
            "type": "boolean"
          },
          "stateful_code_sessions": {
            "type": "boolean"
          },
          "stateful_code_environment": {
            "type": "string",
            "enum": [
              "user",
              "agent-user",
              "conversation"
            ]
          },
          "code_environment_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "code_environment_ids": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
            }
          },
          "code_workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "const": ""
              },
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              }
            ]
          },
          "repositoryInstructions": {
            "type": "string",
            "enum": [
              "prefer",
              "defer",
              "off"
            ]
          },
          "git_identity": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 254
                  }
                },
                "required": [
                  "name",
                  "email"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "artifacts": {
            "type": "string"
          },
          "recursion_limit": {
            "type": "number"
          },
          "conversation_starters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tool_resources": {
            "type": "object",
            "properties": {
              "image_edit": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "execute_code": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "file_search": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "vector_store_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "context": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "ocr": {
                "type": "object",
                "properties": {
                  "file_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "tool_options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "defer_loading": {
                  "type": "boolean"
                },
                "allowed_callers": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "direct",
                      "code_execution"
                    ]
                  }
                },
                "run_in_background": {
                  "type": "boolean"
                },
                "describe_intent": {
                  "type": "boolean"
                },
                "approval_mode": {
                  "type": "string",
                  "enum": [
                    "ask",
                    "allow",
                    "chat",
                    "always"
                  ]
                },
                "approval_revision": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              }
            }
          },
          "subagents": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "allowSelf": {
                "type": "boolean"
              },
              "agent_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "graphs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "agent_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "edges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          },
                          "to": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ]
                          },
                          "description": {
                            "type": "string"
                          },
                          "edgeType": {
                            "type": "string",
                            "const": "direct"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "excludeResults": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "from",
                          "to",
                          "edgeType"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "entry_agent_id": {
                      "type": "string"
                    },
                    "result_agent_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "name",
                    "description",
                    "agent_ids",
                    "edges",
                    "entry_agent_id",
                    "result_agent_id"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "support_contact": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": ""
                  },
                  {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  }
                ]
              }
            }
          },
          "category": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "provider",
          "model",
          "id",
          "version",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "AgentFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "agent.file"
          },
          "filename": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "mime_type": {
            "type": "string"
          },
          "purposes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "filename",
          "bytes",
          "mime_type",
          "purposes",
          "created_at"
        ]
      },
      "SkillFrontmatterValue": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillFrontmatterValue"
            }
          },
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/SkillFrontmatterValue"
            }
          }
        ]
      },
      "SkillCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "displayTitle": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "frontmatter": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/SkillFrontmatterValue"
            }
          },
          "category": {
            "type": "string"
          },
          "alwaysApply": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "description",
          "body"
        ],
        "additionalProperties": false
      },
      "SkillUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "displayTitle": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "alwaysApply": {
            "type": "boolean"
          },
          "body": {
            "type": "string"
          },
          "frontmatter": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/SkillFrontmatterValue"
            }
          },
          "expectedVersion": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "expectedVersion"
        ],
        "additionalProperties": false,
        "minProperties": 2
      },
      "SkillFile": {
        "type": "object",
        "properties": {
          "relativePath": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "relativePath",
          "filename",
          "mimeType",
          "bytes"
        ]
      },
      "SkillFileUpdateRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "maxLength": 1048576,
            "description": "The file content. The accepted maximum is 1 MiB (1,048,576 bytes) of UTF-8-encoded content. The limit is measured in bytes, not characters, so non-ASCII content reaches it at fewer characters."
          }
        },
        "required": [
          "content"
        ],
        "additionalProperties": false
      },
      "AgentList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Agent"
            }
          },
          "first_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "after": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "data",
          "first_id",
          "last_id",
          "has_more",
          "after"
        ],
        "additionalProperties": false
      },
      "AgentDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "AgentFileList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentFile"
            }
          }
        },
        "required": [
          "object",
          "data"
        ]
      },
      "AgentFileDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "not_found",
                  "permission_denied",
                  "internal_error",
                  "conflict"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "array",
                      "items": {
                        "type": [
                          "string",
                          "number"
                        ]
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Skill": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "displayTitle": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "alwaysApply": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "pattern": "^[a-f\\d]{24}$"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "fileCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "disableModelInvocation": {
            "type": "boolean"
          },
          "userInvocable": {
            "type": "boolean"
          },
          "allowedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "body": {
            "type": "string"
          },
          "frontmatter": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/SkillFrontmatterValue"
            }
          }
        },
        "required": [
          "name",
          "description",
          "id",
          "version",
          "fileCount",
          "createdAt",
          "updatedAt",
          "body"
        ]
      },
      "SkillList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "displayTitle": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "category": {
                  "type": "string"
                },
                "alwaysApply": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string",
                  "pattern": "^[a-f\\d]{24}$"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "fileCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "disableModelInvocation": {
                  "type": "boolean"
                },
                "userInvocable": {
                  "type": "boolean"
                },
                "allowedTools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                }
              },
              "required": [
                "name",
                "description",
                "id",
                "version",
                "fileCount",
                "createdAt",
                "updatedAt"
              ]
            }
          },
          "first_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "after": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "first_id",
          "last_id",
          "has_more",
          "after"
        ]
      },
      "SkillFileList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillFile"
            }
          }
        },
        "required": [
          "object",
          "data"
        ]
      },
      "SkillFileContent": {
        "type": "object",
        "properties": {
          "relativePath": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "content": {
            "type": "string"
          },
          "isBinary": {
            "type": "boolean"
          }
        },
        "required": [
          "relativePath",
          "filename",
          "mimeType",
          "bytes",
          "isBinary"
        ]
      },
      "SkillFileUpdated": {
        "type": "object",
        "properties": {
          "relativePath": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "relativePath",
          "bytes"
        ]
      },
      "SkillFileDeleted": {
        "type": "object",
        "properties": {
          "skillId": {
            "type": "string",
            "pattern": "^[a-f\\d]{24}$"
          },
          "relativePath": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "skillId",
          "relativePath",
          "deleted"
        ]
      },
      "SkillDeleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f\\d]{24}$"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          },
          "cleanupComplete": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "deleted",
          "cleanupComplete"
        ]
      },
      "ErrorMessage": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "AccountDeletionConflict": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "ACCOUNT_DELETION_IN_PROGRESS"
          }
        },
        "required": [
          "error",
          "code"
        ],
        "additionalProperties": false
      },
      "MessageError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false
      },
      "JsonParseError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "const": "Invalid JSON format"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "oidcBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "An OIDC access token, sent as a bearer token."
      }
    }
  }
}
