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

@assistant-ui/react-google-adk

v0.0.1

Published

Google ADK adapter for assistant-ui

Readme

@assistant-ui/react-google-adk

Google ADK (Agent Development Kit) adapter for assistant-ui.

Connects Google ADK JS agents to assistant-ui's React runtime with streaming, tool calls, multi-agent support, tool confirmations, auth flows, and session state management.

Installation

npm install @assistant-ui/react @assistant-ui/react-google-adk

Quick Start

Proxy Mode (with a Next.js API Route)

Server (app/api/adk/route.ts):

import { createAdkApiRoute } from "@assistant-ui/react-google-adk/server";
import { runner } from "./agent";

export const POST = createAdkApiRoute({
  runner,
  userId: "default-user",
  sessionId: (req) =>
    new URL(req.url).searchParams.get("sessionId") ?? "default",
});

Client:

import { useAdkRuntime, createAdkStream } from "@assistant-ui/react-google-adk";

const runtime = useAdkRuntime({
  stream: createAdkStream({ api: "/api/adk" }),
});

Direct Mode (connecting to an ADK server)

import {
  useAdkRuntime,
  createAdkStream,
  createAdkSessionAdapter,
} from "@assistant-ui/react-google-adk";

const { adapter, load } = createAdkSessionAdapter({
  apiUrl: "http://localhost:8000",
  appName: "my-app",
  userId: "user-1",
});

const runtime = useAdkRuntime({
  stream: createAdkStream({
    api: "http://localhost:8000",
    appName: "my-app",
    userId: "user-1",
  }),
  sessionAdapter: adapter,
  load,
});

API Reference

Client Exports

createAdkStream(options)

Creates an AdkStreamCallback that connects to an ADK endpoint via SSE.

| Option | Type | Description | |--------|------|-------------| | api | string | URL to POST to (proxy route or ADK server base URL) | | appName | string? | ADK app name (enables direct mode when set) | | userId | string? | ADK user ID (required with appName) | | headers | Record<string, string> \| (() => ...) | Static or dynamic request headers |

createAdkSessionAdapter(options)

Creates a RemoteThreadListAdapter backed by ADK's session REST API.

Returns { adapter, load } where load reconstructs messages from session events.

| Option | Type | Description | |--------|------|-------------| | apiUrl | string | ADK server base URL | | appName | string | ADK app name | | userId | string | ADK user ID | | headers | Record<string, string> \| (() => ...) | Static or dynamic request headers |

useAdkRuntime(options)

Main hook that creates a full AssistantRuntime.

| Option | Type | Description | |--------|------|-------------| | stream | AdkStreamCallback | Stream callback (use createAdkStream) | | sessionAdapter | RemoteThreadListAdapter? | Alternative to cloud for thread persistence | | cloud | AssistantCloud? | Cloud adapter for thread persistence | | load | (threadId: string) => Promise<{messages}> | Load thread history | | autoCancelPendingToolCalls | boolean? | Auto-cancel pending tools on new message (default: true) | | unstable_allowCancellation | boolean? | Enable stream cancellation | | getCheckpointId | (threadId, messages) => Promise<string?> | Enable edit/reload | | adapters | {attachments?, speech?, feedback?} | Optional adapters | | eventHandlers | {onError?, onCustomEvent?, onAgentTransfer?} | Event callbacks |

Hooks

| Hook | Description | |------|-------------| | useAdkAgentInfo() | Current agent name and branch path | | useAdkSessionState() | Accumulated session state delta | | useAdkSend() | Send raw ADK messages | | useAdkLongRunningToolIds() | Pending tool IDs awaiting input | | useAdkToolConfirmations() | Tool confirmation requests | | useAdkAuthRequests() | Auth credential requests | | useAdkArtifacts() | Artifact delta (filename → version) | | useAdkEscalation() | Escalation flag | | useAdkMessageMetadata() | Per-message grounding/citation/usage |

Server Exports (/server)

createAdkApiRoute(options)

One-liner API route handler combining request parsing and SSE streaming.

| Option | Type | Description | |--------|------|-------------| | runner | AdkRunner | ADK Runner instance | | userId | string \| (req) => string | Static or dynamic user ID | | sessionId | string \| (req) => string | Static or dynamic session ID | | onError | (error) => void | Error handler |

adkEventStream(events, options?)

Converts an ADK event async generator into an SSE Response.

parseAdkRequest(request)

Parses an incoming HTTP request into a structured ADK request.

toAdkContent(parsed)

Converts a parsed request into a Google GenAI Content object.

Documentation

See the full documentation for setup guides, advanced APIs, and examples.

License

MIT