.modal.run URL everywhere (configs, health checks, evals).
Prerequisites
- Provision Synth credentials (creates
.envwithSYNTH_API_KEY+ENVIRONMENT_API_KEY): - Export model-provider keys used by your policy/mutation/meta models (e.g.
export GROQ_API_KEY=...). - Keep
uvx synth-aion your PATH (installed with the Synth tooling).
uv pip, editable checkouts, etc.) are required.
Step 1: Deploy the Task App to Modal
Point the CLI at both the TaskAppConfig module and the Modal entrypoint (they are the same file here):--task-apploads theTaskAppConfig(seeds, rubrics, rollout handlers).--modal-appexposes themodal.App(...)wrapper so the CLI can package it.--envmust includeENVIRONMENT_API_KEY; the helper injects it as a Modal secret.
.modal.run URL and writes it to TASK_APP_URL inside the .env you passed. Verify immediately:
Step 2: Author the Prompt Optimization Config
Start from the sample config and update only the task-app URL/IDs:configs/banking77_gepa.toml:
Step 3: Launch GEPA
ENVIRONMENT_API_KEY, and submits the job to Synth’s managed backend (no custom --backend flags required).
Step 4: Monitor the Job
Expect streamed events such as:Step 5: Download Optimized Prompts + Scores
Use the SDK helpers against the Synth production backend (https://agent-learning.onrender.com/api). Reuse the SYNTH_API_KEY stored by uvx synth-ai setup:
Troubleshooting
- Task app health fails → Redeploy to Modal (Step 1) and re-run
curl -H "X-API-Key: ...\" "$TASK_APP_URL/health". - Missing provider key → Export the required Groq/OpenAI/Google key before running
train. - Pattern validation errors → Ensure
{query}(and any other task wildcards) remain insideinitial_prompt.messages.
Next Steps
- Configuration Reference – Complete TOML schema
- Evaluate + Query Results – SDK + REST guide
- Other Examples – Banking77 pipeline, HotpotQA, IFBench, HoVer, PUPA