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.dev20260814.tar.gz (518.9 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.dev20260814-py3-none-any.whl (516.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for synth_containers-0.4.1.dev20260814.tar.gz
Algorithm Hash digest
SHA256 7122cc1d61f73a25e266a92d93ddd7a66bf075d2f5ca304c079588294e867ebf
MD5 2481962d06f13804ecea1de9cc569456
BLAKE2b-256 4b8247fa0f8e886376399667902e434dec527be1eaafc2714f6985e0fdc35c05

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_containers-0.4.1.dev20260814.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.dev20260814-py3-none-any.whl.

File metadata

File hashes

Hashes for synth_containers-0.4.1.dev20260814-py3-none-any.whl
Algorithm Hash digest
SHA256 518dcd5304edc245e74d1d5d2d5f76b32759716d48550ecb756be431d59d8fd3
MD5 b1d479b5b6695e7ddc1a015b0f7d5011
BLAKE2b-256 1e627ad5656a825db2c145afa14b8f16ef81132c14db48afd084c28fce22235d

See more details on using hashes here.

Provenance

The following attestation bundles were made for synth_containers-0.4.1.dev20260814-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.dev20260814 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