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

# Retrieve a collection of agent sessions



## OpenAPI

````yaml /deploy/api/openapi.json get /api/v1/appuid/{appUid}/agentsessions
openapi: 3.0.1
info:
  title: Mindset API Gateway
  version: 1.2.0
servers:
  - url: https://a.api.mindset.ai
  - url: https://b.api.mindset.ai
  - url: https://c.api.mindset.ai
  - url: https://d.api.mindset.ai
security: []
tags:
  - name: Agent Configuration
  - name: Agent Sessions
  - name: AppStatus
  - name: Context Files
  - name: Contexts
  - name: DynamicComponents
  - name: Labels
  - name: SDK Users
  - name: Threads
  - name: Webhooks
  - name: Agent Management (deprecated)
paths:
  /api/v1/appuid/{appUid}/agentsessions:
    get:
      tags:
        - Agent Sessions
      summary: Retrieve a collection of agent sessions
      operationId: getAgentSessions
      parameters:
        - name: appUid
          in: path
          description: Your application's uid
          required: true
          schema:
            minLength: 1
            type: string
        - name: startAfter
          in: query
          description: Start after the given createdAt timestamp (ISO 8601) for pagination
          schema:
            type: string
            format: date-time
        - name: externalUserId
          in: query
          description: Filter results to a specific externalUserId
          schema:
            type: string
        - name: userEmail
          in: query
          description: >-
            Filter results to a specific email address format user identifier.
            Deprecated. Prefer using externalId.
          schema:
            maxLength: 100
            type: string
        - name: contextUid
          in: query
          description: Filter results to a specific contextUid
          schema:
            type: string
        - name: sdkUserEmail
          in: query
          description: Filter results to a specific SDK user email address
          schema:
            maxLength: 100
            type: string
        - name: humanUid
          in: query
          description: Filter results to a specific Mindset human UID
          schema:
            type: string
        - name: agentUid
          in: query
          description: Filter results to a specific agentUid
          schema:
            type: string
      responses:
        '200':
          description: Successful retrieval
          content:
            application/json:
              schema:
                type: object
                properties:
                  agentsessions:
                    type: array
                    items:
                      type: object
                      properties:
                        uid:
                          type: string
                          description: Unique ID of the agent session
                        agentSessionUid:
                          type: string
                          description: Unique ID of the agent session
                        humanUid:
                          type: string
                          description: >-
                            Mindset internal user Uid linked to this agent
                            session
                        externalUserId:
                          type: string
                          description: External user Id
                        userEmail:
                          type: string
                          description: >-
                            External supplied user email address to identify the
                            user
                        agentUid:
                          type: string
                          description: Unique Agent Id linked to this agent session
                        tags:
                          maxItems: 10
                          type: array
                          description: Array of tags (max 10)
                          items:
                            maxLength: 60
                            minLength: 1
                            type: string
                        contextUids:
                          maxItems: 30
                          type: array
                          description: Array of existing context Uids (max 30)
                          items:
                            maxLength: 30
                            minLength: 1
                            type: string
                        mcpserverUids:
                          maxItems: 5
                          type: array
                          description: Array of existing MCP server Uids (max 5)
                          items:
                            maxLength: 20
                            minLength: 20
                            type: string
                        planUids:
                          maxItems: 20
                          type: array
                          description: >-
                            Array of existing plan Uids (max 20). Overrides
                            agent-level planUids.
                          items:
                            type: string
                        skillUids:
                          maxItems: 20
                          type: array
                          description: >-
                            Array of existing skill Uids (max 20). Overrides
                            agent-level skillUids.
                          items:
                            type: string
                        forcePlanUid:
                          type: string
                          description: >-
                            Forces plan activation on session start. Must be a
                            valid plan UID if provided.
                        createdAt:
                          type: string
                          description: Creation timestamp (ISO 8601)
                          format: date-time
                        lastUsedAt:
                          type: string
                          description: Last time used timestamp (ISO 8601)
                          format: date-time
        '404':
          description: Agent Sessions not found
          content: {}
      security:
        - APIKeyHeader: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: x-api-key
      in: header

````