A small FastAPI service that takes a one-line startup idea and returns a draft startup plan: a market and competitor analysis, a brand name and tagline, a business model, and a set of financial calculations with short recommendations. Each part is produced by a separate Python "agent" module; the text-generating agents call the Google Gemini API (gemini-1.5-pro).
api/main.py exposes one main endpoint, POST /create_startup, which calls the agents in sequence and returns their combined output as JSON:
- Idea processing (
agents/input_agent.py):get_startup_ideaechoes the idea with a status message. It is a placeholder and makes no model call. - Market research (
agents/market_research_agent.py):analyze_market_trendsasks Gemini for the top three competitors with similarity scores, then splits the response intoname/similarity_scorepairs. - Brand identity (
agents/brand_identity_agent.py):generate_brand_name_and_taglineasks Gemini for a brand name and tagline and returns the raw text. - Business model (
agents/business_model_agent.py):create_business_modelasks Gemini for revenue streams, cost structure and target customers, and parses the response into three lists. - Financial analysis (
agents/financial_agents.py): five functions (optimize_product_sales,optimize_subscription_service,calculate_development_cost,calculate_marketing_cost,calculate_operations_cost) compute simple figures such as projected revenue, churn loss, cost per feature and remaining marketing budget in plain Python, then ask Gemini for a short recommendation on each.
agents/financial_insights_agent.py contains derive_business_insights_from_financial_data, which aggregates the financial outputs into profit margin, breakeven status, marketing efficiency and a scalability factor, and adds rule-based recommendations without calling a model.
GET / is a health check.
startup-builder-agents/
├── api/
│ └── main.py FastAPI app and the /create_startup pipeline
├── agents/
│ ├── input_agent.py idea intake (placeholder)
│ ├── market_research_agent.py competitor analysis via Gemini
│ ├── brand_identity_agent.py brand name and tagline via Gemini
│ ├── business_model_agent.py revenue, costs, customers via Gemini
│ ├── financial_agents.py revenue and cost calculations with Gemini recommendations
│ └── financial_insights_agent.py rule-based summary of the financial outputs
└── models/ empty package
- Python 3
- A Google Gemini API key
The repository does not include a requirements file. The code imports the following packages, and needs an ASGI server such as uvicorn to run:
pip install fastapi uvicorn pydantic google-generativeai python-dotenvThe agents call load_dotenv() and read one environment variable:
| Variable | Used for |
|---|---|
GEMINI_API_KEY |
Authenticating calls to the Gemini API |
Export it in your shell, or put it in a .env file in the directory you start the server from.
Start the server from the repository root, so that the agents package is importable:
uvicorn api.main:app --reloadcurl -X POST http://localhost:8000/create_startup \
-H "Content-Type: application/json" \
-d '{"idea": "A subscription service for refurbished laptops for students"}'The response is a JSON object with these top-level keys:
idea_processingmarket_analysis(market_size,growth_potential,competitor_analysis)brand_identitybusiness_model(revenue_streams,cost_structure,target_customers)financial_analysis(product_sales,subscription_service,development_cost,marketing_cost,operations_cost)
If any step raises, the endpoint returns HTTP 500 with the error message.
- The financial inputs (price, units, subscribers, churn rate, budgets and so on) are hard-coded in
api/main.py; they are not derived from the submitted idea or taken from the request. market_sizeandgrowth_potentialin the market analysis are fixed placeholder strings; only the competitor list comes from the model.- Model responses are parsed with simple line splitting, so the structure of
competitor_analysisand the business model lists depends on how the model formats its answer. derive_business_insights_from_financial_datais implemented but not called by the API.- There is no persistence, authentication, test suite, or container configuration in the repository.