RubyLLM 2.0: The Agentic Loop, Exposed 0 ▲ Carmine Paolino 1 day ago · Tech · hide · 0 comments Strip any agent framework down and you find the same loop: call the model, run the tools it asked for, call the model again, stop when it answers without wanting a tool. In RubyLLM 1.x that loop lived inside ask, sealed. In RubyLLM 2.0, you can also make it yours. # Run the agentic loop automatically chat = RubyLLM.chat(model: "claude-sonnet-4-6") .with_tools(Weather) .ask("What's the weather in Paris?") # => #<RubyLLM::Message role: :assistant, content: "Here's the current... # Run the agentic loop manually chat = RubyLLM.chat(model: "claude-sonnet-4-6") .with_tools(Weather) .ask_later("What's the weather in Paris?") chat.step until chat.complete? # generate, run_tools, generate chat.messages.last.content => "Here's the current weather in **Paris, France**:\n\n- 🌡️ **Tempera... ask still works exactly as before: one method call runs the conversation to completion. But now it decomposes into verbs you can call yourself: ask_later stages your message without sending anything. generate… No comments yet. Log in to reply on the Fediverse. Comments will appear here.