Skip to content
Navigation

useMyLogins

PUT
/api/v1/agents/{agentId}/login

Make the agent's harness use your account logins. Agent admins only, and only for themselves. Everyone who can prompt the agent then uses your login through it.

Authorization

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

    Authorization: Bearer <token>

Path parameters

  • agentId
    string
    required

Returns

200

The agent.

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

403

Error.
JSON
  • error
    string
    required

404

Error.
JSON
  • error
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close