Agentwright Starter
Next.js 16 starter for Claude agent SaaS with cost metering and billing

About
Agentwright Starter is a Next.js 16 and TypeScript starter kit for building SaaS products around Claude agents. It ships a streaming agent loop with tools, MCP connectors, an eval runner, and per-user token and cost metering with price snapshots, plus plan caps, rate limits, Auth.js sign-in and Polar subscription billing on PostgreSQL and Tailwind CSS. Three source files, including the full agent loop, can be read before buying.
AI Readiness · 2 tools
Optimized for AI coding assistants (Claude Code, Cursor, Copilot). Ships with:
- CLAUDE.mdProject conventions for Claude Code
- AGENTS.mdTask routing for coding agents
AGENTS.md gives coding agents (Claude Code, Cursor and others) the commands and the rules that keep per-user metering correct. The kit connects to MCP servers as a client; it is not an MCP server itself.
Read the AI setup guideWhat's inside
4 technologies · 12 features
Next.js
React
PostgreSQL
Tailwind CSS
- Authentication
- Social Logins
- Passwordless Login
- Subscription Payments
- One-time Payments
- Customer Portal
- Database Integration
- API Layer
- Webhooks
- CI/CD Pipeline
- Testing Framework
- Transactional Emails
Pricing
Built-in Billing
FAQ
Node.js 20.9 or later, a Postgres database, an Anthropic API key and a GitHub OAuth app for sign-in. A Polar or Lemon Squeezy account is only needed when you start charging your own users. Setup is: copy .env.example to .env.local, then npm install, npm run db:migrate, npm run db:seed and npm run dev.
Every future version is included at no extra cost. The changelog on the site lists every release.
No Stripe or Paddle integration (billing is Polar or Lemon Squeezy). No teams, organizations or seats: each user has one plan. Only Claude models. No job queue, RAG, search or file uploads, and the chat UI is minimal and shows plain text.
Right after payment you get an email with your license key and a signed download link for the source as a zip file. There is no activation and no phone-home. You put the code in your own private repository.
It is built for one job: SaaS products around Claude agents. Every Claude call is metered per user with the exact price version used and checked against the plan's cap, and you can read three source files in full, including the whole agent loop, before you buy.
The deploy guide walks through Vercel with Neon step by step and has short notes for Railway, Fly.io, Render and Docker. The app needs Node.js, a Postgres database and a function timeout of up to 300 seconds for the agent route.
Similar Boilerplates
supastack
AI ReadyNext.js, Expo and Tauri SaaS starter kit for AI coding agents
31SaaS
Comprehensive boilerplate for SaaS: React, customizable UI, secure backend, Stripe, CMS; boosts productivity in 10 minutes.
AlPack
Robust boilerplate enhancing performance and scalability with tools like Storybooks, testing scripts, supporting swift market delivery.
Graphile Starter
Efficient full-stack development with React, Node.js, GraphQL, PostgreSQL, and integrations.