Skip to content
Navigation

updateAgent

PATCH
/api/v1/agents/{agentId}

Image and resource changes take effect after a rebuild (see needsRebuild).

Authorization

  • session
    optional
    API key in cookie
  • token
    optional
    HTTP Bearer

    Authorization: Bearer <token>

Path parameters

  • agentId
    string
    required

Request body JSON required

  • name
    optional
    string
    maxLength: 100 · minLength: 1
  • image
    optional
    string
  • cpus
    optional
    number
  • memoryMb
    optional
    integer
    format: int64
  • idleMinutes
    optional
    integer
    maximum: 10080 · minimum: 1
  • harness
    optional
    string

    Harness id (see /harnesses). Default claude-code.

  • model
    optional
    string
  • permissionPolicy
    optional
    auto-approve
    or
    ask

Returns

200

Updated.

JSON
  • id
    string
    required
  • workspaceId
    string
    required
  • name
    string
    required
  • owner
    object
    required
    • id
      string
      required
    • email
      string
      required
    • name
      string
      required
    • avatarUrl
      string
      required
  • image
    string
    required
  • harness
    string
    required
  • cpus
    number
    required
  • memoryMb
    integer
    required
    format: int64
  • idleMinutes
    integer
    required
  • state
    string
    ·
    one of 8 values
    required
    Allowed values: creating, starting, running, stopping, sleeping, rebuilding, destroying, error
  • stateError
    string
    required
  • stateChangedAt
    string
    required
    format: date-time
  • needsRebuild
    boolean
    required

    Image or resources changed since the sandbox was built.

  • model
    string
    required
  • permissionPolicy
    auto-approve
    or
    ask
    required
  • credentialsInSandbox
    boolean
    required

    A harness login was completed inside the sandbox; the agent can read its own credentials.

  • login
    object
    required

    Which login the agent's harness uses.

    • source
      account
      or
      secret
      or
      sandbox
      or
      unsupported
      required

      account: the account login of user. secret: an API key secret attached to the agent wins. sandbox: whatever is signed in inside the sandbox. unsupported: the harness has no account logins.

    • mine
      boolean
      required

      You are that user.

    • connected
      boolean
      required

      That user has connected a login for the agent's harness.

    • user
      optional
      object

      Whose account logins the agent uses.

      • id
        string
        required
      • email
        string
        required
      • name
        string
        required
      • avatarUrl
        string
        required
    • kind
      optional
      string

      How that login was connected.

    • status
      optional
      ok
      or
      error
    • reason
      optional
      string

      Why the account login is not used although a user is set.

  • role
    viewer
    or
    operator
    or
    admin
    required
  • createdAt
    string
    required
    format: date-time
  • updatedAt
    string
    required
    format: date-time
  • lastActivityAt
    optional
    string

    Last activity while running (prompts, terminals, files, CPU use in the sandbox).

    format: date-time
  • sleepsAt
    optional
    string

    When the agent goes to sleep if nothing happens. Absent while busy or not running.

    format: date-time

400

Error.
JSON
  • error
    string
    required

403

Error.
JSON
  • error
    string
    required

404

Error.
JSON
  • error
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close