Skip to main content

🚀 AgentCore RL Toolkit (ART)

Scalable, Composable Reinforcement Learning for Real-World Agents.

CI PyPI Python License

Website · Documentation · Getting Started · Blogs · Examples

AgentCore RL Toolkit (ART) helps developers improve custom agents with reinforcement learning on AWS Bedrock AgentCore Runtime. It brings together scalable, sandboxed rollouts, token-level trajectory capture, training integrations, and examples spanning coding, office automation, and customer service.

Bring your agent framework, tools, and environments. Define your reward function and choose either a self-hosted or a managed training backend while keeping most of your production code intact.

🎯 Agents We've Trained

Our experiments include Strands and OpenHands agents working with real repositories, office applications, and stateful customer-service environments.

Agent and task Model Task success Learn more
Java code migration
Strands · MigrationBench
Qwen3.8-27B 52% → 93% rLLM collaboration
Agent code
Qwen3-Coder-30B-A3B 43% → 76%
Office automation
Strands · OfficeBench
Qwen3-30B-A3B 24% → 41% Results · Agent code
Software engineering
OpenHands · SWE-Gym
Qwen3-Coder-30B-A3B 56% → 64% Results · Agent code
Customer service
Strands · τ²-Bench Telecom
Qwen3-30B-A3B-Thinking 38% → 96% (SFT + RL) Data synthesis and results
Automotive assistant
Strands · CAR-bench
Qwen3-30B-A3B-Thinking 52% → 83% (SFT + RL) BMW collaboration

🧩 What ART Provides

  • Train your own agent. Reuse your framework, tools, and application logic. Examples include Strands, OpenHands, and mini-swe-agent; agents use standard OpenAI- or Anthropic-compatible model clients.
  • Scale complex rollouts. Run long-running agents and their environments on Bedrock AgentCore Runtime, with isolated sessions and on-demand scaling. Builds, tests, and tool execution run separately from the GPU training infrastructure.
  • Capture the data RL needs. The rollout gateway records the exact sampled token IDs, logprobs, and loss masks across model turns, including branching conversations, without custom model wrappers in your agent.
  • Choose your training backend. Train with verl, slime, Tinker, or SkyRL. Agent execution stays separate from model training.
  • Evaluate and verify. Collect rollout results with concurrency control, timeouts, and session cleanup. Use the Sandbox SDK to execute commands and verifiers in task-specific container environments on AgentCore.

How It Works

%%{init: {"flowchart": {"rankSpacing": 20}}}%%
flowchart LR
    subgraph acr["AgentCore Runtime"]
        direction TB
        agent["Agent session<br/>Your agent + tools"]
        sandbox["Sandbox session<br/>(optional)"]
        agent <-.->|Tool I/O| sandbox
    end

    gateway["ART rollout gateway<br/>Token capture"]
    backend["Training backend<br/>Sampling + updates"]
    acr <-->|Model calls| gateway
    gateway <-->|Tokens +<br/>logprobs| backend
    acr -->|Task rewards| backend

Tools can run within the agent session or execute commands in a separate sandbox session for task isolation.

ART's training integrations combine captured trajectories with task rewards so the backend can update the model. Your agent keeps its application-level model interface throughout the loop. See the architecture overview for the runtime, gateway, and result-delivery details.

🔬 Research & Collaborations

We share the training methods and systems work behind these agents, including joint experiments with the rLLM team and collaboration with BMW on CAR-bench.

⚡ Getting Started

The core SDK supports Python 3.11+. Training environments such as Megatron and the SkyRL service require Python 3.12; follow their setup guides.

Install the core SDK:

pip install 'agentcore-rl-toolkit[core]'

Or use uv add 'agentcore-rl-toolkit[core]'. The core SDK includes agent apps and rollout clients. See the installation guide for component-specific dependencies and the deployment CLI.

  1. Start with an agent. Try the math agent for a small end-to-end example, or choose a task from Example Agents.
  2. Choose a training backend. Follow its guide for the required agent entrypoint, dependencies, AWS deployment, and networking setup.
  3. Define success and train. Supply task inputs and a reward function, evaluate your baseline, then launch the backend's training recipe.

Already have an agent? The AgentCoreRuntimeApp example shows how to keep @app.entrypoint while running rollouts and returning task rewards. Follow your training backend's guide for its supported agent setup and deployment steps.

🔌 Training Backends

ART integrates with the following training backends through its rollout gateway for token-level trajectory capture.

Integration Training setup Get started
verl Self-hosted training with verl Setup guide
slime Self-hosted training with slime Setup guide
SkyRL Self-hosted training through its Tinker-compatible API Training guide · Deployment example
Tinker Managed training through the official Tinker API Training guide

SkyRL and Tinker share the toolkit's Tinker-compatible API integration.

rLLM

rLLM natively integrates with AWS Bedrock AgentCore Runtime. Follow its AgentCore integration guide for installation, configuration, and training.

🛠️ Example Agents

Task Framework Example
Math reasoning with a calculator · GSM8K Strands Start here
Java repository migration · MigrationBench Strands Guide
Office automation · OfficeBench Strands Guide
Personal assistant · AppWorld Strands Guide
Customer service · τ²-Bench Strands Guide
Software engineering · SWE-Gym OpenHands Guide
Terminal tasks · Harbor / TMax mini-swe-agent Guide

Terminal agents with separate sandboxes. The terminal agent example uses the Sandbox SDK to run mini-swe-agent and its task environment in separate AgentCore sessions. Verifier tests are withheld until the agent finishes, keeping tests and grading feedback out of the model conversation.

Contributing

Contributions to agent examples, training integrations, and the core toolkit are welcome. See CONTRIBUTING.md for development setup and contribution guidelines, and the design document process for significant features or architectural changes.

Security

See security issue notifications.

License

This project is licensed under the Apache-2.0 License.

Metadata

Release files for agentcore-rl-toolkit 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentcore-rl-toolkit 0.2.0
File Size Uploaded Provenance Actions
agentcore_rl_toolkit-0.2.0.tar.gz 3.3 MB Without provenance Details for agentcore_rl_toolkit-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentcore-rl-toolkit 0.2.0
File Interpreter ABI Platform Actions
agentcore_rl_toolkit-0.2.0-py3-none-any.whl Python 3 none any Details for agentcore_rl_toolkit-0.2.0-py3-none-any.whl

Total release size: 3.6 MB

Release files / agentcore_rl_toolkit-0.2.0.tar.gz

Download URL agentcore_rl_toolkit-0.2.0.tar.gz
Size 3.3 MB
Tags Source
SHA-256 checksum
How to use checksums
fb74d5c68b3323719514a5df8ea0d0237cfb1d0fc1d86cb6ddad76467599ee30
BLAKE2b-256 checksum
How to use checksums
09a61cd1167282aca7cbd8e9ae926a28f3c154e2502dd72b2a860ad4dfad54f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.2 {"installer":{"name":"uv","version":"0.13.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / agentcore_rl_toolkit-0.2.0-py3-none-any.whl

Download URL agentcore_rl_toolkit-0.2.0-py3-none-any.whl
Size 288.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e99455e3aa7ecf7e7f2df47716c7d741b354c0e842bdeaec22919941baa03ed1
BLAKE2b-256 checksum
How to use checksums
4c55489d3f96cba0aa3e1df86cb44ee0572c27e4393e75b0adf963751e93a8e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.2 {"installer":{"name":"uv","version":"0.13.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for agentcore-rl-toolkit 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page