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

# Trace Meta agent conversation

> Step by step, what the agent did in its latest conversation with one customer: model calls and tool calls, with timings and status.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json get /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/insights/conversation-turns
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/insights/conversation-turns:
    get:
      tags:
        - WhatsApp Meta agent
      summary: Trace Meta agent conversation
      description: >-
        Step by step, what the agent did in its latest conversation with one
        customer: model calls and tool calls, with timings and status.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the connection
          name: connection_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the WhatsApp phone number the Meta agent runs on
          name: phone_number_id
          in: path
        - schema:
            type: string
            maxLength: 128
            description: >-
              The customer: phone number in digits only, a business-scoped user
              ID, or a test conversation ID.
          required: true
          description: >-
            The customer: phone number in digits only, a business-scoped user
            ID, or a test conversation ID.
          name: user_phone_number
          in: query
        - schema:
            type:
              - integer
              - 'null'
          required: false
          name: start_timestamp_ms
          in: query
        - schema:
            type:
              - integer
              - 'null'
          required: false
          name: end_timestamp_ms
          in: query
        - schema:
            type: string
            maxLength: 512
          required: false
          name: before
          in: query
        - schema:
            type: string
            maxLength: 512
          required: false
          name: after
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          required: false
          name: limit
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppMetaAgentConversationTurnsSchema'
components:
  schemas:
    WhatsAppMetaAgentConversationTurnsSchema:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              turn_id:
                type: string
              conversation_id:
                type: string
              message_id:
                type: string
              timestamp:
                type: number
              e2e_latency_ms:
                type: number
              steps:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - LLM_CALL
                        - TOOL_CALL
                    status:
                      type: string
                      enum:
                        - SUCCESS
                        - ERROR
                        - TIMEOUT
                    latency_ms:
                      type: number
                    llm_output_preview:
                      type: string
                    tool_name:
                      type: string
                    tool_input:
                      type: string
                    tool_output:
                      type: string
                  required:
                    - type
                    - status
            required:
              - turn_id
              - conversation_id
              - steps
        paging:
          type: object
          properties:
            cursors:
              type: object
              properties:
                before:
                  type: string
                after:
                  type: string
            next:
              type: string
            previous:
              type: string
      required:
        - data
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````