> ## 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.

# Create a session

> Create a session for a task. Provide the initial prompt in description and optionally configure its repositories, agent, and Build (normal) or Plan (planning) mode. New sessions are private to their creator until shared through grants.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public post /v1/sessions
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:
    post:
      tags:
        - Sessions
      summary: Create a session
      description: >-
        Create a session for a task. Provide the initial prompt in description
        and optionally configure its repositories, agent, and Build (normal) or
        Plan (planning) mode. New sessions are private to their creator until
        shared through grants.
      operationId: createSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent:
                  description: >-
                    Agent and model key to run, such as
                    claudeCode:claude-fable-5-1. Omit to use the default.
                  type: string
                  minLength: 1
                  maxLength: 500
                baseBranch:
                  description: >-
                    Git branch to start work from. Omit or use null for the
                    repository default.
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 500
                    - type: 'null'
                mcpServers:
                  default: []
                  description: MCP server or connection IDs to enable for the session.
                  maxItems: 100
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 500
                projectId:
                  description: >-
                    Project environment to use for the workspace. Omit or use
                    null for the default.
                  type:
                    - string
                    - 'null'
                sandboxSize:
                  description: VM size for the session workspace.
                  type: string
                  enum:
                    - nano
                    - micro
                    - medium
                    - large
                    - xl
                    - xxl
                    - ultra
                targetBranch:
                  description: >-
                    Default target branch for pull requests created by the
                    session.
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 500
                    - type: 'null'
                agentOptions:
                  $ref: '#/components/schemas/AgentOptions'
                  description: Agent-specific runtime options, such as reasoning effort.
                branchName:
                  description: >-
                    Git branch for this session. Omit or use null to generate a
                    branch name.
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 500
                    - type: 'null'
                codeRepositoryIds:
                  description: Repository IDs to make available in the session workspace.
                  maxItems: 100
                  type: array
                  items:
                    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)$
                description:
                  type: string
                  minLength: 1
                  maxLength: 1000000
                  description: Initial task or prompt for the session.
                id:
                  description: Optional caller-supplied session UUID. Omit to generate one.
                  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)$
                richContent:
                  $ref: '#/components/schemas/SessionTipTapDocument'
                  description: >-
                    Optional rich-text representation of the initial task.
                    Provide description separately.
                pullRequestId:
                  description: >-
                    Pull request to associate with the session. Requires
                    richContent.
                  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)$
                queueRightAway:
                  description: >-
                    Whether to queue the initial task immediately instead of
                    only creating the session.
                  type: boolean
                automaticSizing:
                  description: >-
                    Size the VM automatically. Sessions are sized automatically
                    by default, and project sessions always are.
                  type: boolean
                sessionMode:
                  description: Whether to create a chat session or a terminal session.
                  type: string
                  enum:
                    - chat
                    - terminal
                startupAgent:
                  description: Coding agent to start in a terminal session.
                  type: string
                  enum:
                    - claudeCode
                    - codex
                    - opencode
                    - pi
                    - amp
                    - cursor
                visibility:
                  description: >-
                    Who starts with access: private, or shared with the
                    workspace (public). Defaults by session source; change it
                    later by sharing.
                  type: string
                  enum:
                    - private
                    - public
                teamId:
                  description: >-
                    Also share the new session with this team, in the same
                    transaction that creates it.
                  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:
                - description
              additionalProperties: false
              example:
                description: Fix the authentication bug in the login component
                projectId: your-project-id
                agent: claudeCode:claude-fable-5-1
                codeRepositoryIds:
                  - 123e4567-e89b-12d3-a456-426614174000
                baseBranch: main
                targetBranch: main
                visibility: private
                mcpServers: []
      responses:
        '201':
          description: Create 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.create({
              description: 'Fix the authentication bug in the login component',
              projectId: 'your-project-id',
              agent: 'claudeCode:claude-fable-5-1',
              codeRepositoryIds: ['123e4567-e89b-12d3-a456-426614174000'],
              baseBranch: 'main',
              targetBranch: 'main',
              visibility: 'private',
              mcpServers: [],
            });
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client
                .sessions()
                .create(
                    SessionsCreateBody::new("Fix the authentication bug in the login component".to_string())
                        .with_agent("claudeCode:claude-fable-5-1".to_string())
                        .with_base_branch("main".to_string())
                        .with_mcp_servers(vec![])
                        .with_project_id("your-project-id".to_string())
                        .with_target_branch("main".to_string())
                        .with_code_repository_ids(vec!["123e4567-e89b-12d3-a456-426614174000".to_string()])
                        .with_visibility(SessionsCreateBodyVisibility::Private),
                )
                .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.