Loading AgentsKit ecosystem navigation…
AgentsKit Chat
Get started

React Native quick start

Expo / React Native shell for the same ChatDefinition.

View canonical Markdown

React Native quick start

Mobile is first-class — same defineChat as web and terminal.

Install

code
pnpm add @agentskit/chat @agentskit/core @agentskit/react-native react react-native

Native deps belong to the Expo/RN app, not the Chat package.

Shell

code
import { AgentChatNative } from '@agentskit/chat/react-native'
import { createSupportChat } from './support-chat'
import { adapter } from './adapter'

export default function App() {
  return <AgentChatNative definition={createSupportChat(adapter)} />
}

Shared definition

code
import { defineChat } from '@agentskit/chat'
import type { AdapterFactory } from '@agentskit/core'

export const createSupportChat = (adapter: AdapterFactory) =>
  defineChat({
    id: 'support',
    chat: { adapter, systemPrompt: 'Help users on mobile.' },
  })

Monorepo example

code
pnpm --filter @agentskit/chat-example-react-native start

Next