Skip to main content
The HTTP and chat APIs in @polpo-ai/sdk use fetch and work on React Native versions with streaming ReadableStream support. React Native does not provide a portable native EventSource; use a polyfill for project events.

Install

For SSE support, install an EventSource polyfill:

Setup

Do not embed an sk_live_ or sk_test_ project key in a mobile binary. Route requests through your authenticated backend and inject the key there.

Chat screen

Agent list

SSE events

For real-time updates, use react-native-sse:

Notes

  • The @polpo-ai/react hooks package uses useSyncExternalStore which works on React Native 0.69+
  • For Expo, all APIs work without extra native modules
  • File uploads (agent avatars, storage) use standard fetch with FormData
  • Chat streaming uses the Fetch API’s ReadableStream — supported in React Native 0.71+ (Hermes)
For older React Native versions without ReadableStream support, use the non-streaming client.chatCompletions() method instead.