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

# 更新智能体

<Note>
  注：训练模型设置参考[系统支持模型列表](https://geekai.co/models)
  响应数据和创建智能体一样，略。
  请求示例也和创建智能体差不多，略。
</Note>


## OpenAPI

````yaml openapi.yaml PUT /agent/{uuid}/update
openapi: 3.1.0
info:
  title: GeekAI API Docs
  description: >-
    GeekAI API Specification Document Provides AI capabilities such as chat,
    image generation, speech processing, video generation, ai agents and file
    extract.
  version: 1.0.0
servers:
  - url: https://geekai.dev/api/v1
    description: base URL
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /agent/{uuid}/update:
    put:
      tags:
        - Agent
      summary: Update Agent
      description: Update the information of an existing AI agent
      operationId: updateAgent
      parameters:
        - $ref: '#/components/parameters/UuidParam'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: agent name
                  example: Test Agent
                logo:
                  type: string
                  format: binary
                  description: agent logo image
                desc:
                  type: string
                  description: agent description
                  example: Agent Desc
                model:
                  type: string
                  description: chat model
                  default: deepseek-chat
                  example: deepseek-chat
                chat_level:
                  type: integer
                  description: >-
                    chat level, default is 2, higher temperatures increase
                    creativity, while lower temperatures increase accuracy.
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                  default: 2
                  example: 2
                interneted:
                  type: integer
                  description: enable internet access, 0 means no, 1 means yes
                  enum:
                    - 0
                    - 1
                  default: 0
                  example: 0
                stream:
                  type: integer
                  description: enable stream output, 0 means no, 1 means yes
                  enum:
                    - 0
                    - 1
                  default: 1
                  example: 1
      responses:
        '200':
          description: successful response
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - data
                properties:
                  message:
                    type: string
                    description: response message
                    example: agent updated successfully.
                  data:
                    type: object
                    description: agent data
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          description: upload file too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/StandardError'
components:
  parameters:
    UuidParam:
      name: uuid
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: uuid
      example: 123e4567-e89b-12d3-a456-426614174000
  responses:
    ValidationError:
      description: validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: validation_error
              message:
                type: string
                example: validation error
              details:
                type: object
                additionalProperties:
                  type: string
                example:
                  field: error message
    Unauthorized:
      description: unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: unauthorized
              message:
                type: string
                example: invalid api key or token
    NotFound:
      description: resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: not_found
              message:
                type: string
                example: resource not found
    StandardError:
      description: standard error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: error code
          example: invalid_request
        message:
          type: string
          description: error message
          example: invalid request
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: token
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: api key

````