Skip to content

methodic

Python client for the Chronicle experiment platform.

methodic is the supported integration path for both researchers (managing experiments, variations, and search) and runners (workers that pull configs, transition runs, upload assets). It is the same client menlo-park uses internally.

pip install methodic-research
from methodic import Chronicle

# Researcher: experiments, variations, search
with Chronicle(server_url="https://api.methodiclabs.ai", api_key="sk_user_...") as chronicle:
    exp = chronicle.experiments.create(
        hypothesis_summary="ripple effect on PDE solvers in 2D",
        config_yaml=open("experiment.yaml").read(),
    )
    exp.commit().variations.create(config_yaml=open("variation-2.yaml").read())

# Worker: run lifecycle + asset uploads
with Chronicle(server_url=..., api_key="sk_agent_...") as chronicle:
    run = chronicle.run(experiment_id, variation=1, run=1)
    run.start()
    run.upload_asset(asset_type="research_report", content={"summary": "..."})
    run.succeed()

API shape

Chronicle is the top-level client. Every operation lives on a namespace; resource handles are sugar for chained drill-downs.

Namespace What it covers
chronicle.experiments create, get, list/iter, commit, conclude, retract, lineage, upstream-retractions
chronicle.variations create, get, commit, retract
chronicle.runs start, succeed, fail, heartbeat, get_status (or use chronicle.run(...) for a handle)
chronicle.assets get, presign, finalize, download, create_inline, create_with_presigned
chronicle.search query, iter (paginated; Vertex-backed)

Where to next

  • Quickstart — install, authenticate, run the hello-world flow end-to-end.
  • Guide — auth, run lifecycle, asset upload protocol, resumable uploads.
  • API reference — full namespace and handle reference, generated from docstrings.
  • Design — protocol details and rationale.