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

# Update a session

> Update a session: archive or restore it, set priority, rename it, change agent/model, switch between Build (normal) and Plan (planning) modes, or configure its workspace and branches. Share it through its sharing subresource; the deprecated visibility field remains for older clients. Archiving uses level=0; restoring archived sessions uses level=1 and does not restart work. Use pins to pin or unpin sessions. Submit memoryMb alone to request asynchronous memory growth for a running adaptive sandbox within project limits; sandbox metrics report progress.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public patch /v1/sessions/{sessionId}
openapi: 3.1.0
info:
  title: Tembo Public API
  description: >-
    Manage agents, sessions, repositories, and organization resources with the
    Tembo API.
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/sessions/{sessionId}:
    patch:
      tags:
        - Sessions
      summary: Update a session
      description: >-
        Update a session: archive or restore it, set priority, rename it, change
        agent/model, switch between Build (normal) and Plan (planning) modes, or
        configure its workspace and branches. Share it through its sharing
        subresource; the deprecated visibility field remains for older clients.
        Archiving uses level=0; restoring archived sessions uses level=1 and
        does not restart work. Use pins to pin or unpin sessions. Submit
        memoryMb alone to request asynchronous memory growth for a running
        adaptive sandbox within project limits; sandbox metrics report progress.
      operationId: updateSession
      parameters:
        - in: path
          name: sessionId
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                visibility:
                  description: >-
                    Deprecated, kept until older clients update; share the
                    session instead. `public` shares it with the workspace;
                    `private` removes every share so only the creator reaches
                    it. Only the session creator can change it.
                  deprecated: true
                  type: string
                  enum:
                    - private
                    - public
                memoryMb:
                  description: >-
                    Request in-place memory growth for a running adaptive
                    sandbox, within project limits. Submit separately from other
                    session changes. Returns the session while the resize runs
                    asynchronously; sandbox metrics report its progress.
                  type: integer
                  minimum: 1024
                  maximum: 131072
                  multipleOf: 1024
                agent:
                  description: >-
                    Change the agent and model key. Null clears the session
                    override.
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 500
                    - type: 'null'
                agentOptions:
                  $ref: '#/components/schemas/AgentOptions'
                  description: >-
                    Change agent-specific runtime options, such as reasoning
                    effort.
                baseBranch:
                  description: >-
                    Change the starting Git branch. Null clears the session
                    override.
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 500
                    - type: 'null'
                branchName:
                  description: >-
                    Change the session Git branch name. Null clears the stored
                    name.
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 500
                    - type: 'null'
                description:
                  description: >-
                    Replace the initial task prompt; only the session creator
                    can change it. Use createMessage to send a follow-up task.
                  type: string
                  minLength: 1
                  maxLength: 1000000
                richContent:
                  description: >-
                    Replace the initial prompt rich-text document, or null to
                    clear it. Only the session creator can change it.
                  anyOf:
                    - $ref: '#/components/schemas/SessionTipTapDocument'
                    - type: 'null'
                level:
                  description: >-
                    Archive or restore the session and set its priority: 0
                    archives and stops its VM; 1 restores without restarting
                    work; 2–100 also keep it unarchived and set its priority
                    level. Omit to preserve the current level.
                  type: integer
                  minimum: 0
                  maximum: 100
                mcpServers:
                  description: >-
                    Replace the enabled MCP server or connection IDs. An empty
                    array clears the selection.
                  maxItems: 100
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 500
                mode:
                  description: Switch between Build (normal) and Plan (planning) modes.
                  type: string
                  enum:
                    - normal
                    - planning
                projectId:
                  description: >-
                    Change the project environment used for the workspace. Null
                    clears the session override.
                  type:
                    - string
                    - 'null'
                sandboxSize:
                  description: >-
                    Change the workspace VM size. Null clears the session
                    override.
                  anyOf:
                    - type: string
                      enum:
                        - nano
                        - micro
                        - medium
                        - large
                        - xl
                        - xxl
                        - ultra
                    - type: 'null'
                targetBranch:
                  description: >-
                    Change the default pull request target branch. Null clears
                    the session override.
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 500
                    - type: 'null'
                title:
                  description: Rename the session.
                  type: string
                  minLength: 1
                  maxLength: 1000
              additionalProperties: false
              minProperties: 1
      responses:
        '200':
          description: Update a session
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent:
                    type:
                      - string
                      - 'null'
                  agentId:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  artifactType:
                    anyOf:
                      - type: string
                        enum:
                          - PullRequest
                          - ToolCall
                          - Plan
                          - Response
                          - File
                          - Service
                          - Source
                      - type: 'null'
                  baseBranch:
                    type:
                      - string
                      - 'null'
                  branchName:
                    type:
                      - string
                      - 'null'
                  createdAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  externalId:
                    type:
                      - string
                      - 'null'
                  externalUrl:
                    type:
                      - string
                      - 'null'
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  kind:
                    type: string
                  lastQueuedAt:
                    anyOf:
                      - type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                      - type: 'null'
                  lastSeenAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  level:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  mode:
                    default: normal
                    type: string
                    enum:
                      - normal
                      - planning
                  parentSessionId:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                    description: The session whose agent created this session.
                  projectId:
                    type:
                      - string
                      - 'null'
                  sandboxSize:
                    anyOf:
                      - type: string
                        enum:
                          - nano
                          - micro
                          - small
                          - medium
                          - large
                          - xl
                          - xxl
                          - ultra
                      - type: 'null'
                  sessionType:
                    default: Chat
                    type: string
                    enum:
                      - Chat
                      - Terminal
                  targetBranch:
                    type:
                      - string
                      - 'null'
                  title:
                    type: string
                  updatedAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  visibility:
                    type: string
                    enum:
                      - private
                      - public
                    description: >-
                      Deprecated: `private` when shared with no one, `public`
                      when shared with anyone. List the session’s shares for its
                      exact audiences.
                    deprecated: true
                  artifacts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        type:
                          type: string
                          enum:
                            - PullRequest
                            - ToolCall
                            - Plan
                            - Response
                            - File
                            - Service
                            - Source
                        createdAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                        updatedAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                        pullRequests:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              url:
                                type: string
                                format: uri
                              title:
                                type:
                                  - string
                                  - 'null'
                              status:
                                type: string
                                enum:
                                  - open
                                  - merged
                                  - closed
                              isDraft:
                                type: boolean
                              sourceBranch:
                                type:
                                  - string
                                  - 'null'
                              createdAt:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                              agent:
                                type:
                                  - string
                                  - 'null'
                              diff:
                                anyOf:
                                  - type: object
                                    properties:
                                      additions:
                                        type: integer
                                        minimum: 0
                                        maximum: 9007199254740991
                                      deletions:
                                        type: integer
                                        minimum: 0
                                        maximum: 9007199254740991
                                      data:
                                        type: string
                                        maxLength: 1000000
                                    additionalProperties: false
                                  - type: 'null'
                              updatedAt:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                              baseBranch:
                                anyOf:
                                  - type: string
                                    maxLength: 500
                                  - type: 'null'
                              headSha:
                                anyOf:
                                  - type: string
                                    maxLength: 200
                                  - type: 'null'
                              author:
                                anyOf:
                                  - type: object
                                    properties:
                                      avatarUrl:
                                        anyOf:
                                          - type: string
                                            format: uri
                                          - type: 'null'
                                      login:
                                        anyOf:
                                          - type: string
                                            maxLength: 500
                                          - type: 'null'
                                    required:
                                      - avatarUrl
                                      - login
                                    additionalProperties: false
                                  - type: 'null'
                              codeRepository:
                                anyOf:
                                  - type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                        pattern: >-
                                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                      name:
                                        type: string
                                      owner:
                                        type:
                                          - string
                                          - 'null'
                                      baseBranch:
                                        type:
                                          - string
                                          - 'null'
                                      provider:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - owner
                                      - baseBranch
                                      - provider
                                    additionalProperties: false
                                  - type: 'null'
                            required:
                              - id
                              - url
                              - title
                              - status
                              - isDraft
                              - sourceBranch
                              - createdAt
                              - agent
                              - diff
                              - updatedAt
                              - baseBranch
                              - headSha
                              - author
                              - codeRepository
                            additionalProperties: false
                      required:
                        - id
                        - type
                        - createdAt
                        - updatedAt
                        - pullRequests
                      additionalProperties: false
                  automaticSizing:
                    type: boolean
                    description: Whether the session VM is sized automatically.
                  description:
                    type:
                      - string
                      - 'null'
                  diffSummary:
                    anyOf:
                      - type: object
                        properties:
                          additions:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          deletions:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                        required:
                          - additions
                          - deletions
                        additionalProperties: false
                      - type: 'null'
                  folderId:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                    description: >-
                      Sidebar folder the authenticated user filed this session
                      in.
                  htmlUrl:
                    type: string
                    format: uri
                  isPinned:
                    type: boolean
                  project:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          name:
                            type: string
                          icon:
                            type: string
                            enum:
                              - folder
                              - code
                              - terminal
                              - book
                              - brain
                              - bug
                              - building
                              - cloud
                              - globe
                              - idea
                              - tools
                              - magic
                              - processor
                              - sandbox
                              - server
                              - tasks
                              - tactics
                              - images
                              - database
                              - api
                              - mobile
                              - package
                          color:
                            type: string
                            enum:
                              - neutral
                              - red
                              - orange
                              - yellow
                              - green
                              - teal
                              - blue
                              - purple
                              - pink
                        required:
                          - id
                          - name
                          - icon
                          - color
                        additionalProperties: false
                      - type: 'null'
                  sessionSource:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      name:
                        type: string
                      type:
                        type: string
                      repositories:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            name:
                              type: string
                            provider:
                              type: string
                          required:
                            - id
                            - name
                            - provider
                          additionalProperties: false
                    required:
                      - id
                      - name
                      - type
                      - repositories
                    additionalProperties: false
                  sourcePullRequest:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          url:
                            type: string
                            format: uri
                          title:
                            type:
                              - string
                              - 'null'
                          status:
                            type: string
                            enum:
                              - open
                              - merged
                              - closed
                          isDraft:
                            type: boolean
                        required:
                          - id
                          - url
                          - title
                          - status
                          - isDraft
                        additionalProperties: false
                      - type: 'null'
                  state:
                    type: object
                    properties:
                      current:
                        type: string
                        enum:
                          - inProgress
                          - queued
                          - completed
                          - failed
                          - cancelled
                      isQueued:
                        type: boolean
                      isCancelled:
                        type: boolean
                      isCompleted:
                        type: boolean
                      isFailed:
                        type: boolean
                      inProgress:
                        type: boolean
                    required:
                      - isQueued
                      - isCancelled
                      - isCompleted
                      - isFailed
                      - inProgress
                    additionalProperties: false
                required:
                  - agent
                  - agentId
                  - artifactType
                  - baseBranch
                  - branchName
                  - createdAt
                  - externalId
                  - externalUrl
                  - id
                  - kind
                  - lastQueuedAt
                  - lastSeenAt
                  - level
                  - mode
                  - parentSessionId
                  - projectId
                  - sandboxSize
                  - sessionType
                  - targetBranch
                  - title
                  - updatedAt
                  - visibility
                  - artifacts
                  - automaticSizing
                  - description
                  - diffSummary
                  - folderId
                  - htmlUrl
                  - isPinned
                  - project
                  - sessionSource
                  - sourcePullRequest
                  - state
                additionalProperties: false
        '400':
          description: >-
            Invalid request or missing required organization or user
            information.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: The session is private
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: The caller is not permitted to perform this operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Session resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Session operation conflicts with existing data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Session operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '502':
          description: Session runtime or provider operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: >
            import Tembo from '@tembo-io/sdk';


            const client = new Tembo();


            const session = await
            client.sessions.update('7c9e6679-7425-40de-944b-e07fc1f90ae7', {});
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client
                .sessions()
                .update("7c9e6679-7425-40de-944b-e07fc1f90ae7", SessionsUpdateBody::new())
                .send()
                .await?;
components:
  schemas:
    AgentOptions:
      type: object
      properties:
        reasoningLevel:
          type: string
          minLength: 1
          maxLength: 100
        mode:
          description: >-
            Use Build (normal) to execute work or Plan (planning) to plan before
            writing code.
          type: string
          enum:
            - normal
            - planning
        speed:
          description: Preferred execution speed when supported by the selected runtime.
          type: string
          enum:
            - normal
            - fast
            - ultrafast
        goal:
          type: object
          properties:
            enabled:
              type: boolean
            objective:
              type: string
              maxLength: 100000
          additionalProperties: false
        ultracode:
          description: >-
            Whether the agent orchestrates multi-agent workflows for every task
            when supported by the selected runtime and model.
          type: boolean
      additionalProperties: false
    SessionTipTapDocument:
      allOf:
        - $ref: '#/components/schemas/SessionDocumentNode'
        - $ref: '#/components/schemas/TipTapDocument'
    SessionDocumentNode:
      type: object
      properties:
        type:
          type: string
          minLength: 1
          maxLength: 100
        text:
          type: string
          maxLength: 1000000
        attrs:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        marks:
          maxItems: 1000
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                minLength: 1
                maxLength: 100
              attrs:
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
            required:
              - type
            additionalProperties: false
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/SessionDocumentNode'
      additionalProperties: false
    TipTapDocument:
      anyOf:
        - $ref: '#/components/schemas/TipTapNode'
        - $ref: '#/components/schemas/CustomDocument'
      description: >-
        Rich-text document containing text, formatting, images, and mentions. A
        document typically has a "doc" root with nested content nodes.
      example:
        type: doc
        content:
          - type: paragraph
            content:
              - type: text
                text: Hello
    TipTapNode:
      anyOf:
        - oneOf:
            - $ref: '#/components/schemas/TipTapImageNode'
            - $ref: '#/components/schemas/TipTapMentionNode'
            - $ref: '#/components/schemas/TipTapHeadingNode'
            - $ref: '#/components/schemas/TipTapOrderedListNode'
            - $ref: '#/components/schemas/TipTapTaskItemNode'
            - $ref: '#/components/schemas/TipTapCodeBlockNode'
        - $ref: '#/components/schemas/TipTapContentNode'
    CustomDocument:
      type: object
      additionalProperties: {}
      description: Rich-text content with custom document properties and node attributes.
    TipTapImageNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: image
        attrs:
          $ref: '#/components/schemas/TipTapImageAttributes'
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapMentionNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: mention
        attrs:
          $ref: '#/components/schemas/TipTapMentionAttributes'
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapHeadingNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: heading
        attrs:
          type: object
          properties:
            level:
              type: integer
              minimum: 1
              maximum: 6
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapOrderedListNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: orderedList
        attrs:
          type: object
          properties:
            start:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            type:
              type:
                - string
                - 'null'
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapTaskItemNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: taskItem
        attrs:
          type: object
          properties:
            checked:
              type: boolean
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapCodeBlockNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: codeBlock
        attrs:
          type: object
          properties:
            language:
              type:
                - string
                - 'null'
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapContentNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          minLength: 1
          maxLength: 100
          not:
            enum:
              - image
              - mention
              - heading
              - orderedList
              - taskItem
              - codeBlock
        attrs:
          $ref: '#/components/schemas/TipTapExtensionAttributes'
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      additionalProperties: {}
    TipTapLinkMark:
      type: object
      properties:
        type:
          type: string
          const: link
        attrs:
          type: object
          properties:
            href:
              type:
                - string
                - 'null'
            target:
              type:
                - string
                - 'null'
            rel:
              type:
                - string
                - 'null'
            class:
              type:
                - string
                - 'null'
            title:
              type:
                - string
                - 'null'
          additionalProperties: {}
      required:
        - type
      additionalProperties: {}
    TipTapMark:
      type: object
      properties:
        type:
          type: string
          minLength: 1
          maxLength: 100
          not:
            enum:
              - link
        attrs:
          $ref: '#/components/schemas/TipTapExtensionAttributes'
      required:
        - type
      additionalProperties: {}
    TipTapImageAttributes:
      type: object
      properties:
        src:
          type:
            - string
            - 'null'
        alt:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        width:
          type:
            - string
            - 'null'
        data-uploading:
          type:
            - string
            - 'null'
        data-placeholder-id:
          type:
            - string
            - 'null'
        upload-progress:
          type:
            - string
            - 'null'
      additionalProperties: {}
    TipTapMentionAttributes:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
        label:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
        mentionSuggestionChar:
          type:
            - string
            - 'null'
        metadata:
          anyOf:
            - type: object
              properties:
                integrationType:
                  type: string
                codeRepositoryId:
                  type: string
                isHeader:
                  type: boolean
                argumentHint:
                  type: string
                commandName:
                  type: string
                source:
                  type: string
              additionalProperties: {}
            - type: 'null'
      additionalProperties: {}
    TipTapExtensionAttributes:
      type: object
      propertyNames:
        type: string
      additionalProperties: {}
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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