A governed agent inside your own app
Most “drop-in AI” SDKs route your users to someone else’s chat surface, someone else’s brand, and someone else’s tool ecosystem. The Assistant SDK is the opposite — a governed agent runs inside your product, calling tools you built in Metabind, rendered with your components, on your typography and color. It follows your project instructions and renders only your approved components. Your users never leave your app, and you never hand them off to a third-party host..png)
What the SDK gives you
Use the Assistant SDK when
- You’re building an iOS, Android, or web product and want an in-product assistant.
- You want to ship MCP tools that you built (in Metabind) without exposing a third-party MCP host to your users.
- You want tool results rendered as interactive UI — SwiftUI on iOS, Jetpack Compose on Android, and sandboxed web UI inside your React app.
- You want Metabind to manage LLM key custody and the tool loop server-side (the default).
Use a connected MCP host instead when
- Your users already work in Claude Desktop or ChatGPT, and you want to extend those surfaces.
- You don’t want to ship a UI yourself — connecting to an existing host is faster.
- The use case is developer-facing rather than end-user-facing.
Three platforms, one model
On iOS and Android, the SDK ships
MetabindAssistant plus a drop-in MetabindAssistantView chat surface. On the web, @metabindai/agent-ui ships the drop-in <AgentChat /> React component. For working references, see the iOS assistant demo, the Android assistant demo, and the web example app.
Two ways to reach an LLM
The SDK reaches an LLM in one of two ways:- The Agent proxy at
agent.metabind.ai—MetabindAgentProvideron iOS and Android; on the web,<AgentChat />and the lower-level clients talk to the proxy directly. The proxy authenticates with a Metabind project token, holds the LLM key, runs the tool loop server-side, and streams responses back as SSE. The proxy supports Anthropic, OpenAI, and Google — selected per-project in MCP App Studio. Available on all three platforms; recommended for production. AnthropicProvider(iOS) — bring-your-own-key (BYOK) Anthropic, called directly from the client. Useful for development, internal tools, or apps where the key reaches the SDK from an authenticated user-managed source.
LLMProvider protocol if you need to integrate something else. See LLM provider configuration.
What you bring
- A Metabind project with at least one published Type. The SDK connects to its production endpoint by default; on iOS you can point the server URL at the draft endpoint, and on the web
configureChattakes anagent.draftflag — see each platform guide. - A Metabind project token (for Agent proxy mode), or an Anthropic API key (for BYOK mode). Mint project tokens server-side so they aren’t hard-coded in the binary.
- A surface in your app to render the assistant — a screen, a sheet, a sidebar, an inline panel. The SDK ships default UI, but you can fully replace it.
What you don’t write
- Tool calling logic. In Agent proxy mode the proxy runs the loop; in BYOK mode the SDK does. Either way you don’t.
- Streaming. SSE deltas flow into the conversation state and re-render the UI.
- Native rendering. Interactive Tool output renders through BindJS without you wiring it up.
- Schema validation. Inputs and outputs are validated against the project’s tool schemas before they reach the renderer.
Token and key handling
For production, prefer the Agent proxy — your binary ships only a Metabind project token, and there is no third-party LLM key to leak.
Conversation state
The SDK maintains conversation state in memory by default — useful for ephemeral chats. For persistence across launches or reloads, read the conversation state —assistant.conversation.messages on iOS, the assistant.messages StateFlow on Android, or your chat transport’s messages on the web — serialize it to your storage, and rehydrate on next launch.
Rendering details
When a Metabind Interactive Tool returns, its UI resource is handed to the SDK’s renderer:- iOS: Rendered as SwiftUI views. Embedded inside your
Viewhierarchy. - Android: Rendered as Composables. Embedded inside your
@Composabletree. - Web: Rendered in a sandboxed iframe via MCP-UI, embedded inside the
<AgentChat />React surface.
What ships in the SDK
- Default chat surface —
MetabindAssistantViewon iOS and Android,<AgentChat />on the web — with sender + assistant messages. - Rendering of Interactive Tool output — SwiftUI and Jetpack Compose via BindJS on mobile; sandboxed iframes via MCP-UI on the web.
- The Agent proxy path on all three platforms —
MetabindAgentProvideron iOS and Android, the built-in transport on the web — plusAnthropicProvider(BYOK direct) on iOS. - Custom
LLMProviderimplementations on iOS for anything else.
Related
iOS SDK
Swift Package — install, configure, embed.
Android SDK
Maven — install, configure, embed.
Web SDK
npm — drop in AgentChat, or build on the lower-level clients.
LLM provider configuration
Agent proxy vs. BYOK; key custody.
Custom host UI
Drive your own chat surface with the lower-level API.