Dosu LogoDosu Logo
Ask
Join our Discord
assistant-ui's SpacePublic
assistant-ui
Documentsassistant-ui's Space
README
README
Type
External
Status
Published
Created
Mar 17, 2026
Updated
Sep 14, 2026
Updated by
Dosu Bot
Source
examples/with-expo/README.md

assistant-ui + Expo#

A native chat app built with assistant-ui and Expo. It runs on iOS, Android, and the web from a single codebase, and is styled to match the assistant-ui web kit: a clean, neutral, ChatGPT-grade look with subtle hairline borders.

The chat is powered by @assistant-ui/react-native with the AI SDK runtime (@assistant-ui/ai-sdk). The UI comes from the assistant-ui React Native kit (packages/ui/src/components/react-native), styled with Tailwind classes through Uniwind and the same design tokens as the web kit, so the thread, composer, attachments, and thread list read the same on every platform. The example adds:

  • Image picker (expo-image-picker) for attachments and clipboard (expo-clipboard) for the copy action.
  • A native drawer (expo-router/drawer) for the thread list, with a swipe gesture to switch conversations.
  • A "use generative" toolkit (components/tools.tsx) that renders weather cards inline.

Get started#

  1. Install dependencies from the repository root:

    pnpm install
    
  2. Configure the chat backend. Copy .env.example to .env and set your key:

    cp .env.example .env
    

    The bundled API route (app/api/chat+api.ts) needs OPENAI_API_KEY. To point the app at a separately hosted backend instead, set EXPO_PUBLIC_CHAT_ENDPOINT_URL. Browser deployments use /api/anonymous-session when the hosted backend supports it and otherwise send the request normally. Native deployments should use a backend intended for their app.

  3. Start the app:

    pnpm --filter with-expo start
    

    From there you can open it in the iOS simulator, an Android emulator, or the browser.

Project structure#

  • app/_layout.tsx wires the runtime, the toolkit, the suggestions, and the drawer navigation.
  • app/index.tsx renders the Thread.
  • components/tools.tsx holds the weather toolkit and its tool UIs.
  • global.css holds the Tailwind and Uniwind setup plus the color tokens; metro.config.js wires Uniwind around the assistant-ui Metro transformer.
  • @/components/assistant-ui/* and @/components/ui/* resolve to the kit sources in packages/ui/src/components/react-native through tsconfig.json paths. A project scaffolded with npx assistant-ui create --native gets the same files installed under components/ from the registry instead.

Learn more#

  • assistant-ui documentation
  • Expo documentation
Documents
AG-UI Message History Management
CHANGELOG
CHANGELOG
CHANGELOG
external-store
overview
README
AG-UI Streaming State Management
hooks
index
introduction
overview
part-1
README
README
stockbroker
AI SDK Integration
ai-sdk
assistant-runtime-provider
expo
hooks
index
index
index
introduction
migration
migration
overview
part-2
README
README
README
README
README
README
README
README
stockbroker
Cloud Message Pagination
index
Generative UI Date and Time Controls
In-Memory Thread Lifecycle
CHANGELOG
CHANGELOG
CHANGELOG
Local Runtime Message History
CHANGELOG
Markdown Preprocessing and Repair
CHANGELOG
CHANGELOG
MCP App Tool UI Rendering
CHANGELOG
CHANGELOG
message
MCP OAuth State Management
MessageRepository Branch Pointer Invariant
Next.js Cache Components
Remote Thread List Runtime
adapters
CHANGELOG
CHANGELOG
hooks
index
README
README
thread-runtime
Render Prop Leakage
Run Cancellation and Abort Signal Propagation
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
README
Run Telemetry Model ID Extraction
SSR-Safe Thread ID Generation
Stream Decoder Buffer Limits
CHANGELOG
CHANGELOG
StreamdownTextPrimitive
index
Streaming Markdown Rendering
CHANGELOG
CHANGELOG
index
introduction
part-1
AGENTS
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CHANGELOG
CODE_OF_CONDUCT
CONTRIBUTING
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README
README_LANGGRAPH
SECURITY
SPEC
SPEC_AssistantFrame
SPEC_ModelContextRegistry
action-bar
action-bar-more
adapters
artifacts
assistant-if
assistant-modal
assistant-modal
assistant-runtime
assistant-sidebar
attachment
attachment
attachment-runtime
branch-picker
chatgpt
claude
composer
composer-runtime
composition
context-display
custom-backend
custom-backend
error
file
form-demo
grok
heat-graph
hooks
image
index
index
index
index
index
index
index
index
index
markdown
mem0
mermaid
message-part
message-part-runtime
message-runtime
message-timing
modal
model-selector
part-3
perplexity
pick-a-runtime
primitives
primitives
quote
reasoning
selection-toolbar
sources
suggestion
syntax-highlighting
thread
thread
thread-list
thread-list
thread-list-item
thread-list-item-more
thread-list-item-runtime
thread-list-runtime
tool-fallback
tool-group
tw-shimmer
v4-legacy
v5-legacy