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
37 lines
1.2 KiB
Markdown
37 lines
1.2 KiB
Markdown
# `@assistant-ui/react-a2a`
|
|
|
|
[A2A (Agent-to-Agent) v1.0](https://github.com/a2aproject/A2A) protocol integration for `@assistant-ui/react`. Built-in HTTP client with SSE streaming, agent-card discovery, multi-tenancy, and structured error handling.
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
npm install @assistant-ui/react @assistant-ui/react-a2a
|
|
```
|
|
|
|
## Usage
|
|
|
|
```tsx
|
|
import { AssistantRuntimeProvider } from "@assistant-ui/react";
|
|
import { useA2ARuntime } from "@assistant-ui/react-a2a";
|
|
import { Thread } from "@/components/assistant-ui/thread";
|
|
|
|
export function App() {
|
|
const runtime = useA2ARuntime({ baseUrl: "http://localhost:9999" });
|
|
|
|
return (
|
|
<AssistantRuntimeProvider runtime={runtime}>
|
|
<Thread />
|
|
</AssistantRuntimeProvider>
|
|
);
|
|
}
|
|
```
|
|
|
|
Supports all 9 A2A task states (including `input_required` and `auth_required`), artifact streaming, push-notification config, extension negotiation, and streaming/non-streaming auto-fallback.
|
|
|
|
## See also
|
|
|
|
- `@assistant-ui/react-ag-ui` for the AG-UI protocol.
|
|
- `@assistant-ui/react-langgraph` for LangGraph agents.
|
|
|
|
Full reference at [assistant-ui.com/docs/runtimes/a2a](https://www.assistant-ui.com/docs/runtimes/a2a/overview).
|