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

Metadata

Release files for synth-containers 0.4.1.dev20260817

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synth-containers 0.4.1.dev20260817
File Size Uploaded Provenance
synth_containers-0.4.1.dev20260817.tar.gz 526.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for synth-containers 0.4.1.dev20260817
File Interpreter ABI Platform
synth_containers-0.4.1.dev20260817-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / synth_containers-0.4.1.dev20260817.tar.gz

Download URL synth_containers-0.4.1.dev20260817.tar.gz
Size 526.4 kB
Tags Source
SHA-256 checksum
How to use checksums
132aed579ca50cb87a85e1033381d6dff15d8a938af224327e6dd10e7f3e4d92
BLAKE2b-256 checksum
How to use checksums
96a2b98de88810e4a83ec4b4ee407e92f2867a1310d1313f7da70c41ae7200e4
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 20, 2026.

Transparency log

Release files / synth_containers-0.4.1.dev20260817-py3-none-any.whl

Download URL synth_containers-0.4.1.dev20260817-py3-none-any.whl
Size 520.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0aea621ca449a6bc84cbb81ecfa2ef31137c40f608638fd5040e136e30b7c9d2
BLAKE2b-256 checksum
How to use checksums
2cb2bcfd727ba3dd2749cd6e59db8f33fce05342cb87bc0d1b678e7a5866ea19
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 20, 2026.

Transparency log

Security for synth-containers 0.4.1.dev20260817

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.

Select from 2 files

Attestation for synth_containers-0.4.1.dev20260817.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 20, 2026.

Transparency log

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.

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