
oryksa
Official Flutter SDK for ORYKSA AI Employees. Put an AI employee that already knows your business inside your Flutter app (Android, iOS, web and desktop): a round bubble with the photo of your AI in the middle of your tab bar, a ready chat with the same look as the ORYKSA website chat, the name and photo of your AI from your ORYKSA account, in English, Portuguese and Spanish.
- Docs: https://developer.oryksa.com/en/sdks
- API:
https://api.oryksa.com/v1
Screenshots

Real screens of the example app in this repository (example/), built for the web by CI and captured in Chrome at phone size with an ORYKSA test account. The green chat uses the code of Colours and theme below.
Install
flutter pub add oryksa
What it is for
The SDK puts the ORYKSA chat and voice inside your app to serve the customers of your business: they ask, buy and book. The AI answers with your Brain, products and 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. It is not an interface for the owner: nobody changes settings, reads Activities or gives orders to ORYKSA through the SDK. More: https://help.oryksa.com/en/a/sdks-what-they-do
Swear words the customer types show as asterisks in the chat (the same list as every ORYKSA chat, loaded from https://app.oryksa.com/widget/profanity.json, kept 24 hours). The AI's replies already come filtered from the server.
Tab bar bubble (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. The name and photo come from Your AI in your ORYKSA account.

Swap your NavigationBar for OryksaBottomBar (same NavigationDestination items):
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 in the middle of it:
// in the Row of your bar
Row(children: [...leftTabs, OryksaTabBubble(client: client, showLabel: true, borderColor: barColor), ...rightTabs]);
// or docked in a BottomAppBar
floatingActionButton: OryksaTabBubble(client: client),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
lang:en,pt,brores(or a locale tag such aspt-BR). Leave it null to follow the language of the app (addflutter_localizationsand yoursupportedLocales, as in the example).theme: null follows the light or dark theme of the app (OryksaChatTheme()/OryksaChatTheme.dark()); pass one to use your colors.unread: trueshows a dot on the bubble (for example after a push from your server on themessage.repliedwebhook); clear it inonBubbleOpen/onOpen.appContext: the screen the customer is on, sent with each message (see below).- Screen readers hear "Talk to Sofia" ("Falar com Sofia", "Hablar con Sofia", plus "new message" when there is one). Right-to-left apps get the side panel on the left.
- Open the same chat from anywhere with
showOryksaChatScreen(context, client: client).
Photo of the AI or company logo (1.2.1). By default the bubble shows the photo of your AI. To show your company logo instead, pick "Company logo" in the ORYKSA panel (Connectors > Website chat): the bubble shows the whole logo on white, with the name of your business under it. The chat that opens keeps the photo and name of your AI. Your app can also force an image with image: on OryksaTabBubble (or bubbleImage: on OryksaBottomBar), for example bubbleImage: const AssetImage('assets/logo.png').
Voice and app context (1.1)
The chat shows a microphone when your plan has voice. It opens the voice screen with the same behaviour as the ORYKSA app: the microphone stays open while she speaks and only a human voice cuts her off (typing, TV and her own echo do not); she stops on the word and the text stays in the chat; a whisper gets a whispered answer; if her voice fails, the text is shown (never a robot voice).
Microphone and loudspeaker permissions: Android <uses-permission android:name="android.permission.RECORD_AUDIO"/> and <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> (her voice on the loudspeaker during the conversation; without it her voice goes out as media), iOS NSMicrophoneUsageDescription in Info.plist. The attach button (photo library, camera, document; on by default, attachments: false hides it) needs NSCameraUsageDescription and NSPhotoLibraryUsageDescription in Info.plist; nothing more on Android.
OryksaChatButton(
client: client,
lang: 'pt',
// the screen the customer is on, so the AI answers about it
appContext: () => const OryksaAppContext(screen: 'product', title: 'Sky Beginner Snowboard, 489.95'),
)
Links with an Open button (1.2.5)
The links the AI gives can be tapped in the chat, and each one gets a card under her reply with the picture and title of the page and an Open button (the pages of your own site, the domains of your website chat; other sites show the address). The voice screen shows what she says without the addresses, with the same cards. Pass onLink to open your own screens, for example your product page: return true when your app opened it, false to let the browser open it.
OryksaTabBubble(
client: client,
onLink: (uri) {
final id = myProductIdOf(uri); // your routes
if (id == null) return false;
Navigator.of(context).pushNamed('/product', arguments: id);
return true;
},
)
Your own AI features: client.ai (1.2.6)
Have the AI do what your app needs (read a photo, extract data, classify, translate, write) and pay with ORYKSA interactions: 1 per answer. Your prompt and your JSON Schema live in your app; the session token is enough (never ship the secret key). It does not create a conversation in your inbox.
final r = await client.ai(
instructions: 'Read the tyre on the photo: brand, model and size exactly as written on the sidewall. '
'If the size is not legible, readable=false and size=null. Never invent.',
images: [OryksaImage(photoBytes)], // JPEG, resized to 1600 px
schema: {
'type': 'object',
'properties': {
'readable': {'type': 'boolean'},
'brand': {'type': ['string', 'null']},
'size': {'type': ['string', 'null']},
},
'required': ['readable', 'brand', 'size'],
},
);
if (r.json?['readable'] == true) showProductsFor(r.json!['size'] as String);
r.text has the answer as text, r.json the object (with a schema), r.interactionsSpent the interactions used. When the plan's interactions are used up the call throws OryksaException with status 402.
TV apps: package:oryksa/tv.dart (Android TV, Google TV, Fire TV)
What the AI does for any TV app, driven only by the remote (arrows, OK, Back), with big letters and a focus you can see from the sofa. Native Flutter widgets, no web view. The texts, voices, rules and buttons come from your ORYKSA account.
- Presenter: the AI speaks on screen with a native voice in the viewer's language and big subtitles. Lines she already said play again from the device, with no new voice made, and are charged again each time she says them.
- Assistant panel: a conversation with the AI for the remote.
- Phone voice: many TVs give no microphone to apps (the Fire TV Stick does not). The TV shows a QR code, the phone opens the ORYKSA page, and what the person says arrives in your app as text.
client.aifor your own tasks, for example moderating or classifying.
import 'package:oryksa/tv.dart';
// A pure Dart package cannot tell a Fire TV from an Android TV: your app says which one it is.
final client = OryksaClient(getToken: tokenFromYourServer, platform: OryksaTvPlatform.fireTv.wire);
final tv = OryksaTv(client: client, locale: 'pt-BR');
// The presenter: put OryksaPresenterView over your screen.
Stack(children: [yourScreen, OryksaPresenterView(tv: tv)]);
await tv.presenter.say('Welcome! I am your host tonight.');
await tv.presenter.sayGenerated(instructions: 'Announce the next round in one short sentence.', input: 'Round 2');
// Subtitles only, no sound (charged at the text price; a spoken line is charged at the voice price).
await tv.presenter.say('The theme tonight: travel.', voice: false);
// The assistant panel (Back closes it and the focus goes back where it was).
showOryksaTvAssistant(context, tv: tv);
// The phone as the microphone.
tv.phoneVoice.texts.listen((text) => onViewerSaid(text));
showDialog(context: context, builder: (_) => Dialog(child: OryksaPairingCard(tv: tv)));
- Without a server of your own:
OryksaClient.public(chatToken: ..., conversationId: ..., platform: OryksaTvPlatform.fireTv.wire, appId: 'your.package.name')opens a public session with your business's public chat token. When your business limits its chat, it must list your package in its allowed apps.appIdis a filter, not strong protection (it can be imitated): the strong protection is a token from your own server (POST /v1/sessions). - Languages: the ORYKSA server picks the voice and the texts for the locale. There are native voices for pt-BR, pt-PT, es-ES, es-419, fr-FR, de-DE, en-US and en-GB, and any other language uses the US English voice.
- Interactions: each presenter line is charged by the ORYKSA interaction cost table every time she says it or shows it (per piece of up to 600 characters), a repeated line and a subtitles-only line too: a spoken line at the voice price, a subtitles-only line at the text price. The exact number comes in the
X-ORYKSA-Interactions-Spentheader, and a line the server did not count is not shown. Each text heard on the phone, each chat reply and eachclient.aianswer are charged too. - While she speaks, OK and Back on the remote stop her (
remoteSkips: falseturns that off). Usetv.presenter.onStartandonEndto lower your music or video. - TV microphone:
OryksaTvMic.isAvailable()tells whether the device lists an audio input. The SDK never asks for the permission on a TV without one. - AndroidManifest: declare the microphone, the touchscreen and leanback as not required, so the stores do not hide your app on TVs without them, and add the TV launcher category with a banner. See
example_tv/in the repository.
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-feature android:name="android.software.leanback" android:required="false"/>
<!-- in the activity's intent-filter -->
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
For tests and demos, OryksaTv.withBackend(OryksaTvFakeBackend()) runs everything without the server. It is simulated, so it proves nothing about your ORYKSA account.
How it works (and why the key stays safe)
- Your server keeps the secret API key (
oryk_live_..., created at developer.oryksa.com) and creates a short-lived session token for each signed-in user withPOST /v1/sessions. - Your app receives only that session token (
oryk_cs_...) and talks to ORYKSA with it. The secret key never goes into the app. - Every AI reply counts as one interaction of your ORYKSA plan, the same as on WhatsApp.
In the app
import 'package:oryksa/oryksa.dart';
final client = OryksaClient(
getToken: () async => await myBackend.fetchOryksaToken(), // returns "oryk_cs_..."
);
Scaffold(
body: MyScreen(),
floatingActionButton: OryksaChatButton(client: client, lang: 'en'), // en, pt, br, es
);
Open it from your own button with showOryksaChat(context, client: client), or place the panel anywhere with OryksaChat(client: client). Change colors with OryksaChatTheme.
Without the UI:
final agent = await client.agent(); // name, photo, greeting, suggestions
final text = await client.sendAndWait('Are you open on Saturday?');
final history = await client.messages();
On your Dart server (secret key)
Server helpers are a separate library, only for your backend: never import it in the app. The app library (package:oryksa/oryksa.dart) serves your customers only and cannot change the AI or its Brain.
import 'package:oryksa/oryksa_server.dart';
final oryksa = Oryksa(Platform.environment['ORYKSA_API_KEY']!);
// session token for one user (send only client_token to the app)
final s = await oryksa.createSession(conversationId: 'user-42', customerName: 'Ana');
// keep the AI in sync with your app (call it on every release)
await oryksa.learnApp(
name: 'FitTrack',
description: 'Fitness app to log workouts and follow training plans.',
screens: [{'title': 'Workouts', 'content': 'Tap + to log a workout.'}],
faq: [{'question': 'How do I cancel Premium?', 'answer': 'Settings > Subscription > Cancel.'}],
);
Servers in other languages can call the same API: see https://developer.oryksa.com.
Webhooks
import 'package:oryksa/oryksa_server.dart';
final event = verifyWebhook(rawBody, request.headers['oryksa-signature'], webhookSecret);
Errors
Every failed call throws OryksaException with status, code (for example interaction_limit_reached, rate_limited, plan_required) and message.
Colours and theme
OryksaChatTheme has six colors: accent (buttons, visitor bubbles, links), ink (main text), soft (AI bubbles), background (panel), muted (secondary text) and line (dividers). OryksaChatTheme() is the light version and OryksaChatTheme.dark() the dark one. Pass the theme to OryksaChatButton, OryksaChat, showOryksaChat or OryksaTabBubble.
// Your own colors (light)
OryksaChatButton(
client: client,
theme: const OryksaChatTheme(accent: Color(0xFF0E8A6B)),
);
// Dark version, with your accent
OryksaChatButton(
client: client,
theme: const OryksaChatTheme.dark(accent: Color(0xFF3DD9A8)),
);
OryksaTabBubble and showOryksaChatScreen follow the light or dark theme of your app when you pass no theme (OryksaChatTheme.of(context)).
About the author
Weslley Harakawa - Founder of ORYKSA AI. Based in Lisbon, Portugal. Specialties: artificial intelligence, web and mobile development, blockchain tokenization. Education: University of the People.
- LinkedIn: https://www.linkedin.com/in/weslleyharakawa/
- ORYKSA AI Employees: https://oryksa.com (X: https://x.com/oryksa, Instagram: https://www.instagram.com/oryksaai, YouTube: https://www.youtube.com/@ORYKSA)
MIT License · ORYKSA AI Employees · W8 Atlantic Unipessoal Lda
Libraries
- oryksa
- Official Flutter SDK for ORYKSA AI Employees.
- oryksa_server
- ORYKSA server helpers: ONLY for the subscriber's own backend (Dart servers such as shelf, dart_frog or serverpod). Never import this library in a Flutter app.
- tv
- ORYKSA for TV apps (Android TV, Google TV, Fire TV with Fire OS).
- vad
