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

# Update an agent

> Replace provided fields on a personal CREAO agent.



## OpenAPI

````yaml /api-reference/developer-v1.openapi.yaml patch /v1/agents/{agent_id}
openapi: 3.1.0
info:
  title: CREAO Developer API
  version: 1.0.0
  description: |
    Create, update, and run personal CREAO agents from your backend with
    Account API keys. The v1 API uses stable `agent_id`, `conversation_id`, and
    `run_id` identifiers and is served from `developer.creao.ai`.
servers:
  - url: https://developer.creao.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Create, update, and edit personal agents for the authenticated account.
  - name: Runs
    description: Create, stream, fetch, and list Developer API runs.
paths:
  /v1/agents/{agent_id}:
    patch:
      tags:
        - Agents
      summary: Update agent by replacing provided fields
      description: |
        Replace only the provided fields on a personal CREAO agent owned by the
        Account API key owner. Omitted fields are left unchanged. This endpoint
        is deterministic and does not interpret natural-language instructions.
        Team, shared, deleted, or foreign agents return `AGENT_NOT_FOUND`.
      operationId: updateAgent
      parameters:
        - name: agent_id
          in: path
          required: true
          description: Personal CREAO agent to update.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentRequest'
            examples:
              updateInstructions:
                summary: Update instructions
                value:
                  skill_content: >-
                    # Equity Research Agent


                    Build a stock memo with an executive summary, valuation
                    sensitivity, key risks, and citations.
                  release_note: Add valuation sensitivity section.
      responses:
        '200':
          description: Agent updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          $ref: '#/components/responses/InvalidInput'
        '401':
          $ref: '#/components/responses/AuthenticationRequired'
        '404':
          description: >-
            Agent not found for this account or not writable through Developer
            API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                agentNotFound:
                  value:
                    error: AGENT_NOT_FOUND
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    UpdateAgentRequest:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
        description:
          oneOf:
            - type: string
            - type: 'null'
        version:
          type: string
        skill_content:
          type: string
          maxLength: 262144
          description: >-
            Replacement Markdown skill definition. UTF-8 content must be 256 KB
            or smaller.
        config_content:
          type: string
          maxLength: 131072
          description: >-
            Replacement app config YAML. If `config` is also supplied, `config`
            wins for parsed config.
        config:
          type: object
          additionalProperties: true
        dashboard_template:
          oneOf:
            - $ref: '#/components/schemas/DashboardTemplate'
            - type: 'null'
          description: Replace or clear the dashboard template.
        write_autonomy:
          $ref: '#/components/schemas/WriteAutonomy'
        release_note:
          oneOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          description: Optional changelog note for the update.
    Agent:
      type: object
      required:
        - agent_id
        - name
        - description
        - version
        - status
        - write_autonomy
        - created_at
        - updated_at
      properties:
        agent_id:
          type: string
          format: uuid
          description: Personal CREAO agent ID.
        name:
          type: string
        description:
          oneOf:
            - type: string
            - type: 'null'
        version:
          type: string
        status:
          type: string
          description: Current agent status. Created agents return `active`.
        write_autonomy:
          $ref: '#/components/schemas/WriteAutonomy'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      additionalProperties: true
      required:
        - error
      properties:
        error:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
          description: Debug message. Do not rely on this field in production clients.
        available:
          type: number
          description: Available credits, when returned for credit errors.
        required:
          type: number
          description: Required credits, when returned for credit errors.
        retryAfterSeconds:
          type: integer
          description: Retry delay, when returned for hourly cap errors.
    DashboardTemplate:
      type: object
      additionalProperties: true
      description: >-
        JSON-render dashboard template. Serialized JSON must be 512 KB or
        smaller.
    WriteAutonomy:
      type: string
      enum:
        - full_auto
        - approval_required
        - blocked
      description: External write autonomy for guarded connector actions.
  responses:
    InvalidInput:
      description: Invalid request shape, invalid UUID, or unsupported status filter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidInput:
              value:
                error: INVALID_INPUT
    AuthenticationRequired:
      description: Missing, malformed, revoked, or unknown Account API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingKey:
              value:
                error: AUTHENTICATION_REQUIRED
    RateLimited:
      description: Account-level or IP-level rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                error: RATE_LIMITED
    ServiceUnavailable:
      description: Agent execution service was unavailable before the run was accepted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unavailable:
              value:
                error: SERVICE_UNAVAILABLE
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cr_sk
      description: Account API key from Developer Console. Keys start with `cr_sk_`.
      x-default: cr_sk_your_key_here

````