# How to Add a Voice AI Agent to Your Banking App (Android, iOS and Web)

> Add a voice AI agent to your Android, iOS or web banking app: the decisions to make first, real SDK code, permissions, agent modes and a go-live checklist.

*Abhishek A · 2026-11-11*

To add a voice AI agent to your banking app, first decide four things: when to ask for the microphone, how the voice session behaves when the phone does something else, which screens and data the agent may use, and which actions only the customer may complete. Then embed a voice agent SDK: declare the microphone permission, initialise it once at launch with your SDK key and an anonymous user id, and name your screens. With the [TARS SDK](/sdk) that is a few lines of Kotlin or Swift, built to go live in under a day; everything else is set in the Zynnex console, not in app code.

This guide is for the teams who build the app at a bank, NBFC, AMC or insurer. For the product view, see the [AI voice assistant for mobile apps](/ai-voice-assistant-for-mobile-apps) page; this one is about the build.

## What a voice AI agent for banking apps actually does

A customer taps a help button and asks their question out loud. The agent answers about the screen they are on, with its fields, buttons, labels and errors, not from a generic help article. If a PAN is rejected because the fourth letter should be P, it says so, and the customer fixes it. That is the difference from a voice chatbot, which does not know where the customer is or what the error says.

TARS, the in-app voice agent from Zynnex, also answers from the customer's own data, such as dues, returns and application status. It can navigate, search and fill in fields, and hands over to your team with context when a person is needed. It responds in under 700 ms, in English, Hindi and 10+ Indian languages, including Hinglish.

The customer stays in the journey, which matters most where financial apps lose people:

- **Onboarding and KYC**, where one wrong field stops the application.
- **Loan and card applications**, where applicants leave half-filled forms.
- **Servicing**, such as statements, dues and status checks.

To pick a first journey, the [drop-off calculator](/drop-off-calculator) estimates what app drop-off costs you, and the [in-app AI agent](/agents/in-app-ai-agent) page shows what the customer sees in each journey.

## Build the voice layer yourself or add a voice agent SDK?

You can build an in-app agent on a real-time voice platform. Your team then owns screen capture, masking, the action layer, the confirmation rules and the voice session, once per platform, and keeps them working as screens change. A voice agent SDK such as TARS packages those pieces, which leaves you the integration below and the product decisions you make either way.

## Four decisions to make before you write code

### When to ask for the microphone

Ask when the customer starts a voice session, not at first launch. On Android, request `RECORD_AUDIO` when the customer taps the help button, and show a short explanation when the system says one is needed. On iOS, the `NSMicrophoneUsageDescription` string is what the customer reads, so keep it plain.

Plan for a refusal: the journey must still work without voice, and the app should say how to turn the microphone on in Settings.

### How the voice session behaves when the phone does something else

Voice needs a real-time, two-way connection, so the customer can speak, hear the answer and interrupt. Decide what should happen when:

- **The customer leaves the app**, for example to read an OTP. By default, TARS ends the call once the app has been in the background for two seconds (`endCallOnAppBackground`, `leaveAppGraceMs`).
- **Something else takes the audio.** By default, a lasting interruption such as a phone call ends the session (`endCallOnAudioFocusLoss`); on Android, a brief one only mutes the microphone.
- **The network changes**, as customers move between Wi-Fi and mobile data mid-sentence.

The first two are server settings, changed without an app release.

### Which screens and data the agent may use

Start narrow: give the agent only the journeys where customers get stuck. For each screen, decide:

- **What it may read:** field labels, button names, errors, statuses and amounts the customer can already see.
- **What it must never receive as a value:** passwords, PINs, MPINs, CVVs and OTPs.
- **Which screens stay out entirely:** anything outside the journeys you chose.

### Which actions wait for the customer

The agent prepares; the customer decides. Let it take the customer to the right screen, highlight a field and fill things in. Anything final waits: a payment or transfer, submitting an application, or ticking a consent or declaration checkbox.

Enforce this in the app, not only in the agent's instructions: the agent may point at a final control and explain it, but its tap must be refused.

## What you need before you add a voice assistant to your app

Three things, on every platform:

- **An SDK key from the Zynnex console.** Apps, then your app, then Android or iOS, then SDK key. Each platform has its own key. The backend rejects every request without one, and the key decides which settings and agent the SDK gets.
- **Microphone permission.** `RECORD_AUDIO` plus a runtime grant on Android; `NSMicrophoneUsageDescription` on iOS. Without it the help button can appear, but the call will not start.
- **A stable, anonymous user id.** A per-install UUID works. Never a phone number or email. After sign-in, `identify` swaps it for your own user id.

You also need your Zynnex backend URL and the SDK package for each platform, which Zynnex shares during onboarding. The [public quick-start](/docs) lists every dependency; put them in front of your security review early.

| Requirement | Android | iOS |
| --- | --- | --- |
| Supported apps | Android apps, including screens built with XML layouts | iOS 17 and later, Swift 5 or Swift 6 |
| Dependencies | As listed in the integration guide | Bundled with ZynnexKit; nothing else to add |

## Android: add a voice assistant to your app in Kotlin

The SDK's floating help button and call card work in any Android app, whatever your screens are built with.

**1. Add the package.** Copy the Android SDK package Zynnex shares with you into `app/libs/`, and add the dependencies the quick-start lists to `app/build.gradle.kts`.

**2. Declare permissions in your app's manifest**, `app/src/main/AndroidManifest.xml`. Your app owns its permissions; do not assume the SDK package covers them.

```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
```

Request `RECORD_AUDIO` at runtime too, before the customer starts a call. The SDK checks for it and will not start a call without it.

**3. Initialise once, in your Application class**, and point `android:name` in the manifest's application tag at that class.

```kotlin
import android.app.Application
import `in`.zynnex.sdk.ZynnexConfig
import `in`.zynnex.sdk.ZynnexSDK

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", // required
            ),
        )
    }
}
```

These three fields, plus an optional `appVersion`, are all of `ZynnexConfig`. Agent mode, proactive help and screen rules are server settings.

**4. Name your screens.** An unnamed screen leaves the agent talking about the last screen it knew. Attach your navigation, or set a name yourself.

```kotlin
LaunchedEffect(navController) {
    ZynnexSDK.attachNavController(navController)
}
// or
ZynnexSDK.setCurrentScreen("Checkout")
```

**5. Start a call.** The customer taps the floating button, or you call `ZynnexSDK.startCall()` from your own help entry point once the microphone is granted. After sign-in, call `ZynnexSDK.identify(userId)`.

## iOS: add ZynnexKit to a Swift app

ZynnexKit is a Swift package for iOS 17 and later, in Swift 5 and Swift 6 apps. On iOS, most of the work is naming screens and tagging controls.

**1. Add the package.** Add the ZynnexKit Swift package Zynnex shares with you, and link the ZynnexKit library to your app target. It brings everything it needs with it.

**2. Add the microphone reason to Info.plist.** The kit asks for microphone access when a call starts.

```xml
<key>NSMicrophoneUsageDescription</key>
<string>Used so the in-app assistant can hear you.</string>
```

**3. Configure once at launch**, in your app's entry point.

```swift
import SwiftUI
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"  // required
        )
    }
    var body: some Scene { WindowGroup { RootView() } }
}
```

**4. Mark every screen root**, including pushed destinations, tabs, sheets and full-screen covers.

```swift
NavigationStack(path: $path) {
    HomeView()
        .zynnexCapture(screenId: "Home", route: "home")
        .navigationDestination(for: Route.self) { route in
            destination(for: route)
                .zynnexCapture(screenId: route.title, route: route.id)
        }
}
```

Mark screens unconditionally; the SDK works out which one is on top. Use names a customer would recognise, because the agent may say them aloud. Plain UIKit screens and controls are found automatically.

**5. Tag your controls once, inside your design system.** SwiftUI views are not visible to an SDK at runtime, so each control the agent should see needs a tag. Keep the ZynnexKit import in one adapter file.

```swift
// The only file that imports ZynnexKit
import ZynnexKit

extension View {
    func agentButton(_ label: String, action: @escaping () -> Void) -> some View {
        semanticNode(id: "btn_\(ZynnexIdentifier.slug(label))", role: "button", label: label,
                     actions: ["CLICK"], onClick: action)
    }
}
```

Add `.agentButton(title, action: action)` to your primary button, with the same action the button runs. Two rules prevent most bugs: `onClick` must do exactly what the control does, and `.disabled(...)` goes outside the tag, or the agent could press a disabled button. No design system? Use drop-ins such as `ZynnexButton` and `ZynnexTextField`.

**6. Start a call** from the floating button, or from code. After sign-in, call `ZynnexKit.identify(userId:)`.

```swift
Task {
    await ZynnexKit.startCall()
}
```

## Web apps: net banking and investment portals

TARS is one SDK for iOS, Android and Web, so the same agent can run in net banking and investment portals. The web integration guide is shared on request: email official@zynnex.in. See what an [AI voice assistant for your website](/ai-voice-assistant-for-website) does in the browser.

## Choose how much the agent does

How far the agent may act is a server setting, `handholdingMode`, changed in the console without an app release.

| Mode | What the agent does |
|---|---|
| Active | Taps, types and clears fields whenever that helps. |
| Hybrid (default) | Highlights and explains first; acts once the customer asks or looks stuck. |
| Passive | Coaches; acts only on an explicit ask. |
| Actions off | `guiNavigationEnabled` set to `false`: the agent can only highlight and speak. |

On top of the mode, mark final controls as user-only in the console: submit, pay, consent checkboxes. The agent can point at them and explain them, but its taps on them are refused. Waivers, settlements and investment advice stay with your team and the customer; the agent never transacts on its own.

## Proactive help, consent and drop-off callbacks

After the microphone, consent comes up twice more: when the agent offers help, and when you call a customer back.

**Offers of help.** An agent should offer help, not start talking. Proactive help offers a call when a customer looks stuck: by default after 15 seconds idle, 25 seconds on one screen or three validation errors, and you set the thresholds. A confirm chip appears, and the call starts only if the customer accepts.

**Drop-off callbacks.** Off by default. Turn on `enableDropoffRecovery`, and a customer who leaves mid-journey is recorded with the screen they left, so a callback can take them back to that step. In code:

- Register the number with `registerCallback` after `identify` and your own OTP check. Customers with no registered number are never called.
- Call `completeFlow()` when the journey ends. Reaching a success screen also cancels the callback.

Call back only customers who agreed to hear from you, inside calling hours, with DND respected. The [Zynnex compliance page](/compliance) sets out the Indian rules for AI voice calls in BFSI.

## Security and data choices

- **Masking happens on the device.** Password, PIN, MPIN and CVV fields send only the fact they exist. PAN, Aadhaar, phone, email, card, bank account, UPI ID and OTP fields send no value, only validation hints. Label fields by what they hold, such as "PAN Card Number": a field the SDK does not recognise is sent as typed.
- **You choose the screens.** `allowedScreenIds` and `excludedScreenIds` decide which screens are sent; excluded wins.
- **Data.** Sensitive information is never stored permanently, and data stays in India.
- **Certifications.** ISO/IEC 27001:2022 certified; DPDP Act 2023 and RBI data-localisation compliant. A SOC 2 audit is in progress; no report has been issued yet.
- **On-premise.** The whole voice stack can run on your own infrastructure.
- **Callback numbers.** Your SDK key ships inside the app, so anyone can extract it. If a wrong number on a customer would matter, turn on `callbackUserTokenRequired` and have your server sign a user token for `registerCallback`.

The [Zynnex security page](/security) has more for your review.

## How to test a voice AI agent in a banking app

Test the paths customers take, on real devices:

- **Permissions:** first request, refusal, and the microphone turned off later in Settings.
- **Interruptions:** an incoming call, switching apps to read an OTP, locking the screen, a network change.
- **Each screen in the journey:** the agent names the right screen, reads the error, and cannot press user-only or disabled controls.
- **Sensitive fields:** PINs, OTPs and passwords never reach the agent as values.
- **Languages:** English, Hindi and the other Indian languages your customers speak.

On iOS, the Simulator uses your Mac's microphone and speakers, so a live test call picks up whoever is talking nearby.

## Go-live checklist

Before you add a voice assistant to your app for every customer:

1. Each platform uses its own SDK key, and `baseUrl` points at your production Zynnex backend.
2. The microphone permission is declared; on Android, `RECORD_AUDIO` is granted at runtime.
3. `appUserId` is stable and anonymous, and `identify` runs after sign-in.
4. Every screen is named in words a customer would recognise.
5. On iOS, design-system controls are tagged, with `.disabled` outside the tags.
6. Allowed and excluded screens match the journeys you chose.
7. Submit, payment and consent controls are user-only, and the agent mode is set.
8. If drop-off recovery is on, `registerCallback` and `completeFlow()` are wired.
9. Screenshot-test launches skip SDK initialisation, and a test call works on a real device.

The [developer docs](/docs) have the full Android and iOS checklists.

## FAQ

### How long does it take to add a voice assistant to your app?

The TARS SDK is built to go live in under a day: a permission, one init call and your screen names, plus control tags on iOS.

### Which platforms does the voice agent SDK support?

Android, including apps with XML layouts; iOS 17 and later through ZynnexKit; and web apps such as net banking portals. Email official@zynnex.in for the web integration guide.

### Can the agent make a payment or submit a form on its own?

No. Anything final waits for the customer to confirm, and the agent never gives investment advice.

### Which languages can customers speak to it?

English, Hindi and 10+ Indian languages, including Tamil, Bengali, Telugu, Kannada and Gujarati, with mixing mid-sentence.

### Do we need an app release to change how the agent behaves?

No. Agent mode, proactive help, screens, call behaviour and drop-off recovery are server settings, fetched at launch and whenever the app returns to the foreground.

### Can the voice stack run on our own servers?

Yes. The whole voice stack can run on your own infrastructure, and data stays in India. More on an [AI voice assistant for mobile apps](/ai-voice-assistant-for-mobile-apps) at a regulated institution.

For platforms, modes and integration steps in one place, see the [TARS SDK page](/sdk). Book a demo from any page on [zynnex.in](https://zynnex.in).
---
Source: https://zynnex.in/blog/add-voice-ai-agent-android-ios-banking-app
