agentcore-investigation

agentcore-investigation is a skill for Claude Code, Codex from awslabs/mcp. It costs 52 tokens per session (2,687 once invoked), scanned A, original, Apache-2.0.

A procedure for investigating Amazon Bedrock AgentCore runtime sessions through CloudWatch logs and OpenTelemetry traces. It links sessions to traces and reconstructs what happened over time.

In plain words
What is it for?
Use it to debug AgentCore sessions, identify a session or trace, filter irrelevant log entries, and analyze failures or slow steps.
Why use it?
It turns scattered runtime logs into a timeline that can show errors, tool calls, token use, and latency. OpenTelemetry is a standard format for recording application activity.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to debug AgentCore sessions, identify a session or trace, filter irrelevant log entries, and analyze failures or slow steps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/awslabs/mcp/agentcore-investigation
About the project

AWS MCP Servers is a collection of Model Context Protocol servers that let AI agents access AWS documentation and services through standardized tools. It is for developers building coding agents or other software that works with AWS. The catalogue includes MCP servers and related add-ons for using AWS through agents.

awslabs/mcp · 9,675 stars · on GitHub · awslabs.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add awslabs/mcp --skill agentcore-investigation
Clone the repo
git clone --depth 1 https://github.com/awslabs/mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agentcore-investigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/awslabs/mcp/agentcore-investigation/github.svg)](https://agentmods.dev/skills/awslabs/mcp/agentcore-investigation)
Your own site
<a href="https://agentmods.dev/skills/awslabs/mcp/agentcore-investigation"><img src="https://agentmods.dev/badge/skills/awslabs/mcp/agentcore-investigation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agentcore-investigation

Your own site · 80×15
<a href="https://agentmods.dev/skills/awslabs/mcp/agentcore-investigation"><img src="https://agentmods.dev/badge/skills/awslabs/mcp/agentcore-investigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,687 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.02687
Opus 5 $0.00026 $0.01344
Sonnet 5 $0.00010 $0.00537
Haiku 4.5 $0.00005 $0.00269

Measured 9d ago against content hash f6e3ce836823, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

agentcore-investigation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/cloudwatch-mcp-server/skills/agentcore-investigation/SKILL.md · 309 lines

How it starts

The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 Code, Gemini, Codex, and Kiro CLI

.mcp.json

When: Load when setting up MCP servers for the first time Contains: Sample MCP configuration with both CloudWatch and Application Signals servers

otel-span-schema.md

When: ALWAYS load before querying or filtering OTEL spans Contains: Field extraction priorities, known instrumentation scopes, noise filtering heuristics (DROP/KEEP patterns)


Phase 0: SessionId-to-TraceId Resolution

When the user provides a sessionId, resolve it to traceId(s) first. If user provides traceId directly, skip this phase.

Discovery Query (structured fields)

fields traceId, @timestamp
| filter attributes.session.id = "SESSION_ID"
| stats count(*) as spanCount, min(@timestamp) as firstSeen, max(@timestamp) as lastSeen by traceId
| sort firstSeen asc

Discovery Query (combined log group — glob-style parse)

fields @timestamp, @message
| parse @message '"traceId":"*"' as traceId
| parse @message '"session.id":"*"' as sessionId
| filter sessionId = "SESSION_ID" or @message like "SESSION_ID"
| stats earliest(@timestamp) as firstSeen, latest(@timestamp) as lastSeen, count(*) as spanCount by traceId
| sort firstSeen asc
| limit 50

Read the full file on GitHub · 309 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 309 lines · 52 tokens per session scan A f6e3ce836823

Subscribe to this mod's changes

agentcore-investigation is a skill published in the GitHub repository awslabs/mcp (9,675 stars, last pushed 3d ago), licensed Apache-2.0. It adds 52 tokens to every session and 2,687 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hyperpod-node-debugger

Diagnose and remediate per-node issues on a HyperPod cluster (EKS or Slurm) — a specific node is unhealthy, unresponsive, stuck, or needs replacing. Covers on-node EFA, GPU / accelerator hardware (XID, ECC, NVLink, row-remap, DCGM), Slurm node down/drained, disk and memory pressure, per-node lifecycle-script failures…

awslabs/agent-plugins · 139 tokens

hyperpod-performance-debugger

Diagnose performance issues on Amazon SageMaker HyperPod clusters — uneven NCCL bandwidth across nodes and poor filesystem throughput. Read-only. Surfaces host-side signals (Xid, ECC, NVLink, EFA reachability, FSx saturation) and routes to the appropriate sibling skill (hyperpod-node-debugger, hyperpod-nccl…

awslabs/agent-plugins · 133 tokens

hyperpod-cluster-debugger

Diagnose and remediate cluster-wide HyperPod (EKS or Slurm) problems — creation / deployment failures (CloudFormation, EFA health check, lifecycle scripts, capacity), EKS access, node replacement, CloudFormation nested-stack errors, post-maintenance rollback state, dangling nodes, autoscaler conflicts. Includes…

awslabs/agent-plugins · 80 tokens

hyperpod-nccl

Diagnose NCCL failures and adjacent training-pod failures on HyperPod GPU clusters (EKS or Slurm) — training hangs, AllReduce / collective-op timeouts, EFA or libfabric errors, rendezvous failures, EFA TCP fallback, /dev/shm or memlock issues, NCCL version mismatch across pods, container OOM / exit-137 / OOMKilled…

awslabs/agent-plugins · 150 tokens

hyperpod-issue-report

Generate comprehensive issue reports from HyperPod clusters (EKS and Slurm) by collecting diagnostic logs and configurations for troubleshooting and AWS Support cases. Use when users need to collect diagnostics from HyperPod cluster nodes, generate issue reports for AWS Support, investigate node failures or…

awslabs/agent-plugins · 99 tokens

incident-response-skill

A skill that uses object-style tool references with purpose descriptions and required flags, plus strict validation.

agentfront/frontmcp · 24 tokens