React Native SDK
The ORYKSA AI employee inside a React Native or Expo app: the same chat as the website, in four languages, with no native code.
What the SDK does and what it is for
It puts the ORYKSA chat bubble and voice inside your app, to serve the customers of your business: they ask, buy and book. The AI answers with your Brain, your products and your services, with the name, photo and voice you chose in Your AI, and saves leads, bookings and sales in the Activities of your ORYKSA account, like WhatsApp or the website chat.
It is not an interface for the owner: through the SDK nobody changes your settings, reads your Activities or gives orders to ORYKSA, even if they say they are the owner. The chat where the owner talks to ORYKSA exists only in the official ORYKSA app, the dashboard and the browser extension.
Voice since version 1.1 (Android, iOS, Flutter and React Native), with the same behaviour as the ORYKSA app. The JavaScript and .NET SDKs are text only.
Swear words the customer types show as asterisks in the chat (the same list as every ORYKSA chat, from GET https://app.oryksa.com/widget/profanity.json); the AI's replies already come filtered.
| Package | Version | Platforms | Licence |
|---|---|---|---|
@oryksa/react-native (npm, GitHub) | 1.1.1 | Android, iOS, Expo (text chat in Expo Go; voice needs native modules or your own audio adapter) | MIT |
Install
npm install @oryksa/react-native
TypeScript types are included. Alternative straight from GitHub: npm install github:oryksa/oryksa-react-native#v1.1.1.
Minimal example
One floating button that opens the chat. The button shows "Talk to <name>" with the AI employee's photo, exactly like the website chat.
import { OryksaClient, OryksaChatButton } from "@oryksa/react-native";
// The app never holds the API key: your backend creates short-lived
// session tokens (oryk_cs_...) with POST /v1/sessions and hands them over.
const client = new OryksaClient({
getToken: async () => {
const r = await fetch("https://your-server.example/oryksa-token");
return (await r.json()).token;
},
});
export default function App() {
return (
<>
<MyScreen />
<OryksaChatButton client={client} lang="en" /> {/* en, pt, br, es */}
</>
);
}
Pieces
| Piece | What it does |
|---|---|
<OryksaChatButton client lang /> | Floating button with the photo and name; opens the chat. |
<OryksaChatModal client visible onClose /> | Opens the chat from a button of your own. |
<OryksaChat client /> | The chat panel inside any screen. |
theme={{ accent: "#5B57E0" }} | Colours. |
client.agent(), client.sendAndWait(text), client.messages() | No interface: agent details, send a message and wait for the reply, message history. |
Server side (Node)
The API key stays on your server. With @oryksa/sdk your backend creates the session tokens the app uses, and keeps the agent's Brain in sync with the app with learnApp.
import { Oryksa, verifyWebhook } from "@oryksa/sdk"; // server side, Node
const oryksa = new Oryksa(process.env.ORYKSA_API_KEY);
// short-lived token for one app user: send only client_token to the app
const session = await oryksa.createSession({ conversationId: "user-42", customerName: "Ana" });
// keep the Brain in sync with the app (call it on every release)
await oryksa.learnApp({ name: "My app", screens, faq });
// webhooks: pass the RAW body
const event = await verifyWebhook(rawBody, req.headers["oryksa-signature"], webhookSecret);
What the user sees
- The same look as the website chat: button with the photo, header with the name and "online", bubbles, suggestions, SEND and "Powered by ORYKSA".
- Languages:
en,pt(Portugal),br(Brazil),es. The name and photo come from the owner's "Your AI" profile. - Voice (since 1.1): the microphone in the chat opens the voice screen, with the same behaviour as the ORYKSA app. Each reply has a copy button.
getToken to fetch a short-lived oryk_cs_... token from your backend; the SDK refreshes it on a 401.
