Skip to content

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.

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.

plain-answer.tsx

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.