The Assistant SDK ships a default chat surface —Documentation Index
Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
Use this file to discover all available pages before exploring further.
MetabindAssistantView on iOS, the Compose / React equivalents on Android and web — that handles most cases. When you need full control over the UI (a different layout, a non-chat interaction model, custom branding beyond what theming covers), use the SDK’s lower-level API to drive your own surface.
Why go custom
Most teams ship the default UI for the first release and customize later. Cases where custom is right from day one:- Your assistant lives inside a non-chat surface — a sidebar, an inline panel, a voice-first interaction.
- You want UI primitives that don’t fit a chat metaphor — e.g., a multi-pane workspace where the assistant is one component.
- Your design system mandates components that diverge significantly from the SDK’s chat default.
- You’re building an agent UI (open-ended task execution) rather than a chat UI.
What the lower-level API gives you
The default chat surface is built on a small public API on theMetabindAssistant object:
| Member | Purpose |
|---|---|
assistant.send(text) | Submit a user message; returns when the response stream completes. |
assistant.conversation | Observable conversation state. messages holds the running turns. |
assistant.cancel() | Cancel the in-flight turn. |
assistant.isProcessing | Observable boolean — true while a turn is streaming. |
BindJSView on iOS, BindJSCompose on Android, <BindJSRenderer> on web). Each message’s tool results carry the BindJS spec; you hand it to the renderer.
iOS example
MetabindAssistant is an ObservableObject — bind it with @ObservedObject or @StateObject. Tool results render through BindJSView, the SwiftUI renderer for BindJS specs.
Android example
BindJSCompose is the Compose renderer for BindJS specs.
Web example
useAssistant subscribes to the assistant’s observable state. Tool result UI renders through BindJSRenderer, the React renderer.
What the default UI does that you’ll need to handle
If you replace the default UI, replicate (or skip) these as needed:| Feature | Why |
|---|---|
| Streaming token rendering | Show partial responses as they arrive — read message.text reactively. |
| Tool call status | ”Calling product_search…” while the tool runs. |
| Error states | Tool failures, network errors, cancellations. |
| Cancel button | Let users abort a long response — call assistant.cancel(). |
| Auto-scroll | Keep the latest content in view. |
| Accessibility | Dynamic type, screen reader support — VoiceOver / TalkBack. |
| Empty / loading / error states | Cover the conversation lifecycle. |
Conversation state observability
The conversation state is the source of truth. Patterns:- Read-only views. Render the conversation in a different surface (e.g., a summary sidebar) by subscribing to the same state.
- Multi-pane layouts. A chat pane on one side, a tool result detail pane on the other — both subscribed to the same state, both displaying different slices.
- Server-side replay. Persist messages to your backend (the SDK does not ship a persistence adapter today); rehydrate on next session by re-creating the assistant and replaying messages.
Persistence
Conversation state is held in memory by theConversation observable on the assistant. If your app needs persistence across launches or reloads, serialize assistant.conversation.messages to your platform’s storage (Core Data, SwiftData, Room, IndexedDB, your backend) and rehydrate on next launch.
Related
iOS SDK
Default chat surface and configuration.
Android SDK
Default chat surface and configuration.
LLM provider configuration
Agent proxy vs. BYOK for the LLM call.
Assistant SDK overview
Conceptual: when to embed and what’s in the box.