synth-containers
The task contract for Synth optimizers and evals — wrap any task as a small HTTP service that optimizers can target without touching your code.
PyPI · Optimizers · Cookbooks
A Synth container is a small HTTP service around a task. It owns the dataset, the
scoring/verifier logic, the mutable prompt or policy fields, and the policy-model
credential boundary. An optimizer like
synth-optimizers GEPA sees one URL
and a typed rollout contract — it never imports your task package or reads private
evaluator state. The same contract works whether the task is a classifier, a coding
agent, or a live game environment, and in Python, Rust, or TypeScript.
Install
pip install synth-containers
# or
uv add synth-containers
Latest daily dev build:
pip install --pre synth-containers==0.2.0.dev202605312141
uv add --prerelease allow synth-containers==0.2.0.dev202605312141
Local Better SDK Dev
This branch pair expects:
containers: packagesynth-containers==0.2.0.dev202605312141optimizers: packagesynth-optimizers==0.2.0.dev202605312141
Install both editable checkouts with uv (sibling repos under your workspace):
cd optimizers
uv sync --group dev
uv pip install -e ../containers
uv pip install -e .
Verify import paths and versions:
uv run python -c "import importlib.metadata as m, synth_containers, synth_optimizers; print(synth_containers.__file__); print(m.version('synth-containers')); print(synth_optimizers.__version__)"
The SDK validation examples (Banking77, TBLite, Crafter, MiniGrid) live in local
optimizers/dev_examples/ (gitignored — not shipped in the repo).
The contract
| Route | Method | Purpose |
|---|---|---|
/metadata |
GET | contract version + capabilities |
/program |
GET | mutable prompt fields + seed candidate |
/dataset |
GET | split names + row counts |
/dataset/rows |
POST | rows for a requested seed list |
/rollout |
POST | run a candidate on a row → reward + usage |
/health |
GET | liveness |
The Python SDK also provides Container, Container.serve(),
ContainerHandle, and ContainerConnection for URL-only optimizer handoff.
Use generic route hints and capability metadata here; optimizer-specific GEPA
settings belong in synth-optimizers.
Example
from fastapi import Body, FastAPI
from synth_containers import GEPA_OPTIMIZER_CONTRACT_VERSION
app = FastAPI()
@app.post("/rollout")
def rollout(payload: dict = Body(...)) -> dict:
candidate, row = payload["candidate"], payload["row"]
# run the task with the candidate's mutable fields, score it with a real verifier
return {"reward": ..., "usage": ...}
See the cookbooks for complete containers: Banking77, HotpotQA, MiniGrid, TBLite, and Crafter.
Links
- Optimizers — GEPA on this contract
- Cookbooks — runnable containers
- Agent skill — drop into a coding agent to build and debug containers
- Contract OpenAPI
License
MIT
Metadata
Release files for synth-containers 0.2.0.20260604
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_containers-0.2.0.20260604.tar.gz | 64.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| synth_containers-0.2.0.20260604-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 143.4 kB
Release files / synth_containers-0.2.0.20260604.tar.gz
| Download URL | synth_containers-0.2.0.20260604.tar.gz |
|---|---|
| Size | 64.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57c3f409315be8d85e549222f33f8cf5f18f6f985c65876458b21180f6974ed0
|
|
BLAKE2b-256 checksum How to use checksums |
29807fe92744f3ab529003d0fad1e0caf561ef9c00d26d70fd4040d72c50ff63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / synth_containers-0.2.0.20260604-py3-none-any.whl
| Download URL | synth_containers-0.2.0.20260604-py3-none-any.whl |
|---|---|
| Size | 78.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f347191078975a51b2b2433c6349ae23663fe97e9233529ab66d84dc9131488
|
|
BLAKE2b-256 checksum How to use checksums |
2f793c4831bc334cb24074f88c9e71dd241bcd85b12b5608e945ec0991fd37b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for synth-containers 0.2.0.20260604
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.