Skip to content

v3.10.0

Choose a tag to compare

@adham90 adham90 released this 13 Mar 17:47
· 61 commits to main since this release

Added

  • RubyLLM::Agents::Tool base class — Extends RubyLLM::Tool with agent context access, per-tool timeouts, and automatic error handling. Users implement execute() (standard RubyLLM convention) while call() wraps with context, timeout, and error recovery
  • ToolContext accessor — Read-only context wrapper providing method-style (context.container_id) and hash-style (context[:container_id]) access to agent params, tenant ID, and execution ID from within tools
  • Per-tool timeout DSL — timeout 30 class-level DSL on tools, with config.default_tool_timeout global fallback
  • ToolExecution model — Real-time per-tool tracking with individual database records (INSERT on start, UPDATE on complete), enabling live dashboard views and queryable tool-level analytics
  • Cancellation support — on_cancelled: proc checked before each tool execution. Raises CancelledError which BaseAgent catches to return Result with cancelled? = true
  • Result#cancelled? — Query whether an agent execution was cancelled mid-run
  • Example coding agent — CodingAgent with FileReaderTool demonstrating tool context and timeout features

Fixed

  • Undefined method error? on Context — Fixed budget middleware breaking tenant budget tracking when Pipeline::Context lacked the error? method