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, andTrajectoryGroup - 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