# @ag-ui/core

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

Latest version **1.0.1** (published 2026-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ag-ui/core
pnpm add @ag-ui/core
yarn add @ag-ui/core
bun add @ag-ui/core
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-09-29 |
| First published | 2025-04-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16304 |
| Author | Markus Ecker |
| Maintainers | _mme, copilotkit |

## Links

- npm: https://www.npmjs.com/package/@ag-ui/core
- Repository: https://github.com/ag-ui-protocol/ag-ui
- Homepage: https://github.com/ag-ui-protocol/ag-ui#readme
- Issues: https://github.com/ag-ui-protocol/ag-ui/issues
- npm.io page: https://npm.io/package/@ag-ui/core

## Recent versions

- 1.0.1 (latest) — 2026-09-29
- 1.0.0-canary.1789569879.0 (canary) — 2026-09-16
- 0.0.50-alpha.0 (alpha) — 2026-04-02
- 1.0.0 — 2026-09-17
- 0.0.59 — 2026-08-27
- 0.0.59-canary.1787220377.0 — 2026-08-20
- 0.0.58 — 2026-08-14
- 0.0.59-canary.1786716392.0 — 2026-08-14
- 0.0.59-canary.1786549251.0 — 2026-08-12
- 0.0.59-canary.1785518626.0 — 2026-07-31
- 0.1.1-canary.beta.0 — 2026-07-30
- 0.0.58-canary.beta.0 — 2026-07-28
- 0.0.59-canary.1784325892.0 — 2026-07-17
- 0.0.57 — 2026-06-12
- 0.0.56 — 2026-06-09
- … 62 more at https://npm.io/package/@ag-ui/core/versions

## README

# @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

```bash
# types and constants only — no runtime dependencies
npm install @ag-ui/core
pnpm add @ag-ui/core
yarn add @ag-ui/core

# to use the validators on @ag-ui/core/schemas, add zod (3.25.18+ or 4.x)
npm install @ag-ui/core zod
```

zod is an optional peer dependency: the main entry never loads it, so an
application that only needs the types installs nothing else.

## Features

- 🧩 **Typed data models** – `Message`, `Tool`, `Context`, `RunAgentInput`, `State` …
- 🔄 **Streaming events** – over 30 event kinds covering assistant messages, tool calls, state updates, reasoning, activity, and the run and subagent lifecycles.
- ✅ **Runtime validation** – schemas catch malformed payloads early.
- 🚀 **Framework-agnostic** – works in Node.js, browsers and any agent framework that can emit JSON.

## Quick example

```ts
import { EventType } from "@ag-ui/core";
// Validators live on the /schemas subpath and need zod installed; the main
// entry is types and constants only, so type-only consumers need no zod.
import { EventSchemas } from "@ag-ui/core/schemas";

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

## Documentation

- Concepts & architecture: [`docs/concepts`](https://docs.ag-ui.com/concepts/architecture)
- Full API reference: [`docs/sdk/js/core`](https://docs.ag-ui.com/sdk/js/core/overview)

## Contributing

Bug reports and pull requests are welcome! Please read our [contributing guide](https://docs.ag-ui.com/development/contributing) first.

## License

MIT © 2025 AG-UI Protocol Contributors

---
_Source: https://npm.io/package/@ag-ui/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
