Spaces:
Sleeping
Sleeping
Commit ·
319ef97
1
Parent(s): be3a0a6
submission
Browse filesCo-authored-by: Copilot <copilot@github.com>
Files changed (5)
- README.mdAdded+216
- server/event_engine.py+1-1
- submission/demo_video_script.mdAdded+34
- submission/hf_mini_blog.mdAdded+62
- tests/test_simulation_parity.py+24
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216# GENESIS — The Autonomous Startup Gauntlet
> Training LLMs to Build, Break, and Rebuild Companies From Zero
**GENESIS** is a multi-agent startup simulation environment where 5 LLM agents co-found and operate a technology startup from Day 0 through Series A. Built for the [OpenEnv Hackathon](https://huggingface.co/openenv).
## The Problem
95% of startups fail — not because the technology was wrong, but because coordination, planning, and human management failed. GENESIS trains LLMs to handle all of this simultaneously across 540 simulated business days.
## Architecture
```┌─────────────────────────────────────────────────────┐│ GENESIS MCP Server ││ ││ ┌──────────┐ ┌──────────┐ ┌───────────────────┐ ││ │ WorldState│ │ Event │ │ MarketMaker │ ││ │ Engine │ │ Engine │ │ (Adaptive Adversary)││ └──────────┘ └──────────┘ └───────────────────┘ ││ ┌──────────┐ ┌──────────┐ ┌───────────────────┐ ││ │ Reward │ │ Role │ │ 28 MCP Tools │ ││ │ Engine │ │ Views │ │ (Agent-facing API) │ ││ └──────────┘ └──────────┘ └───────────────────┘ │└─────────────────────────────────────────────────────┘ ▲ ▲ ▲ CEO Agent CTO Agent Sales Agent ...```
## The 5 Agent Roles
| Agent | Domain | Sees | Hidden From ||---|---|---|---|| **CEO** | Strategy, fundraising | Full financials, investors (approx) | Toxic flags, exact tech debt || **CTO** | Technology, architecture | Exact tech debt, full employee skills | Cash balance, investor sentiment || **Sales** | Revenue, customers | Full customer data, MRR/ARR | Cash, tech debt, team morale || **People** | HR, culture, hiring | Employee toxic flags, full morale | Financials, customers, investors || **CFO** | Finance, fundraising prep | Exact financials, investor sentiment | Toxic flags, deep product details |
## 28 MCP Tools
### Product & Engineering (CTO)`build_feature` · `deploy_to_production` · `run_load_test` · `review_codebase_health`
### Sales & Market`send_customer_email` · `update_crm` · `analyze_market` · `run_competitive_analysis`
### Finance & Fundraising (CEO/CFO)`check_bank_balance` · `create_financial_model` · `send_investor_update` · `negotiate_with_investor`
### People & Culture`hire_candidate` · `fire_employee` · `check_team_morale` · `hold_one_on_one` · `post_job_listing` · `conduct_interview`
### Strategy & Communication`make_decision` · `send_message` · `pivot_company` · `handle_personal_crisis`
### Shared Memory`write_company_brain` · `read_company_brain`
### System`reset` · `get_daily_briefing` · `get_company_state` · `get_reward`
## 11-Component Reward Rubric
```CompanyValuation (0.20) — ARR × 8x multiple + maturity bonusSeriesASuccess (0.10) — Binary: did you close Series A?RunwayManagement (0.10) — Never run out of cashProductVelocity (0.10) — Features shipped / tech debt ratioCustomerRetention (0.10) — Net satisfaction × (1 - churn)TeamMorale (0.10) — Average morale - toxic penaltyCofounderAlignment (0.05) — Are founders on the same page?PersonalCrisisHandl. (0.05) — Were crises resolved well?DecisionCoherence (0.10) — Long-horizon planning qualityCompanyBrainQuality (0.05) — Is shared memory useful?PivotExecution (0.05) — If pivoted: was it clean?```
**Impossible to game:** Boosting one metric at the expense of another creates cascading crises 30-90 days later.
## Difficulty Levels (Curriculum Learning)
| Level | Days | Competitors | Crises | Description ||---|---|---|---|---|| 1 Tutorial | 90 | 1 weak | Rare | Learn the basics || 2 Seed | 180 | 2 moderate | Monthly | Standard seed stage || 3 Growth | 360 | 3 aggressive | Bi-weekly | Scaling challenges || 4 Gauntlet | 540 | 4 + incumbent | Weekly | Full 18-month arc || 5 Nightmare | 720 | 4 + market crash | Constant | Adversarial conditions |
The **MarketMaker** adaptive adversary observes agent weaknesses and generates counter-scenarios each episode.
## Quick Start
```bash# Installpip install -e .
# Run serveruvicorn server.app:app --host 0.0.0.0 --port 7860
# Or via MCPpython -m server.app```
### Python Client
```pythonfrom client import GenesisEnv
with GenesisEnv(base_url="http://localhost:7860") as env: env.reset() tools = env.list_tools() result = env.call_tool("get_daily_briefing", agent_role="ceo")```
## OpenEnv Compliance
```yamlspec_version: 1name: genesis_envtype: spaceruntime: fastapiapp: server.app:appport: 7860```
## Project Structure
```├── server/│ ├── app.py # MCP server with 28 tools│ ├── world_state.py # Core simulation state│ ├── world_init.py # World initialization & crisis templates│ ├── event_engine.py # Daily simulation tick│ ├── reward_engine.py # 11-component composable rubric│ ├── market_maker.py # Adaptive adversary│ └── role_views.py # Role-based observability filters├── client.py # OpenEnv client wrapper├── openenv.yaml # OpenEnv configuration├── Dockerfile # HF Space deployment└── tests/ └── test_role_views.py```
## Hackathon Themes Coverage
| Theme | How GENESIS Covers It ||---|---|| **Multi-Agent (Theme 1)** | 5 agents with partial observability, hidden incentives, coalition formation || **Long-Horizon (Theme 2)** | 540-day episodes with cascading 30-90 day consequences || **Professional World (Theme 3.1)** | 28 MCP tools with realistic delays and side effects || **Personal World (Theme 3.2)** | 8 personal crisis templates testing emotional intelligence || **Self-Improvement (Theme 4)** | MarketMaker generates harder scenarios based on agent weaknesses || **Wild Card (Theme 5)** | Mid-episode pivot mechanic — strategic sunk-cost abandonment |
## Hackathon Submission Checklist
- [x] Uses OpenEnv with `openenv.yaml` manifest- [x] OpenEnv runtime server with MCP tools (`server/app.py`)- [x] Minimal training pipeline using Unsloth + TRL (`train.py`)- [x] Colab notebook for training (`colab/training.ipynb`)- [x] Reward plotting script (`scripts/plot_rewards.py`)- [x] Reward plot artifact committed (`outputs/evals/reward_curves.png`)- [x] Reward summary metrics committed (`outputs/evals/reward_summary.json`)- [x] README includes embedded reward plot (below)- [x] Hugging Face Space URL added below- [x] Mini-blog draft + 90-second demo script added (`submission/`)
## Submission Links
- Hugging Face Space (required): `https://huggingface.co/spaces/rhine-pereira/genesis_env`- Mini-blog draft (publishable to HF): `submission/hf_mini_blog.md`- 90-second demo script (for YouTube upload): `submission/demo_video_script.md`
Judges are expected to use the Space URL for evaluation.
## Minimal Colab Training Script
Use the notebook at `colab/training.ipynb` for a reproducible baseline run in Colab using Unsloth + TRL.
Notebook flow:
1. Install dependencies.2. Run a smoke test (`python train.py --smoke`) to validate environment + reward pipeline.3. Run a short GRPO training command (`python train.py --steps 50`).4. Generate reward artifacts with `python scripts/plot_rewards.py`.
## Training Evidence Artifacts
- Reward curves: `outputs/evals/reward_curves.png`- Reward summary: `outputs/evals/reward_summary.json`
### Embedded Reward Plot

### Reward Summary Snapshot
| Metric | Value ||---|---|| Sessions with history | 6 || Average final reward | 0.3477 || Best final reward | 0.4472 || Worst final reward | 0.2655 |
## Reproduce Artifacts Locally
```bashpython train.py --smokepython scripts/plot_rewards.py --sessions sessions.pkl --out outputs/evals```
## License
MIT207 unmodified lines208209210211212213214207 unmodified lines# ── 6. Personal crisis injection ─────────────────────────────────# Crises inject based on difficulty and timecrisis_freq = {1: 30, 2: 30, 3: 21, 4: 15, 5: 7}[state.difficulty.value]active_crises = [c for c in state.personal_crises if not c.resolved]if state.day % crisis_freq == 0 and len(active_crises) < 2:unused = [t for t in PERSONAL_CRISIS_TEMPLATES207 unmodified lines208209210211212213214207 unmodified lines# ── 6. Personal crisis injection ─────────────────────────────────# Crises inject based on difficulty and timecrisis_freq = {1: 30, 2: 30, 3: 21, 4: 7, 5: 7}[state.difficulty.value]active_crises = [c for c in state.personal_crises if not c.resolved]if state.day % crisis_freq == 0 and len(active_crises) < 2:unused = [t for t in PERSONAL_CRISIS_TEMPLATES
12345678910111213141516171819202122232425262728293031323334# GENESIS 90-Second Demo Script
## 0:00-0:10 - Hook
"Ninety-five percent of startups fail, mostly because coordination fails before the product does. GENESIS trains AI co-founders to run a company from Day 0 to Series A over 540 simulated business days."
## 0:10-0:25 - Environment Overview
"Five specialized agents - CEO, CTO, Sales, People, and CFO - operate with partial observability. They use 28 MCP tools to ship features, hire, raise, communicate with customers, and pivot when needed."
## 0:25-0:45 - Realism and Difficulty
"This is not a toy loop. Actions have delayed side effects: job postings and hires resolve over time, and strategic mistakes can cascade weeks later. In Gauntlet mode, agents face weekly personal crises while balancing growth, morale, and runway."
## 0:45-1:05 - Reward and Learning Signal
"GENESIS uses an 11-component rubric covering valuation, runway, retention, morale, co-founder alignment, crisis handling, and pivot quality. This prevents single-metric gaming and rewards durable strategy."
## 1:05-1:20 - Evidence
"Our training pipeline produces reproducible reward artifacts. You can inspect reward curves and summary metrics directly in the repo. Current runs show clear measurable progress and stable evaluation outputs."
## 1:20-1:30 - Close
"GENESIS is an OpenEnv-compliant startup simulator for training long-horizon, multi-agent business intelligence. Run it on Hugging Face Space, inspect the tools, and watch AI teams learn to build companies."
## On-Screen Capture Plan
1. Show Space home and reset in Gauntlet mode.2. Show role-specific daily briefing views.3. Trigger hiring + job listing to show delayed effects.4. Show a weekly crisis event and response.5. Show reward curve image and summary JSON.6. End on architecture + OpenEnv manifest.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162# GENESIS: Training AI Co-Founders for 540-Day Startup Survival
GENESIS is a multi-agent simulation where five LLM co-founders build and operate a startup from Day 0 to Series A over 540 simulated days. The environment is designed for long-horizon decision-making under partial observability, delayed consequences, and social coordination constraints.
## Why This Environment Matters
Most business simulations optimize a single KPI (revenue, valuation, throughput). Real startups fail for multi-factor reasons: misalignment, toxic hires, rushed roadmap decisions, weak investor communication, and inability to adapt to market pressure.
GENESIS models this reality directly:
- 5 role-specialized agents (CEO, CTO, Sales, People, CFO)- 28 MCP tools with realistic side effects and delays- 11-component reward rubric balancing growth, health, and resilience- Personal crisis events to test emotional intelligence under pressure- Adaptive adversary (MarketMaker) that escalates difficulty
## Key Design Choices
### 1. Role-Scoped Information Asymmetry
Each co-founder sees only the information they should see in a realistic company. This forces coordination and negotiation instead of monolithic, omniscient planning.
### 2. Delayed Causality
Important actions have delayed outcomes:
- Hiring is onboarded after a delay- Job postings create applicants after a delay- Many strategic mistakes produce 30-90 day downstream effects
This makes short-term reward hacking harder and encourages robust planning.
### 3. Difficulty Curriculum
Gauntlet mode runs for 540 days with weekly personal crises. Agents must survive compounding uncertainty and maintain team/investor/customer dynamics over an 18-month arc.
## What We Trained and Measured
The training pipeline includes a minimal Unsloth + TRL setup and produces reproducible reward artifacts.
Current summary snapshot:
- Sessions with history: 6- Average final reward: 0.3477- Best final reward: 0.4472- Worst final reward: 0.2655
See:
- `outputs/evals/reward_curves.png`- `outputs/evals/reward_summary.json`
## Why GENESIS Is Different
GENESIS focuses on business execution quality as a systems problem, not only on text generation quality. The environment can be used to train models that reason over strategy, operations, and human factors simultaneously.
That combination makes it a useful benchmark for long-horizon, economically meaningful agent behavior.
## Try It
- Space: https://huggingface.co/spaces/rhine-pereira/genesis_env- Repo: https://github.com/rhine-pereira/meta-hack-finale145 unmodified lines146147148145 unmodified linesassert result["executed"] is Trueassert result["resolution"] == "ceo_override"145 unmodified lines146147148149150151152153154155156157158159160161162163164165166167168169170171172145 unmodified linesassert result["executed"] is Trueassert result["resolution"] == "ceo_override"def test_gauntlet_crisis_cadence_is_weekly():episode_id = _reset_episode(difficulty=4)state = server_app._get_state(episode_id)before_count = len(state.personal_crises)for crisis in list(state.personal_crises):server_app.handle_personal_crisis(episode_id=episode_id,agent_role=crisis.target_role.value,crisis_id=crisis.id,response="I understand the situation, let's talk through a clear plan and concrete next steps.",)for _ in range(6):server_app.get_daily_briefing(episode_id=episode_id, agent_role="ceo")state = server_app._get_state(episode_id)assert len(state.personal_crises) == before_countserver_app.get_daily_briefing(episode_id=episode_id, agent_role="ceo")state = server_app._get_state(episode_id)assert len(state.personal_crises) > before_count
README.mdAdded+216
server/event_engine.py+1-1
submission/demo_video_script.mdAdded+34
submission/hf_mini_blog.mdAdded+62
tests/test_simulation_parity.py+24