Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ List recent agent conversations

**Flags:**
- `-n, --limit <value> - Number of conversations (1-1000) - (default: "25")`
- `-q, --query <value> - Search query`
- `-q, --query <value> - Any matching span selects its conversation; totals include all spans in selected projects and time range`
- `-t, --period <value> - Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" - (default: "7d")`
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
- `-c, --cursor <value> - Navigate pages: "next", "prev", "first" (or raw cursor string)`
Expand Down Expand Up @@ -63,8 +63,17 @@ sentry agent-conversation list my-project
# Show more, last 24 hours
sentry agent-conversation list --limit 50 --period 24h

# Filter conversations
sentry agent-conversation list -q "has:errors"
# Find conversations with errors
sentry agent-conversation list -q "conversation.errors:>0"

# Find conversations for an agent
sentry agent-conversation list -q "gen_ai.agent.name:my-agent"

# Find conversations with more than two tool calls
sentry agent-conversation list -q "conversation.toolCalls:>2"

# Find conversations that used a tool
sentry agent-conversation list -q "gen_ai.tool.name:search_issues"

# Paginate through project results
sentry agent-conversation list my-org/my-project -c next
Expand Down
22 changes: 19 additions & 3 deletions packages/cli/src/commands/agent-conversation/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,23 @@ export const listCommand = buildListCommand("agent-conversation", {
command: "sentry agent-conversation list --limit 50 --period 24h",
},
{
description: "Filter conversations",
command: 'sentry agent-conversation list -q "has:errors"',
description: "Find conversations with errors",
command: 'sentry agent-conversation list -q "conversation.errors:>0"',
},
{
description: "Find conversations for an agent",
command:
'sentry agent-conversation list -q "gen_ai.agent.name:my-agent"',
},
{
description: "Find conversations with more than two tool calls",
command:
'sentry agent-conversation list -q "conversation.toolCalls:>2"',
},
{
description: "Find conversations that used a tool",
command:
'sentry agent-conversation list -q "gen_ai.tool.name:search_issues"',
},
{
description: "Paginate through project results",
Expand All @@ -160,7 +175,8 @@ export const listCommand = buildListCommand("agent-conversation", {
query: {
kind: "parsed",
parse: String,
brief: "Search query",
brief:
"Any matching span selects its conversation; totals include all spans in selected projects and time range",
optional: true,
},
period: LIST_PERIOD_FLAG,
Expand Down
Loading