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

# Update Agent

> Update an existing agent by its ID.



## OpenAPI

````yaml PUT /agent/{id}
openapi: 3.0.1
info:
  title: Machina Sports SDK
  description: >-
    Machina Sports API for seamless AI integration in sports, offering real-time
    insights, personalized content, and fan sentiment analysis.
  version: '1.0'
  termsOfService: http://machina.gg/tos/
  contact:
    email: support@machina.gg
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{api-address}.org.machina.gg
    description: Production server
    variables:
      api-address:
        default: https://api.machina.gg
        description: Your api-address
  - url: http://local.machina:5001
    description: Local development server
security:
  - ApiToken: []
paths:
  /agent/{id}:
    put:
      tags:
        - agents
      summary: Update Agent
      description: Update an existing agent by its ID.
      operationId: updateAgent
      parameters:
        - name: id
          in: path
          required: true
          description: Unique ID of the agent to update
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Updated display title of the agent
                description:
                  type: string
                  description: Updated description of the agent's purpose
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                  description: Updated status of the agent
                context:
                  type: object
                  description: Updated configuration settings for the agent
                workflows:
                  type: array
                  description: Updated list of workflows associated with the agent
      responses:
        '200':
          description: Agent updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message
                    example: agent updated
                  status:
                    type: boolean
                    description: Operation status
                    example: true
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized
        '404':
          description: Agent not found
components:
  securitySchemes:
    ApiToken:
      type: apiKey
      name: x-api-token
      in: header
      description: API key authentication

````