Flutter SDK
The ORYKSA AI employee inside a Flutter app: a round bubble with the AI photo in the middle of the tab bar, 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.2.1 | Android, iOS | MIT |
Install
flutter pub add oryksa
Version 1.2.1, with the bubble, apps without a server (OryksaClient.public) and photos, is available now from ORYKSA. Put this in pubspec.yaml and run flutter pub get:
dependencies:
oryksa:
git:
url: https://github.com/oryksa/oryksa-flutter.git
ref: v1.2.1Or download the source: oryksa-flutter-1.2.1.zip. To update later, change ref to the new version and run flutter pub upgrade oryksa.
Tab bar bubble
Since 1.2: the round bubble with the photo of your AI in the middle of the bottom tab bar, the same as in the ORYKSA app. Tapping it opens the chat, with the microphone for voice: full screen on phones, a side panel on wide screens (840 dp or more: tablets, open foldables, desktop), so your app stays visible beside it. Swap your NavigationBar for OryksaBottomBar; the NavigationDestination items stay the same.





final client = OryksaClient(getToken: myBackend.fetchOryksaToken); // returns "oryk_cs_..."
bottomNavigationBar: OryksaBottomBar(
client: client,
selectedIndex: tab,
onDestinationSelected: (i) => setState(() => tab = i),
destinations: const [
NavigationDestination(icon: Icon(Icons.home_outlined), label: 'Home'),
NavigationDestination(icon: Icon(Icons.search), label: 'Search'),
NavigationDestination(icon: Icon(Icons.receipt_long_outlined), label: 'Orders'),
NavigationDestination(icon: Icon(Icons.person_outline), label: 'Account'),
],
),Already have your own bar? Put OryksaTabBubble(client: client) in the middle of it, or dock it in a BottomAppBar with FloatingActionButtonLocation.centerDocked. Open the same chat from anywhere with showOryksaChatScreen(context, client: client).
langnull follows the language of the app (en,pt,br,es, or a locale tag such aspt-BR);themenull follows the light or dark theme.unread: trueshows a dot on the bubble (for example after a push from your server on themessage.repliedwebhook).- Screen readers hear "Talk to" and the name of the AI, in the four languages. Right-to-left apps get the side panel on the left.
Screenshots of the example app of the package, connected to an ORYKSA demo account.
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 |
|---|---|
OryksaBottomBar(client:, destinations:, selectedIndex:, onDestinationSelected:) | Bottom tab bar (Material 3 style) with your tabs and the AI bubble in the middle. |
OryksaTabBubble(client:) | The round bubble with the photo of the AI, for a bar of your own; opens the chat. |
showOryksaChatScreen(context, client:) | Opens the chat full screen on phones and as a side panel on wide screens. |
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
- In the tab bar (since 1.2): the photo of the AI in a round bubble in the middle; tapping it opens the chat.
- 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.
