Prerequisites
Installation
The SDK ships as a Swift Package.- Xcode
- Package.swift
- File → Add Package Dependencies…
-
Paste the repository URL:
-
Choose version
0.1.0-beta.1(or Up to Next Minor) and add the ChatbaseSDK library to your app target.
No
Info.plist changes are needed. The SDK talks to https://www.chatbase.co over HTTPS, which iOS allows by default.Quick Start
1
Get your Agent ID
- Go to the Chatbase Dashboard
- Select your AI agent
- Go to Settings → General
- Copy the Agent ID
2
Enable the iOS SDK channel
In the dashboard, go to Deploy → iOS SDK and enable the channel for your AI agent.
3
Create a client
@State property. A new client starts anonymous, tied to a device ID that stays the same across launches. For configuration options, see ChatbaseClient.4
Send your first message
5
Continue the conversation
ConversationState instead. It keeps the conversation ID for you, along with the message list.Next Steps
Streaming
Stream replies with async/await and callbacks
SwiftUI
Ready-made state for chat screens
Client-Side Tools
Let the AI agent run functions on the device
ChatbaseClient
Initializer, properties, and methods