Files
wehub-resource-sync e30e75b5d4
Changesets / Create Version PR (push) Has been cancelled
Deploy Shadcn Registry / Deploy Production (push) Has been cancelled
Template Metrics / LOC + Bundle Size (push) Has been cancelled
Code Quality / Oxlint + Oxfmt (push) Has been cancelled
Code Quality / Template Sync (push) Has been cancelled
Code Quality / Build Changed Packages (push) Has been cancelled
Code Quality / Test Changed Packages (push) Has been cancelled
Deploy Expo Example / Deploy Production (push) Has been cancelled
Deploy Ink Example / Deploy Production (push) Has been cancelled
Python Tests / pytest (assistant-stream, 3.10) (push) Has been cancelled
Python Tests / pytest (assistant-stream, 3.12) (push) Has been cancelled
Python Tests / pytest (assistant-ui-sync-server-api, 3.10) (push) Has been cancelled
Python Tests / pytest (assistant-ui-sync-server-api, 3.12) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:40:13 +08:00

44 lines
1.5 KiB
Markdown

# `@assistant-ui/react-google-adk`
[Google ADK](https://github.com/google/adk-js) (Agent Development Kit) integration for `@assistant-ui/react`. Connects ADK JS agents to the assistant-ui runtime with streaming, tool calls, multi-agent support, tool confirmations, auth flows, and session-state management.
## Installation
```bash
npm install @assistant-ui/react @assistant-ui/react-google-adk @google/adk
```
## Usage
The recommended setup proxies through your own API route:
```ts
// 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",
});
```
```tsx
// client component
import { useAdkRuntime, createAdkStream } from "@assistant-ui/react-google-adk";
const runtime = useAdkRuntime({
stream: createAdkStream({ api: "/api/adk" }),
});
```
Or connect directly to an ADK server with `createAdkSessionAdapter`; see the docs for the full setup and option reference.
## See also
- `@assistant-ui/react-langgraph` for LangGraph SDK agents.
- `@assistant-ui/react-ag-ui` for the AG-UI protocol.
Full reference for client hooks (`useAdkAgentInfo`, `useAdkSessionState`, `useAdkToolConfirmations`, `useAdkAuthRequests`, etc.), server exports, and direct mode at [assistant-ui.com/docs/runtimes/google-adk](https://www.assistant-ui.com/docs/runtimes/google-adk).