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
| Aspect | Value |
|---|---|
| Loop shape | Multi-turn (each framework’s own ReAct loop) |
| Tools | One: calculate — AST-based safe arithmetic interpreter, shared across all four flows |
| Termination | Whatever each framework decides (typically: model emits no more tool calls) |
| Reward shape | 1.0 if final answer matches ground truth (mathd + sympy), else 0.0 |
| Return type | None — the gateway captures everything; the framework auto-builds the Episode |
| GRPO grouping | Each flow’s trajectory name is set on @rllm.rollout and routed via f"{task_id}:{name}" |
Layout
Each flow
Install
Datasets
Eval
--agent with langgraph_math, openai_agents_math, smolagents_math, or strands_math. Same --evaluator math_evaluator for every flow.
Training
train.py:
Adding a new framework
- Create
agentflow/<framework>.pywith one@rllm.rollout(name="<framework>-math")function that wires the framework’s LLM client toconfig.base_url, runs the agent ontask.instruction, andreturn Nones. - Add it to
pyproject.toml’s[project.entry-points."rllm.agents"]and[tool.setuptools] py-moduleslists; declare the framework’s package in[project.optional-dependencies].<framework>. - Reinstall the cookbook with
uv pip install --no-deps -e "cookbooks/agent_frameworks[<framework>]"and your agent shows up underrllm agent list.
On GitHub
cookbooks/agent_frameworks
Full source, README, and runnable launch scripts

