Skip to content

feat(harness): add Agent Inspector and Mantle (OpenAI-compatible) examples#1644

Open
di-brasil wants to merge 2 commits into
awslabs:mainfrom
di-brasil:feat/harness-observability
Open

feat(harness): add Agent Inspector and Mantle (OpenAI-compatible) examples#1644
di-brasil wants to merge 2 commits into
awslabs:mainfrom
di-brasil:feat/harness-observability

Conversation

@di-brasil

Copy link
Copy Markdown
Contributor

Summary

Adds an AgentCore CLI harness sample under 01-features/01-harness/01-advanced-examples/06-getting-started-with-agent-inspector/ that shows how to deploy a harness from scratch and then open the Agent Inspector (agentcore dev) to watch its sessions, traces, and spans live.

The order matters, and the sample makes it explicit: deploy first, then inspect. The Agent Inspector reads the harness's telemetry from CloudWatch, so there is nothing to inspect until the harness is deployed and has handled an invocation. demo.sh deploys, invokes the agent, confirms the OpenTelemetry spans landed in the aws/spans log group, and only then launches the Inspector — so the data is already there when the UI opens.

Every harness invocation is auto-instrumented by the service (no ADOT, no OTEL_* variables, no code). The only account-level setup is enabling CloudWatch Transaction Search once.

Tested end-to-end on @aws/agentcore@1.0.0-preview.12 in us-east-1 (deploy + live invoke + spans confirmed in aws/spans + Agent Inspector).

What the sample includes

  • README.md — the step-by-step CLI flow, prerequisites, how to read the telemetry in the Agent Inspector and in the GenAI Observability console, and cleanup. Includes two short GIFs (the scripted deploy, and the Agent Inspector showing the span tree).
  • demo.sh — a runnable script that prints each command and its real output, built for screen recording. It scaffolds, deploys, invokes, verifies the spans, then launches the Agent Inspector. The account ID is masked as <ACCOUNT> and the local username/home path as <USER> throughout, so a recording is safe to share. Names are auto-generated per run, so it can be run repeatedly without collisions. ./demo.sh --self-test runs offline checks (no AWS calls).
  • cleanup.sh — tears down the harness, memory, and CloudFormation stack with no arguments.
  • system-prompt.md — the agent's system prompt.
  • GIF-SHOTLIST.md — frames to capture for the Agent Inspector clip.

Notes

  • Harness is in preview; the sample targets the four preview regions (IAD / PDX / SYD / FRA).
  • Unlike code-based agents, a harness needs no ADOT setup or OTEL_* variables — instrumentation is service-side.
  • A .gitignore keeps the local recording (*.mov), workspace, and generated aws-targets.json out of git.

Testing

  • agentcore deploy + three agentcore invoke turns + agentcore dev ran end-to-end.
  • Confirmed OpenTelemetry spans for the session in the aws/spans log group, including the chat model-call span with gen_ai.usage.* token counts and the session.id attribute, and the same data rendering in the Agent Inspector's Traces pane.

@di-brasil di-brasil force-pushed the feat/harness-observability branch 2 times, most recently from dae7a07 to 21be6be Compare June 11, 2026 18:10
@di-brasil di-brasil changed the title feat(harness): add getting-started-with-agent-inspector sample feat(harness): add agent-inspector and Mantle (OpenAI-compatible) examples Jun 11, 2026
Adds an AgentCore CLI harness sample under
01-features/01-harness/01-advanced-examples/06-getting-started-with-agent-inspector/.
It deploys a harness from scratch, invokes it to generate telemetry, confirms
the OpenTelemetry spans landed in the aws/spans CloudWatch log group, then
launches the Agent Inspector (agentcore dev) so you can chat with the agent and
watch its sessions, traces, and spans live. Deploy comes first because the
Inspector has nothing to show until the harness is deployed and invoked.

Includes a recording-safe demo.sh (account ID and local username masked),
zero-arg cleanup.sh, README, system prompt, and a GIF shot-list. Tested
end-to-end on @aws/agentcore@1.0.0-preview.12 in us-east-1.
New advanced example 08-mantle-endpoint/ showing how to run a Bedrock harness
through the OpenAI-compatible bedrock-mantle endpoint via --api-format responses,
using OpenAI's open-weight gpt-oss-120b (no API key — uses the execution role).

Self-contained: README, demo.sh, cleanup.sh, system-prompt.md, .gitignore, images.
Verified end-to-end on @aws/agentcore@1.0.0-preview.13 in us-east-1 (deploy + invoke
+ full GenAI spans in aws/spans). Documents the gotcha that the Mantle model id
drops the -1:0 suffix (openai.gpt-oss-120b, not openai.gpt-oss-120b-1:0).
@di-brasil di-brasil force-pushed the feat/harness-observability branch from 21be6be to 8ff6fd5 Compare June 11, 2026 18:15
@di-brasil di-brasil changed the title feat(harness): add agent-inspector and Mantle (OpenAI-compatible) examples feat(harness): add Agent Inspector and Mantle (OpenAI-compatible) examples Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant