> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axilio.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an agent

> Changes an agent's name, model, output schema, limits or data toggles; omitted fields are left unchanged. Its revisions change through POST /agents/{agent_id}/revisions.

Minimum role required: Member


## OpenAPI

````yaml /api-reference/openapi-backend.json patch /agents/{agent_id}
openapi: 3.1.0
info:
  description: Axilio backend HTTP API.
  title: Axilio API
  version: 0.155.0
servers:
  - url: https://api.axilio.ai/api/v1
    description: Production
security: []
tags:
  - name: Agents
  - name: API Keys
  - name: Billing
  - name: Conversations
  - name: Files
  - name: Messages
  - name: Models
  - name: Organization
  - name: Phones
  - name: Runs
  - name: Sessions
  - name: Skill
  - name: Usage
  - name: Webhooks
paths:
  /agents/{agent_id}:
    patch:
      tags:
        - Agents
      summary: Update an agent
      description: >-
        Changes an agent's name, model, output schema, limits or data toggles;
        omitted fields are left unchanged. Its revisions change through POST
        /agents/{agent_id}/revisions.
      operationId: agents_update
      parameters:
        - description: The agent's id.
          in: path
          name: agent_id
          required: true
          schema:
            description: The agent's id.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Bad Request
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Conflict
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  schemas:
    AgentUpdateRequest:
      additionalProperties: false
      description: Request body for updating an agent. Omitted fields are left unchanged.
      properties:
        accessibility_enabled:
          description: >-
            Use accessibility mode for runs. true needs your organization's
            access to accessibility mode (a 403 whose message starts with
            accessibility_unavailable without it).
          type: boolean
        capture_enabled:
          description: Capture the media runs produce into the file library.
          type: boolean
        max_cost_microdollars:
          description: Most a run's model steps may cost, in microdollars.
          format: int64
          minimum: 1
          type: integer
        max_steps:
          description: Most model steps a run may take.
          format: int64
          maximum: 500
          minimum: 1
          type: integer
        model:
          description: The model instruction runs call, one of GET /models.
          minLength: 1
          type: string
        name:
          description: The agent's new name.
          maxLength: 100
          pattern: ^[A-Za-z0-9_-]+$
          type: string
        output_schema:
          additionalProperties: {}
          description: >-
            The JSON Schema a run's result must satisfy. null clears it, so runs
            take any result.
          type:
            - object
            - 'null'
        pause_timeout_seconds:
          description: Longest a run waits paused for an answer, in seconds, 60 to 3600.
          format: int64
          maximum: 3600
          minimum: 60
          type: integer
        recording_enabled:
          description: Record the screen of runs.
          type: boolean
        telemetry_enabled:
          description: Emit telemetry for runs.
          type: boolean
        timeout_seconds:
          description: Longest a run may take, in seconds, at most 3600.
          format: int64
          maximum: 3600
          minimum: 1
          type: integer
      type: object
    Agent:
      additionalProperties: false
      description: >-
        An agent: a task for a phone, as instructions the agent works through a
        model or as code, with the settings its runs use.
      properties:
        accessibility_enabled:
          description: Runs use accessibility mode, which needs a phone that supports it.
          type: boolean
        capture_enabled:
          description: >-
            Runs capture the media they produce on the phone into the file
            library.
          type: boolean
        created_at:
          description: When the agent was created.
          format: date-time
          type: string
        current_revision_id:
          description: The revision runs of the agent use. Absent until the agent has one.
          format: uuid
          type: string
        id:
          description: The agent's id.
          format: uuid
          type: string
        last_run_at:
          description: When a run of the agent last started.
          format: date-time
          type: string
        max_cost_microdollars:
          description: Most a run's model steps may cost, in microdollars.
          format: int64
          type: integer
        max_steps:
          description: Most model steps a run may take.
          format: int64
          type: integer
        model:
          description: The model an instructions revision's runs call, one of GET /models.
          type: string
        name:
          description: The agent's name, unique within the organization.
          type: string
        output_schema:
          additionalProperties: {}
          description: >-
            The JSON Schema a run's result must satisfy. Absent takes any
            result.
          type: object
        pause_timeout_seconds:
          description: >-
            Longest a run waits paused for an answer, in seconds, before it
            fails with input_timeout. A pause also ends with the session.
          format: int64
          type: integer
        recording_enabled:
          description: Runs record the screen.
          type: boolean
        telemetry_enabled:
          description: Runs emit telemetry, live and stored.
          type: boolean
        timeout_seconds:
          description: Longest a run may take, in seconds, within the one-hour session cap.
          format: int64
          type: integer
        updated_at:
          description: When the agent was last changed.
          format: date-time
          type: string
      required:
        - id
        - name
        - model
        - max_steps
        - max_cost_microdollars
        - timeout_seconds
        - pause_timeout_seconds
        - recording_enabled
        - telemetry_enabled
        - capture_enabled
        - accessibility_enabled
        - created_at
        - updated_at
      type: object
    V2ErrorModel:
      additionalProperties: false
      description: >-
        Error response, following RFC 9457 (Problem Details for HTTP APIs).
        Returned with a application/problem+json content type.
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/V2ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    V2ErrorDetail:
      additionalProperties: false
      description: >-
        One specific problem within an error response, locating the offending
        part of the request.
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    apiKeyAuth:
      description: Customer API key (axl_ prefix).
      in: header
      name: X-Axilio-Api-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.