Skip to main content
Every synth-ai train flow is driven by a TOML config that maps to a Pydantic schema under synth_ai/train/configs/. The CLI loads your file, validates it, and turns it into the payload sent to the backend. Use this overview to choose the right schema and find the detailed references.

Schema Cheat Sheet

FlowDocSchema Class
Reinforcement LearningRL Configsynth_ai/train/configs/rl.py (RLConfig)
Supervised Fine TuningSFT Configsynth_ai/train/configs/sft.py (SFTConfig)
Prompt Learning (GEPA/MIPRO)Prompt Learning Configsynth_ai/train/configs/prompt_learning.py (PromptLearningConfig)

Shared Guidance

  1. Match the schema exactly: Field names/types in your TOML must align with the schema attributes; the CLI calls *.from_path() directly.
  2. Keep secrets in .env: Task URLs belong in TOML, but API keys should be stored in environment files loaded via uvx synth-ai setup or --env-file.
  3. Validate early: Run uvx synth-ai train --type <flow> --config <file> --no-poll to surface schema errors without waiting for training to finish.
  4. Document decisions: TOML comments (# ...) are ignored by the parser—use them to explain dataset locations, model choices, or intended usage.
  5. Version control configs: Commit configs alongside task app changes; reproducibility depends on syncing code + config.
Head to the flow-specific pages above for required sections, optional fields, and sample snippets.