Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Was this page helpful?
Claude Managed Agents は、エージェントセッションの監視、デバッグ、理解を支援するオブザーバビリティツールを Claude Console で提供しています。
Console はエージェントセッションのビジュアルタイムラインビューを提供します。Console の Claude Managed Agents セクションに移動すると、以下を確認できます:
プログラムによるデバッグのために、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 ),
"---"
'同じイベントストリームを使用してエラーを表示し、トークン消費量を追跡します:
session.error イベントを通じて伝達されます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)")
'