Example scripts and tutorials for using Synth's APIs and tools.
Run GEPA prompt optimization on the Crafter game - no API key needed!
pip install httpx
python gepa_demo.py --nickname "YourName"Watch live with visualization: https://www.usesynth.ai/blog/gepa-for-agents
Live Demos
gepa_demo.py— GEPA for Crafter (runs against prod, no auth needed)code/demos/banking77/— Banking77 intent classification with GEPA
GEPA & MIPRO In-Process
code/training/prompt_learning/gepa/— GEPA walkthroughcode/training/prompt_learning/mipro/— MIPRO walkthrough
Graph Optimization (ADAS + SSE)
code/training/graph_learning/banking77_adas/— Banking77 Graph-GEPA via ADAS + live SSE progress (requires local backend)code/training/graph_learning/banking77_adas_openai_sft/— Banking77 via ADAS with OpenAI SFT JSONL upload + live SSE progresscode/training/graph_learning/crafter_verifier_adas/— Crafter verifier Graph-GEPA via ADAS + live SSE progress (requires local backend + dataset)
Polyglot Task Apps
code/polyglot/typescript/— TypeScript (Bun) — tested with GEPA, 80% accuracycode/polyglot/rust/— Rust (Axum) — tested with GEPA, 70% accuracycode/polyglot/go/— Go (stdlib)code/polyglot/python/— Python (Flask)
code/training/prompt_learning/sdk/— SDK examplescode/training/prompt_learning/cli/— CLI walkthroughcode/training/sft/— SFT cookbookcode/training/rl/— RL cookbook
python gepa_demo.py --help
Options:
--nickname, -n Your name on the leaderboard (max 32 chars)
--generations, -g Optimization generations 1-5 (default: 2)
--population, -p Candidates per generation 2-10 (default: 3)
--model, -m Policy model (default: openai/gpt-oss-20b)
--list List active demos and exit
--quiet, -q Suppress progress output
Available models:
- openai/gpt-oss-20b (default, faster)
- openai/gpt-oss-120b (larger)
- qwen/qwen3-32b
- moonshotai/kimi-k2-instruct