Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Was this page helpful?
Claude Managed Agents menyediakan alat observabilitas di Claude Console untuk membantu Anda memantau, men-debug, dan memahami sesi agen Anda.
Console menyediakan tampilan timeline visual dari sesi agen Anda. Navigasikan ke bagian Claude Managed Agents di Console untuk melihat:
Untuk debugging terprogram, ambil acara mentah melalui 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 ),
"---"
'Gunakan aliran acara yang sama untuk menampilkan kesalahan dan melacak konsumsi token:
session.errorcurl -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)")
'