File tree Expand file tree Collapse file tree
examples/zero-code-examples/agentcore Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- """AWS AgentCore zero-code OTLP example."""
1+ """Run a Strands dice agent inside AWS AgentCore with standard OTLP export.
2+
3+ Demonstrates zero-code integration: the BedrockAgentCoreApp runtime wraps a
4+ Strands agent and serves it over HTTP. StrandsTelemetry emits OTel spans which
5+ are forwarded to agentevals via OTLPSpanExporter, with no agentevals SDK needed.
6+
7+ The agent exposes two tools:
8+ roll_die -- rolls a die with a given number of sides
9+ check_prime -- checks whether a number is prime
10+
11+ Prerequisites:
12+ 1. pip install -r examples/zero-code-examples/agentcore/requirements.txt
13+ 2. agentevals serve --dev
14+ 3. Configure AWS credentials (AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, etc.)
15+ or set AWS_DEFAULT_REGION=us-east-1 for local testing without Bedrock.
16+
17+ Usage:
18+ python examples/zero-code-examples/agentcore/run.py &
19+ curl http://localhost:8080/invocations -H "Content-Type: application/json" \\
20+ -d '{"prompt": "Roll a 20-sided die for me"}'
21+ """
222
323import os
424import random
You can’t perform that action at this time.
0 commit comments