Choose an AI runtime
Find the recipe for your chat SDK, client, or stream format.
Start with the data you already have
A runtime keeps messages and provides commands such as send or stop. A model provider generates responses. A protocol describes how messages and events move between server and client.
Already have messages? Start by rendering them directly. Otherwise, find the SDK or protocol your app uses below and follow its first example.
By framework or protocol
| You use | Integration | What remains native |
|---|---|---|
| Vercel AI SDK | createAiSdkAdapter over useChat | Transport, UI-message state, tools and persistence |
| TanStack AI | createTanStackAdapter over useChat | Connection, typed tools and SDK state |
| LangChain useStream | createLangChainAdapter | Graph state, checkpoints, branches and interrupts |
| LangGraph SDK | Native values → shared LangChain projection | Runs, stream decoding, graph state and cancellation |
| Eve | createEveAdapter over native session hook | Durable events, delivery, session and interactions |
| AG-UI | createAgUiRuntime over HttpAgent | Event reducer, shared state, interrupts and run options |
| Google ADK | Native event projection or AG-UI bridge | Server runner, session, transfers and tools |
| A2A | Native message/task projection | Contexts, task status, artifacts and auth requirements |
| OpenCode | Native session snapshot projection | Event cache, permissions, questions, forks and workspaces |
| OpenAI Agents SDK | Official UI-message bridge → Vercel | Server agent runs, handoffs, tools and sessions |
| Mastra | Maintained v7 UI-message bridge → Vercel | Memory, run/thread identity and workflow state |
| Cloudflare Agents | Native Agent chat hook → Vercel adapter | Durable turn recovery, connection and server continuations |
| Pydantic AI | Maintained AG-UI or Vercel server interface | Python agent, dependencies, deferred tools and history |
| Claude Managed Agents | Ordered session-event projection | Durable sessions, permissions and custom execution handoffs |
| OpenRouter | Vercel provider or Agent SDK item projection | Model routing or native agent state/tools/usage |
| Agno | AgentOS AG-UI interface → native AG-UI client | Agent/team execution, sessions and policy |
| CrewAI | Maintained AG-UI endpoint → native AG-UI client | Crew/Flow state, orchestration and human input |
The recipes show which client to use and which data it passes to the view. Check tested versions before connecting your server.
By need
| Need | Start here | Example job |
|---|---|---|
| Embed an answer in an existing product | Plain data | A brief summary inside a document |
| Connect a local or simple API | Local/simple API | Text streaming without tool/artifact semantics |
| Keep Redux, Zustand or another store | External store | Existing product state with subscribed messages |
| Consume a UI-message or legacy data stream | Data streams | Current SDK endpoint or an existing v4 backend |
| Render a live task board beside chat | AG-UI shared state or full agent state | An agent edits a plan while explaining progress |
| Branch, inspect or resume graph work | LangChain / LangGraph | Fork a proposal at a checkpoint |
| Ask for permission or clarification | Eve, OpenCode, Managed Agents | Decide about one identified native request |
| Track a remote task and its artifacts | A2A | Review a long-running agent's deliverables |
What Ghost handles
Ghost renders messages and can check whether a command still applies to the open conversation. Your SDK keeps its event handling and state. Your app configures the connection, saves conversations, and runs tools. Import only the parts the recipe uses.
Assistant UI offers managed runtimes, external-store integration and standalone elements. Its managed thread features may suit a new chat product; Ghost's integration edge fits an existing product that already owns state. shadcn offers copyable parts and SDK helpers. These are useful alternatives; SDK independence alone does not establish performance, bundle or whole-library superiority.
Build the conversation UI
Once messages appear, add Composer for replies, Activity for progress, or Citation for sources. The component pages show layout and styling.