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

# Chatbase

> Create SDK clients with Chatbase and configure them with ChatbaseConfig in the Chatbase Android SDK.

`object Chatbase` — **Package:** `com.chatbase.sdk`

The singleton factory for creating SDK clients.

## create

```kotlin theme={null}
fun create(context: Context, agentId: String): ChatbaseClient
```

Create a client with default settings.

<ParamField body="context" type="Context" required>
  Any Android `Context`. Used only during creation to generate the device ID.
</ParamField>

<ParamField body="agentId" type="String" required>
  The Chatbase agent ID to connect to.
</ParamField>

## create (with configuration)

```kotlin theme={null}
fun create(context: Context, block: ChatbaseConfig.Builder.() -> Unit): ChatbaseClient
```

Create a client with custom configuration via a DSL builder.

```kotlin theme={null}
val client = Chatbase.create(context) {
    agentId = "YOUR_AGENT_ID"
    connectTimeoutMs = 15_000  // 15 seconds
    readTimeoutMs = 60_000     // 60 seconds
}
```

## ChatbaseConfig

`data class ChatbaseConfig` — **Package:** `com.chatbase.sdk`

| Property | Type | Default | Description |
| - | - | - | - |
| `agentId` | `String` | (required) | The Chatbase agent ID to connect to. |
| `connectTimeoutMs` | `Long` | `10_000` | Connection timeout in milliseconds. |
| `readTimeoutMs` | `Long` | `30_000` | Read timeout in milliseconds. |

<Tip>
  For streaming responses, the SDK uses a separate 5-minute read timeout regardless of the `readTimeoutMs` setting. This ensures long-running streams are not interrupted prematurely.
</Tip>


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