rdesign/frontend/node_modules/@ag-ui/encoder
Jeff Emmett 80f1e96e6b Fix frontend build: type errors, SDK handling, docker context
- Use jq to cleanly remove encryptid SDK from package.json in Docker
- Fix TypeScript strict mode errors in dashboard and assistant
- Add .dockerignore to exclude node_modules from build context
- Use project root as Docker build context for frontend
- Fix Traefik routing: separate frontend/api/studio paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 02:21:52 +00:00
..
dist Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
LICENSE Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
README.md Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00
package.json Fix frontend build: type errors, SDK handling, docker context 2026-03-24 02:21:52 +00:00

README.md

@ag-ui/encoder

Event encoding utilities for the Agent-User Interaction (AG-UI) Protocol.

@ag-ui/encoder handles content negotiation and format encoding for AG-UI events. It automatically chooses between Server-Sent Events (JSON) and Protocol Buffers based on client Accept headers, ensuring optimal transport efficiency.

Installation

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

Features

  • 🎯 Content negotiation Automatic format selection based on Accept headers
  • 📦 Dual encoding SSE (JSON) and Protocol Buffer support
  • Efficient binary Length-prefixed protobuf encoding for high-throughput scenarios
  • 🔄 Seamless fallback Graceful degradation to SSE when protobuf isn't supported

Quick example

import { EventEncoder } from "@ag-ui/encoder";
import { EventType } from "@ag-ui/core";

const encoder = new EventEncoder({
  accept: "application/vnd.ag-ui.event+proto, text/event-stream",
});

const event = {
  type: EventType.TEXT_MESSAGE_CONTENT,
  messageId: "msg_123",
  delta: "Hello, world!",
};

// Returns protobuf-encoded binary data
const encoded = encoder.encodeBinary(event);

Documentation

Contributing

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

License

MIT © 2025 AG-UI Protocol Contributors