This release is a pre-release and may not be stable for production use.
synth-optimizers
A shared optimizer platform for AI applications — starting with open-source GEPA on a language-agnostic task contract.
PyPI · Task contract · Cookbooks · Hosted jobs
synth-optimizers provides a shared Rust optimizer core for running search
algorithms against any task exposed through the public optimizer HTTP task
contract.
- Shared platform core — reusable Rust machinery for container I/O, workspaces, cache profiles, budgets, telemetry, failure handling, and replayable evidence.
- Algorithm layer — GEPA is the first public optimizer; future algorithms can plug into the same platform contract.
- GEPA runs today — configure GEPA with TOML or
GepaConfig; it proposes prompt changes, rolls them out, scores them, keeps a Pareto frontier, and emits inspectable run evidence.
Supported algorithms
| Algorithm | Status | In this repo | Paper & docs |
|---|---|---|---|
| GEPA — reflective prompt evolution | Supported | rust/crates/synth_gepa/ (Rust engine + service), src/synth_optimizers/gepa.py (Python API), skills/gepa/SKILL.md (agent runbook) |
Paper · gepa-ai docs · bundled HTML via gepa console |
| GELO — Go-Explore in prompt space (hosted) | Hosted submit | src/synth_optimizers/gelo.py, skills/gelo/SKILL.md, GELO_HOSTED_SDK_CLI_SPEC.md |
Bundled HTML via gelo console — src/synth_optimizers/docs/gelo/ |
The shared synth_optimizer_platform
crate is the substrate for optimizer implementations; GEPA is the first public
local algorithm; GELO is hosted-only in the public package and runs on Synth
hosted optimizer infrastructure.
Hosted GEPA/GELO submission is covered in docs/hosted-optimizers.md.
Install
pip install synth-optimizers
# or
uv add synth-optimizers
Install uv for local development and editable installs.
Local development
Sync the repo and install the local Python/Rust extension in editable mode:
cd optimizers
uv sync --group dev
uv pip install -e .
uv run maturin develop --manifest-path rust/crates/synth_optimizers_py/Cargo.toml
Quickstart
A run is defined by TOML (or GepaConfig): which container to talk to, which prompt
modules to optimize, and how to score them.
[container]
url = "http://127.0.0.1:8765"
command = ["uv", "run", "python", "banking77_container/synth_service_app.py", "--port", "8765"]
[candidate]
target_modules = ["stage2_system"]
[seed_candidate]
stage2_system = "Classify the query into exactly one Banking77 intent. Return only the label."
[dataset]
train_seeds = [0, 1, 2, 3, 4, 5, 6, 7]
heldout_seeds = [100, 101, 102, 103]
from synth_containers import Container
from synth_optimizers import GepaConfig, GepaRun, GepaTaskPools, OptimizerRun, TasksetSelection
container = Container("my-task")
with container.serve() as handle:
result = OptimizerRun(
GepaConfig(
container=handle.connection(),
taskset=TasksetSelection(train_ids=["train:0", "train:1"], heldout_ids=["test:100"]),
task_pools=GepaTaskPools(
pareto=["train:0"],
minibatch=["train:0"],
reflection=["train:0", "train:1"],
heldout=["test:100"],
),
program=None,
objectives=None,
policy=None,
)
).execute()
print(result.best_candidate)
print("cost: unknown" if result.cost_usd is None else f"cost: ${result.cost_usd:.2f}")
Or load TOML directly: GepaRun.from_toml("gepa.toml").execute().
CLI:
synth-optimizers gepa run --config gepa.toml
synth-optimizers gepa service --db service.sqlite
synth-optimizers events compare --left a.jsonl --right b.jsonl
Runnable task examples: GEPA cookbooks (Banking77, HotpotQA, MiniGrid, TBLite, Crafter).
Authentication and models
Policy models run inside your task container; the reflective proposer runs Codex on the host (or in Docker). Rollout requests never carry proposer keys.
Default OpenAI API key setup:
export OPENAI_API_KEY="sk-..."
export SYNTH_OPTIMIZERS_TERMINAL=1 # optional: live usage in the terminal
[policy]
provider = "openai"
model = "gpt-4.1-nano"
api_key_env = "OPENAI_API_KEY"
[proposer]
backend = "codex_app_server"
runtime_substrate = "local"
provider = "openai"
auth_mode = "api_key"
api_key_env = "OPENAI_API_KEY"
copy_host_auth = false
model = "gpt-5.4-nano"
sandbox_mode = "workspace-write"
approval_policy = "never"
timeout_seconds = 900
OpenRouter proposer (provider = "openrouter", api_key_env = "OPENROUTER_API_KEY") —
policy can stay on OpenAI. See skills/gepa/SKILL.md for full TOML.
Features
- OpenAI API key proposer — run-local Codex home; does not use your host
~/.codexlogin. - OpenRouter proposer — provider-aware Codex config and base URL; OpenRouter works for policy rollouts too.
- ChatGPT subscription proposer —
auth_mode = "chatgpt"with requiredcodex_home(OAuth via Codex CLI or opencode-openai-codex-auth); models includegpt-5.4-mini,gpt-5.3-codex,gpt-5.3-codex-spark,gpt-5.5; proposer usage is $0, policy rollouts still bill normally. - Nano-Codex proposer harness — explicit
[proposer.nano_codex]opt-in keeps one ChatGPT-authenticated app-server session warm across compatible GEPA generations, caches static task/program context by content digest, records monotonic JSONL events and typed turn receipts, and can replay receipts with zero live model or tool calls. Seedev_examples/nano_codex_gepa/. - Live usage —
SYNTH_OPTIMIZERS_TERMINAL=1prints running token and cost splits (usage total=… policy=… proposer=…). - Docker proposer —
runtime_substrate = "docker"with[proposer.docker].image; workspaces stage under~/.cache/synth-gepa-docker-workspaces/, sync back, then cleanup; image:docker/codex-gepa-proposer/Dockerfile. - Gemini and other policy providers — supported on the policy side via
[policy].provider,base_url, and container env keys; proposer stays Codex. - DeepSeek direct —
provider = "deepseek"withbackend = "deepseek_chat"runs the proposer through DeepSeek Chat Completions; OpenRouter DeepSeek slugs remain supported throughprovider = "openrouter". - Preflight validation — missing keys, missing
codex_home/auth.json, or disallowed ChatGPT models fail before rollouts start.
Agent docs: skills/gepa/SKILL.md.
Links
- GEPA docs (gepa-ai) — algorithm overview, case studies, and adapter guides
- GEPA paper — GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning
- Cookbooks — runnable GEPA examples
- GEPA task contract — the public HTTP task contract
- uv — Python package and project manager
- GEPA service OpenAPI
License
Apache-2.0
Metadata
Release files for synth-optimizers 0.2.8.dev20260814
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| synth_optimizers-0.2.8.dev20260814.tar.gz | 758.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| synth_optimizers-0.2.8.dev20260814-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 7.6 MB
Release files / synth_optimizers-0.2.8.dev20260814.tar.gz
| Download URL | synth_optimizers-0.2.8.dev20260814.tar.gz |
|---|---|
| Size | 758.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fc628df7031ef14a1f4477309f48b3c3e6b194a7cee6c7585e6d01969c1ffb7
|
|
BLAKE2b-256 checksum How to use checksums |
9d2ed697eb14ef16cdd88aea5119002a5e42bcaf4c742b286467896826d5f1ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logRelease files / synth_optimizers-0.2.8.dev20260814-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | synth_optimizers-0.2.8.dev20260814-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.9 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
08590e69be7f7cb3f8c7629b9cff8009c85727ae3648b7118f7b0cd070d90815
|
|
BLAKE2b-256 checksum How to use checksums |
e54c523d06a4916d610199a0b669a2205d59184a440969bd7920edf10de52228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logSecurity for synth-optimizers 0.2.8.dev20260814
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for synth_optimizers-0.2.8.dev20260814.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.