Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Claude Managed Agents fournit des outils d'observabilité dans la Claude Console pour vous aider à surveiller, déboguer et comprendre vos sessions d'agent.
La Console fournit une vue chronologique visuelle de vos sessions d'agent. Accédez à la section Claude Managed Agents dans la Console pour voir :
Pour le débogage programmatique, récupérez les événements bruts via l'API :
curl -fsSL "https://api.anthropic.com/v1/sessions/$SESSION_ID/events" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
| jq -r '
.data[]
| "Type: \(.type)",
"Processed: \(.processed_at)",
( if .type | IN("user.message", "agent.message") then
.content[]
| " Block: \(.type)",
(select(.type == "text") | " Text: \(.text[:100])...")
elif .type | IN("agent.tool_use", "agent.custom_tool_use", "agent.mcp_tool_use") then
" Tool: \(.name)"
else empty end ),
"---"
'Utilisez le même flux d'événements pour afficher les erreurs et suivre la consommation de jetons :
curl -fsSL "https://api.anthropic.com/v1/sessions/$SESSION_ID/events" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
| jq -r '
(.data[] | select(.type == "session.error") | "[\(.error.type)] \(.error.message)"),
(reduce (.data[] | select(.type == "span.model_request_end") | .model_usage) as $u
({input: 0, output: 0}; .input += $u.input_tokens | .output += $u.output_tokens)
| "Total input tokens: \(.input), output tokens: \(.output)")
'session.errorWas this page helpful?