Skip to main content
A single math task — solve a competition problem with a calculator tool — built four ways in one cookbook. Use this to compare LangGraph, OpenAI Agents SDK, smolagents, and Strands on the same dataset, or as a template for plugging your own framework into rLLM. The point of this cookbook is to make the AgentFlow + model-gateway architecture concrete. Every framework integration collapses to ~6 lines of agent body that points the framework’s LLM client at config.base_url and returns None. The gateway captures every LLM call by URL-routed session, the framework auto-builds an Episode from those captured traces, and the evaluator parses the answer out of the resulting trajectory. No callback handler, no traced chat client, no manual Step / Trajectory construction.

Pattern

Layout

Each flow

Install

Datasets

Eval

Substitute --agent with langgraph_math, openai_agents_math, smolagents_math, or strands_math. Same --evaluator math_evaluator for every flow.

Training

Or directly via train.py:

Adding a new framework

  1. Create agentflow/<framework>.py with one @rllm.rollout(name="<framework>-math") function that wires the framework’s LLM client to config.base_url, runs the agent on task.instruction, and return Nones.
  2. Add it to pyproject.toml’s [project.entry-points."rllm.agents"] and [tool.setuptools] py-modules lists; declare the framework’s package in [project.optional-dependencies].<framework>.
  3. Reinstall the cookbook with uv pip install --no-deps -e "cookbooks/agent_frameworks[<framework>]" and your agent shows up under rllm agent list.
That’s the entire integration surface.

On GitHub

cookbooks/agent_frameworks

Full source, README, and runnable launch scripts