AI-DAN is the strategic decision engine for an AI venture system. It transforms founder input into structured decisions, machine-readable commands, and launch-ready business packages – all optimized for a single non-technical operator.
- Enter a business idea → AI-DAN researches, scores, and structures it
- Get a full business verdict → Feasibility, profitability, risk, pricing, distribution
- Monetization-ready output → Every response includes target user, pricing, and go-to-market plan
- Marketing Hub → Generate region-aware campaigns, social cards, and launch copy
- My Projects → Track your venture portfolio and build history in one place
Mac/Linux:
./scripts/start_local.shWindows:
scripts\start_local.batpython -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # Edit with your API keys
uvicorn main:app --reloadOpen http://localhost:8000 in your browser → the UI loads at root.
Idea → Research (Perplexity) → Validate → Score → Structure (AI) → Output
This repo = BRAIN (strategy, decisions, commands). Execution happens in downstream systems (GitHub Factory, Vercel, etc.).
| Module | Purpose |
|---|---|
app/reasoning/ |
Intent classification, idea generation, scoring (0–10), adversarial critique |
app/planning/ |
Execution plans, command compilation, business packages, distribution plans |
app/integrations/ |
AI providers, GitHub, Vercel, LemonSqueezy, Telegram, Registry clients |
app/factory/ |
BuildBrief validation, factory orchestration, deployment coordination |
app/portfolio/ |
SQLite-backed lifecycle state machine (idea → scaled/killed) |
app/feedback/ |
Metrics ingestion, deterministic decisions (kill/scale/revise/monitor) |
app/memory/ |
Learning signals, auto-learning system with weight adjustment |
app/governance/ |
Policy-driven approvals, safety classification, human-in-the-loop gates |
app/agents/ |
Guardian agent for feasibility, competition, and scope risk checks |
app/observability/ |
Control plane, circuit breakers, operational snapshots |
app/command_center/ |
Operator-facing summaries, build status, command tracking |
| Provider | Purpose | Key |
|---|---|---|
| Groq (LLaMA 3.3) | Fast inference, launch copy, daily scoring | GROQ_API_KEY |
| Anthropic (Claude) | Reasoning, scoring, adversarial critique | ANTHROPIC_API_KEY |
| OpenAI (GPT-4o) | Structured output, business verdicts | OPENAI_API_KEY |
| Perplexity | Market research, competitor analysis, demand validation | PERPLEXITY_API_KEY |
| Deepseek | Cost-efficient code generation | DEEPSEEK_API_KEY |
| xAI Grok | Real-time trend analysis | GROK_API_KEY |
All providers have graceful fallback to deterministic mode when API keys are not configured. Provider priority: Groq → OpenAI → Anthropic → Deepseek → fallback.
| Client | Purpose |
|---|---|
ai_provider.py |
Multi-provider routing (Groq → OpenAI → Anthropic → Deepseek → Grok) |
github_client.py |
Repo creation, issue bundles, workflow dispatch |
vercel_client.py |
Deployment triggering, project management via Vercel API |
lemonsqueezy_client.py |
Payment checkout URL generation, product/variant listing |
telegram_client.py |
Build notifications (started, success, failed, idea approved) |
registry_client.py |
Service registry for deployed product tracking |
marketing_engine.py |
Region-aware campaign generation, platform-specific copy |
perplexity_client.py |
Market research and competitor analysis |
- Input → User submits business idea via API or chat UI
- Research → Perplexity analyzes market, competitors, pricing (when configured)
- Validation Gate 0 → Deterministic field checks + market truth
- Scoring Engine → 0–10 mandatory gate:
<6reject,6–8hold,≥8approve - AI Analysis → Routes to best available provider for structured output
- Business Package → Problem, customer, pricing, delivery, CTA
- Distribution Plan → ONE channel, first-10-users plan, messaging (region-aware)
- Output → Complete monetization-ready structured response
idea → review → approved → queued → building → launched → monitoring → scaled/killed
No stage can be skipped. Terminal states: scaled, killed.
The root UI is a single-page app with 8 tabs:
| Tab | Purpose |
|---|---|
| Chat | Conversational AI agent — ask anything, get structured decisions |
| Dashboard | Portfolio health, build status, revenue signals |
| Analyze | Submit a business idea for full AI-powered scoring |
| Factory | Trigger builds, monitor pipeline runs |
| Launch | Animated social card generator, launch copy preview |
| Revenue | Payment signals, fast kill/scale decisions |
| Marketing Hub | Region-aware campaign management, platform-specific copy |
| My Projects | Full portfolio tracker — all your ventures in one place |
Copy .env.example to .env and fill in your values:
| Variable | Default | Description |
|---|---|---|
GROQ_API_KEY |
— | Groq API key (free tier available — recommended first) |
ANTHROPIC_API_KEY |
— | Anthropic Claude key for reasoning and scoring |
OPENAI_API_KEY |
— | OpenAI GPT-4o key for structured output |
PERPLEXITY_API_KEY |
— | Perplexity for market research |
DEEPSEEK_API_KEY |
— | Deepseek for cost-efficient tasks |
GROK_API_KEY |
— | xAI Grok for real-time trend analysis |
OPENAI_MODEL |
gpt-4o |
OpenAI model override |
ANTHROPIC_MODEL |
claude-3-5-sonnet-20241022 |
Anthropic model override |
GROQ_MODEL |
llama-3.3-70b-versatile |
Groq model override |
At least one AI key is recommended. All features degrade gracefully to deterministic mode if none are set.
| Variable | Default | Description |
|---|---|---|
GITHUB_TOKEN |
— | GitHub PAT for factory dispatch and repo ops |
VERCEL_TOKEN |
— | Vercel API token for deployment management |
VERCEL_TEAM_ID |
— | Vercel team ID (if using a team project) |
LEMONSQUEEZY_API_KEY |
— | LemonSqueezy API key for payment checkouts |
LEMONSQUEEZY_STORE_ID |
— | LemonSqueezy store ID |
TELEGRAM_BOT_TOKEN |
— | Telegram bot token for build notifications |
TELEGRAM_CHAT_ID |
— | Telegram chat ID to send notifications to |
| Variable | Default | Description |
|---|---|---|
APP_ENV |
development |
Environment mode |
APP_PORT |
8000 |
Listen port |
PORTFOLIO_DB_PATH |
data/portfolio.sqlite3 |
SQLite path (auto-set to /tmp/ on Vercel) |
MEMORY_MAX_EVENTS |
2000 |
Memory event limit |
FACTORY_OWNER |
ismaelloveexcel |
GitHub org for factory dispatch |
FACTORY_REPO |
ai-dan-factory |
Factory repo name |
FACTORY_CALLBACK_SECRET |
— | Shared secret for factory callbacks |
API_KEY |
— | API key for securing endpoints |
| Service | URL |
|---|---|
| Web UI | http://localhost:8000 |
| API Docs (Swagger) | http://localhost:8000/docs |
| Health Check | http://localhost:8000/health |
GET /— Web UI (single-page application, v3.0)POST /api/analyze/— Full AI-powered idea analysis with monetization output
POST /chat/— Full founder flow: intent → idea → score → critique → plan → commandsPOST /factory/ideas/execute— End-to-end: validate → score → offer → build → deploy
POST /ideas/generate— Generate idea from promptPOST /ideas/brainstorm— Generate up to 5 ideasPOST /ideas/evaluate— Score idea (0–10 mandatory gate)POST /ideas/critique— Adversarial critique
POST /portfolio/projects— Create projectPOST /portfolio/projects/{id}/transition— Enforce state transitionGET /portfolio/projects/{id}/events— Audit trail
GET /projects/— List all projectsPOST /projects/— Create project entryGET /projects/{id}— Project detail
POST /distribution/campaigns— Generate region-aware marketing campaignGET /distribution/campaigns/{id}— Campaign detail and copy
POST /feedback/metrics— Ingest product metricsGET /feedback/projects/{id}/decision— Deterministic decisionGET /feedback/projects/{id}/fast-decision— Fast kill/iterate/scale decision
POST /revenue/fast-decision— Fast kill/scale/iterate based on payment signalsPOST /revenue/projects/{id}/business-output— Generate business output snapshot
POST /analytics/events— Record analytics eventGET /analytics/projects/{id}/summary— Aggregated analytics
POST /memory/events— Record memory eventPOST /memory/signals— Record learning signalPOST /memory/outcomes— Record outcome for auto-learningGET /memory/learning/insight— Auto-learning weights and insight
GET /intelligence/ranked-projects— Projects ranked by healthGET /intelligence/operator/daily-digest— Top 3 actions for operatorGET /control/state— Command center snapshot
POST /factory/briefs/validate— Validate BuildBriefPOST /factory/runs— Create factory runGET /factory/runs— List factory runsGET /factory/runs/{id}— Factory run status
GET /health— Health check
- Connect this repo to Vercel
- Set environment variables in Vercel dashboard (see table above)
- Deploy — the
vercel.jsonconfig handles Python runtime setup - Root URL loads the UI, all API routes are accessible
- Set environment variables from
.env.example - Deploy with
uvicorn main:app --host 0.0.0.0 --port $PORT - Health check:
GET /healthreturns{"status": "ok"}
AI-DAN enforces revenue-readiness at every stage:
- Research → Perplexity validates market demand and pricing benchmarks
- Validation Gate → Rejects ideas without monetization proof
- Scoring Engine → Monetization potential scored 0–2
- AI Analysis → Best available provider generates pricing and distribution plans
- Business Package → Mandatory pricing model, price range, CTA, and GTM strategy
- Distribution Plan → Concrete first-10-users plan with single channel focus
- Fast Decision → Revenue detected → SCALE; no traction → KILL (max 1 iteration)
- LemonSqueezy → Checkout URL generated for every approved product
Target: first revenue within 14 days of launch.
python -m pytest tests/ -vPOST /api/analyze/
│
├── Perplexity: market research, competitors, pricing
│
├── Pipeline: intent → idea → score → critique → plan
│
├── AI Provider: Groq → OpenAI → Anthropic (best available)
│
▼
Monetization-ready output:
├── Business idea (title, problem, target user, solution)
├── Scores (overall, feasibility, profitability, speed, competition)
├── Verdict (APPROVE / HOLD / REJECT)
├── Monetization (method, pricing, competitive edge, LemonSqueezy checkout URL)
└── Distribution (channel, first 10 users plan, region-aware copy)