Skip to main content

beaker

Beaker SDK 0.5.0 defines a customer Integration, validates it locally, uploads datasets and operates hosted optimization runs. Import contract types from beaker and declare a module-level integration = Integration(...) value.

from beaker import (
    Integration,
    Case,
    CaseResult,
    CaseScore,
    RepositoryRunSetup,
    RolloutRuntime,
    SetupRuntime,
    repository,
)

integration = Integration(
    targets=repository(),
    run_setup=MySetup,
    run_case=run_case,
    score_case=score_case,
)

MySetup subclasses RepositoryRunSetup, declares a Pydantic-compatible row_model, and implements async-generator load_cases(row, *, runtime). It yields Case(id=..., input=..., expected=...) values with unique IDs. Beaker constructs one setup instance per attempt and enters/closes its prepare_run() async context manager.

run_case(*, case_input, runtime) returns CaseResult(output=...). Its JSON application result is what the scorer reads; telemetry belongs in runtime.trace. score_case(*, case, result, case_files_dir) returns CaseScore with the agreed objective, stable field metrics and optional per-case checks.

For document optimization, use documents(groups=(...)) and DocumentRunSetup. Setup provides TargetDocument seeds. An optional open_candidate() creates a runtime from candidate files; document results are conditional ChangeSet operations. The customer decides when to apply them.

Configuration and validation

beaker init preserves existing configuration. For a new setup, it creates .beaker/beaker_integration.py and:

default_integration: invoices
integrations:
  invoices:
    entrypoint: beaker_integration:integration
    source_dir: .
    package_import_root: .beaker
    required_env: []

source_dir is relative to the Git root; package_import_root is inside it. Use --integration-id when several entries exist. Config selection is explicit ID, configured default, or the sole entry; ambiguous selection fails. To register an Integration elsewhere, pass beaker init --integration-id <id> --target <path.py-or-module:attribute>. Init does not scan the repository for Integrations.

beaker agent setup "<Agent Name>" --integration-id invoices records the hosted agent key at integrations.invoices.agent_key. Agent selection uses --agent / --agent-key, then BEAKER_AGENT_KEY, then the selected integration's key. Top-level agent_key and project_key fields are no longer used.

beaker onboarding status --integration-id invoices
beaker agent env check --integration-id invoices
beaker run smoke --strict --integration-id invoices --dataset invoices@revision
beaker run trigger --integration-id invoices --dataset invoices@revision
beaker run status RUN_ID --watch
beaker run pull RUN_ID

Smoke validates all rows before entering setup, then loads cases, validates input files, and opens a document seed candidate if applicable. It closes all resources without invoking the agent or scorer. Setup hooks may use external services. Init verification only imports and validates the Integration.

Models

Both repository and document Integrations support explicitly selected comparison models using repeated --optimization-model provider:model flags. When runtime.model is present, inference_target(runtime) provides the hosted gateway configuration. Otherwise preserve the application's production defaults. Set an optional fixed judge with launch scorer_model and call scoring_inference_target() inside scoring.

Read the CLI reference for commands.

The SDK and skills are released together with matching versions. Deploy the compatible hosted runtime before publishing the SDK and skills.

Release files for beaker-sdk 0.6.1

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.6.1
File Size Uploaded
beaker_sdk-0.6.1.tar.gz 203.9 kB Details

Built distribution (wheel)

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

Total release size: 437.5 kB

Release files / beaker_sdk-0.6.1.tar.gz

Download URL beaker_sdk-0.6.1.tar.gz
Size 203.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b4feac4973c5969b7b6ff03afdfc32171b5ffd9e25812bc765aef4301c819b4a
BLAKE2b-256 checksum
How to use checksums
ca79e194b57f0a43803b1bf525159115a8f6aaff7b1e7f331ac3d865d7e637fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.4

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

Download URL beaker_sdk-0.6.1-py3-none-any.whl
Size 233.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38d4750c82b7db47c407bea96f17eab76ded3d5a061130affd8804f7ff2fe81e
BLAKE2b-256 checksum
How to use checksums
d00071a982a97b9531884da1e74bef420253a92936df7f538c4a0d946f873567
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

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.9

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