# @ag-ui/proto

> Protocol Buffer encoding/decoding for **Agent-User Interaction (AG-UI) Protocol** events.

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

## Install

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

## 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 | 15884 |
| Author | Markus Ecker |
| Maintainers | _mme, copilotkit |

## Links

- npm: https://www.npmjs.com/package/@ag-ui/proto
- 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/proto

## 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/proto/versions

## README

# @ag-ui/proto

Protocol Buffer encoding/decoding for **Agent-User Interaction (AG-UI) Protocol** events.

`@ag-ui/proto` provides high-performance binary serialization of AG-UI events using Protocol Buffers. It includes generated TypeScript definitions and utilities for converting between AG-UI's JSON event format and compact binary representation.

## Installation

```bash
npm install @ag-ui/proto
pnpm add @ag-ui/proto
yarn add @ag-ui/proto
```

## Features

- ⚡ **High performance** – Binary protobuf encoding for minimal bandwidth usage
- 🔄 **Round-trip safety** – Compatible conversion between JSON and binary formats
- 📋 **Generated types** – Auto-generated TypeScript definitions from `.proto` schemas
- 🔧 **Length-prefixed** – Standard 4-byte length headers for streaming protocols
- 🖼️ **Multimodal snapshots** – Supports multimodal user content parts in message snapshots

## Quick example

```ts
import { encode, decode, AGUI_MEDIA_TYPE } from "@ag-ui/proto";
import { EventType } from "@ag-ui/core";

const event = {
  type: EventType.TEXT_MESSAGE_START,
  messageId: "msg_123",
  role: "assistant",
};

// Encode to binary protobuf format
const encoded = encode(event);

// Decode back to AG-UI event
const decoded = decode(encoded);
console.log(decoded); // Original event object
```

## Documentation

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

## 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/proto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
