Guides
Example App
Run the included demo and view the live deployment.
The repository includes an e-commerce demo in example/.
Local setup
The example consumes the published @dayhaysoos/convex-database-chat package by
default so the live deployment can build from the example/ directory alone.
cd example
npm installnpx convex devnpx convex env set OPENROUTER_API_KEY your_key_herenpm run seedThis seeds 250 products across electronics, home, clothing, and sports.
If you previously seeded the older 50-product catalog, rerun npm run seed to
insert the missing generated variants.
npm run devOptional: embeddings
npm run seed:embeddingsUseful scripts
npm run convex- Convex dev server onlynpm run dev:local- Vite, Convex, and local package watch for linked-package developmentnpm run dev:ui- Vite UI onlynpm run start- Serve the production build
Standard tool QA prompts
Open the chat, toggle the Tools panel, and run these prompts:
How many electronics are under $50?- Expected tool:
countProducts - Expected metadata:
count 30,returned 0,truncated false
- Expected tool:
Show me 5 electronics under $50.- Expected tool:
listProducts - Expected metadata:
count 30,returned 5,hasMore true
- Expected tool:
Show more.- Expected tool:
listProductswith the previouscursor
- Expected tool:
Find products for a home office setup.- Expected tool:
semanticSearchProducts - Expected metadata:
sampled true,truncated true
- Expected tool:
Use the legacy raw search tool for sports products.- Expected tool:
rawSearchProducts - Expected raw array result
- Expected tool:
These prompts exercise the standard count/list/semantic contracts, hidden
toolContext injection, cursor continuation, semantic action execution, and
legacy raw-tool compatibility.