Skip to main content

beaker

Beaker SDK and CLI package.

beaker gives developers the tools to define optimization specs, validate them locally, upload datasets, configure hosted run environments, launch optimization runs, and inspect results from code or the CLI.

Customer specs import contract types directly from beaker:

from beaker import Case, CaseDataLoader, CaseResult, CaseScore, Spec, spec

Hosted model-selection rollouts also expose a generic OpenAI-compatible target:

from beaker import RolloutContext, inference_target


def build_eval_client(runtime: RolloutContext):
    target = inference_target(runtime)
    return YourFrameworkClient(
        base_url=target.base_url,
        api_key=target.api_key,
        model=target.model,
    )

Call inference_target only in the evaluation path when runtime.model is set. Production application calls should retain the application's existing model and client defaults. The structural beaker run smoke check does not invoke this path.

CLI run lifecycle

Every command, the endpoint it calls, and who can run it are documented in docs/cli-reference.md.

The CLI is intentionally noninteractive: choose the remote GitHub branch, dataset, and optional comparison models before invoking it. Runs use the repository's GitHub default branch when --ref is omitted. --ref resolves a remote GitHub ref, so unpushed local changes are not included.

Datasets are train + test. The TRAIN split drives optimization; TEST is the held-out split scored against the baseline. beaker dataset upload requires both split counts.

# Upload a dataset with its split counts.
beaker dataset upload ./data --name invoices --split train=400 --split test=50

# Discover launch inputs.
beaker github branches --repo owner/repository
beaker model list --available-only

# Agent optimization of the production system.
beaker run trigger --ref feature/prompts --dataset invoices@production

# Agent optimization comparing selected models.
beaker run trigger --ref feature/prompts --dataset invoices \
  --optimization-model openai:gpt-4o \
  --optimization-model anthropic:claude-sonnet-4-5 \
  --benchmark-split TEST

# Discover, inspect, and cancel runs.
beaker run list
beaker run status RUN_ID
beaker run status RUN_ID --watch
beaker run cancel RUN_ID

Lifecycle commands support stable JSON for automation:

beaker model list --json
beaker github branches --repo owner/repository --json
beaker run trigger --ref feature/prompts --dataset invoices --json
beaker run list --json
beaker run status RUN_ID --json
beaker run cancel RUN_ID --json

Release files for beaker-sdk 0.4.9

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

Source distribution (sdist)

Source distribution for beaker-sdk 0.4.9
File Size Uploaded
beaker_sdk-0.4.9.tar.gz 221.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beaker-sdk 0.4.9
File Interpreter ABI Platform
beaker_sdk-0.4.9-py3-none-any.whl Python 3 none any Details

Total release size: 475.8 kB

Release files / beaker_sdk-0.4.9.tar.gz

Download URL beaker_sdk-0.4.9.tar.gz
Size 221.1 kB
Tags Source
SHA-256 checksum
How to use checksums
40e29ff5eb0513e488246303667b48bf17ce174c51412625da821f44946d31cf
BLAKE2b-256 checksum
How to use checksums
053677c7dadd905a7de3dbc67cee19ae4d4de69f42105a1af17812a61a0b3e8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.4

Release files / beaker_sdk-0.4.9-py3-none-any.whl

Download URL beaker_sdk-0.4.9-py3-none-any.whl
Size 254.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b30ffc146cd7271948584f9bae4aa22e97a7ca91dc8644fdc0c321aa7be304e
BLAKE2b-256 checksum
How to use checksums
f13fd20100b8b106cd3d9c1b45b4bc62f9334b63b34436391d97d488ef5e1e48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.4

Release history Release notifications | RSS feed

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

This release

0.4.9 This release

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release 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