Quickstart
Put a question box on a page that already has the answer. Free local mode needs no keys. Test publishable keys are free. Live config needs BYO ($9.99) or Hosted ($19.99). Live Hosted writes need Hosted.
Install with pnpm add @bootstrapware/answers for React and Next.js. Non-React pages use the Hosted script embed. Do not invent a version. The imports below are the package contract.
1. Install
pnpm add @bootstrapware/answers
2. Local, no keys
import { Answers, createLocalAdapter } from "@bootstrapware/answers";
import "@bootstrapware/answers/styles.css";
<Answers adapter={createLocalAdapter()} />The sample answers hours, returns, and shipping for Northwind Outfitters. It does not call the network. A follow-up such as How long do I have? stays on the same session. Do you price match? is unanswered.
3. Hosted
Create and publish an app with MCP, then call ensure_answers_test_publishable. Pass appId and publishableKey and the widget calls Hosted ask. The shipped route is POST https://answers.bootstrapware.co/api/v1/ask?appId= with the publishable key. See the API.
4. BYO
Pass createByoAdapter and post the question to your server. On the server, createAnswersBackend from @bootstrapware/answers/server answers it with your OpenAI key. The full reference app is examples/answers-nextjs. Question text stays on that backend.
Related: AGENTS.md · Script embed · BYO guide