H2O.ai Agents API

The Agents API from H2O.ai — 30 operation(s) for agents.

OpenAPI Specification

h2o-ai-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: h2oGPTe REST Agents API
  description: "\n# Overview \n\nUsers can easily interact with the h2oGPTe API through its REST API, allowing HTTP requests from any programming language.\n\n## Authorization: Getting an API key\n\nSign up/in at Enterprise h2oGPTe and generate one of the following two types of API keys: \n\n- **Global API key**: If a Collection is not specified when creating a new API Key, that key is considered to be a global API Key. Use global API Keys to grant full user impersonation and system-wide access to all of your work. Anyone with access to one of your global API Keys can create, delete, or interact with any of your past, current, and future Collections, Documents, Chats, and settings.\n\n- **Collection-specific API key**: Use Collection-specific API Keys to grant external access to only Chat with a specified Collection and make related API calls to it. Collection-specific API keys do not allow other API calls, such as creation, deletion, or access to other Collections or Chats.\n \nAccess Enterprise h2oGPTe through your [H2O Generative AI](https://genai.h2o.ai/appstore) app store account, available with a freemium tier.\n\n## Authorization: Using an API key \n\nAll h2oGPTe REST API requests must include an API Key in the \"Authorization\" HTTP header, formatted as follows:\n\n```\nAuthorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n```\n\n```sh\ncurl -X 'POST' \\\n  'https://h2ogpte.genai.h2o.ai/api/v1/collections' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Authorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \\\n  -d '{\n    \"name\": \"The name of my Collection\",\n    \"description\": \"The description of my Collection\",\n    \"embedding_model\": \"BAAI/bge-large-en-v1.5\"\n  }'\n```\n    \n## Interactive h2oGPTe API testing\n\nThis page only showcases the h2oGPTe REST API; you can test it directly in the [Swagger UI](https://h2ogpte.genai.h2o.ai/swagger-ui/). Ensure that you are logged into your Enterprise h2oGPTe account.\n"
  version: v1.0.0
servers:
- url: https://h2ogpte.genai.h2o.ai/api/v1
security:
- bearerAuth: []
tags:
- name: Agents
paths:
  /agents:
    get:
      operationId: get_all_agents
      summary: Get all agents (built-in and custom)
      description: Get all agents (both built-in and custom agents) with unified structure
      tags:
      - Agents
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Agent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/directory_stats:
    get:
      operationId: list_agent_directory_stats
      summary: Lists agent directory stats across all agent chat sessions.
      description: Lists agent directory stats across all agent chat sessions.
      tags:
      - Agents
      parameters:
      - name: offset
        in: query
        description: How many agent chat sessions to skip before returning.
        required: false
        schema:
          type: integer
          default: 0
      - name: limit
        in: query
        description: How many agent chat sessions to return.
        required: false
        schema:
          type: integer
          default: 100
      - name: filter_text
        in: query
        description: Applied text filter.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentServerDirectoryStatsPerAgentChatSession'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/tools:
    get:
      operationId: list_agent_tools
      summary: Lists agent tools present on the system.
      description: Lists agent tools present on the system.
      tags:
      - Agents
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentToolSpec'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/tool_preference:
    get:
      operationId: list_agent_tool_preference
      summary: Lists the agent tool preference for the user.
      description: Lists the agent tool preference for the user.
      tags:
      - Agents
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
    post:
      operationId: update_agent_tool_preference
      summary: Creates or updates the agent tool preference for the user.
      description: Creates or updates the agent tool preference for the user.
      tags:
      - Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - reference_value
              properties:
                reference_value:
                  type: array
                  items:
                    type: string
      responses:
        '204':
          description: Successful operation
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
    delete:
      operationId: delete_agent_tool_preference
      summary: Deletes the agent tool preferences for the user.
      description: Deletes the agent tool preferences for the user.
      tags:
      - Agents
      responses:
        '204':
          description: Successful operation
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/keys:
    get:
      operationId: list_agent_keys
      summary: Lists agent keys.
      description: Lists agent keys.
      tags:
      - Agents
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentKey'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
    post:
      operationId: create_agent_key
      summary: Creates agent key.
      description: Creates agent key.
      tags:
      - Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentKeyRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentKey'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/keys/{key_id}:
    post:
      operationId: update_agent_key
      summary: Updates agent key.
      description: Updates agent key.
      tags:
      - Agents
      parameters:
      - name: key_id
        in: path
        description: Id of the key to be updated.
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentKeyRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentKey'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/keys/{key_ids}:
    delete:
      operationId: delete_agent_keys
      summary: Deletes agent keys.
      description: Deletes agent keys.
      tags:
      - Agents
      parameters:
      - name: key_ids
        in: path
        description: Ids of keys to be deleted.
        required: true
        schema:
          type: array
          items:
            type: string
      responses:
        '204':
          description: Successful operation
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/tool_association:
    get:
      operationId: list_agent_key_tool_associations
      summary: Returns a list of tools and the user's associated keys.
      description: Returns a list of tools and the user's associated keys.
      tags:
      - Agents
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentToolKeyAssociations'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
    post:
      operationId: create_agent_key_tool_associations
      summary: Creates associations between a tool and user's keys.
      description: Creates associations between a tool and user's keys.
      tags:
      - Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentToolKeyAssociationsRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentToolKeyAssociations'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/tool_association/{associate_ids}:
    delete:
      operationId: delete_agent_tool_association
      summary: Deletes agent tool key associations.
      description: Deletes agent tool key associations given a list of associate ids belonging to the user.
      tags:
      - Agents
      parameters:
      - name: associate_ids
        in: path
        description: The unique identifiers of tool associations to be deleted.
        required: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Count'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_agent_tool_associations:
    get:
      operationId: list_custom_agent_tool_associations
      summary: Returns a list of custom agent tool associations.
      description: Returns a list of custom agent tool associations, optionally filtered by agent_id or agent_name.
      tags:
      - Agents
      parameters:
      - name: agent_id
        in: query
        description: Filter by custom agent UUID
        required: false
        schema:
          type: string
          format: uuid
      - name: agent_name
        in: query
        description: Filter by custom agent name
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomAgentToolAssociation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
    post:
      operationId: create_custom_agent_tool_association
      summary: Creates a custom agent tool association.
      description: Creates a custom agent tool association.
      tags:
      - Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomAgentToolAssociationRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomAgentToolAssociation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_agent_tool_associations/{association_ids}:
    delete:
      operationId: delete_custom_agent_tool_associations
      summary: Deletes custom agent tool associations.
      description: Deletes custom agent tool associations given a list of association ids belonging to the user.
      tags:
      - Agents
      parameters:
      - name: association_ids
        in: path
        description: The unique identifiers of associations to be deleted.
        required: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCustomAgentToolAssociationsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_agent_key_associations:
    get:
      operationId: list_custom_agent_key_associations
      summary: Returns a list of custom agent key associations.
      description: Returns a list of custom agent key associations, optionally filtered by agent_id.
      tags:
      - Agents
      parameters:
      - name: agent_id
        in: query
        description: Filter by custom agent UUID
        required: false
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomAgentKeyAssociation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
    post:
      operationId: create_custom_agent_key_association
      summary: Creates a custom agent key association.
      description: Associates an env var (from envs.json or user-added) with an agent key.
      tags:
      - Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomAgentKeyAssociationRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomAgentKeyAssociation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_agent_key_associations/{association_ids}:
    delete:
      operationId: delete_custom_agent_key_associations
      summary: Deletes custom agent key associations.
      description: Deletes custom agent key associations given a list of association ids belonging to the user.
      tags:
      - Agents
      parameters:
      - name: association_ids
        in: path
        description: The unique identifiers of associations to be deleted.
        required: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCustomAgentKeyAssociationsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_agents/{agent_id}/suggestions:
    get:
      operationId: get_agent_suggestions
      summary: Get MCP tool suggestions for a custom agent.
      description: Returns suggested MCP tool configurations for a custom agent based on its metadata. Helps users identify and configure required tools.
      tags:
      - Agents
      parameters:
      - name: agent_id
        in: path
        description: The unique identifier of the custom agent.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomAgentSuggestion'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_tools:
    post:
      operationId: add_custom_agent_tool
      summary: Add Custom Agent Tools
      description: Add Custom Agent Tools
      tags:
      - Agents
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type:
                  - string
                  - 'null'
                  format: binary
                  description: 'The tool file to upload. Requirements vary by tool_type:

                    - local_mcp: .zip file containing MCP server code

                    - remote_mcp: Optional .json file with MCP configuration

                    - browser_action: .py file (must start with ''browser_'') or .zip containing browser action scripts

                    - general_code: .py or .zip file with custom code

                    '
                tool_type:
                  type: string
                  enum:
                  - local_mcp
                  - remote_mcp
                  - browser_action
                  - general_code
                  description: 'The type of custom tool being added:

                    - local_mcp: Model Context Protocol server running locally

                    - remote_mcp: Model Context Protocol server running remotely

                    - browser_action: Custom browser automation actions

                    - general_code: General purpose code execution tools

                    '
                tool_args:
                  type: string
                  description: "JSON string containing tool-specific arguments. The structure varies by tool_type:\n\nFor remote_mcp:\n{\n  \"mcp_config_json\": \"JSON string with MCP server configuration\",\n  \"enable_by_default\": true/false (optional, defaults to true)\n}\n\nFor local_mcp, browser_action, and general_code:\n{\n  \"tool_name\": \"string (optional, defaults to filename without extension)\",\n  \"description\": \"string (optional, tool description)\",\n  \"enable_by_default\": true/false (optional, defaults to true),\n  \"should_unzip\": true/false (optional, for general_code .zip files only),\n  \"tool_usage_mode\": [\"runner\", \"creator\"] (optional list of strings),\n  \"system_prompt\": \"string (automatically added when generate_system_prompt=true)\"\n}\n"
                  example: '{"tool_name": "my_tool", "description": "My custom tool", "enable_by_default": true}'
                custom_tool_path:
                  type:
                  - string
                  - 'null'
                filename:
                  type:
                  - string
                  - 'null'
                  description: Optional filename to use when storing the uploaded file
                generate_system_prompt:
                  type:
                  - boolean
                  - 'null'
                  description: 'If true and tool_type is "general_code", generates a system prompt for the tool using LLM analysis.

                    The generated system prompt will be automatically added to tool_args["system_prompt"] after generation completes.

                    Only valid for general_code tool type.


                    WARNING: This is a long-running synchronous operation. The server holds the HTTP connection open

                    while the LLM analyzes the uploaded code. Ensure your HTTP client timeout and any intermediate

                    proxies (nginx, ALB, Cloudflare, etc.) are configured with sufficient timeout. Default proxy

                    timeouts of 60-120s will cause 504 Gateway Timeout errors. See `system_prompt_generation_timeout`

                    to constrain the wait budget on the server side.

                    '
                system_prompt_generation_timeout:
                  type:
                  - number
                  - 'null'
                  format: double
                  description: 'Optional wait budget in seconds for synchronous system prompt generation

                    (only used when generate_system_prompt is true). Set this below your proxy/ingress

                    read timeout so the API returns a 408 instead of letting the proxy emit a 504.

                    If omitted, defaults to the server-side cap of 600 seconds (10 minutes).

                    '
              required:
              - tool_type
              - tool_args
        required: true
      responses:
        '201':
          description: Custom agent tool created successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    agent_custom_tool_id:
                      type: string
                      description: The ID of the created custom agent tool
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        default:
          $ref: '#/components/responses/Unexpected'
    get:
      operationId: list_custom_agent_tools
      summary: List Custom Agent Tools
      description: List all custom agent tools for the current user
      tags:
      - Agents
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: The ID of the custom agent tool
                    tool_name:
                      type: string
                      description: The name of the tool
                    tool_type:
                      type: string
                      description: The type of the tool
                    tool_args:
                      type: object
                      description: The tool arguments
                    owner_email:
                      type: string
                      description: The owner's email
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_tools/{tool_ids}:
    delete:
      operationId: delete_custom_agent_tool
      summary: Deletes custom agent tools
      description: Deletes custom agent tool given a list of tool ids belonging to the user.
      tags:
      - Agents
      parameters:
      - name: tool_ids
        in: path
        description: The unique identifiers of tools to be deleted.
        required: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Count'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_tools/{tool_id}:
    get:
      operationId: get_custom_agent_tool
      summary: Get a single custom agent tool
      description: Get a single custom agent tool by ID for the current user
      tags:
      - Agents
      parameters:
      - name: tool_id
        in: path
        description: The unique identifier of the tool to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  tool_name:
                    type: string
                  tool_type:
                    type: string
                  tool_args:
                    type: object
                  owner_email:
                    type: string
                  file_name:
                    type: string
                    description: Original filename with extension
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/Unexpected'
    put:
      operationId: update_custom_agent_tool
      summary: Updates a custom agent tool
      description: Updates a custom agent tool given a tool id belonging to the user.
      tags:
      - Agents
      parameters:
      - name: tool_id
        in: path
        description: The unique identifier of the tool to be updated.
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomAgentToolRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_custom_tool_id:
                    type: string
                    description: The ID of the updated custom agent tool
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_tools/{tool_id}/download:
    get:
      operationId: download_custom_agent_tool
      summary: Download custom agent tool file
      description: 'Downloads the file associated with a custom agent tool owned by the current user. Only local_mcp, browser_action, and general_code tool types support file download.

        '
      tags:
      - Agents
      parameters:
      - name: tool_id
        in: path
        description: The unique identifier of the tool whose file should be downloaded.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File download successful
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/Unexpected'
  /agents/custom_agents:
    post:
      operationId: add_custom_agent
      summary: Add Custom Agents
      description: Add Custom Agents
      tags:
      - Agents
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                agent_type:
                  type: string
                agent_args:
                  type: string
                agent_name:
                  type: string
                  description: 'User-provided name for the agent. If provided and the zip contains

                    exactly one agent, this name will be used instead of the folder name

                    inside the zip. If not provided, the folder name is used.

                    '
              required:
              - file
 

# --- truncated at 32 KB (75 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/h2o-ai/refs/heads/main/openapi/h2o-ai-agents-api-openapi.yml