Strands Math Agent
An RL-trainable GSM8K
math agent using Bedrock AgentCore RL Toolkit. The agent solves
grade-school word problems by invoking a calculator tool
for arithmetic steps and emitting a final answer after ####.
This is the “hello world” for the toolkit — minimal prompt and single tool. Start here.
Quickstart
Section titled “Quickstart”cd examples/strands_math_agentuv venv --python 3.13 && source .venv/bin/activateuv pip install -e .
# Run the RL-adapted app as a local HTTP serverpython rl_app.pyDeploy using the commands in the Math README, then use its Runtime ARN in the slime training configuration.
What’s in the example
Section titled “What’s in the example”basic_app.py— deployment-ready reference usingBedrockModel.rl_app.py— RL-adapted version; readsbase_url/model_idfrom_config, returns{"reward": ...}.reward.py—GSM8KReward: extract the####answer, exact-match against ground truth.evaluate.py— batch evaluation on GSM8K.
For local setup, request examples, and GSM8K evaluation, see the full README on GitHub.