Docs

    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

    1. Add the SDKAdd the Android SDK package Zynnex shares with you, plus the dependencies listed in the integration guide.
    2. Declare permissionsINTERNET, ACCESS_NETWORK_STATE, RECORD_AUDIO and MODIFY_AUDIO_SETTINGS in your manifest, and request RECORD_AUDIO at runtime before a call.
    3. 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

    1. Add ZynnexKitAdd the ZynnexKit Swift package to your app target. It brings everything it needs with it. Requires iOS 17 or later.
    2. Add the microphone reasonAdd NSMicrophoneUsageDescription to Info.plist. The kit asks for access when a call starts.
    3. Configure once at launchCall ZynnexKit.configure with your backend URL, an anonymous user ID and your SDK key.
    4. Mark every screenAdd .zynnexCapture(screenId:route:) to each screen root. The agent may say the screenId aloud, so make it readable.
    5. 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.

    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

    1. Key and URL setThe app starts the SDK once, at launch, with your SDK key and backend URL.
    2. Microphone worksThe permission is declared, and on Android granted at runtime, before the first call.
    3. Screens are visible to the agentEvery screen root is marked and the controls the agent should use are tagged.
    4. Actions are safeEach tagged control's action does exactly what the control does. Final steps wait for the customer.

    Questions, answered.

    Can’t find what you need? Talk to our team.

    Book a demo
    • 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.

    Your app can now talk, guide, and act.

    Book a demo