Examples Guide
This repo includes seven runnable example apps. Each one maps cleanly to a section of the docs.
coding
Path: examples/coding
Live demo: coding
Use this example for:
- multiline free-text input
- markdown-rendered text parts with headings, lists, and fenced code blocks
- local coding-assistant style follow-up flows
Docs:
Run it:
pnpm --filter coding-example devqa-bot
Path: examples/qa-bot
Live demo: qa-bot
Use this example for:
- the core
Chatcomponent initialMessages- free-form follow-up handling with
userResponseCallback - plain action buttons created with
createButton
Docs:
Run it:
pnpm --filter qa-bot-example devuploads
Path: examples/uploads
Live demo: uploads
Use this example for:
- optional file uploads that stay disabled by default
fileValidator- built-in
imageandfilemessage parts - upload-focused request-input flows
Docs:
Run it:
pnpm --filter uploads-example devlogin
Path: examples/login
Live demo: login
Use this example for:
createRequestInputButtonDefcreateRequestConfirmationButtonDef- validators, retries, and abort behavior
- password masking and
rawContent
Docs:
Run it:
pnpm --filter login-example devllm-support
Path: examples/llm-support
Live demo: llm-support
Use this example for:
react-actions-chat-llmscreateChatTextGenerationFlowcreateTextGenerationBackend- a local backend route wired through
react-actions-chat-llms - an in-chat startup API-key step that keeps the key in memory for the current tab
Docs:
Run it:
pnpm --filter llm-support-example devThe demo starts by asking for an OpenAI API key in-chat before the first request. It keeps that key in memory for the current tab only.
You can optionally set OPENAI_MODEL and VITE_LLM_SUPPORT_EXAMPLE_MODE in your shell if you want a specific model or startup mode locally.
settings
Path: examples/settings
Live demo: settings
Use this example for:
react-actions-chat-recommended-actionscreateVectorSearchQueryRecommendedActionsFlowVectorSearchButtonDefinitioncreateOpenAITextEmbedder
Docs:
- react-actions-chat-recommended-actions
- Recommended actions overview
- Recommended actions with vector search
- Recommended Actions API reference
Run it:
pnpm --filter settings-example devThe public demo is published without VITE_OPENAI_API_KEY, so the page is available but real embedding-backed recommendations stay disabled there.
If you want to run the settings demo with real embeddings locally, create examples/settings/.env.local with:
VITE_OPENAI_API_KEY=your_openai_api_keyThat keeps the example easy to run locally, but production apps should move embedding calls behind a backend service.
support-desk
Path: examples/support-desk
Live demo: support-desk
Use this example for:
react-actions-chat-supportcreateSupportUserFlowcreateSupportAdminFlowcreateInMemorySupportFlowAdapter- sharing a ticket queue between customer and admin views in one demo workspace
Docs:
Run it:
pnpm --filter support-desk-example devThe demo starts with an empty in-memory adapter, lets the customer side create tickets or live chats, and uses the same adapter when you switch to the admin console.