> ## 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.

## 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

<Tabs>
  <Tab title="Kotlin DSL">
    ```kotlin theme={null}
    // build.gradle.kts (app module)
    dependencies {
        implementation("com.chatbase:chatbase-sdk:0.0.1-alpha03")
    }
    ```
  </Tab>

  <Tab title="Groovy">
    ```groovy theme={null}
    // build.gradle (app module)
    dependencies {
        implementation 'com.chatbase:chatbase-sdk:0.0.1-alpha03'
    }
    ```
  </Tab>
</Tabs>

<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.
</Note>

## Quick Start

<Steps>
  <Step title="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**
  </Step>

  <Step title="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.
    </Warning>
  </Step>

  <Step title="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.
  </Step>

  <Step title="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}")
    }
    ```
  </Step>

  <Step title="Clean up">
    ```kotlin theme={null}
    // In your ViewModel
    override fun onCleared() {
        client.close()
    }
    ```
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Streaming" icon="wave-pulse" href="/docs/android-sdk/streaming">
    Real-time streaming with callbacks and Kotlin Flow
  </Card>

  <Card title="Client-Side Tools" icon="bolt" href="/docs/android-sdk/client-side-tools">
    Register local tool handlers the AI agent can invoke
  </Card>

  <Card title="Conversations" icon="messages" href="/docs/android-sdk/conversations">
    Manage conversations, history, and pagination
  </Card>

  <Card title="Chatbase" icon="code" href="/docs/android-sdk/chatbase">
    Create clients and configure ChatbaseConfig
  </Card>
</CardGroup>


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