npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@voltagent/ag-ui

v1.0.8

Published

AG-UI adapter for VoltAgent agents and CopilotKit runtimes.

Readme

+

GitHub issues GitHub pull requests License: MIT npm version npm downloads Discord

@voltagent/ag-ui

An AG-UI adapter for VoltAgent. Wrap any VoltAgent Agent as an AG-UI AbstractAgent that streams VoltAgent events as AG-UI protocol events, and optionally expose it through a CopilotKit runtime.


Install

npm install @voltagent/ag-ui @voltagent/core @ai-sdk/openai @ag-ui/client @ag-ui/core
# or
yarn add @voltagent/ag-ui @voltagent/core @ai-sdk/openai @ag-ui/client @ag-ui/core
# or
pnpm add @voltagent/ag-ui @voltagent/core @ai-sdk/openai @ag-ui/client @ag-ui/core

Add @copilotkit/runtime as well if you plan to use the CopilotKit handlers below.

Usage

Wrap a VoltAgent agent so it speaks the AG-UI protocol:

import { Agent } from "@voltagent/core";
import { createVoltAgentAGUI } from "@voltagent/ag-ui";
import { openai } from "@ai-sdk/openai";

const agent = new Agent({
  name: "my-agent",
  instructions: "A helpful assistant",
  model: openai("gpt-4o-mini"),
});

const aguiAgent = createVoltAgentAGUI({ agent });

createVoltAgentAGUI accepts:

| Option | Type | Description | | -------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------ | | agent | Agent | The VoltAgent agent to expose over AG-UI | | deriveUserId | (input: RunAgentInput) => string \| undefined | Optional function to derive a userId for memory/telemetry from the AG-UI run input |

aguiAgent.run(input) returns an Observable<BaseEvent> that emits AG-UI lifecycle, message, and tool-call events translated from the agent's streamText output.

CopilotKit Integration

Use createCopilotKitHandler to get a framework-agnostic fetch handler for a CopilotKit runtime:

import { createCopilotKitHandler, createVoltAgentAGUI } from "@voltagent/ag-ui";
import { agent } from "./agent"; // a VoltAgent instance

const handler = createCopilotKitHandler({
  agents: { assistant: createVoltAgentAGUI({ agent }) },
  endpoint: "/api/copilotkit",
});

export default {
  fetch: handler,
};

Or mount it directly on a Hono-style app with registerCopilotKitRoutes, picking agents up from the global AgentRegistry instead of wiring them by hand:

import { registerCopilotKitRoutes } from "@voltagent/ag-ui";

registerCopilotKitRoutes({
  app,
  resourceIds: ["assistant"], // omit to expose every registered agent
  path: "/copilotkit",
});

CopilotKitHandlerOptions

| Option | Type | Default | Description | | ---------------- | ------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------- | | agents | Record<string, AbstractAgent> | — | Static map of AG-UI agents | | loadAgents | () => Promise<Record<string, AbstractAgent>> \| Record<string, AbstractAgent> | — | Lazy loader; overrides agents if provided | | serviceAdapter | CopilotServiceAdapter | ExperimentalEmptyAdapter | CopilotKit service adapter | | endpoint | string | "/copilotkit" | Endpoint path used by CopilotKit clients |

RegisterCopilotKitRoutesOptions

| Option | Type | Default | Description | | ------------- | ------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------- | | app | Hono-style app (all(path, handler)) | — | App instance to register the route on | | agents | Record<string, Agent> | — | VoltAgent agents to expose, wrapped lazily with createVoltAgentAGUI | | resourceIds | string[] | all registered agents | Filter which agents from the global AgentRegistry are exposed (if agents is omitted) | | path | string | "/copilotkit" | Path to mount the CopilotKit endpoint |

Documentation

License

Licensed under the MIT License, Copyright © 2026-present VoltAgent.