Think Twice is an AI-powered financial decision-making app that simulates a boardroom of expert agents debating whether you should make a purchase. Instead of a simple yes or no, four specialized AI agents analyze your real financial data, argue their cases over three rounds, vote, and deliver a reasoned verdict.
When you submit a purchase (e.g., "AirPods Pro, $249"), four AI agents each examine your finances from a different angle:
| Agent | Focus |
|---|---|
| Spending Agent | Can you actually afford it right now? |
| Savings Agent | Does this fit your budget and spending patterns? |
| Investment Agent | What's the opportunity cost long-term? |
| Risk Agent | Are there any red flags in your spending behavior? |
The agents debate across three rounds, respond to each other's arguments, then cast votes (APPROVE, DENY, or HOLD). A Board Chair AI synthesizes the debate and delivers the final verdict with reasoning.
- AI Agent Debate — Multi-agent deliberation powered by Claude (Anthropic)
- Real Financial Data — Connects to Nessie banking API for your actual account balance, transactions, and spending history
- Streaming Debate — Watch the debate unfold in real time via Server-Sent Events
- Persistent History — All decisions are stored in MongoDB so you can review past verdicts
- Follow-up Chat — Ask the Board Chair questions after a verdict
- Tradeoff Analysis — Compare two purchases head-to-head
- Custom Budgets — Set per-category spending limits
- Browser Extension — Quick purchase evaluations from any webpage
- Voice Assistant — Vapi-powered voice interaction with the Board
Frontend
- Next.js 14 (App Router) + TypeScript
- React 19
- Tailwind CSS
- Firebase Authentication
Backend
- FastAPI (Python)
- Anthropic Python SDK (
claude-sonnet-4-20250514) - Motor (async MongoDB driver)
- Uvicorn
External Services
- Anthropic Claude API — AI agents
- MongoDB Atlas — User data and decision history
- Firebase — Authentication
- Nessie — Banking API sandbox
- Vapi — Voice AI
TheBoard/
├── frontend/ # Next.js application
│ ├── app/
│ │ ├── page.tsx # Main boardroom page
│ │ ├── login/page.tsx # Login/signup
│ │ └── api/deliberate/ # Server-side API route
│ ├── components/
│ │ ├── BoardroomUI.tsx # Core boardroom interface
│ │ ├── AgentDebateArena.tsx
│ │ └── AuthForm.tsx
│ └── lib/
│ ├── firebase.ts # Firebase config
│ └── auth.ts # Auth helpers
│
├── main.py # FastAPI backend (all endpoints + agent logic)
├── nessie.py # Nessie banking API integration
├── users_store.py # User data persistence layer
├── requirements.txt # Python dependencies
│
├── extension/ # Chrome browser extension
│ └── manifest.json
│
├── scripts/
│ └── seed_boardroom_nessie.py # Seed test banking data
│
└── data/
└── boardroom_customers.json # Firebase <-> Nessie ID mappings
- Python 3.13+
- Node.js 18+
- A MongoDB Atlas cluster
- API keys for Anthropic, Firebase, and Nessie (see Environment Variables)
git clone https://github.com/your-org/TheBoard.git
cd TheBoard# Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create your environment file and fill in your keys
cp .env.example .envcd frontend
npm install
# Create your frontend environment file and fill in your Firebase keys
cp .env.local.example .env.localOpen two terminals:
Terminal 1 — Backend
source venv/bin/activate
uvicorn main:app --reload --host 0.0.0.0 --port 8000Terminal 2 — Frontend
cd frontend
npm run devVisit http://localhost:3000, sign in, and submit your first purchase for debate.
ANTHROPIC_API_KEY=sk-ant-... # Anthropic API key
MONGODB_URI=mongodb+srv://... # MongoDB Atlas connection string
NESSIE_API_KEY=... # Nessie banking API key
NESSIE_BASE_URL=https://api.nessieisreal.com
VAPI_PRIVATE_KEY=... # Vapi voice AI key (optional)NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...
NEXT_PUBLIC_VAPI_PUBLIC_KEY=... # Vapi public key (optional)| Method | Endpoint | Description |
|---|---|---|
POST |
/deliberate |
Stream a purchase debate (SSE) |
POST |
/chat |
Ask the Board Chair a follow-up question |
POST |
/tradeoff |
Compare two purchase options |
POST |
/users/bootstrap |
Create a new user and Nessie account |
GET |
/users/snapshot |
Get user financial data |
PATCH |
/users/settings |
Update budget and category settings |
POST |
/purchases/record |
Record a completed purchase |
POST |
/account/deposit |
Add funds to user account |
GET |
/health |
Health check |
curl -X POST http://localhost:8000/deliberate \
-H "Content-Type: application/json" \
-d '{"item": "AirPods Pro", "price": 249, "firebaseUid": "uid_123"}'The response is a Server-Sent Events stream with the following event types:
meta— User's financial snapshot pulled from Nessie/MongoDBmessage— Individual agent arguments per roundverdict— Final Board Chair verdict and vote tallydone— Debate complete
The extension/ folder contains a Chrome extension for evaluating purchases directly from any product page.
To load it in Chrome:
- Go to
chrome://extensions - Enable Developer mode
- Click Load unpacked and select the
extension/folder
To populate your Nessie account with realistic banking data for testing:
source venv/bin/activate
python scripts/seed_boardroom_nessie.py- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes
- Open a pull request against
main