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

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# List Poll



## OpenAPI

````yaml GET /api/v1/agents/connect/poll
openapi: 3.1.0
info:
  title: LangWatch API
  description: LangWatch openapi spec
  version: 1.0.0
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/v1/agents/connect/poll:
    get:
      summary: >-
        Wait for call and cancel frames while refreshing this instance's
        presence
      operationId: pollConnectedAgentInstance
      parameters:
        - in: query
          name: inFlight
          schema:
            type: string
            maxLength: 200000
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  frames:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            protocol:
                              type: number
                              const: 1
                            type:
                              type: string
                              const: call
                            kind:
                              default: turn
                              type: string
                              enum:
                                - turn
                                - setup
                                - teardown
                            callId:
                              type: string
                            agentId:
                              type: string
                            threadId:
                              type: string
                            messages:
                              type: array
                              items:
                                type: object
                                properties:
                                  role:
                                    type: string
                                    minLength: 1
                                required:
                                  - role
                                additionalProperties: {}
                            newMessages:
                              type: array
                              items:
                                type: object
                                properties:
                                  role:
                                    type: string
                                    minLength: 1
                                required:
                                  - role
                                additionalProperties: {}
                            params:
                              type: object
                              propertyNames:
                                type: string
                                pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                              additionalProperties:
                                type:
                                  - string
                                  - number
                                  - boolean
                            session: {}
                            state:
                              anyOf:
                                - type: object
                                  propertyNames:
                                    type: string
                                  additionalProperties: {}
                                - type: 'null'
                            traceparent:
                              type:
                                - string
                                - 'null'
                            deadlineAt:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            run:
                              type: object
                              properties:
                                scenarioRunId:
                                  type: string
                                scenarioName:
                                  type: string
                                batchRunId:
                                  type: string
                              additionalProperties: false
                          required:
                            - protocol
                            - type
                            - kind
                            - callId
                            - agentId
                            - threadId
                            - messages
                            - newMessages
                            - params
                            - traceparent
                            - deadlineAt
                            - run
                          additionalProperties: false
                        - type: object
                          properties:
                            protocol:
                              type: number
                              const: 1
                            type:
                              type: string
                              const: cancel
                            callId:
                              type: string
                              minLength: 1
                          required:
                            - protocol
                            - type
                            - callId
                          additionalProperties: false
                required:
                  - frames
                additionalProperties: false
      security:
        - project_api_key: []
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````

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