Optimizing Agentic Workflows with Multi-Turn Reinforcement Learning on Amazon SageMaker AI

The landscape of artificial intelligence is undergoing a significant transition from static, single-prompt response models toward dynamic, agentic systems capable of executing complex, multi-step operations. Traditional supervised fine-tuning has long been the industry standard for training models to provide superior answers to isolated queries; however, this methodology falls short when applied to autonomous agents. Agents designed for tasks such as automated expense reporting, IT support ticket triage, or logistical planning require a sequence of dependent actions, where the efficacy of one step is fundamentally linked to the success of the preceding one. To address this, Amazon SageMaker AI has introduced Multi-Turn Reinforcement Learning (MTRL), a robust framework that enables models to learn from the final outcomes of multi-turn trajectories rather than just static text sequences.

The Shift Toward Agentic Intelligence
In a typical agentic workflow, there is rarely a singular "correct" path that a model must imitate. Instead, these agents operate within environments where success is determined by the final outcome—such as whether a support ticket was successfully resolved or an expense report was filed correctly. Supervised fine-tuning lacks the labels necessary to train for these nuanced, open-ended sequences, and single-turn reinforcement learning is ill-equipped to provide credit for a strategic decision made several steps before the eventual outcome.
MTRL on Amazon SageMaker AI fills this gap by training models on the reward signal generated at the conclusion of an entire episode. By integrating with Amazon Bedrock AgentCore or external infrastructure—such as Amazon Elastic Kubernetes Service (EKS) or Amazon Elastic Compute Cloud (EC2)—the system allows agents to act within a live environment, observe the results, and receive a performance-based reward. This process effectively offloads the burden of manual labeling, as developers only need to define a scoring mechanism for the final result.

Demonstrating Capability: The Wordle Case Study
To validate the MTRL framework, engineers utilized the popular word game Wordle as a controlled environment. The game serves as an ideal pedagogical example because it mandates a sequence of guesses where each subsequent attempt must be informed by the feedback of the previous one. The rules are rigid, and the outcomes are objectively measurable.
During the testing phase, researchers utilized the gpt-oss-20b model to navigate the game. Initially, the model operated at a 61 percent solve rate on held-out words when using default reasoning effort. Following the application of MTRL, that figure climbed to 84 percent. Notably, even at lower reasoning effort—where the model was trained—the solve rate improved dramatically from 15 percent to 69 percent. This optimization was achieved at a total training cost of approximately $339 in tokens, demonstrating that high-performance agentic behavior can be achieved at a relatively low capital expenditure compared to traditional full-parameter training cycles.

Chronology of the MTRL Pipeline
The implementation of MTRL follows a structured, six-stage pipeline designed for modularity and scalability:
- Identity and Access Management (IAM): Secure deployment begins by creating specific roles for the agent runtime and the training job. Proper trust policies, specifically designating
job.sagemaker.amazonaws.comas the principal, are essential for preventing authentication failures during the training process. - Agent Deployment: The agent is deployed via the Amazon Bedrock AgentCore runtime. This environment hosts the task logic, the reward function, and the tools available to the model.
- Runtime Verification: Before initiating resource-heavy training, developers must verify the integration. By using a "smoke test" payload, developers can confirm that the agent successfully parses prompts, authenticates with the SageMaker Job Runtime, and correctly reports rewards.
- Dataset Preparation: Unlike supervised learning, MTRL datasets do not require target responses. Instead, they consist of a collection of task prompts. Each row contains the objective, such as a hidden word or an operational goal, which the model attempts to solve.
- Training Execution: The MTRL service utilizes Group Relative Policy Optimization (GRPO) to update a Low-Rank Adaptation (LoRA) adapter on the base model. During this phase, the training job invokes the agent for thousands of rollouts.
- Evaluation and Monitoring: Metrics are tracked via MLflow, providing real-time visibility into reward growth and solve rates. This stage allows developers to compare model performance across different sampling temperatures and reasoning efforts.
Financial and Operational Implications
A key advantage of the MTRL architecture is its serverless nature. Developers are not required to provision, manage, or size complex GPU clusters. Instead, they pay per million tokens based on three usage dimensions: prefill, sample, and train. In the Wordle study, the total billable token usage exceeded 1.2 billion tokens over a 12-hour, 40-minute training window.

The training dimension is the most significant cost driver, as it scales with the length of the agent’s trajectory. Consequently, businesses can optimize costs by designing tasks that reach a resolution efficiently. Furthermore, the AgentCore runtime incurs separate costs for vCPU and memory usage, highlighting the need for efficient code and well-defined timeout parameters. For the Wordle run, these runtime costs amounted to approximately $79, bringing the total operational investment to roughly $418.
Strategic Analysis: Why MTRL Matters
The introduction of MTRL represents a shift in how enterprises should approach model customization. By focusing on reward-based learning rather than pattern imitation, businesses can deploy agents that are "task-aware" rather than just "language-aware."

The implications for internal business workflows are profound. Publicly available foundation models are trained on generalized data, which often results in poor performance when handling proprietary internal software, specific database query languages, or company-specific compliance workflows. By using MTRL, a company can take a cost-effective, smaller model and "teach" it the specific steps required to navigate a custom toolset.
Furthermore, the research confirms that training gains are highly transferable across different serving settings. A model trained at a specific reasoning effort or temperature setting often maintains its performance gains when those variables are adjusted at inference time. This flexibility allows organizations to strike a balance between latency, cost, and accuracy, depending on the specific needs of the end-user.

Best Practices and Lessons Learned
The implementation of MTRL is not without its technical hurdles. Early iterations of the reward design in the Wordle study revealed common pitfalls, such as rewarding intermediate steps too heavily. If an agent is rewarded for every correct letter guess rather than the final word solution, it may develop "gaming" behaviors, where it optimizes for points rather than for winning the game.
To mitigate this, developers should employ a tiered reward structure:

- Outcome-based rewards: High-weight rewards for successfully completing the core task.
- Sparse shaping: Low-weight rewards for intermediate progress, ensuring the agent remains focused on the primary objective.
- Deterministic evaluation: Testing models at temperature 0 during the validation phase to ensure consistency and comparability across training runs.
Conclusion and Future Outlook
As artificial intelligence moves toward increasingly complex automation, the ability to train models that can self-correct and learn from multi-step outcomes will become a competitive necessity. Amazon SageMaker AI’s MTRL framework provides a pragmatic bridge between theoretical reinforcement learning and practical, production-ready agentic systems. By moving the training focus from "how to say it" to "what to achieve," the industry is poised to see a new generation of agents that are not only more capable but also more aligned with the specific operational requirements of the modern enterprise. As organizations continue to adopt this framework, the ability to rapidly iterate on custom workflows—without the need for massive, monolithic datasets—will likely become a cornerstone of AI-driven business strategy.







