Loading...
    • 빌드
    • 관리
    • 모델 및 가격
    • 클라이언트 SDK
    • API 참조
    Search...
    ⌘K
    관리
    Admin API 개요워크스페이스데이터 레지던시API 및 데이터 보존
    모니터링
    Claude Code Analytics API사용량 및 비용 API
    서드파티 플랫폼
    Amazon BedrockMicrosoft FoundryVertex AI
    Console
    Log in
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Help and security

    • Availability
    • Status
    • Support
    • Discord

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    모니터링

    세션 추적

    Console 타임라인 및 원본 이벤트 보기를 사용하여 세션을 모니터링하고 디버깅합니다.

    Claude Managed Agents는 Claude Console에서 관찰성 도구를 제공하여 에이전트 세션을 모니터링, 디버깅 및 이해하는 데 도움을 줍니다.

    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 ),
        "---"
    '

    동일한 이벤트 스트림을 사용하여 오류를 표시하고 토큰 소비를 추적합니다:

    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.error 이벤트를 통해 전달됩니다
    • 도구 결과 검토 - 도구 실행 실패는 종종 예상치 못한 에이전트 동작을 설명합니다
    • 토큰 사용량 추적 - 토큰 소비를 모니터링하여 프롬프트를 최적화하고 비용을 절감합니다
    • 시스템 프롬프트 사용 - 에이전트가 추론을 설명하도록 시스템 프롬프트에 로깅 지침을 추가합니다

    Was this page helpful?

    • Console 관찰성