Installation
Install the SDK using Ruby’s standard package management:Quick Start
Here’s a simple example showing how to create and encode an event:Package Structure
The Ruby SDK is organized into several focused packages, each handling a specific aspect of the AG-UI protocol:Core Package (AgUiProtocol::Core)
The foundation of the SDK, providing event types, interfaces, and decoding capabilities. This package defines all the event structures used in AG-UI communication, including text messages, tool calls, state management, and lifecycle events.
Encoding Package (AgUiProtocol::Encoder::EventEncoder)
Provides flexible encoding for events to SSE. Includes JSON encoding, SSE writing for servers, and content negotiation for handling different MIME types.
Next Steps
Explore the detailed documentation for each package to learn more about specific features and advanced usage:Core Concepts
Learn about events, types, and the foundational concepts of the AG-UI protocol
Encoding & Serialization
Work with different encodings, content negotiation, and SSE server implementation