Cartesiandocs

Get started

Quickstart

Add the Cartesian assistant to your Android, iOS or React app, sign a shopper in and open the assistant from a button.

At the end of this guide your app will have a floating Ask button that opens the Cartesian assistant: a bottom sheet on phones, a side panel on tablets.

9:41

FreshMart

Delivering to Home · 94107 · in 45 min

🥛Dairy
🥦Produce
🍞Bakery
🥩Meat
🍿Snacks

Lucerne Farms Eggs Large

$1.29

Wilcox Family Farm Organic Brown Eggs

$1.29

O Organics Sharp Cheddar Sliced

$2.99

Horizon Organic String Cheese

$5.99

FreshMart Assistant

What's on your grocery list?

Tell me what you're cooking or who you're feeding. I'll find the products, compare prices, plan meals around your diet and allergies, and fill your cart.

FreshMart Assistant can make mistakes. Please check prices and ingredients before you buy.

Powered byCogitX Cartesian
Cartesian cart: 0
What you'll build. Tap the Ask button, then a starter question.

Before you begin

  • The URL of your Cartesian backend, for example https://cartesian.yourcompany.com. See Your Cartesian backend.
  • A way for your app to get a Cartesian session token for the signed-in shopper. See Sessions and tokens.
  • Your platform:
PlatformMinimum
AndroidminSdk 24, Jetpack Compose (BOM 2026.06+)
iOSiOS 16, Swift 5.9 (Xcode 15+), SwiftUI or UIKit
WebReact 18.2 or 19

Set up the SDK

Add the dependency

build.gradle.kts
dependencies {
    implementation("ai.cogitx.cartesian:cartesian-ui:0.1.0")
}

cartesian-ui brings in cartesian-core and its own manifest permissions (INTERNET, ACCESS_NETWORK_STATE, RECORD_AUDIO for voice).

Initialize in your Application

App.kt
class App : Application() {
    override fun onCreate() {
        super.onCreate()
        Cartesian.initialize(
            this,
            CartesianConfig.builder(Vertical.Grocery, "https://cartesian.yourcompany.com").build(),
            CartesianOptions.Builder().title("FreshMart Assistant").build(),
        )
    }
}

Sign the shopper in

lifecycleScope.launch { Cartesian.client.signIn(sessionToken) }
kotlin

The token is saved in the app's private preferences and restored on the next launch.

Wrap your screen and add a button

MainActivity.kt
setContent {
    val assistant = rememberCartesianPanelState()
    CartesianPanelHost(assistant) {
        Box(Modifier.fillMaxSize()) {
            HomeScreen()
            CartesianAskButton(assistant, Modifier.align(Alignment.BottomEnd).padding(20.dp))
        }
    }
}

Full guide: Android SDK.

Tap Ask FreshMart Assistant and try a starter question, such as "Find whole milk and add the cheapest gallon to my cart". That's the whole integration. Everything after this is optional.

Next steps