Flutter SDK
The ORYKSA AI employee inside a Flutter app: the same chat as the website, in four languages, with a Brain that learns the app.
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 (pub.dev, GitHub) | 1.1.1 | Android, iOS | MIT |
Install
flutter pub add oryksa
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 'package:oryksa/oryksa.dart'; // The app never holds the API key: your backend creates short-lived // session tokens (oryk_cs_...) with POST /v1/sessions and hands them over. final client = OryksaClient( getToken: () async => await myBackend.fetchOryksaToken(), ); Scaffold( body: MyScreen(), floatingActionButton: 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. |
showOryksaChat(context, client:) | Opens the chat from a button of your own. |
OryksaChat(client:) | The chat panel embedded wherever you want it. |
OryksaChatTheme | Colours. |
client.agent(), client.sendAndWait(text), client.messages() | No interface: agent details, send a message and wait for the reply, message history. |
Server side (Dart)
The API key stays on your server. Your backend creates the session tokens the app uses, and keeps the agent's Brain in sync with the app with learnApp.
import 'dart:io'; import 'package:oryksa/oryksa_server.dart'; // backend only: never import it in the app final oryksa = Oryksa(Platform.environment['ORYKSA_API_KEY']!); // short-lived token for one app user: send only client_token to the app final 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: appScreens, faq: appFaq); // webhooks: pass the RAW body final event = verifyWebhook(rawBody, request.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 when it expires.
