A pure-Ruby, zero-dependency implementation of the Vercel AI SDK "Data Stream Protocol" (UI Message Stream Protocol) — the Server-Sent-Events wire format that drives the AI SDK's useChat / useCompletion / useObject frontend hooks. The protocol is language-agnostic by design, but Ruby had no implementation; ai_stream lets a Rails/Rack backend stream text, reasoning, tool calls, sources, files, and custom data parts to a Vercel-AI-SDK frontend with the exact frames it expects. Provider-agnostic: it composes with ruby_llm, ruby-openai, or any token source instead of competing with them.
Required Ruby Version
>= 3.0.0
Authors
Levelbrook Team
Versions
- 0.1.0 June 04, 2026 (11 KB)