Best practices for multi-turn reinforcement learning in Amazon SageMaker AI Amazon Web Services released best practices for multi-turn reinforcement learning in Amazon SageMaker AI, covering environment design, reward alignment, and evaluation. The guidance helps developers train agents that handle sequential tasks like support ticket resolution and content moderation. The practices draw from Amazon Science's SOP-Bench dataset across 12 business domains. Artificial Intelligence https://aws.amazon.com/blogs/machine-learning/ Best practices for multi-turn reinforcement learning in Amazon SageMaker AI Training a multi-turn agent in Amazon SageMaker AI to resolve support tickets or moderate content means handling a sequence of dependent steps, not a single response. These agents read instructions, make tool calls, read the results, decide the next action, and recover from a mistake before committing to an answer. That flexibility is also what makes agentic reinforcement learning RL challenging. More ways to act mean more ways to satisfy the reward without doing the task, and the environment the agent trains against can quietly corrupt the training signal. In this post, we share best practices for reliable multi-turn RL training. We cover how to build a training environment you can trust, set up an external evaluation, design a reward aligned with the end task, manage what changes once the agent runs for multiple turns, and monitor the metrics that tell you when to iterate. We draw our examples from the SOP-Bench https://github.com/amazon-science/SOP-Bench dataset, an Amazon Science benchmark that evaluates agents’ ability to resolve tasks based on complex Standard Operating Procedures SOP across 12 business domains. SageMaker AI multi-turn reinforcement learning Amazon SageMaker AI multi-turn RL https://aws.amazon.com/about-aws/whats-new/2026/06/multi-turn-reinforcement-learning-on-sagemaker-ai/ SageMaker AI MTRL provides the training loop for agentic tasks. Your agent can run on Amazon Bedrock AgentCore https://aws.amazon.com/bedrock/agentcore/ , Amazon Elastic Kubernetes Service Amazon EKS , Amazon Elastic Compute Cloud Amazon EC2 , AWS Fargate, or infrastructure of your choice. You connect it through a small adapter that exposes your tool surface to the rollout server, and SageMaker AI MTRL handles the rest: A modular agent-environment interface that keeps integration low-code while giving you full algorithmic control. Custom rewards, custom tool loops, and multi-turn conversation shapes are all yours to define. Serverless execution that simplifies infrastructure concerns, so you get production-scale agentic RL at per-token pricing without provisioning or managing GPU clusters. Asynchronous rollout and trajectory collection with bounded off-policy staleness. Generation and gradient updates run in parallel without drifting too far from the current policy, which speeds up training. A native algorithm library spanning Proximal Policy Optimization PPO , Clipped Importance Sampling Policy Optimization CISPO , and importance-sampling IS losses, paired with multiple group-based advantage estimators GRPO, GRPO pass@k , RLOO, and more . These cover the choices most relevant to multi-turn agentic RL. Sequence-extension training to keep wall-clock down on long multi-turn trajectories. Trajectory and reward observability in MLflow managed by Amazon SageMaker AI https://aws.amazon.com/sagemaker-ai/experiments/ , so you can read what your agent did turn by turn, and across training steps. Evaluation jobs report reward, pass@k , trajectory metrics, and more before you deploy to a SageMaker AI endpoint or Amazon Bedrock. The service provides the training loop, hardware, and orchestration. The choices that decide whether you get a reliable agent are yours. You build the environment the agent trains against, measure success outside the reward, design the reward itself, and decide how to iterate when the curve stalls. Figure 1: Overview of the SageMaker AI multi-turn RL service Build a training environment that is cheap, reproducible, and representative Single-turn RL needs a prompt and a reward function. Multi-turn RL adds an environment for the agent to act in across turns: the tools it calls and the systems behind them. That environment is part of your training setup, and the way you build it shapes both what the model can learn and whether you can trust your metrics. When training an agent, build a sandboxed or simulated environment that resembles production but stays isolated from live traffic. Tool calls and responses keep the same schemas and business logic. They are driven by recorded responses or isolated state instead of live calls. Simulated environments are the recommended starting point because a typical run produces many thousands of rollouts, each making several tool calls. As an example, a batch size of 128 with group size 8 is 1,024 rollouts per step. Pointing that traffic at live systems can lead to customer impact. Without a simulated environment, exploration can produce real side effects. For example, an agent learning by trial and error will issue refunds, delete records, or trigger workflows that you didn’t intend. Additionally, live data shifts under you, so the same trajectory scores differently across runs. You must know the correct outcome to compute a reward, which means a fixed, labeled set of tasks or a trustworthy judge model regardless of where the tool calls go. How you build the simulated environment depends on what your tools do. Three patterns cover most use-cases you will encounter: Read-only tools: Replay recorded responses keyed by their inputs. These tools help the agent retrieve information relevant to a task. For example, in SOP-Bench the customer service task provides ten mocked tools validateAccount , getAuthenticationDetails , createSessionAndOpenTicket , and so on , each returning a deterministic response from a fixture, such as a specific row from a CSV file based on the tool call arguments. Stateful tools: Seeded sandboxes that hold state for the length of an episode. When the agent writes something and reads it back, the environment needs memory. The pattern: allocate per-episode resources at the start of the rollout, and register everything the agent creates. Tear it all down in a try/finally block when the episode ends, whether by reaching a terminal action, hitting max turns , or crashing. No state leaks into the next rollout. Verifiable outcomes: Genuine execution in an isolated simulation environment. When the agent’s output is code, SQL, or math, you can run it in an isolated environment. Use a Docker exec for code, an in-memory SQLite per rollout for SQL, a pure Python eval for math. Real execution, deterministic per-instance, same input plus same sandbox state equals same result. For example, AgentCore Code Interpreter https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/code-interpreter-tool.html provides managed isolated environments for code execution. Whichever pattern fits, hold two properties fixed: Reproducibility : the same tool called with the same arguments returns the same result, so the reward for an identical trajectory is stable and your evaluation is comparable across runs. Representativeness : build the environment from your real schemas and data distributions so the behavior the model learns transfers to production. Before you start training, confirm your environment is configured correctly: Set up an external evaluation before you train After your environment is in place and verified, build a way to measure success before you write a reward function. That measure should capture your end goal directly. RL optimizes the reward signal literally, so if the reward is the only number you watch, you cannot separate progress on the task from progress on satisfying the reward criteria. You need an external evaluation you can trust to guide your decisions while you iterate on rewards, environment seeding, and hyperparameters. Pattern Stand up a held-out evaluation that scores the outcome you care about at deployment, computed independently of the reward. In practice this is a small piece of code that takes a model, runs it through the rollout server on a fixed test split, and returns a single task-success rate. It can be minimal, as long as it is honest. For SOP-Bench, the evaluation is exact-match on the final JSON object inside