> ## 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 agent settings

> Change a personal CREAO agent's write autonomy and default model.



## OpenAPI

````yaml /developer-api/developer-v1.openapi.yaml patch /v1/agents/{agent_id}
openapi: 3.1.0
info:
  title: CREAO CLI
  version: 1.0.0
  description: |
    Create, update, and run personal CREAO agents from your backend through
    CREAO CLI 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: []
  - apiKeyQuery: []
tags:
  - name: Agents
    description: >-
      Create, list, get, update, and edit personal agents for the authenticated
      account.
  - name: Agent Memory
    description: >-
      Read, overwrite, and clear long-term memory (playbooks) for a personal
      agent.
  - name: Agent Files
    description: List, download, and delete files in a personal agent's skill file space.
  - name: Product Profile
    description: Once-per-account Super Agent persona and brand context.
  - name: Agent Runs
    description: >-
      Create, stream, fetch, and list runs for created personal agents. Super
      Agent rows are excluded. `usage.models` is present only for Super
      Agent–allowlisted accounts.
  - name: Super Agent
    description: >-
      Chat with CREAO Super Agent from your backend. Same public NDJSON render
      protocol as Agent Runs. Requires an allowlisted account. `usage.models` is
      present only for Super Agent–allowlisted accounts.
  - name: Account
    description: Read the calling account's platform-wallet balance and CREAO CLI spend.
  - name: Workspaces
    description: Create and list personal workspaces, and add or remove personal agents.
  - name: Workspace Files
    description: Upload, list, download, and delete files in a personal workspace.
  - name: Secrets
    description: Add, update, and list account secret keys. Values are write-only.
  - name: Skills
    description: Install, list, and enable account-level Agent Brain skills.
  - name: Rooms
    description: >-
      Read team rooms, post messages as the key's owner, and stream room events.
      The key acts as its owner.
paths:
  /v1/agents/{agent_id}:
    patch:
      tags:
        - Agents
      summary: Update agent settings
      description: >
        Change settings that are not part of a saved version: `write_autonomy`,

        `default_model_id` and `default_thinking_level`. Omitted fields are left

        unchanged. Team, shared, deleted, or foreign agents return

        `AGENT_NOT_FOUND`.


        The agent's content (name, description, version, `SKILL.md`, config,

        dashboard and files) changes only with [Replace an
        agent](/developer-api/agents/replace-agent),

        which saves a version. Sending a content field here returns

        `AGENT_CONTENT_UPDATE_REQUIRES_VERSION`.


        `default_model_id` and `default_thinking_level` set the model and

        thinking level the agent runs with when a run omits `model`. They are

        the same setting as the agent's default model in the CREAO app.
      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:
              setDefaultModel:
                summary: Set the default model and thinking level
                value:
                  default_model_id: anthropic/claude-sonnet-5-5
                  default_thinking_level: high
      responses:
        '200':
          description: Agent updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: |
            Invalid request. `INVALID_INPUT` for a malformed body,
            `AGENT_CONTENT_UPDATE_REQUIRES_VERSION` for a content field that
            only Replace an agent may change,
            `MODEL_NOT_SUPPORTED` for a `default_model_id` CREAO does not offer,
            `AGENT_THINKING_NOT_APPLICABLE` for a `default_thinking_level` sent
            without `default_model_id` while the agent's model is chosen
            automatically, and `AGENT_MODEL_NOT_APPLICABLE` for a workflow
            agent, which picks models per task.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidInput:
                  value:
                    error: INVALID_INPUT
                modelNotSupported:
                  value:
                    error: MODEL_NOT_SUPPORTED
                thinkingNotApplicable:
                  value:
                    error: AGENT_THINKING_NOT_APPLICABLE
        '401':
          $ref: '#/components/responses/AuthenticationRequired'
        '403':
          description: >-
            The account's plan or model access does not include
            `default_model_id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                modelNotAllowed:
                  value:
                    error: MODEL_NOT_ALLOWED
        '404':
          description: Agent not found for this account or not writable through CREAO CLI.
          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:
        write_autonomy:
          $ref: '#/components/schemas/WriteAutonomy'
        default_model_id:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            Model the agent runs with when a run omits `model` (for example,
            `anthropic/claude-sonnet-5-5`). Accepts any model offered in the
            CREAO app's model picker, including models not listed on
            https://agent.docs.creao.ai/developer-api/supported-models. Setting
            it pins this exact model, replacing automatic model selection.
            Changing the model without also sending `default_thinking_level`
            clears the saved thinking level. Unknown ids return 400
            `MODEL_NOT_SUPPORTED`; models not available on your plan return 403
            `MODEL_NOT_ALLOWED`.
        default_thinking_level:
          oneOf:
            - $ref: '#/components/schemas/ThinkingLevel'
            - type: 'null'
          description: >-
            Thinking level for the agent's default model. `null` clears it so
            the model's own default applies. Requires a pinned model: when the
            agent's model is chosen automatically, send `default_model_id` in
            the same request or the update returns 400
            `AGENT_THINKING_NOT_APPLICABLE`.
    Agent:
      type: object
      required:
        - agent_id
        - name
        - description
        - version
        - status
        - write_autonomy
        - default_model_id
        - default_thinking_level
        - 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'
        default_model_id:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Model the agent runs with when a run omits `model`. `null` means
            CREAO chooses the model automatically.
        default_thinking_level:
          oneOf:
            - $ref: '#/components/schemas/ThinkingLevel'
            - type: 'null'
          description: >-
            Thinking level saved for `default_model_id`. `null` means the
            model's own default.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        skill_content:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Full SKILL.md. Present on GET-by-id and PATCH. Omitted from list
            responses.
        config_content:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Raw config YAML. Present on GET-by-id and PATCH. Omitted from list
            responses.
        config:
          oneOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Parsed config object. Present on GET-by-id and PATCH. Omitted from
            list responses.
        dashboard_template:
          oneOf:
            - $ref: '#/components/schemas/DashboardTemplate'
            - type: 'null'
          description: >-
            Dashboard template. Present on GET-by-id and PATCH. Omitted from
            list responses.
        latest_version:
          oneOf:
            - $ref: '#/components/schemas/AgentLatestVersion'
            - type: 'null'
          description: >-
            The agent's highest saved version, the floor for the next Replace an
            agent. Present on GET-by-id, create from a bundle and replace;
            `null` until the agent has a saved version.
        files:
          type: array
          items:
            $ref: '#/components/schemas/AgentFileEntry'
          description: >-
            The agent's file space, up to 50 files. Present on GET-by-id only.
            Omitted from list and PATCH responses.
    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.
        reason:
          type: string
          description: >-
            A readable explanation on `400` and `409` room and agent bundle
            errors. Do not branch on it.
        latest_version:
          type: string
          description: The agent's latest saved version, on `AGENT_VERSION_NOT_INCREASED`.
        candidates:
          type: array
          description: >-
            Members a `ROOM_MENTION_AMBIGUOUS` name matches. Resend with one of
            their ids in `mentions` to pick it.
          items:
            type: object
            properties:
              member_id:
                type: string
                format: uuid
              kind:
                type: string
                enum:
                  - user
                  - agent
              name:
                oneOf:
                  - type: string
                  - type: 'null'
    WriteAutonomy:
      type: string
      enum:
        - full_auto
        - approval_required
        - blocked
      description: >-
        External write autonomy for guarded connector actions (write and delete
        actions in connected services). full_auto performs them immediately. A
        run started through /v1 cannot collect an approval, so on those runs
        approval_required and blocked both leave the action unperformed; the run
        still completes and the agent is told why. In the browser app,
        approval_required waits for your approval. Reads always run.
    ThinkingLevel:
      type: string
      enum:
        - low
        - medium
        - high
        - xhigh
        - max
      description: >-
        How much the model reasons before answering. Higher levels can improve
        hard tasks at the cost of latency and credits.
    DashboardTemplate:
      type: object
      additionalProperties: true
      description: >-
        JSON-render dashboard template. Serialized JSON must be 512 KB or
        smaller.
    AgentLatestVersion:
      type: object
      required:
        - version_id
        - version
        - created_at
      properties:
        version_id:
          type: string
          format: uuid
        version:
          type: string
          description: >-
            The highest version the agent has saved. A replace must send a
            greater one.
        created_at:
          type: string
          format: date-time
    AgentFileEntry:
      allOf:
        - $ref: '#/components/schemas/AgentFileDownload'
        - type: object
          required:
            - content
          properties:
            content:
              oneOf:
                - type: string
                - type: 'null'
              description: |
                UTF-8 text of the file when the request passed
                `include=file_content` and the file is a text or code file up
                to 256 KB that fits the 2 MB response budget. Otherwise null;
                use `download_url`.
    AgentFileDownload:
      allOf:
        - $ref: '#/components/schemas/AgentFile'
        - type: object
          required:
            - download_url
            - download_url_expires_at
          properties:
            download_url:
              type: string
              format: uri
              description: Presigned download URL (expires in 1 hour).
            download_url_expires_at:
              type: string
              format: date-time
    AgentFile:
      type: object
      required:
        - id
        - name
        - mime_type
        - size_bytes
        - sha256
        - created_at
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        mime_type:
          type: string
        size_bytes:
          oneOf:
            - type: integer
            - type: 'null'
        sha256:
          oneOf:
            - type: string
            - type: 'null'
        created_at:
          type: string
          format: date-time
  responses:
    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
    apiKeyQuery:
      type: apiKey
      in: query
      name: creao-api-key
      description: |
        Account API key passed as a query parameter, for platforms that cannot
        set a custom Authorization header. The bearerAuth header takes
        precedence when both are present.
      x-default: cr_sk_your_key_here

````

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