"What makes an agent different from a regular model is its ability to interact with the outside world to complete a task. It doesn't have to go through you all the time or even talk to you; it just gets things done on its own." This foundational insight, shared by William Hang, API Engineering lead at OpenAI, encapsulates the promise of autonomous AI. In a recent OpenAI Build Hour, Hang, alongside Theophile Sautory (Applied AI Solutions Architect), introduced Agent Reinforcement Fine-Tuning (RFT), a powerful new capability designed to elevate the performance of these tool-using agents. The session, hosted by Cristine Jones from Startup Marketing, delved into the technical nuances, strategic benefits, and real-world success stories of Agent RFT, offering a compelling vision for the future of AI development.
Agent RFT marks a significant leap from traditional fine-tuning methods, empowering reasoning models to become more sophisticated and efficient in their interactions with external tools and environments. While prompt optimization and task simplification offer initial performance gains, Agent RFT provides a deeper, end-to-end training mechanism. Unlike its predecessor, Base RFT, which is limited to single-step reinforcement learning and in-platform graders, Agent RFT embraces multi-step reinforcement learning and allows for arbitrary external reward signals. This crucial distinction means that during training, the agent can actively call external tools and receive real-time feedback via customer-provided endpoints, enabling it to learn from its interactions within a business's unique operational context.
The benefits of this approach are substantial for AI professionals and founders looking to deploy robust, high-performing agents. Agent RFT significantly enhances an agent's ability to effectively utilize tools, ultimately leading to more optimal and accurate final answers. Crucially, it is remarkably sample-efficient, requiring only tens to hundreds of examples to achieve noticeable performance improvements – a vital characteristic in domains where high-quality training data might be scarce. Furthermore, fine-tuned models exhibit lower latency and superior machine learning performance on agentic tasks, translating directly into faster, more responsive user experiences.
One of Agent RFT's most compelling advantages lies in its ability to bridge the "domain shift" gap. OpenAI's frontier models are trained on vast, generalized datasets and general-purpose tools. However, real-world business applications often rely on highly specialized, proprietary tools. Agent RFT allows models to adapt to these unique toolsets, learning to interact with them in the most efficient and effective manner. This adaptive capability means an agent can learn to use fewer tool calls to achieve the same or even better results, directly contributing to reduced latency and improved operational efficiency. The system even allows for imposing a "tool call budget," further optimizing resource utilization.
The technical implementation of Agent RFT is designed for flexibility and control. During the training process, each agent rollout is assigned a unique trajectory ID, which is attached to all subsequent tool calls and final answers. This allows a business's backend systems to accurately track and manage the state of each rollout. The custom grader, provided as an endpoint, receives the full context of the agent's actions and responses, enabling businesses to define highly specific reward signals that align with their precise performance metrics and desired behaviors. This granular control over the learning signal is what truly differentiates Agent RFT, allowing for tailored optimization that reflects real-world business value.
Sampriti Panda, a Research Engineer at Cognition, offered a compelling customer spotlight, detailing how Agent RFT is integral to developing their autonomous AI engineer, Devin. Cognition’s "planning mode subagent" is tasked with identifying which files to edit to complete a given task. Their motivation was to train the model to use fewer tool calls to quickly reach the editing phase while maintaining or improving accuracy. By utilizing Agent RFT with a dataset of real-world repository queries and ground-truth edited files, Cognition observed significant gains. Their evaluation showed that Agent RFT models substantially outperformed base models, with performance further boosting when trained on more data. This success underscores Agent RFT’s potential for complex, real-world engineering tasks.
Related Reading
- Google Cloud's Vertex AI Agent Engine Bridges the Production Gap for AI Agents
- Google Labs' Jules: Autonomy Redefines AI Coding
- Google's Agentic Cloud: Redefining Commerce and Development
The demo further illustrated these points, showcasing how the fine-tuned model (Step 10) achieved higher average reward and significantly lower average latency compared to the baseline model (Step 0). A critical observation was the substantial drop in tool calls per trace—from approximately 6.9 in the baseline to 4.2 in the fine-tuned model—indicating a more efficient and intelligent use of tools. The model also demonstrated a reduced fraction of repeated bigrams in its reasoning, suggesting a more sophisticated and less repetitive problem-solving approach.
For businesses looking to implement Agent RFT, several best practices are crucial. Tasks should be well-specified and constrained, with clear consensus on optimal outcomes to ensure effective incremental learning. A non-zero baseline performance with existing models is necessary for RFT training to effectively bootstrap. Focusing on "quality over quantity" for datasets—even with as few as 100 examples—can yield substantial improvements if the data quality is high. Finally, mirroring production behavior in the training environment and investing in a robust, domain-aligned grader with some gradient are key to maximizing Agent RFT's transformative potential.

