askdare documentation
askdare serves an AI chat from your Next.js app: one route, one script tag, on the official OpenAI SDK. New here? Start with Getting started. It takes about 15 minutes.
Start
- Getting startedFrom an empty Next.js app to a working chat in about 15 minutes. You need Node 22 or later, a Next.js 16 app that uses the App Router, and an OpenAI account.
- Embedding the chatThe chat runs in your Next.js app and shows up on any page that loads one script from it: pages of the app itself, or any other website. The script draws the chat button in a shadow root and opens the
- Configuration referenceYou configure askdare in two places:
- Command lineaskdare comes with a small command-line tool. Run it with npx in the folder of your Next.js app:
- TroubleshootingEach entry starts with what you see, then says why it happens and what to do. askdare's error lines in the server log start with [askdare] and end with a pointer to this page.
Features
- Knowledge baseA bot can answer from your own documents. askdare uploads them to an OpenAI vector store, the model searches it with OpenAI file search, and each answer cites its sources as links to your pages.
- ToolsTools are server-side functions the model may call during a conversation: look up an order, check a price, fetch the weather. You describe the arguments with a Zod schema; askdare validates every call
- AttachmentsVisitors can attach images and PDFs to their messages. The model sees images and reads PDFs (their text and page images).
- Voice inputVisitors can dictate a message instead of typing it. The recording is transcribed by OpenAI and the text lands in the message field, where the visitor can check and edit it before sending. Nothing is
- Signed-in visitorsWhen your site knows who is signed in, the assistant can too: a tool can look up this user's orders, and the instructions can greet them by name. The model never decides who the visitor is. Your backe
Look and feel
- Styling and customizationThree levels, each with more freedom than the last (ADR-0008). Streaming, security and limits stay in the library whatever you change.
- ThemesThe widget comes with four looks, each in light and dark. Pick one, adjust it, or build your own on top of one. The decisions behind this are in ADR-0008.
- TextsEvery text the chat shows has a key, such as composer.placeholder. The library ships each text in English and Polish, and you can replace any of them per bot. The keys are public API (ADR-0006), so yo
Running it
- Deploymentaskdare runs wherever Next.js runs on Node.js. It needs no database: conversations live in OpenAI, and your app only stores signed tokens in the visitor's browser. These are the steps for Vercel and H
- Going public: deployment checklistComplete every step before the chat is reachable from the internet, demos included. The reasoning is in THREAT_MODEL.md.
- CostsEvery message in the chat spends tokens in your OpenAI project, and anyone on the internet can send messages. This page shows the most a deployment can spend under the default limits, and the settings
- PrivacyThis page lists what data the chat handles, where it goes and how long it stays, so you can write your privacy notice. It describes what askdare does; it isn't legal advice. Your instructions, your to
- Custom rate-limit storeRate limits and budgets are counters, and the counters live in a store. The default store keeps them in the memory of each server process. That works for one instance. With more instances (Vercel, sev
- SupportWhat askdare is tested with and promises to keep working. The reasoning is in ADR-0006.
Reference
- Wire protocol (version 1)This is how the askdare server streams a chat turn to its clients: the embed iframe app now, @boldare/askdare/react later. The protocol belongs to askdare; raw OpenAI stream events are never forwarded
- Migrating from @boldare/openai-assistant@boldare/openai-assistant stopped working on 2026-08-26, when OpenAI shut down the Assistants API it was built on. askdare is its successor from the same team, but not a new version of it: the old lib
- Architecture Decision RecordsShort records of decisions that are expensive to reverse. One decision per file, numbered, never renumbered. To change a decision, add a new ADR that supersedes the old one, and update the old one's s