Skip to content
Star

AI interfaces

Render a conversation from your own data or connect the chat SDK you already use.

For a complete conversation UI, see Build an AI chat interface.

Render your first message

Install Ghost UI. MessageParts uses Markdown even when a message is plain text, so add its dependencies.

Install dependencies

Load these styles once in your app entry point or root layout.

Render Answer. You should see “The project brief is ready.”

plain-answer.tsx

Pass messages from your store or API in display order. Keep message and part IDs stable as streamed content changes. Message passes the actor to its nested views so they render the right presentation.

Choose the imports you need

Use the React components with messages from your app or an SDK. Your app chooses the model and transport, stores conversations, and runs tools.

Connect a chat runtime

Use Choose an AI runtime to find the recipe for your SDK or protocol. Keep the SDK’s store and commands, and pass its messages to Ghost. See Data and commands for the shared message and tool contracts.

Use Chat for the layout, Message for individual turns, and Composer for replies. Add Activity for progress and Citation for sources.

If you already have a chat interface, migrate one view while keeping your current message store and transport.

When to use these views

Use these views when your app already owns the conversation or you want to compose parts of the interface yourself. For an SDK integration, check the tested versions before upgrading.