
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@ag-ui/encoder
Advanced tools
Event encoding utilities for the **Agent-User Interaction (AG-UI) Protocol**.
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.
npm install @ag-ui/encoder
pnpm add @ag-ui/encoder
yarn add @ag-ui/encoder
Accept headersimport { 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);
docs/conceptsdocs/sdk/js/encoderBug reports and pull requests are welcome! Please read our contributing guide first.
MIT © 2025 AG-UI Protocol Contributors
FAQs
Event encoding utilities for the **Agent-User Interaction (AG-UI) Protocol**.
The npm package @ag-ui/encoder receives a total of 51,727 weekly downloads. As such, @ag-ui/encoder popularity was classified as popular.
We found that @ag-ui/encoder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.