Skip to main content
Pre-release

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

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

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

synth_containers-0.4.1.dev20260817.tar.gz (526.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synth_containers-0.4.1.dev20260817-py3-none-any.whl (520.1 kB view details)

Uploaded Python 3

File details

Details for the file synth_containers-0.4.1.dev20260817.tar.gz.

File metadata

File hashes

Hashes for synth_containers-0.4.1.dev20260817.tar.gz
Algorithm Hash digest
SHA256 132aed579ca50cb87a85e1033381d6dff15d8a938af224327e6dd10e7f3e4d92
MD5 45f494b5dfee9a845f928d1bfe690f56
BLAKE2b-256 96a2b98de88810e4a83ec4b4ee407e92f2867a1310d1313f7da70c41ae7200e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_containers-0.4.1.dev20260817.tar.gz:

Publisher: publish-pypi.yml on synth-laboratories/containers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synth_containers-0.4.1.dev20260817-py3-none-any.whl.

File metadata

File hashes

Hashes for synth_containers-0.4.1.dev20260817-py3-none-any.whl
Algorithm Hash digest
SHA256 0aea621ca449a6bc84cbb81ecfa2ef31137c40f608638fd5040e136e30b7c9d2
MD5 bc12a6c57e41947720fdf63b3b7e3132
BLAKE2b-256 2cb2bcfd727ba3dd2749cd6e59db8f33fce05342cb87bc0d1b678e7a5866ea19

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_containers-0.4.1.dev20260817-py3-none-any.whl:

Publisher: publish-pypi.yml on synth-laboratories/containers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.1

2 files

This release

0.4.1.dev20260817 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page