A monorepo containing a multi-agent AI system that generates and evaluates business ideas, featuring a modern web application with authentication, execution mode targeting (Solopreneur vs Classic Startup), multi-provider AI model support, and web search capabilities for competitive intelligence.
This project is organized as a monorepo using npm workspaces:
business-idea-multi-agent/
βββ packages/
β βββ core/ # Backend server with authentication + AI agents
β βββ shared/ # Shared types and utilities
β βββ web/ # React web application with authentication
βββ docs/ # Documentation and reports
βββ package.json # Root workspace configuration
- @business-idea/core: Backend server with Fastify-based authentication system, plus AI agents and orchestration logic for business idea generation
- @business-idea/shared: Shared TypeScript types, interfaces, and schemas used across packages
- @business-idea/web: Modern React web application with authentication, session management, and user interface for the business idea generator
The application now features a complete authentication system:
For development and testing, use these pre-configured users:
| Password | Role | |
|---|---|---|
admin@test.com |
Adm!nP@ss2024 |
Administrator |
user@test.com |
Us3r$ecure#24 |
Regular User |
guest@test.com |
Gu3st!Pass@24 |
Guest User |
- Session-based authentication with secure cookie management
- Password hashing using bcrypt
- CORS configuration for frontend-backend communication
- Protected routes and authentication middleware
- In-memory user store for development (easily replaceable with database)
- Comprehensive logging and debug utilities
The application now supports targeted business idea generation based on execution mode:
Optimized for 1-3 person teams leveraging AI-assisted development:
- Focus: Technical moats and AI-powered automation
- Target Market: $10M-$1B TAM opportunities
- Key Technologies: Claude Code, Cursor, Windsurf, v0, Bolt.new
- Business Models: SaaS, API services, AI tools, developer tools
- Examples: Browser extensions, Shopify apps, API services, Chrome plugins
Traditional venture-scalable businesses for 50+ person teams:
- Focus: Large market opportunities with network effects
- Target Market: $1B+ TAM markets
- Key Differentiators: Brand, scale, partnerships
- Business Models: Marketplaces, social platforms, enterprise software
- Examples: B2B SaaS platforms, consumer marketplaces, fintech solutions
The system intelligently maps descriptive team compositions to the appropriate mode:
- Detects "solo", "1-", "2-", "3-" β Solopreneur factory
- All other descriptions β Classic Startup factory
- Examples: "2-founder team (LLM engineer + ex-GC)" β Solopreneur mode
- Execution Mode Selector: Choose between Solopreneur and Classic Startup in the form
- Smart Filtering: Filter ideas by All, Solopreneur, or Classic Startup
- Rich Descriptions: AI provides detailed team composition insights
- Mode Column: Visual badges showing execution mode with tooltips
The system now supports multiple AI providers for different agents:
- OpenAI: GPT-5 Mini, GPT-4o, and other OpenAI models
- Anthropic: Claude Sonnet 4, Claude Opus 4.1
- Google: Gemini 2.5 Flash, Gemini 2.5 Pro
| Agent | Multi-Provider Support | Web Search | Notes |
|---|---|---|---|
| Ideation | β Full | Not needed | Can use any provider |
| Documentation | β Full | Not needed | Can use any provider |
| Critic | β Required | Uses OpenAI for web search | |
| Competitor | β Required | Uses OpenAI for web search |
Note: Web search capabilities currently require OpenAI models. If you configure Critic or Competitor agents with other providers, they will automatically use OpenAI when web search is enabled.
The system operates as a chain of specialized AI agents, orchestrated to perform a sequence of tasks:
- Ideation Agent: Receives user preferences (e.g., industry, business model) and generates a list of 10 initial business ideas. It scores each idea based on criteria like market potential and technical complexity.
- Competitor Agent: Takes the top ideas and performs a competitive analysis using Blue Ocean Strategy principles. It evaluates market saturation, identifies competitors with hyperlinked references, and calculates a Blue Ocean Score for each idea. Now includes web search for real-time competitive intelligence.
- Business Critic Agent: Critically evaluates ideas using web search capabilities for competitive intelligence. It performs risk assessment, validates assumptions, and calculates an Overall Score based on multiple weighted factors. Enhanced with better JSON parsing to handle large analyses.
- Documentation Agent: Generates comprehensive markdown reports for the validated business ideas, including detailed analysis, insights, and recommendations.
The Ideation Agent is responsible for generating innovative business ideas based on market trends and consumer needs. It:
- Multi-Industry Focus: Generates ideas across healthcare, education, sustainability, fintech, retail/e-commerce, and lifestyle
- Two-Pass Generation Process: Uses the 'o3' model to generate 10 high-quality ideas per industry, then selects the top 10 overall
- Comprehensive Idea Details: Each idea includes name, description, problem statement, solution, target market, and more
- Initial Scoring: Provides preliminary scores for disruption potential, market potential, technical complexity, and capital intensity
- Event Streaming: Provides real-time progress updates during the generation process
Each idea contains:
- Name and description
- Industry classification
- Problem solved and proposed solution
- Target market definition
- Initial viability scores (0-10 scale)
The Competitor Analysis Agent evaluates the competitive landscape for each business idea using Blue Ocean Strategy principles. It:
- Competitor Identification: Finds and analyzes 4-6 relevant competitors for each idea
- Market Saturation Analysis: Evaluates how crowded the competitive space is
- Blue Ocean Scoring: Implements ADR-003 methodology to calculate innovation potential
- Differentiation Factors: Identifies unique aspects that set the idea apart from competitors
- Event Streaming: Provides real-time progress updates during analysis
The score (0-10 scale) is based on:
- Market Saturation (40% weight): Lower saturation = higher score
- Innovation Level (35% weight): More innovative = higher score
- Differentiation Clarity (25% weight): Clearer unique value = higher score
The Business Critic Agent is responsible for the critical evaluation and risk assessment of business ideas. It:
- Critical Evaluation: Provides skeptical analysis of each business idea, identifying potential flaws and challenges
- Risk Assessment: Identifies major risks (technical, market, financial, competitive, operational) that could impact success
- Web Search Integration: Uses the OpenAI web search tool to gather competitive intelligence and validate market assumptions
- Overall Score Calculation: Implements the ADR-005 methodology for comprehensive scoring
The Overall Score is calculated using a two-step process:
-
Base Score (weighted average):
- Disruption Potential: 20%
- Market Potential: 25%
- Technical Complexity (inverted): 15%
- Capital Intensity (inverted): 15%
- Blue Ocean Score: 25%
-
Risk Adjustments:
- For each major risk identified, the score is reduced by 0.5 to 2.0 points
- Maximum total reduction: 5.0 points
The Documentation Agent is responsible for generating comprehensive business reports from the analyzed ideas. It:
- Single-Idea Iterative Processing: Generates detailed documentation for each idea independently (per ADR-006)
- Comprehensive Report Generation: Creates structured markdown reports with introduction, detailed idea sections, and summary
- Top 3 Ideas Highlighting: Identifies and features the top-performing ideas based on Overall Score
- Timestamp-Based File Management: Saves reports with timestamped filenames for versioning
- Performance Tracking: Logs processing time and number of ideas processed
The generated reports follow this structure:
- Introduction: Overview of the business idea generation process and methodology
- Individual Idea Sections (10 sections): Each idea gets a detailed section including:
- Executive Summary
- Market Analysis
- Technical Analysis
- Competitive Landscape
- Key Metrics (scores and ratings)
- Risk Assessment
- Implementation Roadmap
- Funding Considerations
- Summary and Recommendations: Highlights top 3 ideas with strategic insights and next steps
-
Prerequisites:
- Node.js 18.x or higher
- npm 9.x or higher
- Git
-
Clone the repository:
git clone <repository-url> cd business-idea-multi-agent
-
Install dependencies (this will install all workspace packages):
npm install
-
Set up environment variables:
cp .env.example .env # Edit .env and add your OpenAI API key -
Build all packages:
npm run build
Start the full application with authentication:
-
Start the backend server (in one terminal):
cd packages/core && npm run dev:server
This starts the Fastify authentication server on
http://localhost:3001 -
Start the frontend (in another terminal):
cd packages/web && npm run dev
This starts the React app on
http://localhost:5173 -
Access the application:
- Open
http://localhost:5173in your browser - Login with any test user (see Authentication System section above)
- You'll be redirected to the main application after successful login
- Open
To run the original multi-agent workflow via CLI (without web interface):
cd packages/core && npm run start:cliThis will:
- Generate 10 business ideas based on default preferences
- Perform competitor analysis on each idea
- Critically evaluate each idea with risk assessment
- Generate a comprehensive markdown report in
docs/output/
To build and run the web application for production:
# Build all packages
npm run build
# Start backend server in production
cd packages/core && npm run start:server
# Build frontend for production
npm run build:web
# Then serve the built files from packages/web/dist using a static file server# Run with test cache enabled (for development)
npm run start:core -- --test-cacheThe test cache feature helps speed up development by caching agent outputs:
# Run with test cache enabled
npm run start:core -- --test-cacheWhen enabled, the system will:
- Cache agent outputs in
tests/cache/directory - Reuse cached results on subsequent runs
- Display a message: "π§ͺ Test cache mode enabled"
This is particularly useful during development to avoid waiting for AI responses when testing downstream agents.
# Install all dependencies
npm install
# Build all packages
npm run build
# Build specific package
npm run build:core
npm run build:shared
npm run build:web
# Run linting across all packages
npm run lint
# Development mode
npm run dev:web # Start web app dev serverEach package can be developed independently:
# Work on core package
cd packages/core
npm run build
npm run lint
# Work on web package
cd packages/web
npm run dev
npm run build# Run linting
npm run lint
# Run type checking (builds the project)
npm run buildAll generated reports are saved in the docs/output/ directory with timestamped filenames:
- Format:
business-ideas-report-YYYYMMDD-HHMMSS.md - Example:
business-ideas-report-20241207-084532.md
Create a .env file in the root directory with the following:
# Provider Configuration
LLM_PROVIDER="openai" # Options: "openai", "anthropic", "google"
LLM_MODEL="gpt-5-mini-2025-08-07" # Default model for selected provider
# Provider API Keys (at least one required)
OPENAI_API_KEY=your-openai-api-key-here
ANTHROPIC_API_KEY=your-anthropic-api-key-here # Optional
GOOGLE_API_KEY=your-google-api-key-here # Optional
# Web Search Configuration
ENABLE_WEB_SEARCH=true # Enable web search for Critic and Competitor agents
# Per-Agent Model Configuration (optional, format: provider:model)
# Examples of multi-provider configuration:
# IDEATION_MODEL="anthropic:claude-sonnet-4-20250514" # Use Anthropic for ideation
# DOCUMENTATION_MODEL="google:gemini-2.5-flash" # Use Google for documentation
# CRITIC_MODEL="openai:gpt-5-mini-2025-08-07" # Must use OpenAI if web search enabled
# COMPETITOR_MODEL="openai:gpt-5-mini-2025-08-07" # Must use OpenAI if web search enabled
# OpenAI Fallback Model for Web Search
# Used when critic/competitor agents are configured with non-OpenAI providers
# but web search is enabled (web search requires OpenAI)
OPENAI_FALLBACK_MODEL="gpt-5-mini-2025-08-07"
# Two-pass refinement for ideation (optional, default: true)
USE_REFINEMENT=true
# Execution mode configuration (optional, default: solopreneur)
# Options: solopreneur, classic-startup, or any descriptive text
# The system will intelligently map descriptions to the appropriate factory
DEFAULT_EXECUTION_MODE=solopreneur
# Optional: Backend server configuration
PORT=3001
HOST=0.0.0.0
# Optional: Session configuration
SESSION_SECRET=your-secure-session-secret-hereThe core package will automatically load this configuration for both the authentication server and AI agents.
The system supports flexible model configuration:
- Global Configuration: Set
LLM_MODELto configure all agents at once - Per-Agent Configuration: Override the global setting for specific agents
- Backward Compatibility: The legacy
IDEATION_MODELvariable is still supported - Supported Models: Currently supports
o3(default) andgpt-4o
Configuration precedence (highest to lowest):
- Agent-specific environment variable (e.g.,
COMPETITOR_MODEL) - Global
LLM_MODELvariable - Legacy
IDEATION_MODEL(for ideation agent only) - Default value (
o3)
The authentication server runs on:
- Default URL:
http://localhost:3001 - API Base:
http://localhost:3001/api - Auth endpoints:
http://localhost:3001/api/auth/*
Key endpoints:
POST /api/auth/login- User authenticationPOST /api/auth/logout- User logoutGET /api/auth/check- Check authentication statusGET /api/auth/me- Get current user info
--test-cache: Enable test caching for development. Caches agent outputs intests/cache/to speed up repeated runs.
Example:
npm run start:core -- --test-cacheThe project follows a modular monorepo architecture:
- Separation of Concerns: Core business logic is separated from UI and shared utilities
- Type Safety: Shared types ensure consistency across packages
- Deterministic Agent Chain: Each agent has a specific responsibility and output format
- Schema Validation: All inputs and outputs are validated using Zod schemas
- Event Streaming: Real-time progress updates during agent processing
- Comprehensive Logging: Detailed logging in CSV format for debugging
@business-idea/web β @business-idea/shared
@business-idea/core β @business-idea/shared
For detailed architecture information, see docs/guidelines/architecture.md.
This is a proof of concept project. For contributions:
- Follow the existing code structure and patterns
- Ensure all TypeScript types are properly defined
- Add appropriate validation using Zod schemas
- Update documentation as needed
- Run linting and type checking before submitting changes
The application now includes a persistence layer using SQLite and Drizzle ORM, allowing all generated ideas and agent runs to be saved and retrieved.
- SQLite Database: A local
business-ideas.dbfile stores all data. - Drizzle ORM: Provides a type-safe query builder for database interactions.
- Data Repositories:
RunRepositoryandIdeaRepositoryinpackages/corehandle all database operations. - API Endpoints: New routes in
packages/core/src/routes/ideas-routes.tsexpose database content. - Frontend Integration: The
SmartTablecomponent can now display historical data from the database.
- Database Generation: The database file is created automatically.
- Migrations: To generate and apply database migrations, use the following commands in the
packages/coredirectory:# Generate migration files based on schema changes npm run db:generate # Apply migrations to the database npm run db:migrate
- Execution Mode System: Added Solopreneur and Classic Startup modes with factory pattern
- Smart Mode Detection: Automatic mapping of descriptive team compositions
- Enhanced UI Filtering: Filter ideas by execution mode (All/Solopreneur/Classic Startup)
- Rich Team Descriptions: AI provides detailed team composition insights
- Factory Pattern Architecture: Clean separation of execution mode logic
- Context Injection: Preserves JSON formatting while adding mode-specific context
- Authentication System: Complete session-based authentication
- Database Persistence: SQLite with Drizzle ORM for data storage
- Web Interface: Modern React application with real-time updates
- User Management: Support for multiple user roles
- Enhanced web UI with visualization components
- Mobile application support
- Additional execution modes (e.g., Enterprise, Non-profit, Research)
- Custom execution mode factory creation API
- Machine learning-based mode recommendation
- Historical performance analytics by execution mode