Skip to main content
# Run GEPA prompt optimization against any task app
synth train gepa_config.toml --poll
Task apps can be written in any language as long as they implement the Synth task app contract (/health and /rollout).

Results Summary (Banking77, GEPA)

LanguageJob IDAccuracySource
Rustpl_4f69a1b099a14e4b100%main.rs
TypeScriptpl_787c47998cfe474585.7%index.ts
Pythonpl_7e0227cc41454ec566.7%app.py
Gopl_1dd94dfdc8c6479d60.0%main.go
All jobs optimize prompts for the same Banking77 task app; only the implementation language changes.

Prerequisites

  • Synth CLI installed (synth on your PATH)
  • Task app contract implemented in one of: Rust, TypeScript, Python, Go
  • ENVIRONMENT_API_KEY set in your shell
  • A Cloudflare tunnel or other public URL exposed for http://localhost:8001

The Task App Contract

All task apps implement the same HTTP contract:
  • GET /health — basic health check used by Synth to discover and monitor the app
  • POST /rollout — evaluate a batch of prompt candidates and return rewards/metrics
OpenAPI spec:
  • GitHub: task_app.yaml
  • Raw: https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/synth_ai/contracts/task_app.yaml
Key rules:
  • ENVIRONMENT_API_KEY must match the X-API-Key header on /rollout requests
  • Your /rollout handler reads the prompt candidate, runs it against your task, and returns rewards
See also: polyglot walkthroughs in the cookbooks repo