Compatibility
Check the dependency versions and behaviors that this repository verifies.
After reading this guide, you will know:
- Which runtime and protocol dependency ranges the gem supports.
- What the local and CI suites assert.
- Which client and provider claims remain unverified.
What this gem is checked against, what it is not, and what changes when a dependency does.
Supported versions
| Component | Range | Evidence |
|---|---|---|
| Ruby | >= 3.3 |
Recorded 0.4 CI passes on 3.3.12 and 3.4.11; 4.0.9 passes locally, and CI now includes 4.0. Ruby 3.2 is no longer supported |
| RubyLLM | >= 2.1, < 3.0 |
2.1.0 and 2.1.1 passed 1.0.0 release CI. The 1.0.1 local checks include 2.2.3. |
ag-ui-protocol |
~> 0.2.0 |
0.2.0 |
| JSON | >= 2.0, < 3 |
2.21.2 passes both Rails lines; JSON 3 removes the quirks_mode option used by Rails 8.0 |
| Rails (adapter only) | railties, actionpack, activerecord >= 8.0 |
Recorded 0.4 CI passes on 8.0.5.1 and 8.1.4 with Ruby 3.3/3.4; both pass locally on Ruby 4.0.9 |
| AG-UI schema | pinned commit 89cedd3fd549feeee41e50e1d7c6d373e549241a |
vendored, SHA-256 recorded in AG-UI Protocol Coverage |
The pure-Ruby core uses ruby_llm and ag-ui-protocol, plus the patched
standard-library gems required by the gemspec. Rails,
ToolViews, OpenUI and OddlyDock are not runtime dependencies, and the Rails
adapter is only loaded when Rails::Railtie is already defined.
RubyLLM 2.2.3 in 1.0.1
On Ruby 3.3.5, the local 1.0.1 suite reports 322 examples on each of RubyLLM 2.1.0 and 2.1.1, and 323 on 2.2.3. Each run has zero failures and skips two opt-in provider checks. The pinned browser client passes 18 workflows against scripted chats, with all 242 received events schema-valid.
The 1.0.1 integration suite covers Chat Completions, Responses, Anthropic, and Gemini tool streams with intercepted HTTP. It matches browser-facing call IDs to the RubyLLM invocation, handles approval questions through the 2.2 API, and preserves timeout and connection error codes. Ordinary questions and background task pauses without a pending approval still end with unsupported_run_state.
A separate upgrade probe starts with the published 1.0.0 gem and RubyLLM 2.1.1. It persists two interrupts in SQLite and saves the assistant tool calls. A fresh process running the installed 1.0.1 gem and RubyLLM 2.2.3 restores the calls, approves one and declines the other. An exact retry returns the recorded result. The fixture records one tool execution for approval and zero for denial. The installed Rails host separately exercises a reloaded Active Record chat with the old empty approval marker, including refusal after its saved arguments change. These are local, offline checks using intercepted HTTP. See Upgrading.
Using gem version 1.0.0 with RubyLLM
Pin gem "ruby_llm", "2.1.1" in your Gemfile when using 1.0.0. Bundler also permits 2.2.3. On 2026-12-03 the same checkout on Ruby 3.3.5 ran 321 examples with zero failures on 2.1.1 and 36 failures on 2.2.3. Both runs skipped the two opt-in live checks. On 2.1.1 the pinned browser client also passed 18 scripted workflows and all 242 consumed events passed schema validation.
With 2.2.3 the mapper expects key/value pairs while the tool-call collection yields call objects. The intercepted approval and denial flows both fail before they present an interrupt. A provider timeout also reaches the client as provider_error instead of transport_timeout. The focused reproduction is bundle exec rspec spec/integration/live_harness_spec.rb with RUBY_LLM_VERSION=2.2.3 resolved in a separate bundle. These checks use a real RubyLLM chat and intercepted HTTP.
What is asserted, and how
| Claim | How it is checked |
|---|---|
require 'ruby_llm/ag_ui' loads no Rails, opens no connection, reads no credentials |
spec/integration/core_load_spec.rb runs the require in a subprocess and inspects what it loaded |
| Every emitted event is a valid AG-UI 1.0 event | mapper and run specs validate each encoded event against the vendored schema (SchemaHelper) |
| The 31-type coverage map is the schema’s own union | spec/ruby_llm/ag_ui/coverage_spec.rb compares the pinned list with Coverage, and the SDK enum at runtime |
The SDK’s five legacy THINKING_* constants are never counted as 1.0 |
the same spec asserts LEGACY_SDK_ONLY is absent from the map |
| Text, tool and lifecycle sequences are ordered and closed | mapper specs, including partial arguments, a nil chunk, a tool that raises, and a thinking-only chunk |
| Streamed tool arguments join to valid JSON for each call | spec/integration/streamed_tool_calls_spec.rb runs a real RubyLLM chat over intercepted Chat Completions, Responses, Anthropic, and Gemini streams, including two tool rounds in one turn |
| A Rails boot does not load Active Record through the gem | spec/integration/core_load_spec.rb requires the gem after the Active Record railtie in a subprocess |
| One outcome per run, and the outcome matches what happened | run specs: success, interrupt, cancelled, sanitized failure, unsupported pause |
requires_approval → interrupt → resume executes the tool once |
run specs drive a fake chat through the pause, approve, deny, replay and expiry cases |
| Identity is reserved, replayed and never re-executed | store specs (memory and ActiveRecord), run specs for conflict, reconnect and live-run refusal |
| The Rails adapter serves a run and refuses invalid requests before committing | adapter specs with a controller double, and an end-to-end spec/integration/rails_adapter_spec.rb |
| The installer resolves the documented command | spec/ruby_llm/ag_ui/generators/install_generator_spec.rb |
| The installed gem generates a working migration and initializer | bin/verify-package --rails generates files and migrates the table up and down in SQLite |
ruby_llm-ag_ui installs outside the checkout |
bin/verify-package resolves dependencies in a fresh gem home and loads the packaged core |
The RSpec suite runs offline with fakes and no provider credentials. Package verification uses the network only to install dependencies, then runs its core and Rails checks without a provider. Its advisory check includes the actual default-library gem versions activated by the isolated core install.
1.0.0 Release Evidence
Version 1.0.0 was rehearsed as the local, unpublished candidate 1.0.0.rc.1 and published after the maintainer’s acceptance. The dated reviews below record that candidate. The 2026-10-21 evidence records the earlier rehearsal.
Published 1.0.0 Artifact
The release CI passes all 21 jobs at e80dfdd:
Ruby 3.3, 3.4, and 4.0 with RubyLLM 2.1.0 and 2.1.1; Rails 8.0 and 8.1 on each
Ruby; lint, installed-host checks, and the browser suite. The
release workflow verifies the tagged package and
publishes it through trusted publishing.
The RubyGems and GitHub Release downloads have the same SHA-256,
28a223ca6f668f077f677e72c6040da7ae9387d828be86e3f11cd35c8909a762, which matches
SHA256SUMS and the RubyGems metadata. All 67 packaged files match v1.0.0
byte for byte. The downloaded gem passes both installed endpoints, clean core
and Rails installation, and the activated-dependency advisory check without
being rebuilt. The stable documentation, the 0.4 archive at /v0/, and /next/
serve the expected versions.
Release Verification on 2026-11-02
The 1.0.0 release commit passes 321 offline examples with zero failures and two opt-in live checks skipped on Ruby 3.3.5, and lint passes on 100 files. The browser suite passes 18 workflows with all 242 consumed events schema-valid. The built gem passes both installed endpoints, clean core and Rails installation with the generator migrated up and down, and the activated-dependency advisory check. The upgrade from the published 0.4.0 artifact keeps the generated files, reconnects, runs an approval once, and denies with no effect.
The OpenRouter rerun passes live streamed text and approval with reconnect, plus the offline and intercepted harness cases: six examples, zero failures.
The development bundle audit uses 1,307 advisories at
79c0e052ade15d29d3ecc1e8d4fa59c337a86383. Advisories published on 2026-11-01
affected addressable, rack, and sqlite3 in the development and test bundle
only; after updating them to 2.9.2, 3.2.8, and 2.10.2 the audit reports no
findings. None is a runtime dependency of the gem. The npm audit reports zero
findings.
Candidate Review on 2026-11-02
A review of every change since 0.4.0 found one more streamed tool-call defect. RubyLLM starts a new call for each fragment that carries an id, but the mapper continued the call already at that stream index. An OpenAI-compatible server that sends each parallel call whole at index 0 had the second call’s arguments appended to the first. A real-chat intercepted-HTTP spec fails before the fix.
The offline suite passes 321 examples with zero failures and two opt-in live checks skipped on Ruby 3.3.5, and lint passes on 100 files. Ruby 4.0.9 passes the same 321 examples twice: with RubyLLM 2.1.1 and Rails 8.1.4, and with RubyLLM 2.1.0 and Rails 8.0.5.1. Malformed-input refusal holds on JSON 2.7.1, 2.9.1, and 2.21.2. CI adds Ruby 4.0 to the core and Rails matrices; its remote results are separate evidence.
The fix changes a packaged file, so the 2026-10-26 artifact below is superseded. The rebuilt candidate passes the installed-host checks for both endpoints and the generated RubyLLM models. Its upgrade from the published 0.4.0 artifact keeps the generated files, reconnects, runs an approval once, and denies with no effect. The browser suite passes 18 workflows with all 242 consumed events schema-valid; desktop approval progress and 390px mobile denial screenshots were inspected.
Final Local Review on 2026-10-26
The offline suite passes 320 examples with zero failures and two opt-in live checks skipped, on Ruby 3.3.5 with RubyLLM 2.1.1 and Rails 8.1.4. Line coverage is 97.58 percent; this measures executed lines rather than complete behavior. The same 320 examples pass separately on the minimum RubyLLM 2.1.0. Lint passes on 100 files. Added regressions cover SSE quality and wildcard precedence, empty media parameters, and actual Rails requests without Active Record. Known missing-record errors still return 404; unrelated host errors propagate. The focused tests reproduce the defects before their fixes.
The client still uses @ag-ui/client 1.0.3. After overriding Zod to 4.6.6,
18 browser workflows pass with all 242 consumed events schema-valid. Desktop
approval progress and 390px mobile denial screenshots were inspected. The
2026-10-26 npm audit reports zero findings. Before the override, the audit
reported four high findings from one transitive Zod advisory. This is a
development bundle, not a JavaScript dependency shipped with the Ruby gem.
The Ruby audit uses 1,269 advisories at
03da937a9e171e3fedebde6620e203559b7a60c0 and reports no findings after updating
the local Rails dependency crass from 1.0.7 to 1.0.8. Existing applications
need their own lockfile audit; installing this gem does not audit a host’s
Rails dependencies. CI now audits both the Ruby development bundle and npm.
bin/verify-upgrade preserves this rehearsal as a repeatable command. It
installs the published 0.4.0 artifact and the built candidate, then uses separate
processes against one temporary SQLite database. Generated files are unchanged;
0.4 completed outcomes reconnect, old approvals execute once, denial executes
no effect, completed retries do not execute again, and scope isolation holds.
Its scripted chat and existing development dependencies are separate evidence
from clean installation and real-provider tests.
The bounded OpenRouter rerun passes both live text and approval/resume checks
with openai/gpt-4.1-mini, plus one offline harness case. No live browser,
Rails/provider, denial, cancellation-timing, or additional-provider claim is made.
Earlier Local Rehearsal on 2026-10-21
On 2026-10-21, the candidate passes 313 offline examples with zero failures
and two opt-in provider skips on Ruby 3.3.5, RubyLLM 2.1.1, and Rails 8.1.4.
Lint passes on 97 files. The browser suite passes 18 workflows with
@ag-ui/client 1.0.3 and validates all 242 consumed events. Desktop approval
and 390px mobile denial screenshots were inspected.
The built artifact passes both installed endpoints, the generated RubyLLM models, a clean gem home with the activated-dependency audit, and Rails generator migration up and down. The root advisory audit reports no findings.
An upgrade rehearsal installs the published 0.4.0 gem in an isolated gem home, generates and migrates its table in SQLite, and records a succeeded run and an interrupted run. The candidate artifact then reconnects to the 0.4 run without executing it, resumes the 0.4 interrupt with the original call id, runs the tool once, and reconnects without running it again. Its generated migration and initializer match 0.4.0.
The rerun OpenRouter session uses openai/gpt-4.1-mini with RubyLLM 2.1.1.
Both live examples pass: streamed text, and the synthetic approval/resume with
reconnect. The same command runs four offline and intercepted harness examples,
for six examples and zero failures.
The audit for this candidate found streamed tool-call defects that the 0.4 evidence did not exercise: a second tool round in one turn, Anthropic and Bedrock empty opening input, and Gemini whole-call arguments. Each defect has a real-chat intercepted-HTTP spec that fails before its fix. Remote CI is separate from that local record. No RC tag or publication is planned.
0.4 Release Acceptance
The 2026-10-21 acceptance CI
passes all 17 jobs at e09b81b. Each test job reports 296 examples, zero failures,
and two opt-in provider skips across the Ruby, Rails, and RubyLLM matrix below.
Local checks also pass 296 examples and lint on 95 files. Both installed
endpoints verify one original tool call and one result with its original id.
The added regressions cover Run#record on reconnect and real RubyLLM denial
without tool execution. Denial uses intercepted HTTP. The local OpenRouter
text and approval/resume examples are separately rerun on the release code:
two live cases plus one offline harness example pass with zero failures.
The browser suite again passes 18 workflows and validates all 242 consumed events. Desktop approval progress and 390px mobile denial screenshots were inspected. The earlier candidate record below retains its own commit and counts.
Published 0.4.0 Artifact
The tag-source CI
passes all 17 jobs at 23d9020. The
0.4.0 release workflow
passes its offline, browser, advisory, installed-host, and clean-install checks.
The actual GitHub and RubyGems downloads have matching SHA-256 hashes, including
the release checksum and RubyGems metadata. All 66 packaged files match the tag.
The downloaded artifact independently passes both installed endpoints and fresh
core, activated-dependency audit, and Rails generator migration up/down checks.
The stable documentation deployment
passes. HTTP checks verify the stable guides, generated API, release history,
and stable/Next installation commands and llms.txt. A fresh browser session
shows 0.4.0 and switches to Next through the version menu; its screenshot was
inspected. Publication checks do not expand the provider or database claims below.
Local 0.4 Development Verification
On 2026-10-21, the candidate passes 294 offline examples with zero failures
and two opt-in provider checks skipped. Separate runs use RubyLLM 2.1.0 and
2.1.1 on Ruby 3.3.5 with Rails 8.1.4 and JSON 2.21.2. The 0.4 candidate CI
passes all 17 jobs at 14b3c15: six Ruby jobs across 3.2.11, 3.3.12, and
3.4.11 with both RubyLLM versions; eight Rails jobs across 8.0.5.1 and 8.1.4
on Ruby 3.3/3.4 with both versions; lint, installed-host, and browser checks.
Each suite reports 294 examples, zero failures, and two opt-in provider skips.
The maintained client passes 18 workflows and validates all 242 consumed events. Approval assertions inspect the official client’s messages as well as the wire: one original call, one associated result, no duplicate visible text after reconnect. The remote browser uses Chromium 156.0.8078.4; local and remote desktop progress and 390px denial screenshots were inspected. The fixture now fires the same resumed before-tool callback as a real RubyLLM chat. Installed-host and generated Rails model checks pass. A fixed local 66-file artifact independently passes clean core loading, activated dependency audit, and Rails generator migration up/down. The isolated core uses JSON 2.7.1. The root and activated-core audit reports no findings against the recorded advisory database. These are development artifact checks, not public downloads.
Recorded Live Provider Session
The 2026-10-21 local session uses OpenRouter with openai/gpt-4.1-mini,
RubyLLM 2.1.1, and Ruby 3.3.5. Both live examples pass: streamed text, then a
synthetic tool approval/resume with its original call id, redaction, and completed
resume reconnect. The tool is not executed before approval and executes once
after it. The same command includes one offline harness example, for three
examples total with zero failures. It verifies the gem’s Ruby path, not a live
provider session through the browser or a deployed Rails application.
This session first exposed duplicate tool-call starts on a real resume. An intercepted-HTTP real-chat test reproduces that defect before the fix and passes afterward. Text, tool results, and approval are live evidence for this route and model only. Live cancellation, timeout timing, network loss, denial, and other providers remain unverified. Follow Provider Verification to reproduce.
The checked current ag-ui-protocol remains 0.2.0. Its missing cancelled
outcome and RUN_STARTED.protocolVersion still require the local protocol
shims. Their encoded events pass the pinned schema checks; no workaround is
removed solely because a new version was expected.
Local 0.3 Development Verification
On 2026-10-19, Ruby 3.3.5, RubyLLM 2.1.1, and Rails 8.1.4 pass 284 examples
with zero failures and one opt-in provider example skipped. The 18 browser
workflows pass with @ag-ui/client 1.0.3, Playwright 1.64.1, and Puma 8.0.2;
all 242 consumed events validate against the pinned schema. Desktop disconnect
and 390px cancellation screenshots were inspected.
Independent Ruby processes share one SQLite file to check reservations, approval decisions, and competing outcome writes. Write barriers force both processes to observe the old payload before either updates it. A producer killed after a synthetic tool effect is explicitly recovered; reconnect never executes the tool again. Mutation checks reject removal of either SQL compare conditions or revision validation.
The real RubyLLM chat is also checked with intercepted HTTP: cancellation at a checkpoint makes no provider request, and a request timeout produces a sanitized, reconnectable failure. These tests make no live provider call. Installed-host checks pass for both endpoints and generated Rails models.
Recorded 0.3 CI Verification
The 2026-10-20 CI run
passes all ten jobs at aa9e035: Ruby 3.2.11, 3.3.12, and 3.4.11; Rails
8.0.5.1 and 8.1.4 on Ruby 3.3/3.4; lint; installed-host checks; and the browser
suite on Ubuntu 24.04. Each test job passes 284 examples with zero failures
and one opt-in provider skip. The browser suite passes 18 workflows and
validates all 242 consumed events with @ag-ui/client 1.0.3.
It uses Playwright 1.64.1 and Chromium 156.0.8078.4. Desktop disconnection and
390px cancellation screenshots from this run were inspected.
The first candidate failed when Rails 8.0 and JSON 3 loaded a real RubyLLM chat. Version 0.3 bounds JSON to 2.x; the passing matrix uses 2.21.2. Intercepted HTTP tests reproduce the failure before the bound and pass after it. These checks make no live provider call.
The 0.3.0 release workflow passes offline tests, browser workflows, advisory checks, and installed-host plus clean core/Rails checks. After publication, the actual GitHub and RubyGems downloads have matching SHA-256 hashes and all 62 packaged files match the tag. The downloaded artifact independently passes both installed endpoints and fresh core, advisory, and Rails generator migration checks. The isolated macOS core activates JSON 2.7.1; the remote test matrix uses 2.21.2.
Recorded 0.2 Client Verification
On 2026-10-19, the local 0.2.0 candidate passes the maintained browser workflows
with @ag-ui/client 1.0.3, Playwright 1.64.1, and Chrome 155.0.8059.82 on macOS.
Both the plain Ruby and Rails endpoints use scripted chats. Checks cover text,
a second turn, approval/denial, incremental progress before completion, default
tool-result redaction, sanitized failure, cancellation, and exact completed-run
reconnect, including a completed resume run. Captured events also validate
against the pinned schema. The progress demo publishes synthetic counts through
a host policy and withholds messages; unit tests check default progress redaction.
Run bin/check-browser to reproduce and inspect screenshots and events under
tmp/browser/. bin/check --package separately installs the built artifact
outside the checkout, checks both endpoints, and generates RubyLLM models and
ordered example migrations to verify scoped chat persistence. This package
probe uses available development dependencies; bin/verify-package checks a
clean gem home with freshly resolved dependencies.
The 2026-10-19 CI run
passes all ten jobs at 4aba0dc: the Ruby and Rails matrices above, lint,
installed-host verification, and the browser suite on Ubuntu 24.04.
The browser job uses Playwright’s Chromium 156.0.8078.4 and passes all 12
scenarios, with 154 consumed events validated against the schema. Its desktop
progress and mobile denial screenshots were also inspected. These remain
synthetic checks; no live provider session is recorded.
The 0.2.0 release workflow also passes browser, advisory, installed-host, and clean-install verification. The published GitHub and RubyGems downloads have matching checksums. The actual published artifact separately passes the installed-host and clean core/Rails checks after download.
What is not asserted
- Other clients or versions. CopilotKit and client versions other than the
recorded
@ag-ui/clientversion have not been verified. Schema conformance does not establish that every UI renders the events correctly. - Other live paths. Only the recorded OpenRouter model’s text and approval workflow is verified live. Anthropic, Gemini, and OpenAI Responses streams are checked with intercepted HTTP only. Browser provider sessions, other providers, cancellation timing, timeouts, and network-loss recovery need separate evidence.
- Every RubyLLM patch release in the
>= 2.1, < 3.0range. The upper bound is a dependency resolver bound; verified versions for 1.0.1 include 2.1.0, 2.1.1, and 2.2.3. Future 2.x releases need the same checks before a compatibility claim. - Rails versions before 8.0. The adapter uses
Rails.setup!and an initializer, and its specs run on 8.0/8.1. It may work on 7.2 and it is not tested there. - Databases other than SQLite for the ActiveRecord store. The store uses a unique index and conditional payload updates. PostgreSQL and MySQL are untested; the SQLite checks do not establish their concurrency behavior.
Deliberate behavior worth knowing
These are choices, not gaps, and each has a reason:
- Tool results are
[redacted]by default. Redaction keeps the payload’s shape and withholds its content until a host opts out. A client will see[redacted]until you configure a policy. - A resume run emits
TOOL_CALL_RESULTwithout repeatingTOOL_CALL_START. The call was already reported in the run that interrupted; repeating it would duplicate the call in the client’s conversation. MESSAGES_SNAPSHOTis never produced. History is the host’s, and the gem will not re-id it.STATE_SNAPSHOTis produced, on a reconnect.- Tool progress is opt-in.
ACTIVITY_SNAPSHOTcarries local tool progress when enabled.ACTIVITY_DELTA,REASONING_*,RAWandSUBAGENT_*remain unproduced. A thinking-only chunk produces nothing. - Message ids are the gem’s (
run-<id>:a<n>), scoped to the run, because RubyLLM streaming chunks carry no message id. - Steps are per phase (
completion,tool), namedstep-<n>per run. - Client-supplied tools are never registered.
input.toolsis reported and ignored. - Two live streams for one run are refused, not merged; a run that already ended is served by reconnect instead.
When a dependency moves
A new ag-ui-protocol 0.2.x that adds a schema type will fail the coverage
spec’s runtime comparison, which is the point: the map has to be updated
deliberately, with a status and a reason.
ag-ui-protocol 0.3+ would need Protocol re-checked first: the gem
subclasses Model and BaseEvent for the cancelled outcome, the versioned
RUN_STARTED and the run-finished shape. The gaps listed in
the protocol coverage guide may be closed upstream, in which case
the local subclasses should be removed rather than kept.
A new RubyLLM 2.x minor can change the callback contract (before_tool_call,
after_message, complete’s streaming block), approval state (waiting?,
the 2.1 approval methods, or 2.2 questions and decisions) or the shape of
chunks and messages. The mapper and run specs pin all of it, so an upgrade fails
loudly instead of silently dropping content. A 3.0 would need a new adapter
layer; the gemspec refuses it.
A new AG-UI schema commit is a deliberate change: vendor the file, update
Protocol::SCHEMA_COMMIT and the SHA-256 in
the protocol coverage guide, then let the coverage and schema
specs tell you what moved.
Reporting an incompatibility
Open an issue with the versions from RubyLLM::AgUI.config.to_h, the event types
that went wrong, and whether a real client or a live provider was involved. A
redacted trace is enough; do not paste credentials or raw tool payloads.
Next Steps
- AG-UI Protocol Coverage - inspect event support.
- Upgrading - record breaking dependency changes.