Skip to content

API Reference

Welcome to the rLLM API reference documentation. This section provides comprehensive documentation for all modules, classes, and functions in the rLLM library.

Overview

rLLM is a library for training LLM agents with reinforcement learning. The API is organized into several key modules:

Core Modules

๐Ÿค– Agents

The agents module contains various agent implementations that can be trained with reinforcement learning:

  • rLLM Data Structures: Step, Trajectory, Episode, and TrajectoryGroup
  • Base Agent: Core agent interface and base functionality

๐ŸŒ Environments

The environments module provides various training and evaluation environments:

  • Base Environment: Core environment interface

๐Ÿงฉ Workflow

The workflow module supports complex multi-step agent interactions:

  • Base Workflow: Core workflow interface and base functionality

โš™๏ธ Engine

The engine module contains the core execution infrastructure:

  • Agent Execution Engine: Handles trajectory rollout and agent execution
  • Agent Workflow Engine: Handles episode rollout for complex workflows

๐ŸŽฏ Trainer

The trainer module provides RL training capabilities:

  • Agent Trainer: Main training interface for RL algorithms
  • Ray Runtime Environment: Configuration for Ray runtime environment

๐Ÿงช Experimental

Experimental APIs for unified backend-agnostic training:

  • rLLM Advantage Estimator: Registry, built-in estimators, and config types (docs)

๐Ÿ› ๏ธ Tools

The tools module provides a comprehensive framework for creating and managing tools:

  • Tool Base Classes: Core interfaces and data structures
  • Web Tools: Search, scraping, and content extraction tools
  • Code Tools: Code execution and AI-powered coding assistance
  • Tool Registry: Central registry for managing tools

๐Ÿ“ Parser

The parser module provides functionality for parsing tool calls and managing chat templates:

  • Tool Parsers: Parse tool calls from different model formats
  • Chat Parsers: Parse messages in chat completions format into string