> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Select session

> Navigate the TUI to display the specified session.



## OpenAPI

````yaml /openapi.json post /tui/select-session
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /tui/select-session:
    post:
      summary: Select session
      description: Navigate the TUI to display the specified session.
      operationId: tui.selectSession
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                sessionID:
                  description: Session ID to navigate to
                  type: string
                  pattern: ^ses.*
              required:
                - sessionID
      responses:
        '200':
          description: Session selected successfully
          content:
            application/json:
              schema:
                type: boolean
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.tui.selectSession({
              ...
            })
components:
  schemas:
    BadRequestError:
      type: object
      properties:
        data: {}
        errors:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        success:
          type: boolean
          const: false
      required:
        - data
        - errors
        - success
    NotFoundError:
      type: object
      properties:
        name:
          type: string
          const: NotFoundError
        data:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - name
        - data

````

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