@agentskit/react-native
v0.2.4
Published
React Native + Expo hook + components for AgentsKit.
Downloads
202
Maintainers
Readme
@agentskit/react-native
React Native / Expo hook + headless chat components. Metro-safe (no DOM deps). Same ChatReturn contract every AgentsKit framework binding ships.
Tags: ai · agents · llm · agentskit · react-native · expo · mobile · chat · streaming
Why
- One contract, every framework —
useChatreturns the exact same shape as the web React / Vue / Svelte / Solid / Angular / Ink bindings. - Metro-safe — no DOM APIs; works on iOS, Android, and Expo out of the box.
- Native components —
<ChatContainer>wrapsScrollView,<InputBar>wrapsTextInput, all theme-aware. - Streaming, tools, HITL — all core features work identically to
@agentskit/react.
Install
npm install @agentskit/react-native @agentskit/adaptersPeers: react, react-native.
Quick example
import { useChat, ChatContainer, Message, InputBar } from '@agentskit/react-native'
import { anthropic } from '@agentskit/adapters'
export function Chat() {
const chat = useChat({
adapter: anthropic({ apiKey: process.env.EXPO_PUBLIC_ANTHROPIC_API_KEY!, model: 'claude-sonnet-4-6' }),
})
return (
<ChatContainer>
{chat.messages.map((m) => <Message key={m.id} message={m} />)}
<InputBar chat={chat} />
</ChatContainer>
)
}API
useChat(config)— hook returningChatReturn(DOM-free).- Headless components:
ChatContainer,Message,InputBar,ToolCallView,ToolConfirmation,ThinkingIndicator.
Ecosystem
| Package | Role |
|---------|------|
| @agentskit/core | ChatReturn contract |
| @agentskit/adapters | LLM providers |
| @agentskit/tools | Built-in + integration tools |
| @agentskit/memory | Chat + vector backends |
| @agentskit/react · vue · svelte · solid · angular · ink | Same contract, different host |
Contributors
License
MIT — see LICENSE.
