npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ag-ui/spring-ai

v0.0.4

Published

AG-UI client for agents served by the community [Spring AI](https://spring.io/projects/spring-ai) integration.

Readme

@ag-ui/spring-ai

AG-UI client for agents served by the community Spring AI integration.

The server side is the community Java SDK in sdks/community/java/spring (com.ag-ui.community:ag-ui-spring-ai-* on Maven Central). It adapts a Spring AI ChatClient into an AG-UI agent and streams its events over Server-Sent Events from a Spring Boot (WebMVC or WebFlux) endpoint. SpringAiAgent is an HttpAgent that connects to that endpoint.

Installation

npm install @ag-ui/spring-ai
pnpm add @ag-ui/spring-ai
yarn add @ag-ui/spring-ai

@ag-ui/client and @ag-ui/core >=1.0.0 are peer dependencies.

Usage

import { SpringAiAgent } from "@ag-ui/spring-ai";

// The Spring starters serve agents at POST /agent (a single Agent bean) or
// POST /agent/{beanName} (several). Change the prefix with `ag-ui.server.path`.
const agent = new SpringAiAgent({
  url: "http://localhost:8080/agent/agentic_chat",
});

const result = await agent.runAgent({
  tools: [], // frontend tools the model may call
});

On the Java side, add ag-ui-spring-ai-webmvc-boot-starter (Servlet) or ag-ui-spring-ai-spring-boot-starter (WebFlux) and a Spring AI model starter such as spring-ai-starter-model-openai. See the Spring integration README for details.

Protocol version

SpringAiAgent pins maxProtocolVersion to 0.0.39 on purpose. The community Java SDK has not moved to AG-UI 1.0 yet:

  • User and tool message content must be a string. A 1.0 ContentPart[] body is rejected with HTTP 400, so the client flattens content to its text parts. Images, audio, video and documents are dropped, with a console warning.
  • protocolVersion is not sent on RunAgentInput. The server ignores unknown fields, so this is only a side effect of the pin.

The pin will be removed once the Java SDK accepts ContentPart[] content. Until then, use a plain HttpAgent only if you never send structured content.

Running the Dojo server

The Dojo's Spring AI integration runs a small Spring Boot app in integrations/community/spring-ai/java/examples on port 8028. It needs Java 17+. Maven comes from the bundled wrapper.

cd integrations/community/spring-ai/java/examples
# Build against the Spring SDK in this checkout (optional: without it, Maven
# uses the published artifacts)
./mvnw -q -DskipTests -f ../../../../../sdks/community/java/spring/pom.xml install
./mvnw -q -DskipTests package
OPENAI_API_KEY=sk-... java -jar target/spring-ai-dojo-server.jar

Or from the repo root, with the Dojo and aimock wired up:

node apps/dojo/scripts/prep-dojo-everything.js --only dojo,spring-ai
node apps/dojo/scripts/run-dojo-everything.js --only dojo,spring-ai

Set OPENAI_BASE_URL to point the server at another OpenAI-compatible endpoint.