Documentation/Quickstart

Quickstart Guide

Get your first AI-powered answer in under 5 minutes.

01

Create a project

Sign up for a free BeforeQuery account and create a project. Give it a name that matches your product or knowledge domain.

02

Add your docs URL and crawl

Enter the root URL of your documentation site. BeforeQuery discovers pages via sitemap and links, extracts clean content, and builds your knowledge index.

03

Embed the widget

Copy the widget snippet from your dashboard and add it to your docs site. The widget is hosted at widget.beforequery.com and is ready to answer questions immediately after the crawl completes. Alternatively, use the @beforequery/react package for a native React integration.

<!-- Option A: hosted widget (any HTML page) --> <script src="https://widget.beforequery.com/beforequery-widget.js" data-project-id="YOUR_PROJECT_ID" data-client-key="bq_pk_..." async ></script> // Option B: React component import { BeforeQueryChat } from "@beforequery/react"; export default function Layout({ children }) { return ( <> {children} <BeforeQueryChat projectId="YOUR_PROJECT_ID" clientKey="bq_pk_..." /> </> ); }
04

Call the API (optional)

Use the Chat API to build custom integrations. Pass a question and session ID. Get a grounded answer with citation links.

curl -X POST https://api.beforequery.com/v1/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "project_id": "proj_abc123", "question": "How do I authenticate the SDK?", "session_id": "sess_xyz" }'

What you can connect

Website Crawler

Crawl any publicly accessible docs site. Supports Docusaurus, Mintlify, GitBook, VitePress, and more. Incremental sync keeps the index current.

Learn more →

GitHub / GitLab

Index README, docs/, and markdown files directly from your repository. Auto-syncs on every push to main.

Learn more →

Notion / Confluence / SharePoint

Connect your internal knowledge base. Index pages, wikis, document libraries, and team spaces for an internal AI assistant.

Learn more →

Shopify Store

Index products, collections, and store pages so your chat widget can answer product questions directly from your live catalog.

Learn more →

Slack & Discord Bots

Deploy AI assistants in your community chat channels. Same RAG pipeline, same citation links, wherever your users ask questions.

Learn more →

MCP Server & @beforequery/agents

Connect any MCP-aware IDE or AI app to your knowledge base. Build agent workflows in TypeScript with the open-source @beforequery/agents SDK.

Learn more →

Ready to get started?

Create your free account and ship your first AI-powered answers today.

Start Free