A full-stack demo showing how the AG-UI protocol connects a Java backend to a React frontend — streaming every token, tool call, and state update in real time.
A React frontend posts to a Spring Boot backend which streams AG-UI events back via Server-Sent Events.
React + TypeScript + Vite. A custom useAgentStream hook reads the SSE response body and dispatches AG-UI events to update state token-by-token. Voice input via the Web Speech API.
Spring Boot + Java 21 with Project Reactor. The agent runs on Schedulers.boundedElastic() inside a Flux.create(), emitting AG-UI events as JSON strings over a text/event-stream response.
Makes two GPT-4.1 calls. The first streams reasoning + tool args for create_ticket. The second streams a summary. Ticket fields appear live as the model writes them.
If a run is still going at 10 seconds the UI switches to background mode — the stream panel hides, a live elapsed timer ticks, and a toast + browser push notification fire when the ticket is ready.
Press Play to simulate the live event stream and background mode.
Turns natural language into a structured ticket — with background mode for slow requests
Every event is a JSON object streamed over Server-Sent Events.
thread_id and run_id.message_id.message_id and delta.tool_call_id and tool_call_name.delta.tickets array.message field.Speak your issue into the mic button. The Web Speech API transcribes it live into the textarea.
Every token from GPT-4.1 is pushed immediately — reasoning text, tool args, and summaries all appear character by character.
Watch the ticket fields (title, description, priority, labels) build up in real time as the model writes the JSON arguments.
Runs taking more than 10 seconds switch to background — the stream hides, a live elapsed timer ticks, and the user is free to step away.
When a background run completes, a browser push notification fires even if the tab is hidden — plus an in-app dismissible toast banner.
A Cancel button appears the moment the agent starts, aborting the SSE connection immediately so the user stays in control.
You need Java 21+, Maven 3.9+, Node 18+, and an OpenAI API key.
# copy the template cp backend/.env.example \ backend/.dev.properties # then edit the file: OPENAI_API_KEY=sk-... OPENAI_ORG_ID=org-...
cd backend
mvn spring-boot:run
# Starts on http://localhost:8000
cd frontend
npm install
npm run dev
# Opens http://localhost:5173
Open http://localhost:5173 in Chrome or Edge. Describe any bug — use the 🎙️ mic or type. To test background mode, include the word "print" in your description.