teamforge / SETUP.md
Your Name
fix: add FastAPI REST endpoints for OpenEnv validator
637f42c

Setup Guide (VS Code)

Prerequisites


Step 1 β€” Open the project

  1. Unzip teamforge.zip
  2. In VS Code: File β†’ Open Folder β†’ select the teamforge folder
  3. Open the terminal: View β†’ Terminal (or Ctrl + `` ``)

Step 2 β€” Create virtual environment

Windows:

python -m venv venv
venv\Scripts\activate

Mac / Linux:

python3 -m venv venv
source venv/bin/activate

You should see (venv) appear at the start of your terminal prompt.

If python -m venv venv hangs or errors:

  • Try py -m venv venv (Windows)
  • Try python3 -m venv venv (Mac/Linux)
  • Or skip venv and just run pip install -r requirements.txt directly

Step 3 β€” Install dependencies

pip install -r requirements.txt

This installs: pydantic, openai, rich, pytest, ruff


Step 4 β€” Run the demo (no API key needed!)

python demo.py

You will see a beautiful step-by-step agent trace in your terminal.


Step 5 β€” Run the tests

pytest tests/test_environment.py -v

All 21 tests should pass (green).


Step 6 β€” Get a free Groq API key

  1. Go to console.groq.com
  2. Sign up (free, no credit card)
  3. Create an API key
  4. Copy .env.example β†’ .env and paste your key:
    cp .env.example .env
    
    Then open .env and set:
    GROQ_API_KEY=gsk_your_key_here
    

Step 7 β€” Run the benchmark

Windows:

set GROQ_API_KEY=gsk_your_key_here
python benchmark.py --model llama3-8b-8192

Mac / Linux:

export GROQ_API_KEY=gsk_your_key_here
python benchmark.py --model llama3-8b-8192

Common Issues

Problem Fix
python not found Use python3 or py instead
venv command hangs Skip it, run pip install -r requirements.txt directly
ModuleNotFoundError: rich Run pip install -r requirements.txt
git: command not found Install Git from git-scm.com
Terminal shows >>> You're in Python REPL β€” press Ctrl+Z then Enter to exit

File Structure

teamforge/
β”œβ”€β”€ demo.py               ← run this first
β”œβ”€β”€ benchmark.py          ← model comparison
β”œβ”€β”€ baseline_inference.py ← single agent run
β”œβ”€β”€ environment.py        ← core environment
β”œβ”€β”€ models.py             ← data models
β”œβ”€β”€ grader.py             ← scoring
β”œβ”€β”€ reward.py             ← reward function
β”œβ”€β”€ tasks/                ← easy / medium / hard / bonus
β”œβ”€β”€ sandbox/              ← git isolation
β”œβ”€β”€ tests/                ← test suite
β”œβ”€β”€ results/              ← benchmark output
β”œβ”€β”€ requirements.txt      ← dependencies
β”œβ”€β”€ .env.example          ← copy to .env with your API key
└── README.md             ← full documentation