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.0

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.0
File Size Uploaded
beaker_sdk-0.6.0.tar.gz 202.9 kB Details

Built distribution (wheel)

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

Total release size: 435.6 kB

Release files / beaker_sdk-0.6.0.tar.gz

Download URL beaker_sdk-0.6.0.tar.gz
Size 202.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4da8a4da455243b65dbf0e17b00e5a419c906d71b4ceaa161d11ffff902f274d
BLAKE2b-256 checksum
How to use checksums
14c7d88457853bbd90842f13709ded4be15f698789fbb694866e50ff235e18c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.4

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

Download URL beaker_sdk-0.6.0-py3-none-any.whl
Size 232.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91dc2a0f9e9d133b56771dcb1acc3db4b182513c3f1cf1630cd91b3baccae1f0
BLAKE2b-256 checksum
How to use checksums
3b98ddbcd94c408643ef4c3c857b54ff66b8af40aebe9af017976cc04a091c37
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

This release

0.6.0 This release

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