1
Create a workspace and project
Sign in at app.beforequery.com and create a workspace (your organization) and a project (a knowledge base). Point the project at your documentation URL, for example
https://docs.example.com.2
Add a knowledge source and start a crawl
Your project’s website source is crawled automatically: BeforeQuery discovers your sitemap, respects
robots.txt, strips navigation, extracts code blocks, converts pages to markdown, chunks them heading-aware, and embeds every chunk.Works out of the box with Docusaurus, Mintlify, GitBook, ReadMe, VitePress, MkDocs, and Hugo.Want more than a docs site? Add GitHub/GitLab repos, Notion or Confluence, OpenAPI specs, file uploads, and more from the Sources tab.3
Test in the Playground
Open the Playground in the dashboard and ask a question. You’ll see the streamed answer with numbered
[1] [2] citations linking to your source pages. Iterate on persona, tone, and custom instructions in project settings until the answers feel right.4
Create a client key
Under Project → Integration Credentials, create a public client key (
bq_pk_…). Public keys are safe to ship in browsers, scoped to a single project, and support an origin allowlist (wildcards like https://*.example.com are supported).5
Deploy the widget
Add one script tag to your site:That’s it — a floating “Ask AI” launcher appears with streaming chat, citations, instant search, Cmd/Ctrl+K shortcut, and dark-mode sync. See Widget for view modes and full configuration.
Prefer code?
- JavaScript SDK
- React
- cURL (SSE)
Next steps
Knowledge sources
Connect repos, wikis, tickets, specs, forums, and files.
API reference
Chat, search, feedback, and deflection endpoints.