Socket
Book a DemoInstallSign in
Socket

@ag-ui/core

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/core

TypeScript definitions & runtime schemas for the **Agent-User Interaction (AG-UI) Protocol**.

latest
npmnpm
Version
0.0.42
Version published
Weekly downloads
107K
-0.02%
Maintainers
2
Weekly downloads
 
Created
Source

@ag-ui/core

TypeScript definitions & runtime schemas for the Agent-User Interaction (AG-UI) Protocol.

@ag-ui/core delivers the strongly-typed building blocks that every other AG-UI package is built on: message & state models, run inputs and the full set of streaming event types.

Installation

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

Features

  • 🧩 Typed data modelsMessage, Tool, Context, RunAgentInput, State
  • 🔄 Streaming events – 16 core event kinds covering assistant messages, tool calls, state updates and run lifecycle.
  • Runtime validation – schemas catch malformed payloads early.
  • 🚀 Framework-agnostic – works in Node.js, browsers and any agent framework that can emit JSON.

Quick example

import { EventSchemas, EventType } from "@ag-ui/core";

// Validate an incoming event
EventSchemas.parse({
  type: EventType.TEXT_MESSAGE_CONTENT,
  messageId: "msg_123",
  delta: "Hello, world!",
});

Documentation

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

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 05 Dec 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