Socket
Book a DemoInstallSign in
Socket

@ag-ui/client

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-ui/client

Client SDK for connecting to **Agent-User Interaction (AG-UI) Protocol** servers.

npmnpm
Version
0.0.40-alpha.10
Version published
Weekly downloads
70K
6.56%
Maintainers
2
Weekly downloads
 
Created
Source

@ag-ui/client

Client SDK for connecting to Agent-User Interaction (AG-UI) Protocol servers.

@ag-ui/client provides agent implementations that handle the full lifecycle of AG-UI communication: connecting to servers, processing streaming events, managing state mutations, and providing reactive subscriber hooks.

Installation

npm install @ag-ui/client
pnpm add @ag-ui/client
yarn add @ag-ui/client

Features

  • 🔗 HTTP connectivityHttpAgent for direct server connections with SSE/protobuf support
  • 🏗️ Custom agentsAbstractAgent base class for building your own transport layer
  • 📡 Event streaming – Full AG-UI event processing with validation and transformation
  • 🔄 State management – Automatic message/state tracking with reactive updates
  • 🪝 Subscriber system – Middleware-style hooks for logging, persistence, and custom logic

Quick example

import { HttpAgent } from "@ag-ui/client";

const agent = new HttpAgent({
  url: "https://api.example.com/agent",
  headers: { Authorization: "Bearer token" },
});

const result = await agent.runAgent({
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(result.newMessages);

Documentation

  • Concepts & architecture: docs/concepts
  • Full API reference: docs/sdk/js/client

Contributing

Bug reports and pull requests are welcome! Please read our contributing guide first.

License

MIT © 2025 AG-UI Protocol Contributors

FAQs

Package last updated on 23 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts