RubyLLM 2.0 and 2.1 are out and come with new APIs for video, speech, OCR, reranking, batches, conversation controls, expanded list of supported providers and even better Rails integration. But that's not all. If you build chat-based agents in Rails, tools can now wait for a human to approve them, you can run the agent loop one step at a time, and the agents can live in the database and survive a restart. So let's have a look on how to upgrade our old agents and give them new capabilities.
💡 This post is mainly about RubyLLM 2.0 and 2.1 features for agents. For the full list, see also the official What's New in 2.0 and 2.1 guides.
A quick look on the changes
The short version of both releases include the following main additions:
Tool approvals. Mark a tool with requires_approval and the agent pauses until a human says yes or no.
Caller-controlled loop. ask_later , generate , run_tools , and step let you run the agent loop one piece at a time.
Durable agents.…