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

# List the agent chats visible to the caller, newest first

> Every chat the caller created or may see, as summaries without their transcripts. Filter by `projectId`, `branchId` or `visibility`; page with `cursor` and `nextCursor`.



## OpenAPI

````yaml /openapi/customer-api.json get /ai/agents
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Flow customer API reference. Start with the [quickstart](/api/quickstart)
    and [authentication guide](/api/authentication).
  title: Customer API
  version: 1.0.0
servers:
  - description: Flow API
    url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://backend.branch.flowengineering.com
security: []
tags:
  - name: Automations
  - name: Branches
  - name: Comments
  - name: Convert
  - name: Data Model
  - name: Diagrams
  - name: Entities
  - name: Files
  - name: Import
  - name: Notifications
  - name: Projects
  - name: ReqIF
  - name: ReqIF Import
  - name: Shared Access Grants
  - name: User Groups
  - name: Users
paths:
  /ai/agents:
    get:
      tags:
        - Automations
      summary: List the agent chats visible to the caller, newest first
      description: >-
        Every chat the caller created or may see, as summaries without their
        transcripts. Filter by `projectId`, `branchId` or `visibility`; page
        with `cursor` and `nextCursor`.
      operationId: AgentChatController_list
      parameters:
        - in: query
          name: visibility
          required: false
          schema:
            type: string
        - in: query
          name: limit
          required: false
          schema:
            type: string
        - description: >-
            Opaque keyset cursor for chat history. Use 0 for the first page,
            then pass nextCursor while moreAvailable is true.
          in: query
          name: cursor
          required: false
          schema:
            type: string
        - description: >-
            Legacy offset pagination. New clients should use cursor so deep
            pages do not require scanning every preceding row.
          in: query
          name: offset
          required: false
          schema:
            type: string
        - in: query
          name: configId
          required: false
          schema:
            type: string
        - in: query
          name: triggerType
          required: false
          schema:
            type: string
        - in: query
          name: projectId
          required: false
          schema:
            type: string
        - in: query
          name: branchId
          required: false
          schema:
            type: string
        - description: >-
            Pass true to list archived chats instead of active ones. Omitted,
            only active chats are returned.
          in: query
          name: archived
          required: false
          schema:
            type: string
        - description: >-
            Ordering. 'updated' (default) walks the row's last write;
            'lastUserMessage' walks when its owner last sent a message, which
            does not reshuffle while a run streams.
          in: query
          name: sort
          required: false
          schema:
            enum:
              - updated
              - lastUserMessage
            type: string
        - description: Workspace identifier
          in: header
          name: customer
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentChatListDto'
          description: ''
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    AgentChatListDto:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentChatSummaryDto'
          type: array
        moreAvailable:
          type: boolean
        nextCursor:
          type: string
        total:
          type: number
      required:
        - items
      type: object
    AgentChatSummaryDto:
      properties:
        ai_model:
          nullable: true
          type: string
        archived:
          type: boolean
        branch_id:
          nullable: true
          type: string
        config_id:
          nullable: true
          type: string
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        error:
          nullable: true
          type: string
        error_details:
          nullable: true
          type: string
        id:
          type: string
        last_user_message_at:
          format: date-time
          type: string
        parent_agent_id:
          nullable: true
          type: string
        plan_headline:
          nullable: true
          type: string
        plan_items:
          default: []
          items:
            $ref: '#/components/schemas/AgentPlanItemDto'
          type: array
        project_id:
          nullable: true
          type: string
        root_agent_id:
          nullable: true
          type: string
        shared_with:
          default: []
          items:
            type: string
          type: array
        spawn_depth:
          type: number
        spawn_tool_call_id:
          nullable: true
          type: string
        status:
          type: string
        title:
          nullable: true
          type: string
        trigger_info:
          nullable: true
          type: object
        trigger_type:
          enum:
            - branch
            - endpoint
            - import
            - schedule
            - slack
            - github
            - gitlab
            - onshape
            - webhook
            - assistant
            - entity_edit
            - manual
            - impact_analysis
            - what_if_analysis
            - subagent
          nullable: true
          type: string
        updated_at:
          format: date-time
          type: string
        visibility:
          type: string
      required:
        - id
        - status
        - title
        - error
        - error_details
        - branch_id
        - project_id
        - config_id
        - visibility
        - created_by
        - shared_with
        - created_at
        - updated_at
        - trigger_type
        - trigger_info
        - plan_items
        - plan_headline
        - ai_model
        - parent_agent_id
        - root_agent_id
        - spawn_depth
        - spawn_tool_call_id
        - archived
        - last_user_message_at
      type: object
    AgentPlanItemDto:
      properties:
        conclusion:
          enum:
            - pass
            - fail
            - warning
            - skipped
          type: string
        detail:
          type: string
        status:
          enum:
            - pending
            - in_progress
            - done
          type: string
        title:
          type: string
      required:
        - title
        - status
      type: object
  securitySchemes:
    api-key:
      in: header
      name: X-API-Key
      type: apiKey
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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