Skip to content

Commit fb26b2a

Browse files
committed
docs: expand run.py docstring with prerequisites and usage
1 parent a1493ea commit fb26b2a

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

  • examples/zero-code-examples/agentcore

examples/zero-code-examples/agentcore/run.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
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

323
import os
424
import random

0 commit comments

Comments
 (0)