Getting started
Prerequisites
Section titled “Prerequisites”- Node.js 22+
- A Cloudflare account
- Wrangler (
npx wrangler)
Create a project
Section titled “Create a project”npm create prompton@latest my-docscd my-docsnpm installLocal development
Section titled “Local development”npm run devOpen the site, then use the Browse / Chat toggle in the header. Chat mode connects to DocsAgent over the Agents SDK WebSocket.
Cloudflare resources
Section titled “Cloudflare resources”Create Vectorize and KV before the first deploy (or update IDs in wrangler.jsonc):
npx wrangler vectorize create prompton-docs --dimensions=1024 --metric=cosinenpx wrangler kv namespace create PROMPTON_DOCSnpx wrangler kv namespace create PROMPTON_SESSIONPaste the returned KV IDs into wrangler.jsonc. Keep the Vectorize binding index_name as prompton-docs (or rename both).
For local preview semantic search, add "remote": true on the Vectorize binding so Wrangler talks to your real index (Vectorize has no local emulator). Without it, chat falls back to lexical search over KV after POST /api/prompton/reindex.
Then:
npm run buildnpm run deploy# seed production index (requires PROMPTON_REINDEX_SECRET Worker secret)curl -X POST -H "x-prompton-reindex-secret: $PROMPTON_REINDEX_SECRET" \ https://<your-worker>.workers.dev/api/prompton/reindex