AI interfaces
Render plain conversation data and add an SDK adapter only where your application needs one.
Start at the boundary you own
Ghost provides SDK-independent data contracts and reusable React views. The contracts do not require a runtime; the views require React. Ghost does not run a model, choose a transport, persist a thread, authorize an action or execute tools.
| Entry | Use |
|---|---|
@ghost-ui/core/chat-runtime | Neutral runtime contracts, guarded commands and external-store bridge. |
@ghost-ui/core/chat-runtime-react | Optional native-hook, context and store bindings. |
@ghost-ui/core/chat-model | Type-only ChatMessage, ChatPart, controllers and related records; no runtime imports. |
@ghost-ui/core/components/message-parts | Render ordered parts, with custom renderer escape routes. |
@ghost-ui/core/components/message | Compose a message surface around caller-owned content. |
@ghost-ui/core/conversation | Broad convenience entry for conversation components, views and types. |
@ghost-ui/core/chat-adapter-tanstack | Normalize TanStack snapshots and bind caller commands. |
@ghost-ui/core/chat-adapter-ai-sdk | Normalize Vercel AI SDK snapshots and bind caller commands. |
@ghost-ui/core/chat-normalizers | Pure native format projections; no React or SDK imports. |
@ghost-ui/core/chat-adapter-langchain / chat-adapter-eve | Optional native React hook bindings. |
@ghost-ui/core/chat-adapter-ag-ui | Subscribe to an existing AG-UI client without another message store. |
First plain-data view
Follow installation for the local artifact. Import @ghost-ui/core/styles.css and @ghost-ui/core/conversation.css once. MessageParts statically composes Markdown, so also install react-markdown@10.1.0, remark-gfm@4.0.1 and react-syntax-highlighter@16.1.1, even when the initial message contains plain text. React, React DOM and Base UI are package peers. Direct component subpaths avoid unrelated owners while retaining each owner's transitive dependencies. For a narrower text-only composition, use Message and your own text renderer.
Use data from your existing store or API and pass the next snapshot to the view. No SDK runtime provider or transcript store is required. Message supplies actor context to its nested views so they use the correct user or assistant composition. Keep messages in their supplied order and use stable IDs when a streamed snapshot replaces an earlier one.
Add only the integration you need
Start with Choose an AI runtime, organized by framework and need. Read runtime architecture, adapters, threads and stability for the shared integration model. Native hooks, subscribed clients, server protocol bridges and pure projections all feed the same MessageParts view. AI contracts is the reference for data, state and extension points.
For interface composition and styling, see Chat, Conversation, Message, Composer, Tool, Activity and Citation. Activity is Ghost's canonical owner for trace-like work disclosure; no separate Trace engine is required.
Choosing Ghost
Choose direct Ghost views when conversation content belongs inside an existing product and its store. A managed thread/runtime library can be a better fit when you want it to coordinate thread state. Assistant UI also supports external stores and standalone elements; shadcn supplies helpers for both SDKs. SDK independence alone is not a unique advantage or evidence of faster rendering, a smaller bundle or broader accessibility.