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
Local Synth development
Register the current checkout once after changing Containers or its package version:
./scripts/register-local-dev-build.sh
The command builds a wheel, installs it into an immutable machine-local directory, verifies the installed version, and atomically selects it for local Workshop builds. No launch flags or environment variables are required. Re-running it reuses an identical registered wheel.
Sibling Optimizers development remains editable through its checked-in uv source:
cd ../optimizers
uv sync --group dev
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synth_containers-0.4.1.tar.gz.
File metadata
- Download URL: synth_containers-0.4.1.tar.gz
- Upload date:
- Size: 590.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df3b8f5e04b6260ad2b1bd3a00ced618721938c9638d21e38b8c10d5c693acd1
|
|
| MD5 |
9b29434d695a398a82e1530be1e9e6c4
|
|
| BLAKE2b-256 |
6aafc521e3f35bf4fea80e1f01dbd7a45b5c3ffd5f0928a7e714f1c2430df601
|
Provenance
The following attestation bundles were made for synth_containers-0.4.1.tar.gz:
Publisher:
publish-pypi.yml on synth-laboratories/containers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synth_containers-0.4.1.tar.gz -
Subject digest:
df3b8f5e04b6260ad2b1bd3a00ced618721938c9638d21e38b8c10d5c693acd1 - Sigstore transparency entry: 2550108869
- Sigstore integration time:
-
Permalink:
synth-laboratories/containers@b8bfe4c93a161df1606a150071c1e61665c671d8 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/synth-laboratories
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b8bfe4c93a161df1606a150071c1e61665c671d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file synth_containers-0.4.1-py3-none-any.whl.
File metadata
- Download URL: synth_containers-0.4.1-py3-none-any.whl
- Upload date:
- Size: 562.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7f3eccedf99f3915fbbf7b75dd070910f7e4a6c113887c3528fe2f02bdc5c08
|
|
| MD5 |
23c4b8345c68c4bc7985a596e6ce7887
|
|
| BLAKE2b-256 |
4fe4b31a3ad91a5699927aafcebaa8f9197fec02b390d3d6538f601cdc70595b
|
Provenance
The following attestation bundles were made for synth_containers-0.4.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on synth-laboratories/containers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synth_containers-0.4.1-py3-none-any.whl -
Subject digest:
c7f3eccedf99f3915fbbf7b75dd070910f7e4a6c113887c3528fe2f02bdc5c08 - Sigstore transparency entry: 2550108926
- Sigstore integration time:
-
Permalink:
synth-laboratories/containers@b8bfe4c93a161df1606a150071c1e61665c671d8 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/synth-laboratories
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b8bfe4c93a161df1606a150071c1e61665c671d8 -
Trigger Event:
push
-
Statement type: