Penny is an autonomous AI commerce assistant powered by Prava. It is not a shopping chatbot. It discovers products, compares options, creates a Purchase Intent, requests approval, authenticates through Prava, executes checkout, and returns a receipt.
- Next.js 15 + TypeScript + Tailwind
- Convex for persistent agent and commerce data
- OpenAI Responses API for intent extraction
- LangGraph-ready workflow layer
- Playwright for browser automation
- Prava SDK + API client for intent-based payments
The app uses the official Prava SDK package @prava-sdk/core for secure card collection flows and a dedicated server-side client in src/lib/prava/client.ts for all API communication.
Required environment variables:
PRAVA_API_KEYPRAVA_SECRET_KEYPRAVA_PUBLISHABLE_KEYPRAVA_BASE_URLPRAVA_IFRAME_URLPRAVA_ENV
Prava authentication uses the documented Api-Key: <YOUR_API_KEY> header. Sandbox and production use separate base URLs and credentials.
- Copy
.env.exampleto.env.localand fill in your OpenAI, Convex, and Prava values. - Run
npx convex devin one terminal. - Run
npm run devin another terminal.
- Frontend: deploy the Next.js app to Vercel.
- Backend: deploy Convex with
npx convex deploy. - Secret management: store all Prava and OpenAI credentials only in environment variables.
flowchart LR
U[User]
F[Next.js Frontend]
A[Assistant API]
O[OpenAI Responses API]
C[Convex]
P[Prava API + SDK]
B[Browser Automation]
M[Merchant Checkout]
U --> F --> A --> O
A --> C
A --> P
A --> B --> M
P --> M
C --> A
- No card numbers are stored.
- All purchases require explicit approval.
- All transactions route through Prava and remain auditable.