List an Organization's AI Conversations
Return AI conversations ordered by latest span time.
query uses Sentry search syntax.
Span filters
- Description:
"payment failed"; status:span.status:[error,internal_error]. - Operation:
gen_ai.operation.type:tool; tool:gen_ai.tool.name:get_weather. - Duration:
span.duration:>2s; ID:gen_ai.conversation.id:"session:123"orconversation.conversationId:"session:123".
Conversation filters
- Calls:
conversation.llmCallsorconversation.messages, andconversation.toolCalls; failures:conversation.errorsandconversation.toolErrors. - Usage:
conversation.inputTokens,conversation.outputTokens,conversation.totalTokens, andconversation.totalCost. - Timespan:
conversation.timeSpanmeasures elapsed time between first and last AI spans;conversation.generationDurationsums LLM call durations. Both use milliseconds.
Use numeric comparisons such as conversation.toolCalls:>2. Queries return
conversations, not spans. Each AND condition may match a different span.
Returned totals include all AI spans in selected project, environment, and time
filters, not only matching spans.
Negation means no span matches, including when an attribute is absent. Payloads
are searchable only when recorded and not scrubbed. Payload failure text does
not mark a span as failed; set span.status:error for reliable failure search.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
Query Parameters:
project(array(undefined))The IDs or slugs of projects to filter by. Project slugs are unique within each organization. Omit this parameter to include all accessible projects.
-1is also accepted to include all accessible projects. For example, the following are valid parameters:/?project=1234&project=56789/?project=android&project=javascript-react/?project=-1
environment(array(string))The name of environments to filter by.
statsPeriod(string)The period of time for the query, will override the start & end parameters, a number followed by one of:
dfor dayshfor hoursmfor minutessfor secondswfor weeks
For example,
24h, to mean query data starting from 24 hours ago to now.start(string)The start of the period of time for the query, expected in ISO-8601 format. For example,
2001-12-14T12:34:56.7890.end(string)The end of the period of time for the query, expected in ISO-8601 format. For example,
2001-12-14T12:34:56.7890.query(string)Sentry search syntax matched against spans. A conversation is returned when any span in it matches. Summary fields include all spans in selected projects and time range, not only matching spans.
cursor(string)A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
per_page(integer)Number of conversations to return per page. Defaults to 10; maximum is 100.
Scopes
<auth_token> requires one of the following scopes:org:adminorg:readorg:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/agents/conversations/ \ -H 'Authorization: Bearer <auth_token>'
Copied[ { "conversationId": "01JQZ4W8X7J2Q9B4R5M6N7P8T9", "title": "Check San Francisco weather", "projectId": 1, "projects": [ { "id": 1, "name": "Weather Assistant", "slug": "weather-assistant" } ], "webUrl": "https://sentry.io/organizations/org-slug/explore/agents/conversations/01JQZ4W8X7J2Q9B4R5M6N7P8T9/?project=1", "flow": [ "Weather Assistant" ], "errors": 0, "llmCalls": 2, "toolCalls": 1, "totalTokens": 485, "inputTokens": 320, "outputTokens": 165, "totalCost": 0.0042, "timeSpan": 2500, "generationDuration": 1250.5, "startTimestamp": 1743465600000, "endTimestamp": 1743465602500, "traceCount": 1, "traceIds": [ "4c79f60c11214eb38604f4ae0781bfb2" ], "firstInput": "What is the weather in San Francisco?", "lastOutput": "It is currently 18°C and sunny in San Francisco.", "user": { "id": "123", "email": "user@example.com", "username": "example-user", "ip_address": "192.0.2.1" }, "toolNames": [ "get_weather" ], "toolErrors": 0 } ]