0.0
The project is in a healthy, maintained state
An unofficial RubyLLM ecosystem extension that turns one RubyLLM 2.x chat turn into one AG-UI 1.0 run. It parses and validates RunAgentInput, maps RubyLLM streaming, tool and lifecycle behavior onto schema-valid AG-UI events, turns requires_approval pauses into interrupt outcomes with host-authorized resume, reports cancellation as the cancelled outcome, and ships an SSE writer for plain Ruby plus an optional Rails adapter.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0.4.2, < 1
>= 0.7.2, < 1
>= 2.1, < 3.0
>= 1.0.4, < 2
>= 3.2.3, < 4
 Project Readme

ruby_llm-ag_ui

CI

Connect RubyLLM chats to AG-UI clients over Server-Sent Events. The gem handles streaming text, tool calls, approval and resume, cancellation outcomes, and run identity. Use it from plain Ruby or with the optional Rails adapter.

Your application provides authentication, tool permissions, chat history, and the model. This is an unofficial community project, independent of the RubyLLM and AG-UI maintainers.

Documentation · Getting started · Rails guide · Compatibility

Install

gem 'ruby_llm-ag_ui', '~> 0.2.0'

Requires Ruby >= 3.2, RubyLLM >= 2.1 and < 3.0, and ag-ui-protocol 0.2.x. Run bundle install after adding the gem.

Stream a run

Pass a chat authorized for the current actor, a shared run store, and an IO-like response stream from your application:

require 'ruby_llm/ag_ui'

input = RubyLLM::AgUI::Input.parse(request_body)
chat = authorized_chat_for(current_user, input.thread_id)

RubyLLM::AgUI::Run.new(
  chat: chat,
  input: input,
  scope: "actor:#{current_user.id}",
  store: run_store
).stream(to: response_stream)

Build scope from authenticated identity. See the streaming guide for setup and the examples for integration code.

Development

bundle install
bundle exec rspec
bundle exec rubocop
bundle exec rake example # offline approval and resume demo, no API key needed

The default suite is offline. Real client and provider verification is tracked in the compatibility guide. See CONTRIBUTING.md for development and documentation rules, ROADMAP.md for the proposed path to 1.0, and CHANGELOG.md for shipped changes.

License and security

MIT. See the third-party notices and report vulnerabilities through SECURITY.md.