Skip to content
SegmentStream/ Docs

Loading documentation…

↑ ↓ to navigate  ↵ to open  Esc to close
Website Console
Section menu

Inspect an agent tool call

GET /api/workspaces/{workspaceId}/agent/logs/calls/{toolCallId}

Endpoint

GET/api/workspaces/{workspaceId}/agent/logs/calls/{toolCallId}

Use the tool call ID from a turn to inspect arguments, result and errors. This is a repeatable read. See agentLogs_getAgentTurnLog. Required personal key scopes: workspace:view, agent:logs:read.

Authorization

Bearer token · workspace:view · agent:logs:read

Parameters

workspaceId path · uuid · required
Workspace UUID returned by list workspaces.
toolCallId path · string · required
ID of a particular invocation of an agent tool.
sessionId query · string · optional
Identifier of the agent session.
cursor query · string · optional
Opaque cursor returned by the preceding page.
API-Version header · string · optional
Optional platform API major version. Omit to use the current default. Allowed values: 1

Responses

200 Success
application/json schema
{
  "type": "object",
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "description": "Identifier of the event."
          },
          "provider": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "description": "Provider associated with the connection, event or channel."
          },
          "chatId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "description": "Chat identifier assigned by the channel provider."
          },
          "chatType": {
            "type": "string",
            "enum": [
              "group",
              "private",
              "channel"
            ],
            "description": "Provider classification of the conversation."
          },
          "threadId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Thread identifier within the chat."
          },
          "participantIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "maxItems": 100,
            "description": "Provider identifiers of participants in the conversation."
          },
          "senderId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the sender at the channel provider."
          },
          "senderName": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "description": "Sender display name supplied by the channel."
          },
          "senderIsBot": {
            "type": "boolean",
            "description": "Whether the channel identifies the sender as a bot."
          },
          "kind": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound",
              "decision",
              "tool_call",
              "tool_result"
            ],
            "description": "Discriminator identifying the kind of entry."
          },
          "messageId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the message."
          },
          "replyToMessageId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the reply to message."
          },
          "sessionId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the agent session."
          },
          "turnId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Agent turn ID associated with the log event."
          },
          "text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable content of the message or log entry."
          },
          "decision": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "reply",
                  "silent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the agent chose to reply or stay silent."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "description": "Explanation of the reported status or decision."
          },
          "toolCallId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "ID of a particular invocation of an agent tool."
          },
          "toolName": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the invoked agent tool."
          },
          "argsSummary": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "description": "Short rendering of the arguments passed to the tool."
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "requested",
                  "completed",
                  "failed",
                  "rejected",
                  "cancelled",
                  "unknown",
                  "sent",
                  "uncertain"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Current lifecycle or execution status."
          },
          "operationId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the operation."
          },
          "requestedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "description": "Identifier of this resource."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "member",
                      "service"
                    ],
                    "description": "Discriminator identifying the kind of entry."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "allOf": [
                      {
                        "description": "Name identifying this item within its parent resource."
                      }
                    ]
                  },
                  "via": {
                    "type": "string",
                    "enum": [
                      "oauth",
                      "hq",
                      "service"
                    ],
                    "description": "Mechanism through which the operation or event occurred."
                  },
                  "clientId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Identifier of the client."
                  },
                  "clientName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Display name of the client application."
                  },
                  "attribution": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Empty only for a member's own reply, sent unsigned; the archive refuses it on any other."
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "name",
                  "via",
                  "clientId",
                  "clientName",
                  "attribution"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Identity or component that requested the operation."
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "description": "Address at which the resource can be accessed."
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "description": "Identifier of this resource."
                },
                "kind": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "description": "Discriminator identifying the kind of entry."
                },
                "filename": {
                  "type": "string",
                  "maxLength": 100000,
                  "description": "File name supplied for this attachment."
                },
                "contentType": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "description": "Media type describing the content."
                },
                "size": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "Infinity",
                        "-Infinity",
                        "NaN"
                      ]
                    }
                  ],
                  "allOf": [
                    {
                      "description": "Size of the resource in the units used by its enclosing object."
                    }
                  ]
                },
                "uniqueId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "description": "Unique identifier assigned to the attachment."
                }
              },
              "required": [
                "id",
                "kind"
              ],
              "additionalProperties": false
            },
            "maxItems": 100,
            "description": "Files associated with the message."
          },
          "at": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "allOf": [
              {
                "description": "Time of the recorded event."
              }
            ]
          },
          "sequence": {
            "type": "string",
            "description": "Sequence number used to order entries."
          },
          "storedAt": {
            "type": "string",
            "description": "Time when the item was stored."
          },
          "argsText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Retained text of the tool arguments."
          },
          "resultText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Retained textual result of the tool call."
          },
          "errorText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Text describing the tool or runtime failure."
          },
          "contentExpired": {
            "type": "boolean",
            "description": "Whether retention has removed the original content."
          },
          "chatTitle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The chat's title in the agent's chat registry, matched by provider and chat ID; null when the registry has no such chat, absent when the registry could not be read."
          },
          "trace": {
            "type": "string",
            "enum": [
              "available",
              "unavailable",
              "expired"
            ],
            "description": "Whether the agent's runs keep the trace of the event's turn, for 30 days: in a list, `available` within them and `expired` past them; in a turn's detail, `available` when it was read, `unavailable` when it could not be (see `traceError`). Absent on events without a turn and on logs read from the chat archive in the platform."
          },
          "traceError": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "description": "Why the turn's trace is `unavailable`: trace_not_deployed, trace_not_configured, trace_refused, trace_not_found, trace_rate_limited, trace_unreadable, trace_unavailable or trace_turn_not_found."
          }
        },
        "required": [
          "eventId",
          "provider",
          "chatId",
          "chatType",
          "threadId",
          "participantIds",
          "senderId",
          "senderName",
          "senderIsBot",
          "kind",
          "messageId",
          "replyToMessageId",
          "sessionId",
          "turnId",
          "text",
          "decision",
          "reason",
          "toolCallId",
          "toolName",
          "argsSummary",
          "status",
          "attachments",
          "at",
          "sequence",
          "storedAt",
          "argsText",
          "resultText",
          "errorText",
          "contentExpired"
        ],
        "additionalProperties": false
      },
      "description": "Agent events in this page, including retained tool call details."
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Opaque continuation cursor for the next page."
    }
  },
  "required": [
    "events",
    "nextCursor"
  ],
  "additionalProperties": false
}
Full schema and referenced types ↗
Example
{
  "events": [],
  "nextCursor": null
}
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
Deprecation
Present when the operation is deprecated. RFC 9745 date in seconds since the Unix epoch.
Sunset
Present when retirement is scheduled. HTTP date of planned removal, per RFC 8594.
400 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
401 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
403 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
404 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
406 Unsupported platform API version
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
409 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
429 Request limit reached
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
Retry-After
Seconds to wait before retrying the request.
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
500 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).
503 Error
application/json schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Machine-readable error code or diagnostic reported by the operation."
    },
    "detail": {
      "type": "string",
      "description": "Human-readable explanation of the failure."
    },
    "requestId": {
      "type": "string",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
      "format": "uuid",
      "description": "Correlation ID for tracing the request with support."
    },
    "retryable": {
      "type": "boolean",
      "description": "Whether retrying the same failed request may succeed."
    }
  },
  "required": [
    "error",
    "detail",
    "requestId",
    "retryable"
  ],
  "additionalProperties": true
}
Full schema and referenced types ↗
Response headers
API-Version
Supported platform API major version.
RateLimit
Remaining quota (r) and seconds until reset (t), when admission is available.
RateLimit-Policy
Request quota (q) and window in seconds (w).