Skip to main content
The Android Assistant SDK puts a governed agent inside your own app: a streaming client to Metabind’s Agent proxy, an MCP client for your project’s tools, and rendering of Interactive Tool results as real native Jetpack Compose — not web views — through BindJS. Use the drop-in MetabindAssistantView for a complete chat surface, or build your own with the lower-level APIs.

SDK on GitHub

metabind-android — the Android SDK. The Assistant SDK is the :metabindai module.

Demo app

samples/assistant-demo — a complete Compose chat app built on MetabindAssistantView.

Requirements

Installation

Add the Assistant SDK dependency, which pulls in the MCP client (ai.metabind:mcpappshost-android) and the BindJS renderer (ai.metabind:bindjs-android) transitively:
See the repository README for the Maven repository configuration.

What you configure

  • A Metabind API key, sent as a Bearer token to both the Agent proxy and the MCP server.
  • Your project’s orgId and projectId. The SDK derives your project’s MCP server URL from these.
  • Optionally, the agentHost and mcpHost constructor parameters, which default to https://agent.metabind.ai and https://mcp.metabind.ai.

Drop in the chat surface

The SDK ships MetabindAssistantView, a complete chat UI:
MetabindAssistantView handles message bubbles, streaming indicators, tool rendering, input, and auto-scrolling. It follows your app’s Material3 theme.
Retain the MetabindAssistant instance at an appropriate scope — inside a ViewModel, for example — and call close() when you discard it.

MetabindAssistant

MetabindAssistant manages the conversation. For custom UIs, observe its state directly:

ChatMessage

Stream a conversation turn

MetabindAgentProvider calls the Agent proxy — which holds the LLM key and runs the tool loop server-side — and streams results back as a Flow<LLMStreamEvent>:
The Android SDK is Agent-proxy only — there’s no bring-your-own-key Anthropic provider. See LLM provider configuration for how the proxy works.

Discover and fetch tool UIs

Use MCPAppsClient to list your project’s tools and fetch the UI resource for a tool that renders one:
MCPAppsClient also exposes callTool(name, arguments) for invoking tools.

Native rendering of tool output

If you use MetabindAssistantView, tool rendering is automatic. For custom UIs, ToolUIContent has two variants:
  • ToolUIContent.BindJS — render via BindJSView from bindjs-android
  • ToolUIContent.Html — render in a WebView
See MetabindAssistantView.kt for the full wiring.

Build a custom chat UI

If MetabindAssistantView doesn’t fit your design, build your own around MetabindAssistant. Observe assistant.messages, call assistant.send(text), and render tool UIs via assistant.toolUIContent. The MetabindAssistantView source is a complete reference implementation built on these same APIs.

Next steps

Demo app

The reference Compose chat app, end to end.

LLM provider configuration

How the Agent proxy holds keys and runs the tool loop.

BindJS reference

The component language the tool UIs are written in.

iOS SDK

The iOS equivalent.