AgentJet: A Distributed Swarm Training Framework for Agentic Reinforcement Learning

Qingxu Fu, Boyin Liu, Shuchang Tao, Zhaoyang Liu, Cheng Chen, Xuanfa Jin, Rong Zhu, Bolin DingarXiv 2026

TL;DR

AgentJet is an open-source, distributed training framework for agentic reinforcement learning (RL) that decouples model optimization from environment execution using standard LLM serving APIs. This flexible, swarm-based architecture enables multi-model multi-agent training, fault-tolerant execution, and live code iteration, while a novel timeline-merging technique accelerates actor updates by 6.25×.

What Problem Does This Paper Address?

Reinforcement learning for LLM agents (agentic RL) is fundamentally different from standard single-turn RLHF. Agents must interact with complex, often fragile external environments (such as Docker containers, web browsers, or databases) over long, multi-turn trajectories.

Existing distributed RL frameworks tightly couple rollout generation with model training. This creates several critical bottlenecks:

  • Runtime Fragility: A single environment crash or timeout can derail the entire training pipeline, discarding in-flight progress.
  • Multi-Model Constraints: Monolithic trainers typically optimize a single policy at a time, making it difficult to train heterogeneous multi-agent teams where different roles use different model sizes.
  • Iteration Overhead: Modifying agent code or tweaking a reward coefficient forces a full restart of the training process, costing 5–10 minutes to reload weights and reinitialize engines.
  • Redundant Context: As an agent interacts over multiple turns, it repeatedly sends growing conversation histories (system prompts, tool definitions), forcing the optimizer to wastefully reprocess identical prefix tokens.

Methods

AgentJet solves these issues by structurally splitting the training pipeline into a decentralized Swarm Architecture composed of two node types:

  1. Swarm Servers (Optimizer Nodes): Hosted on GPU clusters, these nodes manage trainable models, inference engines (vLLM/SGLang), optimizers, and sample pools.
  2. Swarm Clients (Sampling Nodes): Lightweight, CPU-only processes that execute arbitrary agent loops, manage task environments, and compute rewards.
Figure 1: AgentJet swarm training architecture. The swarm servers (optimizer nodes) host model weights on GPU clusters, while the swarm clients (sampling nodes) execute agent workflows and collect reinforce- ment learning training trajectories. The swarm network is formed dynamically as clients join and leave, enabling fault-tolerant operation, hot-swap debugging, and multi-model training.

Clients and servers communicate entirely via standard OpenAI- or Anthropic-compatible APIs augmented with temporary per-episode routing credentials. Because the server-client topology is completely configurable, AgentJet natively supports heterogeneous multi-model RL, mixed-task training, and fault-tolerant client hot-swapping.

Core Optimizations:

  • Timeline Merging: To eliminate context redundancy, the server-side context tracker automatically identifies overlapping prompt prefixes across multi-turn interactions and merges them into single, consolidated training samples.
  • Dynamic Batching: AgentJet introduces five distinct server-client coordination strategies (e.g., task-count or all-clients-agree) to dynamically manage sample collection across unevenly paced tasks.
  • AutoResearch (A3R): An autonomous research module that leverages the framework's decoupled nature. A "Leader" agent formulates hypotheses and dispatches standardized "experiment blueprints" to distributed "Worker" agents on GPU clusters, managing long-horizon, multi-day RL campaigns entirely without human intervention.

Datasets

The authors evaluated AgentJet across a diverse suite of multi-turn and multi-agent benchmarks:

  • Werewolves RPG: A complex social deduction game used to evaluate shared and non-shared parameter multi-agent reinforcement learning.
  • Academic Translation: A hierarchical multi-agent workflow translating English academic abstracts into Chinese.
  • AppWorld: A highly interactive coding and tool-use benchmark simulating 9 apps and roughly 450 APIs.
  • AIME (American Invitational Mathematics Examination): Used for mathematical reasoning and testing the autonomous ablation capabilities of the AutoResearch module.
  • DeepResearch Bench: An open-ended analytical benchmark used to train a long-horizon financial deep research agent utilizing 19 specialized financial tools.

Key Insights and Ideas

  • The API as an Abstraction Layer: By elevating standard LLM serving interfaces into a formal execution-optimization boundary, AgentJet achieves complete framework agnosticism. Agents built on LangChain, AgentScope, or raw HTTP clients can be trained out-of-the-box with zero source-code modification.
  • State Partitioning Enables REPL Workflows: Separating expensive state (model weights, optimizers) on the server from cheap logic (prompts, reward functions) on the client allows for a Read-Eval-Print-Loop (REPL) style workflow. Researchers can patch agent code or adjust reward weights on a live training run in seconds without restarting the server.
  • Behavioral Diversity in Multi-Agent Teams: In competitive environments like the Werewolves game, training separate models for individual roles (non-shared parameters) outperforms a single shared policy. Independent parameter sets break behavioral correlations, preventing opponents from exploiting uniform speech and voting patterns.

Key Results

  • 6.25× Actor-Update Speedup: On the tool-heavy AppWorld benchmark, timeline merging reduced the average per-step actor-update wall time from $2160 \pm 171$ seconds to $346 \pm 13$ seconds, with zero degradation to training quality.
  • Framework Agnosticism Verified: A four-arm ablation testing identical GRPO recipes across different agent-loop frameworks (OpenAI SDK, LangChain, AgentScope, Raw HTTP) showed tightly overlapping reward curves, with a final evaluation reward spread of just 0.025.
  • Substantial Win-Rate Improvements: In Werewolves, a 14B model trained with AgentJet improved its success rate from 40.9% to 64.7% against a massive, static 235B opponent ensemble.
  • Successful Autonomous Science: The AutoResearch (A3R) module autonomously executed a 3-day, 19-job parallel ablation study on GPU clusters to successfully map out the minimum stable batch size for AIME swarm training.

Limitations and Future Work

  • Reward Hacking Vulnerability: The automated task onboarding module successfully sets up training loops from natural language but lacks built-in safeguards against reward hacking. In a "Who is the Spy" case study, agents quickly converged on a degenerate strategy of paraphrasing each other because the generated reward function failed to penalize repetition (though AgentJet's REPL architecture allowed a human to quickly hot-swap a patch).
  • The "Cocktail Training" Tax: While mixed-task training (combining AppWorld and AIME under one server) significantly reduces infrastructure costs and produces a more versatile generalist model, it introduces a performance penalty on tool-heavy benchmarks compared to training dedicated, single-task specialists.

Summary updated

BibTeX
@misc{fu2026agentjet,
  author = {Qingxu Fu and Boyin Liu and Shuchang Tao and Zhaoyang Liu and Cheng Chen and Xuanfa Jin and Rong Zhu and Bolin Ding},
  title = {{AgentJet: A Distributed Swarm Training Framework for Agentic Reinforcement Learning}},
  year = {2026},
  eprint = {2606.04484},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.04484},
}
Figure