Add a voice agent to your app: the quick-start
The TARS voice agent SDK adds a screen-aware voice agent to Android, iOS and web apps. This page is the short version. The full integration guides are shared with your team when you start.
Before you start
- An SDK keyFrom the Zynnex console: Apps, then your app, then the platform, then SDK key. Every request needs it, and it decides which agent and settings your app gets.
- Your Zynnex backend URLZynnex gives you the URL your app talks to.
- An anonymous user IDAny stable, anonymous ID, such as a per-install UUID. Never a phone number or email.
- Microphone permissionWithout it the help button still shows, but the call cannot start.
Android quick-start
- Add the SDKAdd the Android SDK package Zynnex shares with you, plus the dependencies listed in the integration guide.
- Declare permissionsINTERNET, ACCESS_NETWORK_STATE, RECORD_AUDIO and MODIFY_AUDIO_SETTINGS in your manifest, and request RECORD_AUDIO at runtime before a call.
- Initialise onceCall ZynnexSDK.init in your Application class. Call ZynnexSDK.identify(userId) once the user signs in.
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
ZynnexSDK.init(
application = this,
config = ZynnexConfig(
baseUrl = "https://YOUR_ZYNNEX_BACKEND_URL",
appUserId = installId, // anonymous, never a phone number or email
apiKey = "YOUR_SDK_KEY",
),
)
}
}iOS quick-start
- Add ZynnexKitAdd the ZynnexKit Swift package to your app target. It brings everything it needs with it. Requires iOS 17 or later.
- Add the microphone reasonAdd NSMicrophoneUsageDescription to Info.plist. The kit asks for access when a call starts.
- Configure once at launchCall ZynnexKit.configure with your backend URL, an anonymous user ID and your SDK key.
- Mark every screenAdd .zynnexCapture(screenId:route:) to each screen root. The agent may say the screenId aloud, so make it readable.
- Tag your controlsTag controls once, inside your design-system components, with .semanticNode, or use the kit's drop-in controls.
import ZynnexKit
@main
struct MyApp: App {
init() {
ZynnexKit.configure(
baseUrl: URL(string: "https://YOUR_ZYNNEX_BACKEND_URL")!,
appUserId: installID, // anonymous, never a phone number or email
apiKey: "YOUR_SDK_KEY"
)
}
var body: some Scene { WindowGroup { RootView() } }
}
// On each screen root
HomeView().zynnexCapture(screenId: "Home", route: "home")
// Start a call from your own button (the floating button does this too)
Task { await ZynnexKit.startCall() }Web and React apps
TARS also runs in web apps, such as net banking and investment portals, added with one script tag. Email [email protected] for the web integration guide.
- AI voice assistant for websitesWhat the web SDK does on your site.
Settings you change without a release
Everything beyond the key, URL and user ID is a server setting in the console: the overlay, how much the agent may do on screen (Active, Hybrid or Passive, or actions off), proactive help, call limits, screens and drop-off recovery. Settings can differ per app version.
- What the SDK addsOn-screen awareness, guided actions, proactive help and drop-off callbacks.
Go-live checklist
- Key and URL setThe app starts the SDK once, at launch, with your SDK key and backend URL.
- Microphone worksThe permission is declared, and on Android granted at runtime, before the first call.
- Screens are visible to the agentEvery screen root is marked and the controls the agent should use are tagged.
- Actions are safeEach tagged control's action does exactly what the control does. Final steps wait for the customer.
In the Zynnex console, open Apps, then your app, then Android or iOS, then SDK key. Use Book a demo on any page if you don't have a console account yet.
Usually the microphone permission. On Android, RECORD_AUDIO must be declared and granted at runtime. On iOS, NSMicrophoneUsageDescription must be in Info.plist.
ZynnexKit needs iOS 17 or later and works in Swift 5 and Swift 6 apps. The Android SDK works in any Android app.
On iOS, no: ZynnexKit brings what it needs. On Android, add the dependencies the integration guide lists alongside the SDK.
Yes. TARS runs in web apps with one script tag. Email [email protected] for the web integration guide.
They are shared with your team when you start. Email [email protected].
Related
In-app voice SDK
The TARS SDK adds a screen-aware voice agent to Android, iOS and web apps: real-time voice, guided actions and drop-off callbacks.
Learn moreAI voice assistant for mobile apps
Add an AI voice assistant to your iOS or Android app. TARS sees the screen, guides customers by voice in Indian languages and goes live in under a day.
Learn moreAI voice assistant for websites
Add an AI voice assistant to your website. TARS sees the page, answers by voice in Indian languages and fills forms with the visitor. One script tag.
Learn moreTrust Center
Zynnex is ISO/IEC 27001:2022 certified and compliant with India's DPDP Act; our SOC 2 audit is underway. How we protect data for banks, NBFCs and insurers.
Learn more