Mobile SDKs overview
Compare the Askocto iOS and Android SDKs: packages, requirements, shared concepts and how the two map onto each other, with links to both.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Askocto ships two native SDKs, one for iOS in Swift and one for Android in Kotlin. They mirror each other, so a feature you learn on one platform works the same way on the other. Pick the SDK for your app, or use both and keep one mental model.
Choose an SDK
| iOS | Android | |
|---|---|---|
| Language | Swift | Kotlin |
| Package | Swift Package Askocto |
co.askocto:sdk |
| Minimum version | iOS 16 | minSdk 24 |
| Single request | async throws function |
suspend function |
| Streaming | AsyncThrowingStream |
Flow |
| Tool arguments | JSONValue |
JsonObject |
| Errors | OctoError enum |
OctoError sealed class |
Both SDKs authenticate with the agent id. Neither needs a workspace API key, so no secret ships inside your app.
Shared concepts
The same names appear on both platforms:
OctoClientis the entry point. It holds the agent id and the current identity.ChatResponseis the result ofchat: the answer message, the conversation id and the usage.ConversationandMessagedescribe a thread and its messages.StreamEventhas four cases: message delta, message done, tool call and error.ClientToolexposes code in your app to the agent.UserIdentityties a conversation to a signed-in customer, verified with a hash from your server.OctoErrorreports every failure with a request id.
Pages by platform
Each SDK section has the same pages: client, chat response, conversations, models, streaming, streaming events, client side tools, user identity and error handling. The iOS section adds a JSONValue page and a SwiftUI page.
Other ways to connect
- For a website, use the website integration with the chat bubble or an iframe.
- For your own backend, call the REST API. Start with Authentication.
Tip: Test the agent in the Playground first. If an answer is wrong there, it will be wrong in the app too, and fixing it takes a source or procedure change, not an app release.