skillfed

agentcore-investigation

agentcore-investigation lets you troubleshoot Bedrock AgentCore runtime sessions by querying CloudWatch Logs Insights with structured and glob-style parsing. It resolves session-to-trace relationships through OpenTelemetry span correlation, filters instrumentation noise, and surfaces errors, tool invocations, token usage, and performance metrics in timeline format.

agentcore-investigation helps you debug Bedrock AgentCore runtime sessions by querying CloudWatch Logs Insights and analyzing OpenTelemetry spans.

AI-generated summary based on this skill's SKILL.md

9,509 1,664 Apache-2.0 updated by awslabs

Install

awslabs/mcp/agentcore-investigation · repository language: Python

git clone https://github.com/awslabs/mcp
cp -r mcp/src/cloudwatch-mcp-server/skills/agentcore-investigation ~/.claude/skills/agentcore-investigation
npx skillfed install awslabs/mcp/agentcore-investigation

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I debug a Bedrock AgentCore session?

agentcore-investigation helps you debug Bedrock AgentCore sessions by querying CloudWatch Logs Insights with structured parsing. Start by filtering logs by session ID, then use the tool's span correlation features to link session IDs to OpenTelemetry trace IDs. This enables root cause analysis of runtime failures, tool invocations, and latency issues across your agent execution flow.

How can I investigate agent runtime session Bedrock errors?

agentcore-investigation surfaces runtime errors by correlating CloudWatch Logs with OpenTelemetry span data. Filter logs by session ID and trace ID to construct a structured timeline of events. The tool helps you identify error patterns, analyze token usage anomalies, and pinpoint which tool invocations or model calls failed, all within a single investigation context.

What is the agentcore session ID to trace ID resolution process?

agentcore-investigation resolves session IDs to trace IDs by analyzing OpenTelemetry span metadata in your CloudWatch Logs. Once correlated, you can trace the full execution path of an agent session—from initial request through tool calls to final response. This correlation is essential for root cause analysis when debugging performance or error scenarios.

How does agentcore-investigation filter OpenTelemetry noise?

agentcore-investigation filters OTEL instrumentation noise using glob-style and structured parsing rules. It lets you construct clean, actionable timelines from span data by excluding verbose diagnostic spans and focusing on meaningful events: tool invocations, latency markers, token counts, and errors. This reduces cognitive load when investigating complex multi-step agent sessions.

Can agentcore-investigation analyze tool invocation latency?

Yes. agentcore-investigation traces tool invocations and analyzes latency in agent execution flows by extracting span timing data from CloudWatch Logs. You can identify which tools are slow, spot latency outliers, and correlate delays with token usage or error conditions. This supports performance debugging and optimization of your Bedrock agent workflows.

What metrics does agentcore-investigation surface for agent sessions?

agentcore-investigation surfaces errors, tool invocations, token usage, and performance metrics in timeline format. It correlates session IDs with OpenTelemetry trace IDs, filters instrumentation noise, and presents structured data that lets you analyze error patterns, track latency across tool calls, and understand token consumption across your Bedrock AgentCore runtime sessions.

SKILL.md

rendered from the published skill — quoted content, verbatim

AgentCore Runtime Session Investigation

Investigate AgentCore runtime sessions by querying CloudWatch Logs Insights, filtering OpenTelemetry noise, and producing structured investigation output.

Key capabilities: - Session-to-trace resolution via OTEL span correlation - Structured and glob-style parse queries for both dedicated and combined log groups - OpenTelemetry noise filtering with AgentCore-specific heuristics - Timeline construction with T+offset format - Error, tool invocation, token usage, and latency analysis


Reference Files

Load these files as needed for detailed guidance:

MCP:
mcp-setup.md

When: ALWAYS load before starting an investigation — ensures CloudWatch and Application Signals MCP servers are configured Contains: MCP server configuration for CloudWatch Logs and Application Signals, with setup instructions for Claude

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 5 files
src/cloudwatch-mcp-server/skills/agentcore-investigation/SKILL.md
src/cloudwatch-mcp-server/skills/agentcore-investigation/kiro-skill-setup.md
src/cloudwatch-mcp-server/skills/agentcore-investigation/mcp/.mcp.json
src/cloudwatch-mcp-server/skills/agentcore-investigation/mcp/mcp-setup.md
src/cloudwatch-mcp-server/skills/agentcore-investigation/references/otel-span-schema.md

Related skills

Tags

runtime-debugging trace-correlation observability-platform agent-performance span-analysis cloudwatch-querying error-investigation timeline-construction otel-instrumentation latency-profiling