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

# Reference

> API reference for the MobileBoost Espresso SDK

## GptDriver

### Constructor

```kotlin theme={null}
GptDriver(
    apiKey: String,
    deviceName: String,
    platformVersion: String,
    additionalUserContext: String = "",
    cachingMode: String = "NONE",
    testId: String = "",
    composeTestRule: ComposeTestRule? = null
)
```

| Parameter               | Type               | Description                                            |
| ----------------------- | ------------------ | ------------------------------------------------------ |
| `apiKey`                | `String`           | Your MobileBoost API key                               |
| `deviceName`            | `String`           | Device name for logging                                |
| `platformVersion`       | `String`           | Android version                                        |
| `additionalUserContext` | `String`           | Context to guide AI behavior across all steps          |
| `cachingMode`           | `String`           | `"NONE"`, `"FULL_SCREEN"`, or `"INTERACTION_REGION"`   |
| `testId`                | `String`           | Identifier for the test (used for caching and logging) |
| `composeTestRule`       | `ComposeTestRule?` | Required for Jetpack Compose apps                      |

### AI commands

#### execute

Execute a natural language instruction on the current screen.

```kotlin theme={null}
sdkInstance.execute("Tap on the home button and verify it leads to the main screen")
```

#### assert

Verify a condition without taking action. Throws on failure.

```kotlin theme={null}
sdkInstance.assert("The shopping cart shows 3 items")
```

#### extract

Extract information from the current screen.

```kotlin theme={null}
val data = sdkInstance.extract("product name", "price", "quantity")
```
