This release is a pre-release and may not be stable for production use.
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.dev202605312141
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.dev202605312141.tar.gz | 64.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| synth_containers-0.2.0.dev202605312141-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 142.9 kB
Release files / synth_containers-0.2.0.dev202605312141.tar.gz
| Download URL | synth_containers-0.2.0.dev202605312141.tar.gz |
|---|---|
| Size | 64.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6397f7d2367dbe53f48a4603ab3add890e1c4eca52b4d894b2f967c0760c9dd5
|
|
BLAKE2b-256 checksum How to use checksums |
90e03eec07a8919e81a3739a8780e6e8df041bc01aeca4e425e3a67a59c88d6e
|
| 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.dev202605312141-py3-none-any.whl
| Download URL | synth_containers-0.2.0.dev202605312141-py3-none-any.whl |
|---|---|
| Size | 78.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
559acf296090f292dd6e0e7b26ff73511ac083e6837c934df69b2352f7d0822b
|
|
BLAKE2b-256 checksum How to use checksums |
e35059f3bf99af16ed315eb39eba6e4baa07c400ff31f5a80072dffcf2b2c8ca
|
| 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.dev202605312141
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.