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

# List agent sessions

> Retrieves a paginated list of agent sessions. Use 'X-End-User-ID' header to filter by your end-users.



## OpenAPI

````yaml /api-reference/openapi.en.json get /agent-sessions
openapi: 3.1.0
info:
  title: UBIK Public API
  description: Publicly accessible API endpoints for UBIK.
  version: '1.0'
servers:
  - url: https://app.ubik-agent.com/api/v1
    description: Production Server
security: []
paths:
  /agent-sessions:
    get:
      tags:
        - Public API
        - Public API - Agent Sessions
      summary: List agent sessions
      description: >-
        Retrieves a paginated list of agent sessions. Use 'X-End-User-ID' header
        to filter by your end-users.
      operationId: list_agent_sessions_agent_sessions_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: X-End-User-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-End-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPaginatedAgentSessionsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicPaginatedAgentSessionsResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PublicAgentSession'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - total
        - page
        - limit
        - has_more
      title: PublicPaginatedAgentSessionsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicAgentSession:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for the session.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Title of the session.
        status:
          type: string
          title: Status
          description: Current status (e.g., 'active', 'completed').
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
          description: Model being used.
        external_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External User Id
          description: The external user ID associated with this session, if any.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Last update timestamp.
        active_tools:
          items:
            $ref: '#/components/schemas/PublicToolListItem'
          type: array
          title: Active Tools
          description: List of tools enabled for this session.
        active_skills:
          items:
            $ref: '#/components/schemas/PublicSkillListItem'
          type: array
          title: Active Skills
          description: List of skills enabled for this session.
        documents:
          items:
            $ref: '#/components/schemas/PublicSessionDocumentListItem'
          type: array
          title: Documents
          description: List of documents linked to this session.
        workspaces:
          items:
            $ref: '#/components/schemas/PublicWorkspace'
          type: array
          title: Workspaces
          description: List of workspaces linked to this session.
        mcp_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Mcp Config
          description: The currently active MCP configuration for this session.
      type: object
      required:
        - id
        - status
        - created_at
        - updated_at
      title: PublicAgentSession
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PublicToolListItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier for the tool.
        name:
          type: string
          title: Name
          description: The name of the tool.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: A brief description of what the tool does.
      type: object
      required:
        - id
        - name
      title: PublicToolListItem
    PublicSkillListItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier for the skill.
        name:
          type: string
          title: Name
          description: The name of the skill.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: A brief description of what the skill does.
      type: object
      required:
        - id
        - name
      title: PublicSkillListItem
    PublicSessionDocumentListItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier for the document.
        name:
          type: string
          title: Name
          description: The display name of the document.
        file_type:
          anyOf:
            - type: string
            - type: 'null'
          title: File Type
          description: The MIME type of the document file.
        status:
          type: string
          title: Status
          description: The current processing status of the document.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when the document was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The timestamp when the document was last updated.
        processing_pipeline:
          anyOf:
            - type: string
            - type: 'null'
          title: Processing Pipeline
          description: The name of the processing pipeline used for this document.
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: If processing failed, this field will contain the error message.
        api_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Api Metadata
          description: >-
            Custom API metadata resolved for the current user. Useful for
            retrieving stored external references (e.g. {'internal_app_ref':
            'REF-123'}). Note: This value is resolved based on the request's
            external_user_id. A document shared globally but also scoped to a
            specific user may return different metadata depending on who is
            asking.
        is_starred:
          type: boolean
          title: Is Starred
          description: Whether the document is starred in the current session context.
          default: false
      type: object
      required:
        - id
        - name
        - status
        - created_at
        - updated_at
      title: PublicSessionDocumentListItem
    PublicWorkspace:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier for the workspace.
        name:
          type: string
          title: Name
          description: The name of the workspace.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: A brief description of the workspace's purpose.
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
          description: Indicates if this is the default workspace for the user.
          default: false
        workspace_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Workspace Metadata
          description: Metadata for the workspace.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when the workspace was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The timestamp when the workspace was last updated.
        document_count:
          type: integer
          title: Document Count
          description: The number of documents contained within the workspace.
      type: object
      required:
        - id
        - name
        - created_at
        - updated_at
        - document_count
      title: PublicWorkspace
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````