Skip to content

v2.0.0

Choose a tag to compare

@adham90 adham90 released this 14 Feb 15:36
· 208 commits to main since this release

v2.0.0 — Major Schema Overhaul

Added

  • before_call and after_call callbacks — Agent-level hooks that run before and after LLM calls. Use method names or blocks.
  • Simplified DSL with prompt-centric syntax — New inline prompt syntax for more concise agent definitions.
  • Execution details table — Large payloads (prompts, responses, tool calls, error messages) split into a separate ruby_llm_agents_execution_details table for better query performance.
  • Tenants table — New ruby_llm_agents_tenants table with DB counter columns for efficient budget tracking.
  • Database-agnostic metadata JSON queries — Helper methods for querying JSON metadata across SQLite and PostgreSQL.
  • Class-level schema DSL — Define response schemas directly in agent classes.
  • Upgrade generator — Run rails generate ruby_llm_agents:upgrade to automatically migrate from v1.x to v2.0.

Changed (Breaking)

  • Schema split — Detail columns moved from executions to execution_details. Existing code still works via delegation.
  • Niche fields moved to metadata JSON — time_to_first_token_ms, rate_limited, retryable, fallback_reason, span_id, response_cache_key.
  • Renamed execution_metadata to metadata throughout the codebase.
  • LLMTenant concern uses foreign_key: :tenant_id instead of polymorphic association.
  • Dashboard redesigned with compact layout and sortable columns.

Removed (Breaking)

  • Workflow orchestration subsystem
  • version DSL method (cache keys are now content-based)
  • ApiConfiguration table (use environment variables)
  • Built-in moderation system (use before_call hook)
  • Built-in PII redaction (use before_call hook)
  • Image content policy

Fixed

  • Agent show pages crashing due to analytics querying removed columns
  • with_parameter scope now correctly queries execution_details table
  • Migration and upgrade path for both fresh installs and version upgrades
  • LLMTenant executions association using correct tenant_id foreign key

Upgrading from v1.x

rails generate ruby_llm_agents:upgrade
rails db:migrate

The generator will automatically create the new tables and migrate your data. See the CHANGELOG for the full migration guide.