Skip to content

RubyLLM AG-UI Run RubyLLM chats as AG-UI agent runs

An unofficial Ruby gem for connecting RubyLLM applications to AG-UI clients.

Install

bundle add ruby_llm-ag_ui --git https://github.com/yorzi/ruby_llm-ag-ui --branch main

Parse a request

require 'ruby_llm/ag_ui'

input = RubyLLM::AgUI::Input.parse({
  'threadId' => 'thread-1',
  'runId' => 'run-1',
  'messages' => [{ 'id' => 'm1', 'role' => 'user', 'content' => 'Hello' }]
})

puts "#{input.thread_id}/#{input.run_id}"
# => thread-1/run-1

Get started or read how a run works.