How do you teach an AI agent to finish a task that takes many steps, when nobody can say which single step was right? Amazon describes multi-turn reinforcement learning on SageMaker AI as a training method that scores only the final result of a whole sequence of actions. AWS published a hands-on guide that demonstrates it with the word game Wordle.
What problem does it solve?
AWS explains that most fine-tuning teaches a model to give a better answer to one prompt. Agents behave differently. An agent that files an expense report or triages a support ticket takes a chain of actions, and each depends on the previous one.
Single-turn reinforcement learning cannot credit a decision made three steps before the outcome. The multi-turn approach trains on the one signal that is reliable: whether the whole episode succeeded.
How does the training loop work?
The service has two halves. SageMaker AI runs the training job and owns the model being trained, called the policy model. Amazon Bedrock AgentCore hosts the agent, the game environment and the reward function. AWS says the agent can also run on your own infrastructure, such as Amazon EKS, EC2 or Fargate, through a forwarding function.
For each rollout, meaning one full attempt at the task, the training service sends one row of data to the agent. In the Wordle example, that row holds one secret word. The agent calls the policy model, plays up to six guesses through a single tool, and receives per-letter feedback after each guess. When the game ends, it returns one reward.
AWS says the update step uses Group Relative Policy Optimization (GRPO). It compares rewards across several attempts at the same word and adjusts a small add-on layer called a LoRA adapter, which changes the model without retraining all of it. Users do not specify the right trajectory, only how to score the result.
Why Wordle?
AWS chose Wordle because the rules are few, each guess depends on the last feedback, and the result can be scored objectively. AWS notes that it is a teaching example and that frontier models already play it well. The stated practical goal is to make a small, low-cost model good at a multi-step task specific to a business, such as an internal workflow that public models never saw.
How is the reward designed?
AWS describes an outcome-dominant reward. A solve pays between 1.05 and 1.55 depending on speed. A loss pays -0.5, and never making a valid guess pays -1.5. A small shaping term rewards good strategy within each tier. The guide also says its authors share the reward-design mistakes and training failures they hit along the way.
What results did AWS report?
- At the model’s default reasoning effort, the solve rate on held-out words rose from 61 to 84 percent.
- At the low reasoning effort used in training, it rose from 15 to 69 percent.
- These figures come from one run described by AWS, using GPT-OSS-20B, and are not independent benchmarks.
Which models and Regions are supported?
AWS says the service is serverless: you choose a base model and it provisions training and sampling capacity. At the time of writing, each model is trained with a LoRA adapter.
- Amazon Nova 2 Lite and GPT-OSS-20B: US East (N. Virginia) and US West (Oregon).
- Gemma 4 31B instruction-tuned and Qwen 3.6 27B: US West (Oregon) only.
AWS picked GPT-OSS-20B for its lowest per-token price of the four and for reasoning effort that can be set per request.
What does it cost?
Pricing is per million tokens in three dimensions, set by base model. Prefill covers input tokens, which pile up in multi-turn tasks because every turn re-reads the history. Sample covers generated tokens, including reasoning. Train covers tokens processed when the adapter is updated.
AWS reports that its 100-step run used 105,486 rollouts over 12 hours 40 minutes. At US East list prices, that came to about $339 in tokens: roughly $59 for prefill, $48 for sampling and $232 for training. Training dominates and grows with trajectory length, so shorter games and less verbose reasoning reduce the bill. The AgentCore runtime bills separately, at about $79 for this run according to AWS.
What data stays where?
AWS states that datasets, the agent and the trained model remain in the user’s AWS account and are not used to train the base models. The walkthrough also lists prerequisites, including two IAM roles and an S3 bucket in the same Region as the agent, because the job rejects a cross-Region runtime. Code is available in an AWS samples repository, and monitoring uses MLflow.