React
Send a message through your app’s transport:
await chat.send("Summarize this page.");React 0.2.1 is the experimental chat package. It keeps messages and connection state, handles requests and provides optional components. You can use its hooks, keep your own state owner, or use both. Set up your first chat.
Choose what you need
Section titled “Choose what you need”| Import | What it provides |
|---|---|
@providerkit/react |
Chat and composer state, useChat and useAgentRun |
/protocol |
Portable display data, validation and one reducer |
/sse |
A fetch transport for event streams |
/agents |
Server-side projection of SDK execution into safe display data |
/ui |
Conversation, composer, messages and activity controls |
/markdown |
Markdown, code blocks and citations |
/ag-ui |
Conversion between display events and AG-UI |
/styles.css |
Optional default styles |
Hook imports load no UI, Markdown parser or styles. /protocol has no React dependency. Components
receive plain data and callbacks, so an app can keep its existing store. Tailwind is not required.
Keep authority on the server
Section titled “Keep authority on the server”Your app owns sign-in, permissions, uploads and retention. It authorizes every read, send, stop and response. A request ID or a browser view does not grant permission to run a tool.
The server projector hides private execution state by default. Tool details and structured results need a host-selected projection. Never send a raw agent snapshot to a browser. Transport and display data explains where projection belongs.
Pick a starting point
Section titled “Pick a starting point”- Build a chat or try the component demo.
- Handle questions and client actions without treating the browser as an authority.
- Use the components and your own styles.
- Recover a conversation without replaying a command.
- Build on React Native with your own stream reader and classes.
- Connect an AG-UI host or look up an export.