Skip to main content
Actions are events that are dispatched to the native app.

Using Actions

import { AudioAppKit } from '@bragiai/audio-app-kit';
// Usage: AudioAppKit.chatAgent.toggleState(state);

List of Actions

Toggle State

AudioAppKit.chatAgent.toggleState(agentShared.StatePayload_State.ON);

Toggle Mute

AudioAppKit.chatAgent.toggleMute(agentShared.StatePayload_State.ON);

Send Message

AudioAppKit.chatAgent.send('What is superconductivity?');

Regenerate Message

AudioAppKit.chatAgent.send({
  prompt: 'What is superconductivity?',
  uuid: 'd61ff9f3-c41b-4967-9963-1791599db445'
});

Language Update

AudioAppKit.chatAgent.languageUpdate('en'); // English

Enable Voice Control

AudioAppKit.chatAgent.enableVoiceControl();

Clear Chat History

AudioAppKit.chatAgent.clearChatHistory();

Shortcut Button Tapped

AudioAppKit.chatAgent.shortcutButtonTapped();

Complete Session

AudioAppKit.chatAgent.completeSession({
  silent: false, // If true, the session will complete silently without triggering UI or sound feedback.
  unsubscribe: false, // If true, the session will be terminated after the response is generated.
});

Paywall Button Tapped

AudioAppKit.chatAgent.paywallButtonTapped(); // Paywall button tapped

Notification Badge State

AudioAppKit.chatAgent.notificationBadgeState(type, isActive); // Notification badge state

Share Message

AudioAppKit.chatAgent.shareText("Superconductivity is a phenomenon where ...");
AudioAppKit.chatAgent.bannerTapped();

Input Mode Changed

AudioAppKit.chatAgent.inputModeChanged(agentAction.InputTypePayload_Type.TEXT);

Open App Settings

AudioAppKit.chatAgent.openAppSettings();

Download Language Model

AudioAppKit.chatAgent.downloadLanguageModel('de'); // language code

Cancel Downloading Language Model

AudioAppKit.chatAgent.cancelDownloadLanguageModel();

Delete Language Model

AudioAppKit.chatAgent.deleteLanguageModel('de'); // language code
I