# AgentJet
[](https://benchmark.agentjet.top/)
[](https://modelscope.github.io/AgentJet)
[](LICENSE)
[](https://modelscope.github.io/AgentJet/en/installation#requirements)
<div align="center">
<a href="https://modelscope.github.io/AgentJet" target="_blank">
<img width="500" alt="AgentJet" src="docs/agentjet.jpg"/>
</a>
</div>
**AgentJet (AJet)** is a cutting-edge, user-friendly agent RL training framework designed to optimize agents and agentic workflows (supporting any agent built with OpenAI SDK, AgentScope, Langchain, or raw HTTP requests), fine-tuning LLM weights to enhance model performance.
**AgentJet (AJet)** has fully-distributed **swarm training** capability, which means that you can **deploy `ajet-swarm start` in GPU server(s) and then start training agents in your laptop(s)**! Simply provide your agent workflow, training dataset, and reward function, and AgentJet will be ready to go!
## ✈️ News
- 2026.6.4 Arxiv paper release: *AgentJet - A Flexible Swarm Training Framework for Agentic Reinforcement Learning* [2606.04484](https://arxiv.org/abs/2606.04484).
- 2026.5.26 From Laptop to GPU Cluster: `sync_train_code` enables remote-controlled Swarm Training and closes the loop for automated RL research. [EN Blog](https://modelscope.github.io/AgentJet/en/blog_sync_train_code/) / [ZH Blog](https://modelscope.github.io/AgentJet/en/blog_sync_train_code.zh/).
- 2026.4.30 DeepFinance: training a financial deep-research Agent with multi-dimensional reward GRPO. [EN Blog](https://modelscope.github.io/AgentJet/en/example_deep_finance/) / [ZH Blog](https://modelscope.github.io/AgentJet/en/example_deep_finance.zh/).
- 2026.4.9 AgentJet-powered Auto Research: fully automated overnight RL experiments. [EN Blog](https://modelscope.github.io/AgentJet/en/blog_auto_research.en/) / [ZH Blog](https://modelscope.github.io/AgentJet/en/blog_auto_research/).
- 2026.3.30 LoRA training example is now online! See [tutorial/example_math_lora](tutorial/example_math_lora/) for an example.
- 2026.3.26 Upgrade verl backend to 0.7.1 to support more models and increase training speed! All [benchmark](https://benchmark.agentjet.top/) verified.
- 2026.3.19 Support for latest Qwen3.5 models is [in progress](https://github.com/modelscope/AgentJet/pull/16).
- 2026.3.12 Tuning Original OpenClaw Agent without Editing Any Agent Code. [EN Blog](https://modelscope.github.io/AgentJet/en/example_openclaw/) / [ZH Blog](https://modelscope.github.io/AgentJet/en/example_openclaw.zh/).
- 2026.3.09 Non-shared-parameter Multiagent Training. [EN Blog](https://modelscope.github.io/AgentJet/en/example_train_multi_model/) / [ZH Blog](http://modelscope.github.io/AgentJet/en/example_train_multi_model.zh/).
- 2026.2.20 Introducing AgentJet Swarm. [ZH Blog](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_zh/) / [EN Blog](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_en/).
## ✈️ Fast Introduction
### **1 - Classic Mode**
Let's begin with the simplest example: a math agent with a tool call. This is a simple & centralized training example.
1. please check out the [installation guide](https://modelscope.github.io/AgentJet/en/installation/) to set up the training environment.
2. tune your first model using the minimum example.
```python
ajet --conf ./tutorial/example_math_agent/math_agent.yaml --backbone='verl'
```
<div align="center">
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/new_classic.png"/>
</div>
### **2 - Swarm Mode**
Let's begin with the simplest AgentJet Swarm example: also a math agent. In this case, you can use any GPU-less laptop to train the model remotely.
1. Start swarm server and begin swarm overwatch: `ajet-swarm start` and `ajet-swarm overwatch` (or `ajet-swarm top`). (Alternative: if you are a fan of docker, use our [prebuilt docker image here](docs/en/ajet-swarm-docker.md) without setting up dependencies)
2. From your laptop (or swarm server localhost), run [this simple script](https://github.com/modelscope/AgentJet/blob/main/tutorial/example_math_swarm/math.py) to begin training:
```python
AJET_SWARM_URL="http://swarm-server-ip:10086" python ./tutorial/example_math_swarm/math.py
```
<!-- <div align="center">
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/new_swarm.png"/>
</div> -->
<!-- <div align="center">
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/swarming.gif"/>
</div> -->
<div align="center">
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/swarming2.gif"/>
</div>
<div align="center">
<img width="600" alt="image" src="https://github.com/user-attachments/assets/41ed1e71-8b18-4c4c-b5e2-833399317337"/>
</div>
## ✈️ Features
We aim to build an easy-to-learn Agent tuner that unlocks more possibilities for agent developers:
- **Easy and Friendly**. AgentJet helps you tune models behind your agent workflows easily, optimizing your agents for top performance with minimal effort.
- **Rich Tutorial Library**. AgentJet provides a rich library of [examples](https://github.com/modelscope/AgentJet/tree/main/tutorial) as tutorials.
- **Swarm Training**. [This unique feature](https://modelscope.github.io/AgentJet/en/swarm_intro_blog_en/) of AgentJet opens many possibilities: deploying distributed & self-healing rollout workers, **non-shared-parameter multi-agent** training, **multi-runtime & multi-task cocktail** training. And just like Tinker, you can use AgentJet Swarm to train models even on **GPU-less laptop(s)**.
- **Efficient and Scalable**. AgentJet uses [verl] as the default backbone (`--backbone=verl`). However, we also support trinity as an alternative backbone, accelerating your tuning process via fully asynchronous RFT.
- **Flexible and Fast**. AgentJet supports [multi-agent workflows](https://modelscope.github.io/AgentJet/en/workflow/) and adopts a context merging technique, accelerating training by 1.5x to 10x when the workflow involves multi-turn (or multi-agent) conversations.
- **Reliability and Reproducibility**. Our team keeps track of framework performance across multiple [tasks + major-git-version + training-backbones](https://benchmark.agentjet.top/) (under construction, still gathering data, coming soon).
For advanced researchers, AgentJet also provides high-resolution logging and debugging solutions:
<!-- For advanced researchers, AgentJet provides high-resolution logging and debugging solutions that are, to our knowledge, unprecedented in other prior projects. -->
- **High-Resolution Logging**: AgentJet allows users to save and inspect token-level rollout details, recording token IDs, token loss masks, and even token logprobs to facilitate workflow development and agent diagnostics.
- **Fast Debugging**: AgentJet also provides the `--backbone=debug` option for the best debugging experience, shortening your wait period from minutes to seconds after code changes and enabling breakpoint debugging in IDEs.
<div align="center">
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/ai-generated-1771873242388.jpg"/>
</div>
<div align="center">
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/beast_logger_zimu.mp4.gif"/>
</div>
---
### ✈️ Quick Start
#### Installation
- **Click here to read the** [**installation guide**](https://modelscope.github.io/AgentJet/en/installation/).
#### Example Library
Explore our rich library of examples to kickstart your journey:
- 🔢 [**Training a math agent that can write python code**](https://modelscope.github.io/AgentJet/en/example_math_agent).
- 📱 [**Creating an AppWorld agent using AgentScope and training it**](https://modelscope.github.io/AgentJet/en/example_app_world).
- 🐺 [**Developing Werewolves RPG agents and training them**](https://modelscope.github.io/AgentJet/en/example_werewolves).
- 👩🏻⚕️ [**Learning to ask questions like a doctor**](https://modelscope.github.io/AgentJet/en/example_learning_to_ask).
- 🎴 [**Writing a countdown game using AgentScope and solving it**](https://modelscope.github.io/AgentJet/en/example_countdown).
- 🚶 [**Solving a frozen lake walking puzzle using AgentJet**](https://modelscope.github.io/AgentJet/en/example_frozenlake).
Explore our automated benchmarking system [https://benchmark.agentjet.top/](https://benchmark.agentjet.top/):
<div align="center">
<img width="600" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/benchmark.gif"/>
</div>
---
### ✈️ Core Concepts
AgentJet makes agent fine-tuning straightforward by separating the developer interface from the internal execution logic.
<div align="center">
<img width="480" alt="image" src="https://img.alicdn.com/imgextra/i2/O1CN01PdCJym1jqr1jWGMZ4_!!6000000004600-0-tps-2013-870.jpg"/>
</div>
#### 1. The User-Centric Interface
To optimize an agent, you provide three core inputs:
* [**Trainable Workflow**](https://modelscope.github.io/AgentJet/en/workflow): Define your agent logic by inheriting the Workflow class, supporting both simple agent setups and advanced multi-agent collaborations.
* [**Task Reader**](https://modelscope.github.io/AgentJet/en/data_pipeline): Load training tasks from JSONL files, HuggingFace datasets, interactive environments, or auto-generate them from documents.
* [**Task Judger**](https://modelscope.github.io/AgentJet/en/task_judger): Evaluates agent outputs and assigns rewards to guide training.
#### 2. Internal System Architecture
The internal system orchestrates several specialized modules to handle the complexities of RL training and agent interactions.
* **Launcher**: Manages background service processes (Ray, vLLM) and routes the backbone.
* **Task Reader**: Handles data ingestion, augmentation, and filtering.
* **Task Rollout**: Bridges LLM engines and manages the Gym environment lifecycle.
* **Task Runner**: Executes the Agent workflow and calculates rewards.
* **Model Tuner**: Forwards inference requests from the workflow to the LLM engine.
* **Context Tracker**: Monitors LLM calls and automatically merges shared-history timelines to improve training efficiency by **1.5x to 10x**.
* **Swarm Server**: A data interchange center that accepts OpenAI-like requests and engine instructions, activated only in AgentJet Swarm mode.
#### 3. Swarm Architecture
When swarm training mode is enabled, an additional component will be activated:
* **Swarm Data Interchange Server**: Maintains HTTP service, listens to swarm instructions and OpenAI compatible requests. Establishes a high-speed zmq communication channel to coordinate other modules.
<div align="center">
<img width="400" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/arch.jpg"/>
</div>
### ✈️ Navigation
* **Tutorials**: From [Installation](https://modelscope.github.io/AgentJet/en/installation) to [Tuning your first agent](https://modelscope.github.io/AgentJet/en/tune_your_first_agent) to [Multi-Node Training](https://modelscope.github.io/AgentJet/en/multi_node_training) — the essential path for beginners.
* **Core Components**: Define your [Trainable Workflow](https://modelscope.github.io/AgentJet/en/workflow) and manage [Data](https://modelscope.github.io/AgentJet/en/data_pipeline) and [Reward](https://modelscope.github.io/AgentJet/en/task_judger).
* **Example**: Check the [Example Library](https://modelscope.github.io/AgentJet/#example-library) above for real-world cases like [Math](https://modelscope.github.io/AgentJet/en/example_math_agent), [Werewolves game](https://modelscope.github.io/AgentJet/en/example_werewolves) and [Learning to ask task](https://modelscope.github.io/AgentJet/en/example_learning_to_ask).
* **Deep Dive**: Master advanced [Configuration](https://modelscope.github.io/AgentJet/en/configuration).
## ✈️ Roadmap
AgentJet is a constantly evolving project. We are planning to add the following features in the near future.
| Category | Feature | Status |
| :--- | :--- | :--- |
| **Infra** | Optimize configurations for long-context adaptation on smaller GPUs | In Progress |
| **Capability** | Multi-modal training support | Todo |
| **Capability** | MARL Credit assignment | Todo |
| **Capability** | Training dataset generation from few-shot samples | Todo |
## ✈️ Citation
If you use AgentJet in your research, please cite:
```bibtex
@software{
title = {AgentJet: A Cutting-Edge Multi-Agent Training Platform for Large Language Models.},
author = {The AgentJet Team},
url = {https://modelscope.github.io/AgentJet/},
month = {01},
year = {2026}
}
```
<br/>
---
<div align="center">
This project is under active development, we need your help to make it shine! <br/>
[⭐ Star Us](https://github.com/modelscope/AgentJet) · [✈️ Report Bug](https://github.com/modelscope/AgentJet/issues) · [✈️ Request Feature](https://github.com/modelscope/AgentJet/issues)
</div>
<div align="center">
<img height="180" alt="image" src="https://img.alicdn.com/imgextra/i4/O1CN01DJuOtZ1Kgu1UvjaNl_!!6000000001194-2-tps-922-882.png"/>
<br/>
<span>Join AgentJet DingTalk Group to share your idea</span>
</div>
<br/>
<hr/>
<br/>
<div align="center">
<img height="260" alt="image" src="https://serve.gptacademic.cn/publish/shared/Image/star3.png"/>
<br/>
</div>