# Add a voice agent to your app: the quick-start

> Quick-start for the TARS voice agent SDK: add a screen-aware voice agent to your Android, iOS or web app. Initialise it, mark screens and start a call.

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 key**: From 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 URL**: Zynnex gives you the URL your app talks to.
- **An anonymous user ID**: Any stable, anonymous ID, such as a per-install UUID. Never a phone number or email.
- **Microphone permission**: Without it the help button still shows, but the call cannot start.

## Android quick-start

1. **Add the SDK**: Add the Android SDK package Zynnex shares with you, plus the dependencies listed in the integration guide.
2. **Declare permissions**: INTERNET, ACCESS_NETWORK_STATE, RECORD_AUDIO and MODIFY_AUDIO_SETTINGS in your manifest, and request RECORD_AUDIO at runtime before a call.
3. **Initialise once**: Call 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 ZynnexKit**: Add the ZynnexKit Swift package to your app target. It brings everything it needs with it. Requires iOS 17 or later.
2. **Add the microphone reason**: Add NSMicrophoneUsageDescription to Info.plist. The kit asks for access when a call starts.
3. **Configure once at launch**: Call ZynnexKit.configure with your backend URL, an anonymous user ID and your SDK key.
4. **Mark every screen**: Add .zynnexCapture(screenId:route:) to each screen root. The agent may say the screenId aloud, so make it readable.
5. **Tag your controls**: Tag 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 official@zynnex.in for the web integration guide.

- **[AI voice assistant for websites](https://zynnex.in/ai-voice-assistant-for-website)**: What 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 adds](https://zynnex.in/sdk)**: On-screen awareness, guided actions, proactive help and drop-off callbacks.

## Go-live checklist

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

## Frequently asked questions

### How do I get an SDK key?

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.

### Why does the call not start?

Usually the microphone permission. On Android, RECORD_AUDIO must be declared and granted at runtime. On iOS, NSMicrophoneUsageDescription must be in Info.plist.

### Which iOS and Android versions does the SDK support?

ZynnexKit needs iOS 17 or later and works in Swift 5 and Swift 6 apps. The Android SDK works in any Android app.

### Do I need to add other libraries?

On iOS, no: ZynnexKit brings what it needs. On Android, add the dependencies the integration guide lists alongside the SDK.

### Is there a React or web SDK?

Yes. TARS runs in web apps with one script tag. Email official@zynnex.in for the web integration guide.

### Where are the full integration guides?

They are shared with your team when you start. Email official@zynnex.in.

## Related

- [In-app voice SDK](https://zynnex.in/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.
- [AI voice assistant for mobile apps](https://zynnex.in/ai-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.
- [AI voice assistant for websites](https://zynnex.in/ai-voice-assistant-for-website): 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.
- [Trust Center](https://zynnex.in/security): 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.
---
Source: https://zynnex.in/docs
