Skip to main content
The AG-UI Java SDK provides a robust and idiomatic way to connect Java applications to AG-UI agents. It enables real-time streaming communication through Server-Sent Events (SSE), allowing you to build intelligent agent-powered applications with Java.

Installation

Add the packages you need as Maven dependencies (or Gradle):

Quick Start

Create an HttpAgent, subscribe to events, and run the agent:

Package Structure

The Java SDK is organized into several focused packages, each handling a specific aspect of the AG-UI protocol:

Core Package (com.agui.core)

Foundational types and events: messages, state, tools, context, event stream, and all event classes.

Client Package (com.agui.client)

Agent base class, message factory, and subscriber interfaces for building and integrating agents.

HTTP Package (com.agui.http)

Ready-to-use HttpAgent that streams events from a remote server using your chosen HTTP client.

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

Client Connectivity

Detailed guide on SSE client configuration, streaming, and connection management

Agent Subscribers

Build reactive UIs and middleware with the event subscriber API