> ## Documentation Index
> Fetch the complete documentation index at: https://chatbase.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation & Quickstart

> Install the Chatbase Android SDK and send your first message.

> [!TIP]
>
> **Want the full chat without building a UI?** Load the chat in a WebView. It's the simplest way to add your agent to an app, with the same chat, actions, forms, tickets and voice as your website. See [Mobile apps](https://chatbase.co/docs/developer-guides/website-integration/iframe.md#mobile-apps). Use the SDK when you want your own native chat UI.

## Prerequisites

| Requirement | Minimum |
| - | - |
| Android API | 24 (Android 7.0) |
| Java | 11+ |
| Kotlin Coroutines | Required |
| Jetpack Compose | Not required — the SDK works with any UI framework |

## Installation

**Kotlin DSL**

```kotlin theme={null}
// build.gradle.kts (app module)
dependencies {
    implementation("com.chatbase:chatbase-sdk:0.0.1-alpha03")
}
```

**Groovy**

```groovy theme={null}
// build.gradle (app module)
dependencies {
    implementation 'com.chatbase:chatbase-sdk:0.0.1-alpha03'
}
```

> [!NOTE]
>
> The SDK declares the `INTERNET` permission in its own manifest. It is merged automatically — you do not need to add it to your app's manifest.

## Quick Start

**1. Get your Agent ID**

1. Go to the [Chatbase Dashboard](https://www.chatbase.co/dashboard)
2. Select your AI agent
3. Go to **Settings** → **General**
4. Copy the **Agent ID**

**2. Enable the Android SDK channel**

In the dashboard, go to **Deploy** → **Android SDK** and enable the channel for your AI agent.

> [!WARNING]
>
> If the Android SDK channel is not enabled, every SDK request fails with a `404` `AGENT_NOT_FOUND` error — even when the agent ID is correct.

**3. Create a client**

```kotlin theme={null}
import com.chatbase.sdk.Chatbase

val client = Chatbase.create(context, "YOUR_AGENT_ID")
```

`context` can be any Android `Context` (Activity, Application, etc.). It is only used during creation to generate the device ID.

**4. Send your first message**

```kotlin theme={null}
import com.chatbase.sdk.model.Part

lifecycleScope.launch {
    val response = client.sendMessage("Hello! How can you help me?") {
        onTextDelta { delta ->
            // Called for each text chunk — safe to update UI
            print(delta)
        }
    }

    // Access the full response
    val text = response.parts
        .filterIsInstance<Part.Text>()
        .joinToString("") { it.text }

    println(text)
    println("Conversation: ${response.metadata.conversationId}")
}
```

**5. Clean up**

```kotlin theme={null}
// In your ViewModel
override fun onCleared() {
    client.close()
}
```

## Next Steps

> **[Streaming](https://chatbase.co/docs/android-sdk/streaming.md)**
>
> Real-time streaming with callbacks and Kotlin Flow

> **[Client-Side Tools](https://chatbase.co/docs/android-sdk/client-side-tools.md)**
>
> Register local tool handlers the AI agent can invoke

> **[Conversations](https://chatbase.co/docs/android-sdk/conversations.md)**
>
> Manage conversations, history, and pagination

> **[Chatbase](https://chatbase.co/docs/android-sdk/chatbase.md)**
>
> Create clients and configure ChatbaseConfig


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.