Skip to main content
The Synth CLI (synth-ai) provides commands for training, deploying, and testing your agent task apps.

Installation

# Run without installing (recommended)
uvx synth-ai --help

# Or install globally
pip install synth-ai

Core Commands

CommandDescription
synth-ai setupConfigure API keys and environment
synth-ai deployDeploy task apps locally (uvicorn) or to Modal
synth-ai trainSubmit SFT or RL training jobs
synth-ai smokeSmoke-test a task app

Quick Start

  1. Setup credentials
uvx synth-ai setup
  1. Deploy your task app locally
uvx synth-ai deploy --runtime uvicorn --port 8001
  1. Smoke-test your task app
uvx synth-ai smoke --url http://localhost:8001 --env-name my-env
  1. Train a model
uvx synth-ai train --type rl --config configs/rl.toml

Configuration Files

Most commands accept a --config flag pointing to a TOML configuration file:

SFT Config

type = "sft"

[model]
base = "Qwen/Qwen3-4B"
# ... more SFT settings

RL Config

type = "rl"

[algorithm]
type = "online"
method = "policy_gradient"
variety = "gspo"

[policy]
model_name = "Qwen/Qwen3-4B"
trainer_mode = "full"
label = "my-rl-model"

# Optional: smoke testing configuration
[smoke]
task_url = "https://my-app.modal.run"
max_steps = 10
# ... more smoke settings
The [smoke] section is only used by the synth-ai smoke command and is ignored by training jobs.

Environment Variables

The CLI respects these environment variables (usually set by synth-ai setup):
  • SYNTH_API_KEY - Your Synth API key
  • TASK_APP_URL - Default task app URL
  • ENVIRONMENT_API_KEY - Task app API key (X-API-Key header)
  • OPENAI_API_KEY - For OpenAI-based mock inference
You can override these with CLI flags or load additional .env files:
uvx synth-ai smoke --env-file .env.local --url https://custom-url.com

Getting Help

# General help
uvx synth-ai --help

# Command-specific help
uvx synth-ai smoke --help
uvx synth-ai train --help

Next Steps