CALIBER
Quickstart
Reference

CALIBER Python SDK API reference

Every GA resource module the client exposes, the models they decode into, error types, waiters, and the stability tier each surface carries.

DeveloperReferenceGA
PrerequisitesPython 3.10+ · A CALIBER integration question
Reviewed 2026-08-10 · current main branch docs contract

This reference is generated from the SDK source tree at build time. It follows the same pattern as the MLflow Python API docs: start with the top-level package, then drill into resource modules, models, errors, waiters, and the async client.

This page is intentionally about the Python client, not the raw HTTP routes. If you need headers, envelopes, or concrete endpoints, start with the REST API overview and HTTP reference.

Most developers should begin with:

  • caliber_sdk.CaliberClient for the synchronous client
  • caliber_sdk.aio.AsyncCaliberClient for async workflows
  • the SDK guide for setup and common flows
  • SDK recipes for full runnable scenarios

The reference below is generated from the current SDK code, so the published HTML stays aligned with the package the tests exercise.

Deep reference · data models, APIs & lifecycle

Reference

The most common entry point is caliber_sdk.CaliberClient; the rest of the package fans out into typed resource modules, dataclass models, shared transport and error helpers, and an async client.

The reference tables below are generated directly from the current SDK source. Behavior notes and examples come from the SDK docstrings and the executable example files the test suite runs.

Module index

Symbol index

Every documented class and module-level function, with the module that defines it. Members hang off their class, so start here and follow the link.

A

B

C

E

F

G

I

J

K

L

M

N

SymbolDefined in
NoAuthcaliber_sdk.auth

O

P

R

S

T

W

Package index

Module caliber_sdk

caliber-sdk — a typed Python client for the CALIBER management API.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

API_PREFIX, ENV_BASE_URL, ENV_PROJECT, ENV_TOKEN, ENV_USER, FAILURE_STATES, TERMINAL_STATES, AuthProvider, CaliberAPIError, CaliberAuthenticationError, CaliberClient, CaliberConfigError, CaliberConflictError, CaliberError, CaliberNotFoundError, CaliberPermissionError, CaliberRateLimitError, CaliberServerError, CaliberTransportError, CaliberValidationError, ErrorBody, FieldError, NoAuth, Page, RawAPI, Response, Stability, TokenAuth, Transport, TrustedHeaderAuth, WaitFailed, WaitTimeout, WorkflowRunFailed, __version__, wait_for, wait_for_terminal_state

Module constants

NameValue
__version__'0.1.0.dev0'

Module caliber_sdk.client

The root client — what a developer constructs first.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

ENV_BASE_URL, ENV_PROJECT, ENV_TOKEN, ENV_USER, CaliberClient

Module constants

NameValue
ENV_BASE_URL'CALIBER_BASE_URL'
ENV_TOKEN'CALIBER_TOKEN'
ENV_PROJECT'CALIBER_PROJECT'
ENV_USER'CALIBER_USER'

Classes

CaliberClient

class CaliberClient(base_url: str | None = None, *, token: str | None = None, user: str | None = None, proxy_secret: str | None = None, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, verify: bool | str = True, http_client: httpx.Client | None = None)

A connection to one CALIBER deployment.

Usage example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Constructor

__init__(base_url: str | None = None, *, token: str | None = None, user: str | None = None, proxy_secret: str | None = None, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, verify: bool | str = True, http_client: httpx.Client | None = None) -> None

Operate on the caliber client surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
base_urlpositional-or-keyword`strNone`None
tokenkeyword-only`strNone`None
userkeyword-only`strNone`None
proxy_secretkeyword-only`strNone`None
authkeyword-only`AuthProviderNone`None
projectkeyword-only`strNone`None
timeoutkeyword-onlyfloat30.0
max_retrieskeyword-onlyint2
verifykeyword-only`boolstr`True
http_clientkeyword-only`httpx.ClientNone`None

Returns: None

Raises:

Attributes

AttributeTypeNotes
rawRawAPILow-level route access through the SDK transport.
authAuthAPISession inspection plus token and account sub-resources.
meMeAPIThe caller identity surface.
capabilities_apiCapabilitiesAPIRuntime stability tiers and deployment capabilities.
settingsSettingsAPIRuntime and LLM configuration inventory.
projectsProjectsAPIProjects plus the managed file registry.
promptsPromptsAPIPrompt registry authoring and promotion.
skillsSkillsAPISkill registry, render tests, selection tests, and versions.
toolsToolsAPITool registry, schemas, and deterministic calibration.
workflowsWorkflowsAPIWorkflow registry plus versions, runs, and services.
datasetsEvalDatasetsAPIEvaluation datasets and examples.
judgesJudgesAPIModel-backed graders and alignment scoring.
evaluationsEvaluationsAPIScored dataset runs.
mcp_serversMcpServersAPIManaged MCP server registry and governed tool invocation.
openapi_integrationsOpenApiIntegrationsAPIGoverned OpenAPI import, curation, dependency review, and tool-draft publication.
gatewayGatewayAPIGateway discovery, usage, and guardrails.
knowledge_basesKnowledgeBasesAPIRAG corpora, versions, retrieval, and calibration.
object_storeObjectStoreAPIBuckets and objects under the storage substrate.
jobsJobsAPILong-running background jobs.
review_queuesReviewQueuesAPIHuman review queues and queue items.
ariaAriaAPIThe approval-aware plan and interaction loop.
releasesReleasesAPIRelease candidates, waivers, signoff, and reports.
observabilityObservabilityAPITraces, experiments, and metrics.
auditAuditAPIThe audit log.
eventsEventsAPIServer-sent event stream.
cookbooksCookbooksAPIThe built-in cookbook catalog and installer.
secretsSecretsAPIWrite-only secret references.

Properties

stability() -> dict[str, list[str]]

Tags grouped by `ga / beta / internal`.

This callable takes no public parameters.

Returns: dict[str, list[str]]

Methods

close() -> None

Close the underlying HTTP client or transport owned by this object.

This callable takes no public parameters.

Returns: None

__enter__() -> CaliberClient

Return this instance so it can be used inside a context manager.

This callable takes no public parameters.

Returns: CaliberClient

__exit__(*_: object) -> None

Close any owned resources when leaving the context manager.

ParameterKindTypeDefault
_var-positionalobject

Returns: None

capabilities() -> Any

Runtime feature flags and the SDK stability tiers.

The cheap half of feature detection: it answers "may I call this?" without downloading the full OpenAPI document.

This callable takes no public parameters.

Returns: Any

Raises:

openapi() -> Any

The management OpenAPI document, generated from the live routes.

This callable takes no public parameters.

Returns: Any

Raises:

whoami() -> Any

The identity and scopes CALIBER resolved for this client's credential.

The first call worth making when a script gets an unexpected 403: it distinguishes "wrong credential" from "right credential, wrong scope".

It reports identity rather than requiring it, so an invalid or revoked credential does not raise here -- it returns `user_id: "anonymous"` with no scopes. Check the value; do not rely on an exception to detect a bad token.

This callable takes no public parameters.

Returns: Any

Raises:

health() -> Any

Fetch the lightweight health/readiness view exposed by the deployment.

This callable takes no public parameters.

Returns: Any

Raises:

bootstrap_csrf() -> str | None

Fetch a CSRF token up front.

Rarely needed: the transport fetches one automatically when a write is refused for want of it. Exposed for callers who would rather pay that round trip at startup than on their first write.

This callable takes no public parameters.

Returns: str | None

__repr__() -> str

Operate on the caliber client surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: str

Module caliber_sdk.auth

Authentication strategies for the CALIBER management API.

Tested example

def issue_scoped_token(caliber: CaliberClient, *, name: str = "ci") -> dict[str, Any]:
    """Create a token limited to operator scope.

    The scope list is a *ceiling*: the effective authority is the intersection
    with what the owner holds when the request is made. Requesting more than
    you hold is refused outright rather than silently narrowed, so a token
    never claims authority it cannot exercise.
    """
    issued = caliber.auth.tokens.create(name, scopes=["caliber.operator"])
    # The plaintext exists exactly once. There is no endpoint that returns it
    # again — store it now or rotate to get a new one.
    secret = issued.token

    live = [token.token_id for token in caliber.auth.tokens.list() if token.active]
    caliber.auth.tokens.revoke(issued.token_id)
    return {"token_id": issued.token_id, "secret_len": len(secret), "live_before_revoke": live}
From sdk/caliber-sdk/examples/tokens.py — executed by the SDK test suite.

Public exports

AuthProvider, NoAuth, TokenAuth, TrustedHeaderAuth

Classes

AuthProvider

class AuthProvider()

Bases: Protocol

Supplies per-request auth headers.

A protocol rather than a base class so a caller can plug in their own -- fetching a short-lived token from a secret manager, for instance -- without subclassing anything in this package.

Properties

Whether this credential is cookie-based.

Drives CSRF: CALIBER's protection exists for browser credentials, and a Bearer client should not be forced to bootstrap a token it does not need. See :mod:caliber_sdk.csrf.

This callable takes no public parameters.

Returns: bool

Methods

headers() -> dict[str, str]

Headers to attach to every request.

This callable takes no public parameters.

Returns: dict[str, str]

TokenAuth

class TokenAuth(token: str)

`Authorization: Bearer <token>` — personal access or session token.

Constructor

__init__(token: str) -> None

Operate on the token auth surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
tokenpositional-or-keywordstr

Returns: None

Raises:

Properties

Report whether this auth strategy relies on cookie-backed authentication.

This callable takes no public parameters.

Returns: bool

Methods

headers() -> dict[str, str]

Build the authentication headers added to outgoing HTTP requests.

This callable takes no public parameters.

Returns: dict[str, str]

__repr__() -> str

Operate on the token auth surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: str

TrustedHeaderAuth

class TrustedHeaderAuth(user: str, *, proxy_secret: str | None = None)

`X-CALIBER-User — only for deployments in trusted_header` mode.

Carries no proof of identity by itself, which is why CALIBER ignores the header entirely in the default `session` mode. Offered because local development and proxy-terminated deployments genuinely use it.

Constructor

__init__(user: str, *, proxy_secret: str | None = None) -> None

Operate on the trusted header auth surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
userpositional-or-keywordstr
proxy_secretkeyword-only`strNone`None

Returns: None

Raises:

Properties

Report whether this auth strategy relies on cookie-backed authentication.

This callable takes no public parameters.

Returns: bool

Methods

headers() -> dict[str, str]

Build the authentication headers added to outgoing HTTP requests.

This callable takes no public parameters.

Returns: dict[str, str]

__repr__() -> str

Operate on the trusted header auth surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: str

NoAuth

class NoAuth()

Send no credential. Useful for probing an unauthenticated endpoint.

Properties

Report whether this auth strategy relies on cookie-backed authentication.

This callable takes no public parameters.

Returns: bool

Methods

headers() -> dict[str, str]

Build the authentication headers added to outgoing HTTP requests.

This callable takes no public parameters.

Returns: dict[str, str]

Module caliber_sdk.transport

HTTP transport: envelopes, errors, retries, CSRF, and correlation.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

API_PREFIX, USER_AGENT, Response, Transport

Module constants

NameValue
USER_AGENT'caliber-sdk-python'
API_PREFIX'/ajax-api/2.0/mlflow/caliber'

Classes

Response

class Response(*, data, status_code: int, headers: Mapping[str, str], request_id: str | None)

A decoded response plus the context needed to debug it.

Constructor

__init__(*, data, status_code: int, headers: Mapping[str, str], request_id: str | None) -> None

Operate on the response surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
datakeyword-onlyAny
status_codekeyword-onlyint
headerskeyword-onlyMapping[str, str]
request_idkeyword-only`strNone`

Returns: None

Attributes

AttributeTypeNotes
dataAny
status_codeAny
headersAny
request_idAny
Transport

class Transport(base_url: str, *, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, backoff_factor: float = 0.5, verify: bool | str = True, client: httpx.Client | None = None, user_agent: str | None = None)

Synchronous HTTP transport against one CALIBER deployment.

Constructor

__init__(base_url: str, *, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, backoff_factor: float = 0.5, verify: bool | str = True, client: httpx.Client | None = None, user_agent: str | None = None) -> None

Send a prepared request through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
base_urlpositional-or-keywordstr
authkeyword-only`AuthProviderNone`None
projectkeyword-only`strNone`None
timeoutkeyword-onlyfloat30.0
max_retrieskeyword-onlyint2
backoff_factorkeyword-onlyfloat0.5
verifykeyword-only`boolstr`True
clientkeyword-only`httpx.ClientNone`None
user_agentkeyword-only`strNone`None

Returns: None

Raises:

Attributes

AttributeTypeNotes
base_urlAny
authAnySession inspection plus token and account sub-resources.
projectAny

Methods

close() -> None

Close the underlying HTTP client or transport owned by this object.

This callable takes no public parameters.

Returns: None

__enter__() -> Transport

Return this instance so it can be used inside a context manager.

This callable takes no public parameters.

Returns: Transport

__exit__(*_: object) -> None

Close any owned resources when leaving the context manager.

ParameterKindTypeDefault
_var-positionalobject

Returns: None

url_for(path: str) -> str

Absolute URL for an API path, with or without the prefix.

ParameterKindTypeDefault
pathpositional-or-keywordstr

Returns: str

bootstrap_csrf() -> str | None

Fetch and cache a CSRF token, returning it.

Idempotent and cheap to call. Returns `None` when the deployment does not issue one, which is not an error: CSRF enforcement is configurable and a Bearer client may not need it.

This callable takes no public parameters.

Returns: str | None

request(method: str, path: str, *, params: Mapping[str, Any] | None = None, json = None, headers: Mapping[str, str] | None = None, files = None, data: Mapping[str, Any] | None = None, timeout: float | None = None, _csrf_retry: bool = True) -> Response

Perform one API call, returning the unwrapped payload.

ParameterKindTypeDefault
methodpositional-or-keywordstr
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
jsonkeyword-onlyAnyNone
headerskeyword-only`Mapping[str, str]None`None
fileskeyword-onlyAnyNone
datakeyword-only`Mapping[str, Any]None`None
timeoutkeyword-only`floatNone`None
_csrf_retrykeyword-onlyboolTrue

Returns: Response

Raises:

get(path: str, **kwargs) -> Response

Fetch one record from the transport surface identified by path.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

post(path: str, **kwargs) -> Response

Send a prepared request through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

put(path: str, **kwargs) -> Response

Send a prepared request through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

patch(path: str, **kwargs) -> Response

Send a prepared request through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

delete(path: str, **kwargs) -> Response

Delete a record on the transport surface and return the server acknowledgement.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

download(path: str, **kwargs) -> bytes

Fetch raw bytes.

Separate from :meth:request because file content is not JSON: it has no envelope to unwrap and decoding it would corrupt binary data.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: bytes

Raises:

stream_lines(path: str, *, params: Mapping[str, Any] | None = None, timeout: float | None = None) -> Iterator[str]

Yield lines from a server-sent-events endpoint.

Streaming needs its own path: the ordinary request reads the whole body before returning, which for an endpoint that never ends means blocking forever. No default timeout is applied either — a stream staying open is the success case, not a hang.

ParameterKindTypeDefault
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
timeoutkeyword-only`floatNone`None

Returns: Iterator[str]

Raises:

paginate(path: str, *, params: Mapping[str, Any] | None = None, limit: int = 100) -> Iterator[Any]

Yield items across `limit/offset` pages.

CALIBER's list endpoints are offset-based today. Exposing an iterator rather than the raw pages means the eventual move to cursors does not change this signature.

ParameterKindTypeDefault
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
limitkeyword-onlyint100

Returns: Iterator[Any]

Raises:

Module caliber_sdk.errors

Exception hierarchy for the CALIBER SDK.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

CaliberAPIError, CaliberAuthenticationError, CaliberConfigError, CaliberConflictError, CaliberError, CaliberNotFoundError, CaliberPermissionError, CaliberRateLimitError, CaliberServerError, CaliberTransportError, CaliberValidationError, error_for_response

Functions

error_for_response(*, status_code: int, payload, method: str, url: str, request_id: str | None = None) -> CaliberAPIError

Build the right exception for a non-2xx response.

Tolerates a body that is not the documented shape -- an HTML error page from a proxy in front of CALIBER is a realistic response, and it must produce a usable exception rather than a KeyError inside the SDK.

ParameterKindTypeDefault
status_codekeyword-onlyint
payloadkeyword-onlyAny
methodkeyword-onlystr
urlkeyword-onlystr
request_idkeyword-only`strNone`None

Returns: CaliberAPIError

Classes

CaliberError

class CaliberError()

Bases: Exception

Base class for everything this SDK raises.

A caller who wants "any SDK failure" catches this and nothing else.

CaliberConfigError

class CaliberConfigError()

Bases: CaliberError

The client was constructed with an unusable configuration.

CaliberTransportError

class CaliberTransportError()

Bases: CaliberError

The request never produced an HTTP response.

Connection refused, DNS failure, timeout. Distinct from :class:CaliberAPIError because there is no server verdict to inspect -- and because retrying is often correct here and often wrong there.

CaliberAPIError

class CaliberAPIError(message: str, *, status_code: int, detail: str | None = None, method: str | None = None, url: str | None = None, request_id: str | None = None, payload = None)

Bases: CaliberError

The server returned a non-2xx response.

Constructor

__init__(message: str, *, status_code: int, detail: str | None = None, method: str | None = None, url: str | None = None, request_id: str | None = None, payload = None) -> None

Operate on the caliber a p i error surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
messagepositional-or-keywordstr
status_codekeyword-onlyint
detailkeyword-only`strNone`None
methodkeyword-only`strNone`None
urlkeyword-only`strNone`None
request_idkeyword-only`strNone`None
payloadkeyword-onlyAnyNone

Returns: None

Attributes

AttributeTypeNotes
status_codeAny
detailAny
methodAny
urlAny
request_idAny
payloadAny
CaliberAuthenticationError

class CaliberAuthenticationError()

Bases: CaliberAPIError

401 — no usable identity. The credential is missing, wrong, or revoked.

CaliberPermissionError

class CaliberPermissionError()

Bases: CaliberAPIError

403 — authenticated, but the identity lacks the required scope.

CaliberNotFoundError

class CaliberNotFoundError()

Bases: CaliberAPIError

404 — no such resource.

CALIBER also returns this for a resource that exists but belongs to another user, deliberately: distinguishing the two would let a caller enumerate ids.

CaliberConflictError

class CaliberConflictError()

Bases: CaliberAPIError

409 — the request conflicts with current state (duplicate name, etc.).

CaliberValidationError

class CaliberValidationError(message: str, *, errors: list[dict[str, Any]], **kwargs)

Bases: CaliberAPIError

400 with a structured `errors` list.

Constructor

__init__(message: str, *, errors: list[dict[str, Any]], **kwargs) -> None

Operate on the caliber validation error surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
messagepositional-or-keywordstr
errorskeyword-onlylist[dict[str, Any]]
kwargsvar-keywordAny

Returns: None

Attributes

AttributeTypeNotes
errorsAny
CaliberRateLimitError

class CaliberRateLimitError()

Bases: CaliberAPIError

429 — too many requests.

CaliberServerError

class CaliberServerError()

Bases: CaliberAPIError

5xx — the server failed. Usually worth retrying; never worth assuming.

Module caliber_sdk.waiters

Polling helpers for CALIBER's long-running operations.

Tested example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Public exports

FAILURE_STATES, TERMINAL_STATES, WaitFailed, WaitTimeout, state_of, wait_for, wait_for_terminal_state

Functions

wait_for(poll: Callable[[], T], *, is_done: Callable[[T], bool], timeout: float = 300.0, interval: float = 2.0, max_interval: float = 15.0, backoff: float = 1.5, sleep: Callable[[float], None] = time.sleep, now: Callable[[], float] = time.monotonic) -> T

Poll until `is_done` or the timeout expires.

The interval grows geometrically to `max_interval. A fixed short interval is what turns a slow job into thousands of requests; a fixed long one makes a fast job feel slow. sleep and now` are injectable so tests do not have to spend real seconds proving this.

ParameterKindTypeDefault
pollpositional-or-keywordCallable[[], T]
is_donekeyword-onlyCallable[[T], bool]
timeoutkeyword-onlyfloat300.0
intervalkeyword-onlyfloat2.0
max_intervalkeyword-onlyfloat15.0
backoffkeyword-onlyfloat1.5
sleepkeyword-onlyCallable[[float], None]time.sleep
nowkeyword-onlyCallable[[], float]time.monotonic

Returns: T

Raises:

state_of(payload, *, keys: Sequence[str] = ('status', 'state')) -> str

Read a status field from a payload, tolerating either spelling.

ParameterKindTypeDefault
payloadpositional-or-keywordAny
keyskeyword-onlySequence[str]('status', 'state')

Returns: str

wait_for_terminal_state(poll: Callable[[], Any], *, terminal: frozenset[str] = TERMINAL_STATES, failure: frozenset[str] = FAILURE_STATES, raise_on_failure: bool = True, **kwargs) -> Any

Poll until the payload's status is terminal.

`raise_on_failure` is on by default because the common script wants a failed job to stop it; a caller inspecting the outcome themselves turns it off rather than wrapping every call in a try.

ParameterKindTypeDefault
pollpositional-or-keywordCallable[[], Any]
terminalkeyword-onlyfrozenset[str]TERMINAL_STATES
failurekeyword-onlyfrozenset[str]FAILURE_STATES
raise_on_failurekeyword-onlyboolTrue
kwargsvar-keywordAny

Returns: Any

Raises:

Classes

WaitTimeout

class WaitTimeout(message: str, *, last = None, elapsed: float = 0.0)

Bases: CaliberError

The operation did not reach a terminal state within the budget.

Constructor

__init__(message: str, *, last = None, elapsed: float = 0.0) -> None

Operate on the wait timeout surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
messagepositional-or-keywordstr
lastkeyword-onlyAnyNone
elapsedkeyword-onlyfloat0.0

Returns: None

Attributes

AttributeTypeNotes
lastAny
elapsedAny
WaitFailed

class WaitFailed(message: str, *, state: str, last = None)

Bases: CaliberError

The operation reached a terminal state that indicates failure.

Constructor

__init__(message: str, *, state: str, last = None) -> None

Operate on the wait failed surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
messagepositional-or-keywordstr
statekeyword-onlystr
lastkeyword-onlyAnyNone

Returns: None

Attributes

AttributeTypeNotes
stateAny
lastAny

Resource modules

Module caliber_sdk.resources

Resource modules — typed façades over route groups.

Public exports

AccountsAPI, AriaAPI, AuditAPI, AuthAPI, CapabilitiesAPI, CookbooksAPI, EvalDatasetsAPI, EvaluationsAPI, EventsAPI, GatewayAPI, JobsAPI, JudgesAPI, KnowledgeBasesAPI, McpServersAPI, MeAPI, ObjectStoreAPI, ObservabilityAPI, OpenApiIntegrationsAPI, ProjectFilesAPI, ProjectsAPI, PromptsAPI, RawAPI, ReleasesAPI, Resource, ReviewQueuesAPI, SecretsAPI, SettingsAPI, SkillsAPI, TokensAPI, ToolsAPI, WorkflowRunFailed, WorkflowRunsAPI, WorkflowServicesAPI, WorkflowVersionsAPI, WorkflowsAPI

Module caliber_sdk.resources.auth

Authentication, tokens, and accounts.

Tested example

def issue_scoped_token(caliber: CaliberClient, *, name: str = "ci") -> dict[str, Any]:
    """Create a token limited to operator scope.

    The scope list is a *ceiling*: the effective authority is the intersection
    with what the owner holds when the request is made. Requesting more than
    you hold is refused outright rather than silently narrowed, so a token
    never claims authority it cannot exercise.
    """
    issued = caliber.auth.tokens.create(name, scopes=["caliber.operator"])
    # The plaintext exists exactly once. There is no endpoint that returns it
    # again — store it now or rotate to get a new one.
    secret = issued.token

    live = [token.token_id for token in caliber.auth.tokens.list() if token.active]
    caliber.auth.tokens.revoke(issued.token_id)
    return {"token_id": issued.token_id, "secret_len": len(secret), "live_before_revoke": live}
From sdk/caliber-sdk/examples/tokens.py — executed by the SDK test suite.

Public exports

AccountsAPI, AuthAPI, TokensAPI

Classes

TokensAPI

class TokensAPI()

Personal access tokens for automation.

Methods

list() -> list[PersonalAccessToken]

Every token belonging to the caller. Never includes a secret.

This callable takes no public parameters.

Returns: list[PersonalAccessToken]

Raises:

create(name: str, *, scopes: Sequence[str] | None = None, expires_at: str | None = None) -> IssuedToken

Issue a token. The plaintext is returned once — store it now.

`scopes` is a ceiling, not a grant: the effective authority is the intersection with what the owner holds at request time. Omit it to inherit the owner's scopes. Requesting a scope the caller does not hold is refused rather than silently narrowed.

ParameterKindTypeDefault
namepositional-or-keywordstr
scopeskeyword-only`Sequence[str]None`None
expires_atkeyword-only`strNone`None

Returns: IssuedToken

Raises:

revoke(token_id: str) -> bool

Revoke a token. Returns whether a live token was actually revoked.

ParameterKindTypeDefault
token_idpositional-or-keywordstr

Returns: bool

Raises:

rotate(token_id: str) -> IssuedToken

Replace a token's secret, preserving its name and scope ceiling.

One transaction on the server: the old token is revoked and the replacement issued together, so a failure cannot leave an account with two live tokens or none.

ParameterKindTypeDefault
token_idpositional-or-keywordstr

Returns: IssuedToken

Raises:

AccountsAPI

class AccountsAPI()

User accounts. Admin-only on the server.

Methods

list() -> list[Account]

Return the current collection of user accounts, applying any supported filters.

This callable takes no public parameters.

Returns: list[Account]

Raises:

create(user_id: str, password: str) -> Any

Create a new record on the user accounts surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
user_idpositional-or-keywordstr
passwordpositional-or-keywordstr

Returns: Any

Raises:

update(user_id: str, *, password: str | None = None, disabled: bool | None = None) -> Any

Reset a password or enable/disable an account.

Both revoke the account's sessions server-side, so they take effect immediately rather than at the next expiry.

ParameterKindTypeDefault
user_idpositional-or-keywordstr
passwordkeyword-only`strNone`None
disabledkeyword-only`boolNone`None

Returns: Any

Raises:

revoke_sessions(user_id: str) -> int

Sign an account out everywhere. Returns how many sessions were cut.

ParameterKindTypeDefault
user_idpositional-or-keywordstr

Returns: int

Raises:

AuthAPI

class AuthAPI(transport)

Session inspection, plus the token and account sub-resources.

Constructor

__init__(transport) -> None

Operate on the authentication and session state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
transportpositional-or-keywordAny

Returns: None

Attributes

AttributeTypeNotes
tokensTokensAPI
accountsAccountsAPI

Methods

session() -> SessionInfo

How this client's identity was established.

This callable takes no public parameters.

Returns: SessionInfo

Raises:

Module caliber_sdk.resources.system

Identity, capabilities, and settings — the deployment-level surfaces.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

CapabilitiesAPI, MeAPI, SettingsAPI

Classes

MeAPI

class MeAPI()

The caller's own identity.

Methods

get() -> Identity

Resolve this client's identity and scopes.

Reports rather than requires: an invalid or revoked credential returns an anonymous identity instead of raising. Check :attr:Identity.is_anonymous; do not rely on an exception.

This callable takes no public parameters.

Returns: Identity

Raises:

CapabilitiesAPI

class CapabilitiesAPI()

Runtime feature flags and API stability tiers.

Methods

get() -> Capabilities

Fetch one record from the runtime capabilities surface identified by id.

This callable takes no public parameters.

Returns: Capabilities

Raises:

SettingsAPI

class SettingsAPI()

Runtime configuration inventory and LLM credential status.

Methods

runtime() -> RuntimeSettings

Return the current runtime settings snapshot for the deployment.

This callable takes no public parameters.

Returns: RuntimeSettings

Raises:

llm() -> LlmSetupStatus

Which LLM credentials are configured.

Presence flags and masked fingerprints only — the endpoint does not disclose key values, deliberately.

This callable takes no public parameters.

Returns: LlmSetupStatus

Raises:

update_llm(**changes) -> Any

Write LLM provider settings. Secrets are write-only on the server.

ParameterKindTypeDefault
changesvar-keywordAny

Returns: Any

Raises:

Module caliber_sdk.resources.projects

Projects and their files — the workspace-scoping surface.

Tested example

def prompt_lifecycle(
    caliber: CaliberClient, *, agent_id: str = "intake-classifier"
From sdk/caliber-sdk/examples/prompt_lifecycle.py — executed by the SDK test suite.

Public exports

ProjectFilesAPI, ProjectsAPI

Classes

ProjectFilesAPI

class ProjectFilesAPI()

Files inside one project.

Methods

list(project_id: str) -> tuple[list[ProjectFile], list[ProjectFolder]]

Files and the directories containing them.

Returned as a pair rather than one flattened list: a directory is not a file, and collapsing them would make an empty folder indistinguishable from a missing one.

ParameterKindTypeDefault
project_idpositional-or-keywordstr

Returns: tuple[list[ProjectFile], list[ProjectFolder]] — see ProjectFile, ProjectFolder

Raises:

upload(project_id: str, *, filename: str, content: bytes | BinaryIO, path: str | None = None, kind: str = 'input', media_type: str | None = None) -> ProjectFile

Upload a file. Multipart, so it does not go through the JSON path.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
filenamekeyword-onlystr
contentkeyword-only`bytesBinaryIO`
pathkeyword-only`strNone`None
kindkeyword-onlystr'input'
media_typekeyword-only`strNone`None

Returns: ProjectFile

Raises:

create_folder(project_id: str, path: str) -> ProjectFolder

Operate on the project files and folders surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
pathpositional-or-keywordstr

Returns: ProjectFolder

Raises:

delete(project_id: str, file_id: str) -> bool

Delete a record on the project files and folders surface and return the server acknowledgement. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
file_idpositional-or-keywordstr

Returns: bool

Raises:

download(project_id: str, file_id: str) -> bytes

Raw bytes. Not JSON, so it bypasses the envelope entirely.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
file_idpositional-or-keywordstr

Returns: bytes

Raises:

ProjectsAPI

class ProjectsAPI(transport)

Projects, project access, and the file sub-resource.

Related APIs: ProjectFilesAPI

Constructor

__init__(transport) -> None

Operate on the projects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
transportpositional-or-keywordAny

Returns: None

Attributes

AttributeTypeNotes
filesProjectFilesAPI

Methods

list(*, status: str | None = None) -> list[Project]

Active projects by default; pass `status="all"` for everything.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[Project]

Raises:

get(project_id: str) -> Project

Fetch one record from the projects surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr

Returns: Project

Raises:

create(name: str, *, description: str | None = None) -> Project

Create a new record on the projects surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
namepositional-or-keywordstr
descriptionkeyword-only`strNone`None

Returns: Project

Raises:

update(project_id: str, *, name: str | None = None, description: str | None = None, status: str | None = None) -> Project

Patch an existing record on the projects surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
namekeyword-only`strNone`None
descriptionkeyword-only`strNone`None
statuskeyword-only`strNone`None

Returns: Project

Raises:

list_members(project_id: str) -> list[ProjectMember]

List active members and their effective project roles.

ParameterKindTypeDefault
project_idpositional-or-keywordstr

Returns: list[ProjectMember]

Raises:

add_member(project_id: str, user_id: str, *, role: str = 'viewer') -> ProjectMember

Grant `user_id` a project role; only owners may manage members.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
user_idpositional-or-keywordstr
rolekeyword-onlystr'viewer'

Returns: ProjectMember

Raises:

update_member(project_id: str, user_id: str, *, role: str | None = None, status: str | None = None) -> ProjectMember

Change a member's role or active status.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
user_idpositional-or-keywordstr
rolekeyword-only`strNone`None
statuskeyword-only`strNone`None

Returns: ProjectMember

Raises:

remove_member(project_id: str, user_id: str) -> bool

Deactivate a member; the project owner cannot be removed.

ParameterKindTypeDefault
project_idpositional-or-keywordstr
user_idpositional-or-keywordstr

Returns: bool

Raises:

storage() -> Any

Where project files live, and what else the deployment supports.

This callable takes no public parameters.

Returns: Any

Raises:

Module caliber_sdk.resources.assets

Prompts, skills, and tools — the governed asset families.

Tested example

def prompt_lifecycle(
    caliber: CaliberClient, *, agent_id: str = "intake-classifier"
From sdk/caliber-sdk/examples/prompt_lifecycle.py — executed by the SDK test suite.

Public exports

PromptsAPI, SkillsAPI, ToolsAPI

Classes

PromptsAPI

class PromptsAPI()

Prompt registry surfaces.

Prompts are MLflow registry objects that CALIBER governs. Versions are immutable and an alias points at one of them, so "update a prompt" is always "register a new version", never an edit in place.

Usage example

def prompt_lifecycle(
    caliber: CaliberClient, *, agent_id: str = "intake-classifier"
From sdk/caliber-sdk/examples/prompt_lifecycle.py — executed by the SDK test suite.

Related APIs: EvaluationsAPI, ReviewQueuesAPI

Methods

list() -> list[Prompt]

Return the current collection of prompts and prompt versions, applying any supported filters.

This callable takes no public parameters.

Returns: list[Prompt]

Raises:

get(agent_id: str) -> Prompt

Fetch one record from the prompts and prompt versions surface identified by agent_id.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr

Returns: Prompt

Raises:

create(name: str, template: str, *, commit_message: str | None = None) -> Any

Register a prompt and its first version.

ParameterKindTypeDefault
namepositional-or-keywordstr
templatepositional-or-keywordstr
commit_messagekeyword-only`strNone`None

Returns: Any

Raises:

versions(agent_id: str) -> Any

Every registered version, newest first.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr

Returns: Any

Raises:

register_version(agent_id: str, template: str, *, commit_message: str | None = None) -> Any

Add a version without touching the live alias.

The alias is rotated separately by :meth:promote, so authoring is never a deployment — the property the whole refinement loop depends on.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr
templatepositional-or-keywordstr
commit_messagekeyword-only`strNone`None

Returns: Any

Raises:

promote(agent_id: str, version: int, *, alias: str = 'prod') -> Any

Point an alias at a version. This is the deployment step.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr
versionpositional-or-keywordint
aliaskeyword-onlystr'prod'

Returns: Any

Raises:

SkillsAPI

class SkillsAPI()

Skill registry, rendering, selection testing, and versions.

Related APIs: JudgesAPI, EvaluationsAPI

Methods

list(*, status: str | None = None, tag: str | None = None) -> list[Skill]

Return the current collection of skills, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None
tagkeyword-only`strNone`None

Returns: list[Skill]

Raises:

get(skill_id: str) -> Skill

Fetch one record from the skills surface identified by skill_id.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr

Returns: Skill

Raises:

create(name: str, *, content: str, owner: str, summary: str | None = None, description: str | None = None, tags: Sequence[str] | None = None) -> Skill

Create a skill.

`owner` is required by the server and is therefore keyword-required here rather than defaulted to the caller's identity: a skill's owner is a governance field, and quietly inferring it would make authorship an accident of which credential happened to run the script.

ParameterKindTypeDefault
namepositional-or-keywordstr
contentkeyword-onlystr
ownerkeyword-onlystr
summarykeyword-only`strNone`None
descriptionkeyword-only`strNone`None
tagskeyword-only`Sequence[str]None`None

Returns: Skill

Raises:

update(skill_id: str, **changes) -> Skill

Patch an existing record on the skills surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr
changesvar-keywordAny

Returns: Skill

Raises:

render(skill_id: str, *, variables: dict[str, Any] | None = None) -> SkillRender

Substitute `{{variables}}` and report what was left unresolved.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr
variableskeyword-only`dict[str, Any]None`None

Returns: SkillRender

Raises:

test_selection(skill_id: str, query: str) -> SkillSelection

Would this skill be auto-selected for this query?

ParameterKindTypeDefault
skill_idpositional-or-keywordstr
querypositional-or-keywordstr

Returns: SkillSelection

Raises:

versions(skill_id: str) -> list[SkillVersion]

Operate on the skills surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr

Returns: list[SkillVersion]

Raises:

ToolsAPI

class ToolsAPI()

Tool registry, fixtures, and calibration.

Methods

list(*, status: str | None = None) -> list[Tool]

Return the current collection of tools and calibration cases, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[Tool]

Raises:

get(tool_id: str) -> Tool

Fetch one record from the tools and calibration cases surface identified by tool_id.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr

Returns: Tool

Raises:

register(name: str, *, version: str, module_path: str, callable_name: str, input_schema: dict[str, Any] | None = None, output_schema: dict[str, Any] | None = None, **options) -> Tool

Operate on the tools and calibration cases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
namepositional-or-keywordstr
versionkeyword-onlystr
module_pathkeyword-onlystr
callable_namekeyword-onlystr
input_schemakeyword-only`dict[str, Any]None`None
output_schemakeyword-only`dict[str, Any]None`None
optionsvar-keywordAny

Returns: Tool

Raises:

update(tool_id: str, **changes) -> Tool

Patch an existing record on the tools and calibration cases surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr
changesvar-keywordAny

Returns: Tool

Raises:

calibrate(tool_id: str, **options) -> CalibrationJob

Queue a calibration run. Returns immediately with a job to poll.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: CalibrationJob

Raises:

calibration_job(tool_id: str, job_id: str) -> CalibrationJob

Operate on the tools and calibration cases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr
job_idpositional-or-keywordstr

Returns: CalibrationJob

Raises:

calibration_jobs(tool_id: str) -> list[CalibrationJob]

Operate on the tools and calibration cases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr

Returns: list[CalibrationJob]

Raises:

wait_for_calibration(tool_id: str, job_id: str, *, timeout: float = 600.0, **options) -> CalibrationJob

Poll a calibration job until it stops.

Returns the terminal job rather than raising on failure: a failed calibration is a result to inspect, not an error in the call.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr
job_idpositional-or-keywordstr
timeoutkeyword-onlyfloat600.0
optionsvar-keywordAny

Returns: CalibrationJob

Raises:

Module caliber_sdk.resources.workflows

Workflows, versions, runs, deployments, and services.

Tested example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Public exports

WorkflowRunFailed, WorkflowRunsAPI, WorkflowServicesAPI, WorkflowVersionsAPI, WorkflowsAPI

Classes

WorkflowRunFailed

class WorkflowRunFailed(run: WorkflowRun)

Bases: CaliberError

A run reached a terminal state that is not success.

Constructor

__init__(run: WorkflowRun) -> None

Operate on the workflow run failed surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
runpositional-or-keywordWorkflowRun

Returns: None

Attributes

AttributeTypeNotes
runAny
WorkflowVersionsAPI

class WorkflowVersionsAPI()

Immutable manifest snapshots of one workflow.

Related APIs: WorkflowsAPI, WorkflowRunsAPI, WorkflowServicesAPI

Methods

list(workflow_id: str) -> list[WorkflowVersion]

Return the current collection of workflow versions, applying any supported filters.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr

Returns: list[WorkflowVersion]

Raises:

get(version_id: str) -> WorkflowVersion

Fetch one record from the workflow versions surface identified by version_id.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: WorkflowVersion

Raises:

create(workflow_id: str, manifest: dict[str, Any]) -> WorkflowVersion

Register a draft version. Drafts are not runnable until published.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr
manifestpositional-or-keyworddict[str, Any]

Returns: WorkflowVersion

Raises:

validate(version_id: str) -> Any

Validation report for a version's manifest.

Returned untyped on purpose: the report is produced by the server's validator, and a schema here would be a second definition of a contract that lives there.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: Any

Raises:

compile(version_id: str) -> Any

Ask the server to compile the draft workflow or asset into its executable form.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: Any

Raises:

publish(version_id: str) -> WorkflowVersion

Promote the draft or version into the published state used by operators or runtime callers.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: WorkflowVersion

Raises:

WorkflowRunsAPI

class WorkflowRunsAPI()

Executions, and waiting on them.

Usage example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Related APIs: WorkflowsAPI, WorkflowVersionsAPI, WorkflowServicesAPI

Methods

list(workflow_id: str, *, status: str | None = None) -> list[WorkflowRun]

Runs of one workflow.

Scoped to a workflow because the server has no unscoped run listing: `/workflow-runs` is POST-only (submission). An SDK method implying otherwise returned 405 at runtime, which is how this was found.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr
statuskeyword-only`strNone`None

Returns: list[WorkflowRun]

Raises:

get(run_id: str) -> WorkflowRun

Fetch one record from the workflow runs surface identified by run_id.

ParameterKindTypeDefault
run_idpositional-or-keywordstr

Returns: WorkflowRun

Raises:

submit(*, workflow_version_id: str | None = None, workflow_id: str | None = None, alias: str | None = None, input = None, idempotency_key: str | None = None, **options) -> WorkflowRun

Queue a run. Returns immediately with a run to poll.

A run targets either a specific version or a workflow plus a deployment alias — the server accepts both, and forcing one here would make the alias path unreachable, which is how a deployed workflow is invoked.

`idempotency_key` is passed through because submission is the one mutating call the SDK cannot safely retry on its own.

ParameterKindTypeDefault
workflow_version_idkeyword-only`strNone`None
workflow_idkeyword-only`strNone`None
aliaskeyword-only`strNone`None
inputkeyword-onlyAnyNone
idempotency_keykeyword-only`strNone`None
optionsvar-keywordAny

Returns: WorkflowRun

Raises:

cancel(run_id: str) -> WorkflowRun

Operate on the workflow runs surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
run_idpositional-or-keywordstr

Returns: WorkflowRun

Raises:

wait(run_id: str, *, timeout: float = 900.0, raise_on_failure: bool = True, **options) -> WorkflowRun

Poll until the run stops.

Raises by default, unlike calibration: a script that submitted work and got a failure almost always wants to stop, whereas a calibration score is the thing being measured. Pass `raise_on_failure=False` to inspect instead.

ParameterKindTypeDefault
run_idpositional-or-keywordstr
timeoutkeyword-onlyfloat900.0
raise_on_failurekeyword-onlyboolTrue
optionsvar-keywordAny

Returns: WorkflowRun

Raises:

WorkflowServicesAPI

class WorkflowServicesAPI()

Workflows published as external HTTP services.

The server splits this in two, and so does this class. Management lives under `/workflows/{id}/service — configuring and publishing is a property of the workflow. *Invocation* lives under /services/{id}` — that is the external surface, authenticated by per-service tokens rather than a user credential.

There is no unscoped service listing; a service is reached through its workflow. An earlier version of this class invented `GET /services` and returned 404 at runtime.

Related APIs: WorkflowsAPI, WorkflowVersionsAPI

Methods

get(workflow_id: str) -> WorkflowService

Fetch one record from the workflow services surface identified by workflow_id.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr

Returns: WorkflowService

Raises:

publish(workflow_id: str, **options) -> WorkflowService

Promote the draft or version into the published state used by operators or runtime callers.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: WorkflowService

Raises:

unpublish(workflow_id: str) -> bool

Remove the published state from the targeted runtime asset.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr

Returns: bool

Raises:

openapi(workflow_id: str) -> Any

The per-workflow OpenAPI document the service surface publishes.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr

Returns: Any

Raises:

invoke(workflow_id: str, payload = None, **options) -> Any

Call a published service.

The external surface: in production this is authenticated by a per-service token rather than the user credential the rest of this client carries.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr
payloadpositional-or-keywordAnyNone
optionsvar-keywordAny

Returns: Any

Raises:

WorkflowsAPI

class WorkflowsAPI(transport)

Workflows, plus versions, runs, and services as sub-resources.

Usage example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Related APIs: WorkflowVersionsAPI, WorkflowRunsAPI, WorkflowServicesAPI

Constructor

__init__(transport) -> None

Operate on the workflows surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
transportpositional-or-keywordAny

Returns: None

Attributes

AttributeTypeNotes
versionsWorkflowVersionsAPI
runsWorkflowRunsAPI
servicesWorkflowServicesAPI

Methods

list(*, status: str | None = None) -> list[Workflow]

Return the current collection of workflows, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[Workflow]

Raises:

get(workflow_id: str) -> Workflow

Fetch one record from the workflows surface identified by workflow_id.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr

Returns: Workflow

Raises:

create(name: str, *, description: str | None = None, **options) -> Workflow

Create a new record on the workflows surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
namepositional-or-keywordstr
descriptionkeyword-only`strNone`None
optionsvar-keywordAny

Returns: Workflow

Raises:

update(workflow_id: str, **changes) -> Workflow

Patch an existing record on the workflows surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr
changesvar-keywordAny

Returns: Workflow

Raises:

delete(workflow_id: str) -> Any

Delete a record on the workflows surface and return the server acknowledgement. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr

Returns: Any

Raises:

Module caliber_sdk.resources.quality

Datasets, judges, and evaluations — the evidence and scoring surfaces.

Tested example

def build_and_score(caliber: CaliberClient, *, owner: str = "@you") -> dict[str, Any]:
    """Create a dataset, add a row, define a judge, and run an evaluation."""
    dataset = caliber.datasets.create("intake-golden", owner=owner)
    caliber.datasets.add_example(
        dataset.dataset_id,
        inputs={"ticket": "I was charged twice"},
        expected={"intent": "billing"},
    )

    # Instructions must reference an evaluation variable. A judge with no
    # variable grades nothing — it returns the same verdict every time — so
    # the server rejects it rather than letting you collect meaningless scores.
    judge = caliber.judges.create(
        "valid-intent",
        instructions="Given {{ inputs }} and {{ outputs }}, return true if intent is allowed.",
        feedback_value_type="bool",
    )

    evaluation = caliber.evaluations.create(dataset.dataset_id, judge_id=judge.judge_id)
    return {
        "dataset_id": dataset.dataset_id,
        "judge_id": judge.judge_id,
        "evaluation_id": evaluation.evaluation_id,
    }
From sdk/caliber-sdk/examples/evaluation.py — executed by the SDK test suite.

Public exports

EvalDatasetsAPI, EvaluationsAPI, JudgesAPI

Classes

EvalDatasetsAPI

class EvalDatasetsAPI()

Versioned evaluation datasets and their examples.

Usage example

def build_and_score(caliber: CaliberClient, *, owner: str = "@you") -> dict[str, Any]:
    """Create a dataset, add a row, define a judge, and run an evaluation."""
    dataset = caliber.datasets.create("intake-golden", owner=owner)
    caliber.datasets.add_example(
        dataset.dataset_id,
        inputs={"ticket": "I was charged twice"},
        expected={"intent": "billing"},
    )

    # Instructions must reference an evaluation variable. A judge with no
    # variable grades nothing — it returns the same verdict every time — so
    # the server rejects it rather than letting you collect meaningless scores.
    judge = caliber.judges.create(
        "valid-intent",
        instructions="Given {{ inputs }} and {{ outputs }}, return true if intent is allowed.",
        feedback_value_type="bool",
    )

    evaluation = caliber.evaluations.create(dataset.dataset_id, judge_id=judge.judge_id)
    return {
        "dataset_id": dataset.dataset_id,
        "judge_id": judge.judge_id,
        "evaluation_id": evaluation.evaluation_id,
    }
From sdk/caliber-sdk/examples/evaluation.py — executed by the SDK test suite.

Related APIs: EvaluationsAPI, JudgesAPI, ReviewQueuesAPI

Methods

list(*, status: str | None = None) -> list[EvalDataset]

Return the current collection of evaluation datasets, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[EvalDataset]

Raises:

get(dataset_id: str) -> EvalDataset

Fetch one record from the evaluation datasets surface identified by dataset_id.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr

Returns: EvalDataset

Raises:

create(name: str, *, owner: str, description: str | None = None, **options) -> EvalDataset

Create a dataset.

`owner` is required by the server and kept keyword-required here for the same reason as skills: ownership is a governance field, not something to infer from whichever credential ran the script.

ParameterKindTypeDefault
namepositional-or-keywordstr
ownerkeyword-onlystr
descriptionkeyword-only`strNone`None
optionsvar-keywordAny

Returns: EvalDataset

Raises:

add_example(dataset_id: str, *, inputs, expected = None, **options) -> EvalExample

Append one labeled example row to the targeted evaluation dataset.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr
inputskeyword-onlyAny
expectedkeyword-onlyAnyNone
optionsvar-keywordAny

Returns: EvalExample

Raises:

examples(dataset_id: str) -> list[EvalExample]

Return the example rows currently stored for the targeted evaluation dataset.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr

Returns: list[EvalExample]

Raises:

add_from_trace(dataset_id: str, trace_id: str, **options) -> EvalExample

Capture a production trace as a dataset row.

The path that turns an observed failure into evidence, which is where the refinement loop starts.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr
trace_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: EvalExample

Raises:

JudgesAPI

class JudgesAPI()

Model-backed graders and their human alignment.

Usage example

def build_and_score(caliber: CaliberClient, *, owner: str = "@you") -> dict[str, Any]:
    """Create a dataset, add a row, define a judge, and run an evaluation."""
    dataset = caliber.datasets.create("intake-golden", owner=owner)
    caliber.datasets.add_example(
        dataset.dataset_id,
        inputs={"ticket": "I was charged twice"},
        expected={"intent": "billing"},
    )

    # Instructions must reference an evaluation variable. A judge with no
    # variable grades nothing — it returns the same verdict every time — so
    # the server rejects it rather than letting you collect meaningless scores.
    judge = caliber.judges.create(
        "valid-intent",
        instructions="Given {{ inputs }} and {{ outputs }}, return true if intent is allowed.",
        feedback_value_type="bool",
    )

    evaluation = caliber.evaluations.create(dataset.dataset_id, judge_id=judge.judge_id)
    return {
        "dataset_id": dataset.dataset_id,
        "judge_id": judge.judge_id,
        "evaluation_id": evaluation.evaluation_id,
    }
From sdk/caliber-sdk/examples/evaluation.py — executed by the SDK test suite.

Methods

list() -> list[Judge]

Return the current collection of judges and alignment assets, applying any supported filters.

This callable takes no public parameters.

Returns: list[Judge]

Raises:

get(judge_id: str) -> Judge

Fetch one record from the judges and alignment assets surface identified by judge_id.

ParameterKindTypeDefault
judge_idpositional-or-keywordstr

Returns: Judge

Raises:

create(name: str, *, instructions: str, feedback_value_type: str = 'bool', model: str | None = None, **options) -> Judge

Create a model-backed grader.

`instructions must reference at least one evaluation variable — {{ inputs }}, {{ outputs }}, {{ expectations }}, {{ conversation }}, or {{ trace }}` — or the server rejects it. The rule exists because a judge with no variable grades nothing: it would return the same verdict for every example.

`feedback_value_type defaults to bool`. A numeric judge is not interchangeable with a boolean one downstream, so scorecards read this field to know which they have.

ParameterKindTypeDefault
namepositional-or-keywordstr
instructionskeyword-onlystr
feedback_value_typekeyword-onlystr'bool'
modelkeyword-only`strNone`None
optionsvar-keywordAny

Returns: Judge

Raises:

test(judge_id: str, **payload) -> Any

Run a judge against sample input without recording a scorecard.

ParameterKindTypeDefault
judge_idpositional-or-keywordstr
payloadvar-keywordAny

Returns: Any

Raises:

alignment(judge_id: str, **payload) -> JudgeAlignment

Agreement with human labels.

Read `kappa, not agreement`: a judge that always answers the same way agrees with a skewed sample while measuring nothing.

ParameterKindTypeDefault
judge_idpositional-or-keywordstr
payloadvar-keywordAny

Returns: JudgeAlignment

Raises:

EvaluationsAPI

class EvaluationsAPI()

Scored runs over datasets.

Usage example

def build_and_score(caliber: CaliberClient, *, owner: str = "@you") -> dict[str, Any]:
    """Create a dataset, add a row, define a judge, and run an evaluation."""
    dataset = caliber.datasets.create("intake-golden", owner=owner)
    caliber.datasets.add_example(
        dataset.dataset_id,
        inputs={"ticket": "I was charged twice"},
        expected={"intent": "billing"},
    )

    # Instructions must reference an evaluation variable. A judge with no
    # variable grades nothing — it returns the same verdict every time — so
    # the server rejects it rather than letting you collect meaningless scores.
    judge = caliber.judges.create(
        "valid-intent",
        instructions="Given {{ inputs }} and {{ outputs }}, return true if intent is allowed.",
        feedback_value_type="bool",
    )

    evaluation = caliber.evaluations.create(dataset.dataset_id, judge_id=judge.judge_id)
    return {
        "dataset_id": dataset.dataset_id,
        "judge_id": judge.judge_id,
        "evaluation_id": evaluation.evaluation_id,
    }
From sdk/caliber-sdk/examples/evaluation.py — executed by the SDK test suite.

Related APIs: EvalDatasetsAPI, JudgesAPI, ReviewQueuesAPI

Methods

list(*, dataset_id: str | None = None) -> list[Evaluation]

Return the current collection of evaluation runs, applying any supported filters.

ParameterKindTypeDefault
dataset_idkeyword-only`strNone`None

Returns: list[Evaluation]

Raises:

get(evaluation_id: str) -> Evaluation

Fetch one record from the evaluation runs surface identified by evaluation_id.

ParameterKindTypeDefault
evaluation_idpositional-or-keywordstr

Returns: Evaluation

Raises:

create(dataset_id: str, **options) -> Evaluation

Create a new record on the evaluation runs surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: Evaluation

Raises:

wait(evaluation_id: str, *, timeout: float = 900.0, **options) -> Evaluation

Poll until the evaluation stops.

Returns the terminal evaluation rather than raising: a low score is the measurement, not an error in the call.

ParameterKindTypeDefault
evaluation_idpositional-or-keywordstr
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny

Returns: Evaluation

Raises:

Module caliber_sdk.resources.integrations

MCP servers, the LLM gateway, knowledge bases, and object storage.

Tested example

def install_ready_cookbook(caliber: CaliberClient) -> dict[str, Any]:
    """Install the first cookbook whose prerequisites are already satisfied.

    Readiness is checked before installing rather than after failing: the
    recipe's unmet checks name what is missing, and each one that can be fixed
    carries the route that fixes it.
    """
    recipes = caliber.cookbooks.list()
    ready = [recipe for recipe in recipes if recipe.is_ready]
    if not ready:
        blocked = {
            recipe.id: [check.get("label") for check in recipe.unmet_checks] for recipe in recipes
        }
        return {"installed": None, "blocked_by": blocked}

    recipe = ready[0]
    result = caliber.cookbooks.install(recipe.id, name=f"{recipe.title} (SDK)")
    # Installed paused, never running: an example manifest can carry model,
    # connector, or side-effect bindings an operator should review first.
    workflow = result.get("workflow") if isinstance(result, dict) else None
    return {
        "installed": recipe.id,
        "workflow_status": (workflow or {}).get("status"),
    }
From sdk/caliber-sdk/examples/agentic.py — executed by the SDK test suite.

Public exports

GatewayAPI, KnowledgeBasesAPI, McpServersAPI, ObjectStoreAPI, OpenApiIntegrationsAPI

Classes

McpServersAPI

class McpServersAPI()

Managed MCP server definitions and governed tool use.

Related APIs: ToolsAPI, GatewayAPI

Methods

list() -> list[McpServer]

Return the current collection of MCP servers and governed tools, applying any supported filters.

This callable takes no public parameters.

Returns: list[McpServer]

Raises:

get(server_id: str) -> McpServer

Fetch one record from the MCP servers and governed tools surface identified by server_id.

ParameterKindTypeDefault
server_idpositional-or-keywordstr

Returns: McpServer

Raises:

history(server_id: str) -> Any

Return the recorded history for the targeted managed integration.

ParameterKindTypeDefault
server_idpositional-or-keywordstr

Returns: Any

Raises:

create(name: str, **options) -> McpServer

Create a new record on the MCP servers and governed tools surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
namepositional-or-keywordstr
optionsvar-keywordAny

Returns: McpServer

Raises:

update(server_id: str, **changes) -> McpServer

Patch an existing record on the MCP servers and governed tools surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
server_idpositional-or-keywordstr
changesvar-keywordAny

Returns: McpServer

Raises:

delete(server_id: str) -> Any

Delete a record on the MCP servers and governed tools surface and return the server acknowledgement. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
server_idpositional-or-keywordstr

Returns: Any

Raises:

test_connection(server_id: str) -> Any

Probe the server now, rather than trusting the last known state.

ParameterKindTypeDefault
server_idpositional-or-keywordstr

Returns: Any

Raises:

discover_tools(server_id: str) -> Any

Refresh the tool inventory from the remote server.

ParameterKindTypeDefault
server_idpositional-or-keywordstr

Returns: Any

Raises:

tools(server_id: str) -> Any

The tool inventory as last discovered.

ParameterKindTypeDefault
server_idpositional-or-keywordstr

Returns: Any

Raises:

update_tool_policy(server_id: str, tool_name: str, **policy) -> Any

Write the policy overlay that governs one discovered tool.

ParameterKindTypeDefault
server_idpositional-or-keywordstr
tool_namepositional-or-keywordstr
policyvar-keywordAny

Returns: Any

Raises:

save_test_cases(server_id: str, tool_name: str, test_cases: list[dict[str, Any]]) -> Any

Persist deterministic calibration cases for the targeted integration tool.

ParameterKindTypeDefault
server_idpositional-or-keywordstr
tool_namepositional-or-keywordstr
test_casespositional-or-keywordlist[dict[str, Any]]

Returns: Any

Raises:

calibrate_tool(server_id: str, tool_name: str) -> Any

Start or run the calibration pass for the targeted integration tool.

ParameterKindTypeDefault
server_idpositional-or-keywordstr
tool_namepositional-or-keywordstr

Returns: Any

Raises:

invoke_tool(server_id: str, tool_name: str, arguments = None) -> Any

Call a remote tool through CALIBER's governed egress path.

Routed through the server rather than called directly, which is what makes tool policy, secret resolution, and audit apply at all.

ParameterKindTypeDefault
server_idpositional-or-keywordstr
tool_namepositional-or-keywordstr
argumentspositional-or-keywordAnyNone

Returns: Any

Raises:

OpenApiIntegrationsAPI

class OpenApiIntegrationsAPI()

Governed OpenAPI import, curation, and publication.

The control-plane pipeline is: create an integration shell, import a pinned spec version into it, review the normalized operations and detected dependencies, generate tool drafts from selected operations, then publish an approved draft into CALIBER's tool registry. Importing a spec never creates a runtime tool by itself — `generate_tool_drafts and publish_tool_draft` are the two explicit steps that do.

Related APIs: ToolsAPI, McpServersAPI

Methods

list(*, status: str | None = None) -> list[OpenApiIntegration]

Return the current collection of OpenAPI integrations, tool drafts, and dependency graph, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[OpenApiIntegration]

Raises:

get(integration_id: str) -> OpenApiIntegration

Fetch one record from the OpenAPI integrations, tool drafts, and dependency graph surface identified by integration_id.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr

Returns: OpenApiIntegration

Raises:

create(name: str, **options) -> OpenApiIntegration

Create a new record on the OpenAPI integrations, tool drafts, and dependency graph surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
namepositional-or-keywordstr
optionsvar-keywordAny

Returns: OpenApiIntegration

Raises:

update(integration_id: str, **changes) -> OpenApiIntegration

Patch an existing record on the OpenAPI integrations, tool drafts, and dependency graph surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
changesvar-keywordAny

Returns: OpenApiIntegration

Raises:

archive(integration_id: str) -> OpenApiIntegration

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr

Returns: OpenApiIntegration

Raises:

import_spec(integration_id: str, *, spec_text: str | None = None, spec_base64: str | None = None, spec_url: str | None = None, source_ref: str | None = None) -> OpenApiIntegrationVersion

Import one OpenAPI 3.x document, pinning it as a new version.

Exactly one of `spec_text (pasted JSON/YAML), spec_base64 (an uploaded file), or spec_url` (fetched over CALIBER's guarded egress path) must be given.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
spec_textkeyword-only`strNone`None
spec_base64keyword-only`strNone`None
spec_urlkeyword-only`strNone`None
source_refkeyword-only`strNone`None

Returns: OpenApiIntegrationVersion

Raises:

reimport(integration_id: str) -> Any

Re-fetch the last imported version's `url` source and diff it.

Only meaningful when the last imported version came from `spec_url`; an inline or uploaded spec has nothing live to re-fetch.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr

Returns: Any

Raises:

validate_spec_source(integration_id: str, *, spec_url: str, source_kind: str = 'url') -> Any

Check whether a spec source is reachable and permitted, without importing it.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
spec_urlkeyword-onlystr
source_kindkeyword-onlystr'url'

Returns: Any

Raises:

versions(integration_id: str) -> list[OpenApiIntegrationVersion]

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr

Returns: list[OpenApiIntegrationVersion]

Raises:

version(integration_id: str, version_id: str) -> OpenApiIntegrationVersion

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
version_idpositional-or-keywordstr

Returns: OpenApiIntegrationVersion

Raises:

diff_version(integration_id: str, version_id: str, *, compare_to_version_id: str | None = None) -> Any

Diff one pinned version against another, defaulting to its predecessor.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
version_idpositional-or-keywordstr
compare_to_version_idkeyword-only`strNone`None

Returns: Any

Raises:

list_operations(integration_id: str, *, version_id: str | None = None) -> list[OpenApiOperation]

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
version_idkeyword-only`strNone`None

Returns: list[OpenApiOperation]

Raises:

get_operation(integration_id: str, operation_id: str) -> OpenApiOperation

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
operation_idpositional-or-keywordstr

Returns: OpenApiOperation

Raises:

list_dependencies(integration_id: str, *, version_id: str | None = None, status: str | None = None) -> list[OpenApiOperationDependency]

Canonical dependency rows — the source of truth the API graph derives from.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
version_idkeyword-only`strNone`None
statuskeyword-only`strNone`None

Returns: list[OpenApiOperationDependency]

Raises:

review_dependency(integration_id: str, dependency_id: str, *, status: str, notes: str | None = None) -> OpenApiOperationDependency

Confirm or reject one suggested/advisory dependency (`status is "confirmed" or "rejected"`). A high-confidence, already auto-wired row cannot be reviewed.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
dependency_idpositional-or-keywordstr
statuskeyword-onlystr
noteskeyword-only`strNone`None

Returns: OpenApiOperationDependency

Raises:

graph(integration_id: str, *, version_id: str | None = None) -> Any

The derived API dependency graph (nodes/edges) for planning and display.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
version_idkeyword-only`strNone`None

Returns: Any

Raises:

generate_tool_drafts(integration_id: str, *, operation_ids: list[str] | None = None, tags: list[str] | None = None, methods: list[str] | None = None, path_prefix: str | None = None, group_as_pack: bool = False, version_id: str | None = None, server_url: str | None = None, auth_binding: dict[str, Any] | None = None, requires_approval: bool = False, allow_in_preview: bool = False) -> list[OpenApiToolDraft]

Generate one or more curated tool drafts from selected operations.

Select operations by id, or by filter (`tags/methods/path_prefix) — useful for a large spec without enumerating every id by hand. With group_as_pack=True` and more than one selected operation, all of them are bound into a single tool-pack draft instead of one draft each.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
operation_idskeyword-only`list[str]None`None
tagskeyword-only`list[str]None`None
methodskeyword-only`list[str]None`None
path_prefixkeyword-only`strNone`None
group_as_packkeyword-onlyboolFalse
version_idkeyword-only`strNone`None
server_urlkeyword-only`strNone`None
auth_bindingkeyword-only`dict[str, Any]None`None
requires_approvalkeyword-onlyboolFalse
allow_in_previewkeyword-onlyboolFalse

Returns: list[OpenApiToolDraft]

Raises:

list_tool_drafts(integration_id: str) -> list[OpenApiToolDraft]

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr

Returns: list[OpenApiToolDraft]

Raises:

get_tool_draft(integration_id: str, draft_id: str) -> OpenApiToolDraft

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
draft_idpositional-or-keywordstr

Returns: OpenApiToolDraft

Raises:

update_tool_draft(integration_id: str, draft_id: str, **changes) -> OpenApiToolDraft

Operate on the OpenAPI integrations, tool drafts, and dependency graph surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
draft_idpositional-or-keywordstr
changesvar-keywordAny

Returns: OpenApiToolDraft

Raises:

preview_tool_draft(integration_id: str, draft_id: str, *, input: dict[str, Any] | None = None) -> Any

Run one real upstream call for an unpublished draft.

This is a live effect, not a simulation — refused unless the draft has `allow_in_preview` set, so an approval-gated write cannot be fired through preview before anyone approves it.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
draft_idpositional-or-keywordstr
inputkeyword-only`dict[str, Any]None`None

Returns: Any

Raises:

publish_tool_draft(integration_id: str, draft_id: str, *, name: str | None = None, description: str | None = None, version: str = '1.0') -> Any

Publish an approved draft into CALIBER's governed tool registry.

Returns `{"draft": ..., "tool": ...} — the tool is now reachable through the standard tool, workflow, and SDK tools` surfaces.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
draft_idpositional-or-keywordstr
namekeyword-only`strNone`None
descriptionkeyword-only`strNone`None
versionkeyword-onlystr'1.0'

Returns: Any

Raises:

validate_credential_binding(integration_id: str, *, auth_binding: dict[str, Any]) -> Any

Check whether an auth binding's secret references resolve, without publishing.

ParameterKindTypeDefault
integration_idpositional-or-keywordstr
auth_bindingkeyword-onlydict[str, Any]

Returns: Any

Raises:

GatewayAPI

class GatewayAPI()

External LLM gateway discovery, guardrails, and usage.

Methods

get() -> Any

Discovered endpoints and routing visibility.

This callable takes no public parameters.

Returns: Any

Raises:

usage(**params) -> Any

Trace-derived usage. Derived, not metered: it reports what was traced, so untraced calls are absent rather than zero.

ParameterKindTypeDefault
paramsvar-keywordAny

Returns: Any

Raises:

guardrails() -> Any

Return the configured gateway guardrails for the connected deployment.

This callable takes no public parameters.

Returns: Any

Raises:

guardrail_catalog() -> Any

What this deployment can enforce, versus what it does.

This callable takes no public parameters.

Returns: Any

Raises:

create_guardrail(**payload) -> Any

Create a new gateway guardrail from the supplied configuration payload.

ParameterKindTypeDefault
payloadvar-keywordAny

Returns: Any

Raises:

delete_guardrail(guardrail_id: str) -> Any

Delete the targeted gateway guardrail definition.

ParameterKindTypeDefault
guardrail_idpositional-or-keywordstr

Returns: Any

Raises:

attach_guardrail(endpoint_id: str, **payload) -> Any

Operate on the gateway policies and usage surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
endpoint_idpositional-or-keywordstr
payloadvar-keywordAny

Returns: Any

Raises:

KnowledgeBasesAPI

class KnowledgeBasesAPI()

Versioned RAG corpora, retrieval, and calibration.

Related APIs: ProjectsAPI, EvaluationsAPI

Methods

list(*, status: str | None = None) -> list[KnowledgeBase]

Return the current collection of knowledge bases, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[KnowledgeBase]

Raises:

get(knowledge_base_id: str) -> KnowledgeBase

Fetch one record from the knowledge bases surface identified by knowledge_base_id.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr

Returns: KnowledgeBase

Raises:

create(name: str, **options) -> KnowledgeBase

Create a new record on the knowledge bases surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
namepositional-or-keywordstr
optionsvar-keywordAny

Returns: KnowledgeBase

Raises:

update(knowledge_base_id: str, **changes) -> KnowledgeBase

Patch an existing record on the knowledge bases surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr
changesvar-keywordAny

Returns: KnowledgeBase

Raises:

delete(knowledge_base_id: str) -> Any

Delete a record on the knowledge bases surface and return the server acknowledgement. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr

Returns: Any

Raises:

options() -> Any

Embedding models and chunking strategies this deployment offers.

This callable takes no public parameters.

Returns: Any

Raises:

versions(knowledge_base_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr

Returns: Any

Raises:

create_version(knowledge_base_id: str, **payload) -> Any

Create a new version under the targeted top-level asset.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr
payloadvar-keywordAny

Returns: Any

Raises:

activate_version(knowledge_base_id: str, version_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr
version_idpositional-or-keywordstr

Returns: Any

Raises:

runs(knowledge_base_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr

Returns: Any

Raises:

run_events(run_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
run_idpositional-or-keywordstr

Returns: Any

Raises:

version(version_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: Any

Raises:

sync_version_to_age(version_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: Any

Raises:

sources(version_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: Any

Raises:

chunks(version_id: str, *, q: str | None = None, source_key: str | None = None, limit: int | None = None) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
version_idpositional-or-keywordstr
qkeyword-only`strNone`None
source_keykeyword-only`strNone`None
limitkeyword-only`intNone`None

Returns: Any

Raises:

entities(version_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: Any

Raises:

relationships(version_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
version_idpositional-or-keywordstr

Returns: Any

Raises:

graph(version_id: str, **params) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
version_idpositional-or-keywordstr
paramsvar-keywordAny

Returns: Any

Raises:

calibrate(knowledge_base_id: str, **options) -> Any

Start the calibration flow exposed by the knowledge bases surface.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: Any

Raises:

test_runs(knowledge_base_id: str, *, limit: int | None = None) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr
limitkeyword-only`intNone`None

Returns: Any

Raises:

test_run(test_run_id: str) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
test_run_idpositional-or-keywordstr

Returns: Any

Raises:

set_baseline(knowledge_base_id: str, **options) -> Any

Operate on the knowledge bases surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: Any

Raises:

rollback(knowledge_base_id: str, **options) -> Any

Roll back to a prior version.

Knowledge bases roll back by activation history, not by an alias restore — the semantics differ per asset family, and the server is the authority on what this one means.

ParameterKindTypeDefault
knowledge_base_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: Any

Raises:

query(**payload) -> Any

Run a query against the server-managed corpus or knowledge surface and return the response.

ParameterKindTypeDefault
payloadvar-keywordAny

Returns: Any

Raises:

ObjectStoreAPI

class ObjectStoreAPI()

S3/MinIO console operations.

Distinct from `projects.files`: that is CALIBER's managed file registry with lineage and immutable refs, this is the raw bucket browser underneath.

Methods

status() -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: Any

Raises:

buckets() -> list[Bucket]

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: list[Bucket]

Raises:

create_bucket(bucket: str) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr

Returns: Any

Raises:

delete_bucket(bucket: str) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr

Returns: Any

Raises:

listing(bucket: str, *, prefix: str | None = None, token: str | None = None, recursive: bool = False) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
prefixkeyword-only`strNone`None
tokenkeyword-only`strNone`None
recursivekeyword-onlyboolFalse

Returns: Any

Raises:

objects(bucket: str, *, prefix: str | None = None, token: str | None = None, recursive: bool = False) -> list[StoredObject]

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
prefixkeyword-only`strNone`None
tokenkeyword-only`strNone`None
recursivekeyword-onlyboolFalse

Returns: list[StoredObject]

Raises:

folders(bucket: str, *, prefix: str | None = None) -> list[str]

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
prefixkeyword-only`strNone`None

Returns: list[str]

Raises:

upload(bucket: str, *, filename: str, content: bytes, prefix: str | None = None, key: str | None = None, media_type: str | None = None) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
filenamekeyword-onlystr
contentkeyword-onlybytes
prefixkeyword-only`strNone`None
keykeyword-only`strNone`None
media_typekeyword-only`strNone`None

Returns: Any

Raises:

create_folder(bucket: str, name: str, *, prefix: str | None = None) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
namepositional-or-keywordstr
prefixkeyword-only`strNone`None

Returns: Any

Raises:

delete_objects(bucket: str, *, keys: list[str] | None = None, prefix: str | None = None) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
keyskeyword-only`list[str]None`None
prefixkeyword-only`strNone`None

Returns: Any

Raises:

download(bucket: str, key: str, *, disposition: str | None = None) -> bytes

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
keypositional-or-keywordstr
dispositionkeyword-only`strNone`None

Returns: bytes

Raises:

preview(bucket: str, key: str) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
keypositional-or-keywordstr

Returns: Any

Raises:

extract(bucket: str, key: str) -> Any

Extract text/structure from a stored document.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
keypositional-or-keywordstr

Returns: Any

Raises:

import_object(bucket: str, key: str, **options) -> Any

Register a stored object as a managed project file.

The bridge from raw storage into the governed registry, where it gains a content hash and lineage.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
keypositional-or-keywordstr
optionsvar-keywordAny

Returns: Any

Raises:

delete_object(bucket: str, key: str) -> Any

Operate on the object store buckets and objects surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
bucketpositional-or-keywordstr
keypositional-or-keywordstr

Returns: Any

Raises:

Module caliber_sdk.resources.operations

Jobs, review queues, Aria, releases, observability, audit, events, cookbooks.

Tested example

def plan_from_intent(caliber: CaliberClient, goal: str) -> dict[str, Any]:
    """State an intent, wait for Aria to plan it, and approve if it asks.

    ``wait_for_plan`` returns as soon as the plan pauses, because a paused plan
    makes no further progress on its own — polling past it would burn the whole
    timeout on the expected outcome.
    """
    detail = caliber.aria.create_plan(goal)
    settled = caliber.aria.wait_for_plan(detail.plan.plan_id, timeout=120)

    if settled.plan.needs_you:
        # The plan is waiting on a human decision. Approving is that decision,
        # made explicitly rather than inferred from the script continuing.
        caliber.aria.approve_plan(settled.plan.plan_id)
        settled = caliber.aria.execute_plan(settled.plan.plan_id)

    return {
        "plan_id": settled.plan.plan_id,
        "status": settled.plan.status,
        "steps": len(settled.steps),
    }
From sdk/caliber-sdk/examples/agentic.py — executed by the SDK test suite.

Public exports

AriaAPI, AuditAPI, CookbooksAPI, EventsAPI, JobsAPI, ObservabilityAPI, ReleasesAPI, ReviewQueuesAPI, SecretsAPI

Classes

JobsAPI

class JobsAPI()

Durable background jobs — refinement, calibration, reporting.

Methods

list(*, status: str | None = None) -> list[Job]

Return the current collection of background jobs, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[Job]

Raises:

get(job_id: str) -> Job

Fetch one record from the background jobs surface identified by job_id.

ParameterKindTypeDefault
job_idpositional-or-keywordstr

Returns: Job

Raises:

targets(job_id: str) -> Any

What applying this job would change.

ParameterKindTypeDefault
job_idpositional-or-keywordstr

Returns: Any

Raises:

apply(job_id: str, **options) -> Any

Apply a job's candidate. This is the human decision, made explicit.

ParameterKindTypeDefault
job_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: Any

Raises:

wait(job_id: str, *, timeout: float = 900.0, **options) -> Job

Poll until the job stops or stops for a person.

`awaits_human counts as done here on purpose. A refinement job that reaches candidate_ready` will never advance on its own, so a waiter that only accepted terminal states would block until timeout on the expected outcome.

ParameterKindTypeDefault
job_idpositional-or-keywordstr
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny

Returns: Job

Raises:

ReviewQueuesAPI

class ReviewQueuesAPI()

Structured human review.

Related APIs: JudgesAPI, ObservabilityAPI, EvalDatasetsAPI

Methods

list() -> list[ReviewQueue]

Return the current collection of review queues and queue items, applying any supported filters.

This callable takes no public parameters.

Returns: list[ReviewQueue]

Raises:

get(queue_id: str) -> ReviewQueue

Fetch one record from the review queues and queue items surface identified by queue_id.

ParameterKindTypeDefault
queue_idpositional-or-keywordstr

Returns: ReviewQueue

Raises:

create(name: str, **options) -> ReviewQueue

Create a new record on the review queues and queue items surface and return the server-normalized result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
namepositional-or-keywordstr
optionsvar-keywordAny

Returns: ReviewQueue

Raises:

update(queue_id: str, **changes) -> ReviewQueue

Patch an existing record on the review queues and queue items surface and return the updated result. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
queue_idpositional-or-keywordstr
changesvar-keywordAny

Returns: ReviewQueue

Raises:

enqueue(queue_id: str, **payload) -> Any

Add the supplied items to the targeted review queue.

ParameterKindTypeDefault
queue_idpositional-or-keywordstr
payloadvar-keywordAny

Returns: Any

Raises:

submit(queue_id: str, item_id: str, **answers) -> Any

Answer a queued item. The write-back that turns review into evidence.

ParameterKindTypeDefault
queue_idpositional-or-keywordstr
item_idpositional-or-keywordstr
answersvar-keywordAny

Returns: Any

Raises:

alignment_examples(queue_id: str) -> Any

Human labels usable for judge-alignment scoring.

ParameterKindTypeDefault
queue_idpositional-or-keywordstr

Returns: Any

Raises:

AriaAPI

class AriaAPI()

Aria goal-plans: the permissioned agentic loop.

Usage example

def plan_from_intent(caliber: CaliberClient, goal: str) -> dict[str, Any]:
    """State an intent, wait for Aria to plan it, and approve if it asks.

    ``wait_for_plan`` returns as soon as the plan pauses, because a paused plan
    makes no further progress on its own — polling past it would burn the whole
    timeout on the expected outcome.
    """
    detail = caliber.aria.create_plan(goal)
    settled = caliber.aria.wait_for_plan(detail.plan.plan_id, timeout=120)

    if settled.plan.needs_you:
        # The plan is waiting on a human decision. Approving is that decision,
        # made explicitly rather than inferred from the script continuing.
        caliber.aria.approve_plan(settled.plan.plan_id)
        settled = caliber.aria.execute_plan(settled.plan.plan_id)

    return {
        "plan_id": settled.plan.plan_id,
        "status": settled.plan.status,
        "steps": len(settled.steps),
    }
From sdk/caliber-sdk/examples/agentic.py — executed by the SDK test suite.

Related APIs: JobsAPI, ReviewQueuesAPI, JudgesAPI, EvalDatasetsAPI

Methods

capabilities() -> Any

What Aria is allowed to do in this deployment.

This callable takes no public parameters.

Returns: Any

Raises:

plans(*, session_id: str | None = None, limit: int | None = None, offset: int | None = None) -> list[AriaPlan]

Operate on the Aria plans and interaction state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
session_idkeyword-only`strNone`None
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[AriaPlan]

Raises:

get_plan(plan_id: str) -> AriaPlanDetail

Operate on the Aria plans and interaction state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
plan_idpositional-or-keywordstr

Returns: AriaPlanDetail

Raises:

create_plan(goal: str, **options) -> AriaPlanDetail

State an intent. Aria plans the steps; you approve them.

ParameterKindTypeDefault
goalpositional-or-keywordstr
optionsvar-keywordAny

Returns: AriaPlanDetail

Raises:

update_plan(plan_id: str, **changes) -> AriaPlanDetail

Operate on the Aria plans and interaction state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
plan_idpositional-or-keywordstr
changesvar-keywordAny

Returns: AriaPlanDetail

Raises:

approve_plan(plan_id: str, **options) -> AriaPlanDetail

Operate on the Aria plans and interaction state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
plan_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: AriaPlanDetail

Raises:

execute_plan(plan_id: str, **options) -> AriaPlanDetail

Operate on the Aria plans and interaction state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
plan_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: AriaPlanDetail

Raises:

poll_plan(plan_id: str, **options) -> AriaPlanDetail

Operate on the Aria plans and interaction state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
plan_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: AriaPlanDetail

Raises:

interactions(plan_id: str, *, limit: int | None = None, offset: int | None = None) -> list[AriaInteraction]

Operate on the Aria plans and interaction state surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
plan_idpositional-or-keywordstr
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[AriaInteraction]

Raises:

answer(interaction_id: str, **payload) -> AriaPlanDetail

Answer a question Aria paused to ask.

ParameterKindTypeDefault
interaction_idpositional-or-keywordstr
payloadvar-keywordAny

Returns: AriaPlanDetail

Raises:

wait_for_plan(plan_id: str, *, timeout: float = 900.0, **options) -> AriaPlanDetail

Poll until the plan finishes or pauses for you.

`paused` is a resting state, not a transient one: the plan makes no further progress until a person answers, so polling past it would burn the whole timeout waiting for something that cannot happen.

ParameterKindTypeDefault
plan_idpositional-or-keywordstr
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny

Returns: AriaPlanDetail

Raises:

ReleasesAPI

class ReleasesAPI()

Release candidates, evidence, waivers, and signoff.

Related APIs: EvaluationsAPI, ReviewQueuesAPI, WorkflowsAPI

Methods

candidates() -> list[ReleaseCandidate]

Operate on the release candidates and signoffs surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: list[ReleaseCandidate]

Raises:

get_candidate(candidate_id: str) -> ReleaseCandidate

Operate on the release candidates and signoffs surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
candidate_idpositional-or-keywordstr

Returns: ReleaseCandidate

Raises:

create_candidate(name: str, **options) -> ReleaseCandidate

Create a release candidate with its decision criteria, evidence, and rollback metadata.

ParameterKindTypeDefault
namepositional-or-keywordstr
optionsvar-keywordAny

Returns: ReleaseCandidate

Raises:

evaluate(candidate_id: str, **options) -> ReleaseCandidate

Recompute the weighted score from current evidence.

ParameterKindTypeDefault
candidate_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: ReleaseCandidate

Raises:

add_waiver(candidate_id: str, **payload) -> Any

Record an exception. Admin-only, and audited — a waiver is a decision someone owns, not a way to raise a score.

ParameterKindTypeDefault
candidate_idpositional-or-keywordstr
payloadvar-keywordAny

Returns: Any

Raises:

generate_report(candidate_id: str, **options) -> Any

Start the durable report-generation job for the targeted release candidate.

ParameterKindTypeDefault
candidate_idpositional-or-keywordstr
optionsvar-keywordAny

Returns: Any

Raises:

sign(candidate_id: str, *, decision: str, rationale: str, **options) -> Any

Record go / no-go. `rationale` is required by design: a signoff without a reason is not evidence of a decision.

ParameterKindTypeDefault
candidate_idpositional-or-keywordstr
decisionkeyword-onlystr
rationalekeyword-onlystr
optionsvar-keywordAny

Returns: Any

Raises:

ObservabilityAPI

class ObservabilityAPI()

Traces, experiments, and metrics.

Methods

traces(**params) -> list[Trace]

Operate on the observability traces and metrics surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
paramsvar-keywordAny

Returns: list[Trace]

Raises:

trace(trace_id: str) -> Any

One trace with its full span tree, left untyped: the node structure is MLflow's, and re-declaring it here would drift from it.

ParameterKindTypeDefault
trace_idpositional-or-keywordstr

Returns: Any

Raises:

experiments() -> Any

Operate on the observability traces and metrics surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: Any

Raises:

metrics(**params) -> Any

Operate on the observability traces and metrics surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
paramsvar-keywordAny

Returns: Any

Raises:

AuditAPI

class AuditAPI()

The audit log.

Methods

list(**params) -> list[AuditEntry]

Return the current collection of audit log entries, applying any supported filters.

ParameterKindTypeDefault
paramsvar-keywordAny

Returns: list[AuditEntry]

Raises:

export(*, format: str = 'csv', **params) -> bytes

Raw export bytes. CSV by default; JSON is admin-only on the server.

ParameterKindTypeDefault
formatkeyword-onlystr'csv'
paramsvar-keywordAny

Returns: bytes

Raises:

EventsAPI

class EventsAPI()

Server-sent events.

Methods

stream(**params) -> Iterator[str]

Yield raw SSE lines.

Deliberately unparsed. The event vocabulary is a live surface, and a client that decoded into fixed types would reject events added after it shipped — the opposite of what a stream consumer wants.

ParameterKindTypeDefault
paramsvar-keywordAny

Returns: Iterator[str]

Raises:

CookbooksAPI

class CookbooksAPI()

Built-in, installable examples.

Usage example

def install_ready_cookbook(caliber: CaliberClient) -> dict[str, Any]:
    """Install the first cookbook whose prerequisites are already satisfied.

    Readiness is checked before installing rather than after failing: the
    recipe's unmet checks name what is missing, and each one that can be fixed
    carries the route that fixes it.
    """
    recipes = caliber.cookbooks.list()
    ready = [recipe for recipe in recipes if recipe.is_ready]
    if not ready:
        blocked = {
            recipe.id: [check.get("label") for check in recipe.unmet_checks] for recipe in recipes
        }
        return {"installed": None, "blocked_by": blocked}

    recipe = ready[0]
    result = caliber.cookbooks.install(recipe.id, name=f"{recipe.title} (SDK)")
    # Installed paused, never running: an example manifest can carry model,
    # connector, or side-effect bindings an operator should review first.
    workflow = result.get("workflow") if isinstance(result, dict) else None
    return {
        "installed": recipe.id,
        "workflow_status": (workflow or {}).get("status"),
    }
From sdk/caliber-sdk/examples/agentic.py — executed by the SDK test suite.

Related APIs: WorkflowsAPI, ProjectsAPI, ReviewQueuesAPI, AriaAPI

Methods

list() -> list[CookbookRecipe]

Return the current collection of built-in cookbook recipes, applying any supported filters.

This callable takes no public parameters.

Returns: list[CookbookRecipe]

Raises:

install(cookbook_id: str, *, name: str | None = None, **options) -> Any

Install a recipe as a paused workflow plus an editable draft.

Paused on purpose: an example manifest can carry model, connector, or side-effect bindings that an operator should review before anything runs.

ParameterKindTypeDefault
cookbook_idpositional-or-keywordstr
namekeyword-only`strNone`None
optionsvar-keywordAny

Returns: Any

Raises:

SecretsAPI

class SecretsAPI()

Secret references. Write-only: values are never returned.

Methods

list() -> Any

Names and metadata only — no values, by design.

This callable takes no public parameters.

Returns: Any

Raises:

put(name: str, value: str) -> Any

Operate on the secret references surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
namepositional-or-keywordstr
valuepositional-or-keywordstr

Returns: Any

Raises:

revoke(name: str) -> Any

Operate on the secret references surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
namepositional-or-keywordstr

Returns: Any

Raises:

delete(name: str) -> Any

Delete a record on the secret references surface and return the server acknowledgement. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
namepositional-or-keywordstr

Returns: Any

Raises:

Module caliber_sdk.resources.raw

Untyped access to any management endpoint.

Tested example

def plan_from_intent(caliber: CaliberClient, goal: str) -> dict[str, Any]:
    """State an intent, wait for Aria to plan it, and approve if it asks.

    ``wait_for_plan`` returns as soon as the plan pauses, because a paused plan
    makes no further progress on its own — polling past it would burn the whole
    timeout on the expected outcome.
    """
    detail = caliber.aria.create_plan(goal)
    settled = caliber.aria.wait_for_plan(detail.plan.plan_id, timeout=120)

    if settled.plan.needs_you:
        # The plan is waiting on a human decision. Approving is that decision,
        # made explicitly rather than inferred from the script continuing.
        caliber.aria.approve_plan(settled.plan.plan_id)
        settled = caliber.aria.execute_plan(settled.plan.plan_id)

    return {
        "plan_id": settled.plan.plan_id,
        "status": settled.plan.status,
        "steps": len(settled.steps),
    }
From sdk/caliber-sdk/examples/agentic.py — executed by the SDK test suite.

Public exports

RawAPI

Classes

RawAPI

class RawAPI()

Call any path under `/ajax-api/2.0/mlflow/caliber`.

Methods

get(path: str, **kwargs) -> Any

Fetch one record from the low-level management API routes surface identified by path.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

post(path: str, **kwargs) -> Any

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

put(path: str, **kwargs) -> Any

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

patch(path: str, **kwargs) -> Any

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

delete(path: str, **kwargs) -> Any

Delete a record on the low-level management API routes surface and return the server acknowledgement. Validation and permission failures are surfaced through the standard CALIBER error hierarchy.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

paginate(path: str, *, params: Mapping[str, Any] | None = None, limit: int = 100) -> Iterator[Any]

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
limitkeyword-onlyint100

Returns: Iterator[Any]

Raises:

Model modules

Module caliber_sdk.models

Shared models for the CALIBER SDK.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

FAILED_RUN_STATES, STABILITY_BETA, STABILITY_GA, STABILITY_INTERNAL, TERMINAL_RUN_STATES, Account, AriaInteraction, AriaPlan, AriaPlanDetail, AriaPlanStep, AuditEntry, Bucket, CalibrationJob, Capabilities, CookbookRecipe, ErrorBody, EvalDataset, EvalExample, Evaluation, Extensibility, FieldError, Identity, IssuedToken, Job, Judge, JudgeAlignment, KnowledgeBase, LlmSetupStatus, McpServer, OpenApiIntegration, OpenApiIntegrationVersion, OpenApiOperation, OpenApiOperationDependency, OpenApiToolDraft, OptimizerPlugin, Page, PersonalAccessToken, Project, ProjectFile, ProjectFolder, ProjectMember, Prompt, RegisteredOptimizer, ReleaseCandidate, ReviewQueue, RuntimeSettings, RuntimeSettingsSummary, SessionInfo, Skill, SkillRender, SkillSelection, SkillVersion, Stability, StoredObject, Tool, Trace, Workflow, WorkflowRun, WorkflowRunCapabilities, WorkflowService, WorkflowVersion, decode, decode_list

Module caliber_sdk.models.common

Shapes shared across the API, independent of any one resource.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

STABILITY_BETA, STABILITY_GA, STABILITY_INTERNAL, Page, Stability

Module constants

NameValue
STABILITY_GA'ga'
STABILITY_BETA'beta'
STABILITY_INTERNAL'internal'

Classes

Page

class Page()

One page of an offset-paginated list.

Kept even though :meth:Transport.paginate hides pagination from most callers: a caller who needs to checkpoint and resume needs the offset, and reconstructing it from a flat iterator is not possible.

Dataclass fields

FieldTypeDefault
itemslist[Any]field(default_factory=list)
limitint0
offsetint0

Properties

is_last() -> bool

Whether this looks like the final page.

A short page ends the sequence. A full page might too -- the only way to know is to ask for the next one and get nothing.

This callable takes no public parameters.

Returns: bool

next_offset() -> int

Operate on the page surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: int

Stability

class Stability()

Which API tags fall in which tier.

Dataclass fields

FieldTypeDefault
gatuple[str, ...]()
betatuple[str, ...]()
internaltuple[str, ...]()

Methods

from_payload(payload) -> Stability

Operate on the stability surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
payloadpositional-or-keywordAny

Returns: Stability

tier_of(tag: str) -> str | None

Operate on the stability surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
tagpositional-or-keywordstr

Returns: str | None

Module caliber_sdk.models.core

Typed models for the core admin surfaces: auth, identity, capabilities, settings.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

Account, Capabilities, Extensibility, Identity, IssuedToken, LlmSetupStatus, OptimizerPlugin, PersonalAccessToken, Project, ProjectFile, ProjectFolder, ProjectMember, RegisteredOptimizer, RuntimeSettings, RuntimeSettingsSummary, SessionInfo, WorkflowRunCapabilities

Classes

Identity

class Identity()

Who the caller is, from `GET /me`.

Note the server reports identity rather than requiring it: an invalid or revoked credential yields `user_id == "anonymous" with no scopes rather than an error. :meth:is_anonymous` is the check to make.

Dataclass fields

FieldTypeDefault
user_idstr''
scopeslist[str]field(default_factory=list)
is_adminboolFalse
extradict[str, Any]field(default_factory=dict)

Properties

is_anonymous() -> bool

Operate on the identity surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

SessionInfo

class SessionInfo()

How the caller's identity was established, from `GET /auth/session`.

Dataclass fields

FieldTypeDefault
user_idstr''
scopeslist[str]field(default_factory=list)
is_adminboolFalse
auth_modestr''
authenticated_bystr''
login_requiredboolFalse
extradict[str, Any]field(default_factory=dict)
Account

class Account()

A user account. Never carries a password hash.

Dataclass fields

FieldTypeDefault
user_idstr''
disabledboolFalse
created_at`strNone`None
password_updated_at`strNone`None
last_login_at`strNone`None
extradict[str, Any]field(default_factory=dict)
PersonalAccessToken

class PersonalAccessToken()

Token metadata. Never carries the secret.

The plaintext lives on :class:IssuedToken, which only the issue and rotate calls return — mirroring the server, where a listed token has no `token` key at all rather than a null one.

Dataclass fields

FieldTypeDefault
token_idstr''
user_idstr''
namestr''
scopeslist[str]field(default_factory=list)
created_at`strNone`None
created_by`strNone`None
expires_at`strNone`None
last_used_at`strNone`None
revoked_at`strNone`None
revoked_reason`strNone`None
rotated_from`strNone`None
activeboolTrue
extradict[str, Any]field(default_factory=dict)
IssuedToken

class IssuedToken()

Bases: PersonalAccessToken

A freshly issued token. `token` is returned exactly once, ever.

Dataclass fields

FieldTypeDefault
tokenstr''
WorkflowRunCapabilities

class WorkflowRunCapabilities()

Which workflow-run features the deployment has switched on.

Dataclass fields

FieldTypeDefault
queue_enabledboolFalse
supports_async_submitboolFalse
supports_cancelboolFalse
supports_retryboolFalse
supports_resumeboolFalse
runtime_approvals_enabledboolFalse
checkpointing_enabledboolFalse
event_backendstr''
approval_readinessdict[str, Any]field(default_factory=dict)
extradict[str, Any]field(default_factory=dict)
RegisteredOptimizer

class RegisteredOptimizer()

One optimizer the deployment can run, with its provenance.

Dataclass fields

FieldTypeDefault
namestr''
summarystr''
artifact_typeslist[str]field(default_factory=list)
sourcestr'builtin'
requires`strNone`None
distribution`strNone`None
explicit_onlyboolFalse
experimentalboolFalse
extradict[str, Any]field(default_factory=dict)

Properties

is_third_party() -> bool

True when a distribution other than CALIBER registered this.

Worth checking before pinning an agent to an optimizer: a third-party optimizer authors the artifact that gets promoted to production, and it is only present because the deployment allowlisted its distribution.

This callable takes no public parameters.

Returns: bool

Methods

can_target(artifact_type: str) -> bool

Operate on the registered optimizer surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
artifact_typepositional-or-keywordstr

Returns: bool

OptimizerPlugin

class OptimizerPlugin()

An installed optimizer plugin and whether the deployment enabled it.

An entry with `allowlisted=False` is installed and inert. That is the normal state for a freshly installed plugin, not an error — CALIBER discovers plugins automatically and enables none of them automatically.

Dataclass fields

FieldTypeDefault
namestr''
distribution`strNone`None
valuestr''
allowlistedboolFalse
error`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_active() -> bool

Operate on the optimizer plugin surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

Extensibility

class Extensibility()

What this deployment can run, and what it has been permitted to run.

Dataclass fields

FieldTypeDefault
optimizerslist[RegisteredOptimizer]field(default_factory=list)
pluginslist[OptimizerPlugin]field(default_factory=list)
allowlist_env_varstr'CALIBER_PLUGIN_ALLOWLIST'
extradict[str, Any]field(default_factory=dict)

Methods

optimizers_for(artifact_type: str) -> list[RegisteredOptimizer]

Optimizers that can target one artifact kind.

Filtering matters because the artifact kinds are not interchangeable: submitting a skill job with a prompt-only optimizer is rejected by the server, and asking here is how a caller avoids finding out that way.

ParameterKindTypeDefault
artifact_typepositional-or-keywordstr

Returns: list[RegisteredOptimizer]

optimizer(name: str) -> RegisteredOptimizer | None

Operate on the extensibility surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
namepositional-or-keywordstr

Returns: RegisteredOptimizer | None

Capabilities

class Capabilities()

Runtime feature flags plus the SDK stability tiers.

`artifact_families is deliberately left as a mapping: the server documents that each family means something different by the same key (rollback` in particular), so flattening it here would imply a uniformity the platform does not have.

Dataclass fields

FieldTypeDefault
workflow_runsWorkflowRunCapabilitiesfield(default_factory=WorkflowRunCapabilities)
sync_workflow_version_runboolTrue
artifact_familiesdict[str, Any]field(default_factory=dict)
sdk_stabilitydict[str, list[str]]field(default_factory=dict)
extensibilityExtensibilityfield(default_factory=Extensibility)
extradict[str, Any]field(default_factory=dict)

Methods

tier_of(tag: str) -> str | None

Which stability tier an API tag falls in, or `None` if unknown.

ParameterKindTypeDefault
tagpositional-or-keywordstr

Returns: str | None

is_ga(tag: str) -> bool

Operate on the capabilities surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
tagpositional-or-keywordstr

Returns: bool

LlmSetupStatus

class LlmSetupStatus()

Which LLM credentials are configured — presence, never values.

The server returns masked fingerprints only. A field here that looked like a key would misrepresent what the endpoint is willing to disclose.

Dataclass fields

FieldTypeDefault
llm_providerstr''
gateway_urlstr''
openai_key_env`strNone`None
openai_key_presentboolFalse
anthropic_key_presentboolFalse
assistant_enginestr''
openai_key_fingerprint`strNone`None
anthropic_key_fingerprint`strNone`None
extradict[str, Any]field(default_factory=dict)
RuntimeSettingsSummary

class RuntimeSettingsSummary()

Data model returned by the SDK for runtime settings summary records.

Dataclass fields

FieldTypeDefault
totalint0
live_editableint0
environment_managedint0
configuredint0
defaultsint0
secret_sourcesint0
extradict[str, Any]field(default_factory=dict)
RuntimeSettings

class RuntimeSettings()

Grouped inventory of runtime configuration knobs.

Dataclass fields

FieldTypeDefault
summaryRuntimeSettingsSummaryfield(default_factory=RuntimeSettingsSummary)
groupslist[dict[str, Any]]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)
Project

class Project()

A project/workspace.

`file_count is present on list responses and absent on detail ones — the server computes it with one grouped query for the list only. None` means "not reported here", which is why it is not defaulted to 0.

Dataclass fields

FieldTypeDefault
project_idstr''
namestr''
description`strNone`None
ownerstr''
statusstr''
storage_backend`strNone`None
created_at`strNone`None
updated_at`strNone`None
file_count`intNone`None
access_role`strNone`None
permissionslist[str]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)
ProjectMember

class ProjectMember()

A user's active or inactive membership in a project.

Dataclass fields

FieldTypeDefault
member_idstr''
project_idstr''
user_idstr''
rolestr'viewer'
statusstr'active'
created_bystr''
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
ProjectFile

class ProjectFile()

One stored file.

Dataclass fields

FieldTypeDefault
file_idstr''
file_ref`strNone`None
namestr''
kind`strNone`None
relative_path`strNone`None
media_type`strNone`None
size_bytes`intNone`None
sha256`strNone`None
etag`strNone`None
object_version_id`strNone`None
version`intNone`None
status`strNone`None
storage_backend`strNone`None
producer_node_id`strNone`None
project_id`strNone`None
workflow_run_id`strNone`None
playground_run_id`strNone`None
created_at`strNone`None
updated_at`strNone`None
immutable_ref`dict[str, Any]None`None
extradict[str, Any]field(default_factory=dict)
ProjectFolder

class ProjectFolder()

Data model returned by the SDK for project folder records.

Dataclass fields

FieldTypeDefault
pathstr''
name`strNone`None
file_ref`strNone`None
storage_backend`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Module caliber_sdk.models.assets

Typed models for the governed asset families: prompts, skills, tools.

Tested example

def prompt_lifecycle(
    caliber: CaliberClient, *, agent_id: str = "intake-classifier"
From sdk/caliber-sdk/examples/prompt_lifecycle.py — executed by the SDK test suite.

Public exports

CalibrationJob, Prompt, Skill, SkillRender, SkillSelection, SkillVersion, Tool

Classes

Prompt

class Prompt()

A prompt as the list/detail routes report it.

Prompts live in MLflow's registry, not CALIBER's database, so this carries a registry coordinate (`prompt_name, version, alias) rather than a CALIBER row id. template_preview` is truncated by the server; fetch the version to read the whole template.

Dataclass fields

FieldTypeDefault
agent_idstr''
prompt_namestr''
version`intNone`None
alias`strNone`None
template_preview`strNone`None
template_lengthint0
approval_id`strNone`None
artifact_ref`strNone`None
agent_name`strNone`None
agent_enabled`boolNone`None
has_prompt`boolNone`None
source`strNone`None
description`strNone`None
extradict[str, Any]field(default_factory=dict)
Skill

class Skill()

A reusable instruction asset.

Dataclass fields

FieldTypeDefault
skill_idstr''
namestr''
description`strNone`None
summary`strNone`None
content`strNone`None
owner`strNone`None
category`strNone`None
tagslist[str]field(default_factory=list)
skill_metadatadict[str, Any]field(default_factory=dict)
allowed_toolslist[str]field(default_factory=list)
depends_onlist[str]field(default_factory=list)
statusstr''
version`intNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
SkillRender

class SkillRender()

A skill's content with variables substituted.

Dataclass fields

FieldTypeDefault
skill_idstr''
skill_namestr''
rendered_contentstr''
original_contentstr''
detected_variableslist[str]field(default_factory=list)
unresolved_variableslist[str]field(default_factory=list)
variables_applieddict[str, Any]field(default_factory=dict)
summarystr''
word_countint0
char_countint0
extradict[str, Any]field(default_factory=dict)
SkillSelection

class SkillSelection()

Whether a skill would be auto-selected for a query, and why.

Dataclass fields

FieldTypeDefault
skill_idstr''
skill_namestr''
is_selectedboolFalse
selection_scorefloat0.0
selection_reason`strNone`None
extradict[str, Any]field(default_factory=dict)
SkillVersion

class SkillVersion()

One immutable skill snapshot.

Dataclass fields

FieldTypeDefault
skill_idstr''
version_numberint0
content`strNone`None
summary`strNone`None
created_by`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
Tool

class Tool()

A registered callable.

`input_schema and output_schema` stay open mappings: they are JSON Schema documents describing the caller's own function, and CALIBER stores them rather than defining them.

Dataclass fields

FieldTypeDefault
tool_idstr''
namestr''
version`strNone`None
description`strNone`None
module_path`strNone`None
callable_name`strNone`None
input_schemadict[str, Any]field(default_factory=dict)
output_schemadict[str, Any]field(default_factory=dict)
side_effect_level`strNone`None
requires_approvalboolFalse
allow_in_previewboolTrue
secret_refslist[str]field(default_factory=list)
owner`strNone`None
statusstr''
deprecated_at`strNone`None
successor_tool_id`strNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
CalibrationJob

class CalibrationJob()

One tool calibration job.

`result` is left open: it carries scorer output whose keys vary by suite, and the server is the authority on what a run measured.

Dataclass fields

FieldTypeDefault
job_idstr''
tool_id`strNone`None
statusstr''
requested_by`strNone`None
result`dict[str, Any]None`None
error`strNone`None
created_at`strNone`None
claimed_at`strNone`None
claimed_by`strNone`None
finished_at`strNone`None
pass_rate`floatNone`None
retry_of_job_id`strNone`None
resolution`strNone`None
resolution_reason`strNone`None
resolved_by`strNone`None
resolved_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_terminal() -> bool

Whether the job has stopped, successfully or not.

This callable takes no public parameters.

Returns: bool

Module caliber_sdk.models.quality

Typed models for the quality surfaces: datasets, judges, evaluations.

Tested example

def build_and_score(caliber: CaliberClient, *, owner: str = "@you") -> dict[str, Any]:
    """Create a dataset, add a row, define a judge, and run an evaluation."""
    dataset = caliber.datasets.create("intake-golden", owner=owner)
    caliber.datasets.add_example(
        dataset.dataset_id,
        inputs={"ticket": "I was charged twice"},
        expected={"intent": "billing"},
    )

    # Instructions must reference an evaluation variable. A judge with no
    # variable grades nothing — it returns the same verdict every time — so
    # the server rejects it rather than letting you collect meaningless scores.
    judge = caliber.judges.create(
        "valid-intent",
        instructions="Given {{ inputs }} and {{ outputs }}, return true if intent is allowed.",
        feedback_value_type="bool",
    )

    evaluation = caliber.evaluations.create(dataset.dataset_id, judge_id=judge.judge_id)
    return {
        "dataset_id": dataset.dataset_id,
        "judge_id": judge.judge_id,
        "evaluation_id": evaluation.evaluation_id,
    }
From sdk/caliber-sdk/examples/evaluation.py — executed by the SDK test suite.

Public exports

EvalDataset, EvalExample, Evaluation, Judge, JudgeAlignment

Classes

EvalDataset

class EvalDataset()

A versioned evaluation dataset.

The `mlflow_*` fields record the last sync to MLflow's dataset registry. They are reported rather than owned: the dataset lives here, and the sync is a separate, possibly stale, fact.

Dataclass fields

FieldTypeDefault
dataset_idstr''
namestr''
description`strNone`None
owner`strNone`None
tagslist[str]field(default_factory=list)
statusstr''
version`intNone`None
created_at`strNone`None
updated_at`strNone`None
mlflow_dataset_id`strNone`None
mlflow_synced_at`strNone`None
mlflow_synced_version`intNone`None
mlflow_record_count`intNone`None
mlflow_digest`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_synced() -> bool

Whether the dataset has ever been pushed to MLflow.

Not whether it is currently in sync — `mlflow_synced_version can lag version`, and conflating the two would let a caller trust stale evidence.

This callable takes no public parameters.

Returns: bool

EvalExample

class EvalExample()

One row of a dataset.

Dataclass fields

FieldTypeDefault
example_idstr''
dataset_idstr''
inputsAnyNone
expectedAnyNone
example_metadatadict[str, Any]field(default_factory=dict)
source_trace_id`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
Judge

class Judge()

A model-backed grader.

`feedback_value_type` is what a scorecard reads: a bool judge and a numeric one are not interchangeable, and the field is how a caller knows which they have.

Dataclass fields

FieldTypeDefault
judge_idstr''
namestr''
description`strNone`None
instructions`strNone`None
model`strNone`None
feedback_value_type`strNone`None
owner`strNone`None
tagslist[str]field(default_factory=list)
statusstr''
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
Evaluation

class Evaluation()

One scored run over a dataset.

`metrics and results` stay open: which scorers ran is a property of the evaluation, not of this type, and enumerating them here would go stale the first time a scorer is added.

Dataclass fields

FieldTypeDefault
evaluation_idstr''
dataset_id`strNone`None
name`strNone`None
statusstr''
target_type`strNone`None
target_ref`strNone`None
metricsdict[str, Any]field(default_factory=dict)
resultsAnyNone
created_by`strNone`None
created_at`strNone`None
completed_at`strNone`None
error`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_terminal() -> bool

Operate on the evaluation surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

JudgeAlignment

class JudgeAlignment()

Agreement between a judge and human reviewers.

Cohen's kappa matters more than raw agreement: a judge that always says "pass" agrees with a mostly-passing sample while measuring nothing.

Dataclass fields

FieldTypeDefault
judge_idstr''
agreement`floatNone`None
kappa`floatNone`None
sample_sizeint0
per_examplelist[dict[str, Any]]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)

Module caliber_sdk.models.integrations

Typed models for the integration and data surfaces (beta tier).

Tested example

def install_ready_cookbook(caliber: CaliberClient) -> dict[str, Any]:
    """Install the first cookbook whose prerequisites are already satisfied.

    Readiness is checked before installing rather than after failing: the
    recipe's unmet checks name what is missing, and each one that can be fixed
    carries the route that fixes it.
    """
    recipes = caliber.cookbooks.list()
    ready = [recipe for recipe in recipes if recipe.is_ready]
    if not ready:
        blocked = {
            recipe.id: [check.get("label") for check in recipe.unmet_checks] for recipe in recipes
        }
        return {"installed": None, "blocked_by": blocked}

    recipe = ready[0]
    result = caliber.cookbooks.install(recipe.id, name=f"{recipe.title} (SDK)")
    # Installed paused, never running: an example manifest can carry model,
    # connector, or side-effect bindings an operator should review first.
    workflow = result.get("workflow") if isinstance(result, dict) else None
    return {
        "installed": recipe.id,
        "workflow_status": (workflow or {}).get("status"),
    }
From sdk/caliber-sdk/examples/agentic.py — executed by the SDK test suite.

Public exports

Bucket, KnowledgeBase, McpServer, StoredObject

Classes

McpServer

class McpServer()

A managed MCP server definition.

`discovered_tools is what the server reported at last connection, not a contract: an MCP server can change its tool list, and a stale entry here means "we saw this once", which is why last_connected_at` sits beside it.

Dataclass fields

FieldTypeDefault
server_idstr''
namestr''
description`strNone`None
transport`strNone`None
uri`strNone`None
command`strNone`None
argslist[str]field(default_factory=list)
envdict[str, Any]field(default_factory=dict)
headersdict[str, Any]field(default_factory=dict)
auth_type`strNone`None
auth_configdict[str, Any]field(default_factory=dict)
tool_policiesdict[str, Any]field(default_factory=dict)
icon`strNone`None
owner`strNone`None
statusstr''
connection_error`strNone`None
discovered_toolslist[dict[str, Any]]field(default_factory=list)
last_connected_at`strNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_connected() -> bool

Whether the last connection attempt succeeded.

Not whether it is reachable now — that would require a probe, and :meth:McpServersAPI.test_connection is how you ask.

This callable takes no public parameters.

Returns: bool

KnowledgeBase

class KnowledgeBase()

A versioned RAG corpus.

Dataclass fields

FieldTypeDefault
knowledge_base_idstr''
namestr''
description`strNone`None
owner`strNone`None
statusstr''
active_version_id`strNone`None
embedding_model`strNone`None
chunking_strategy`strNone`None
document_count`intNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
Bucket

class Bucket()

One object-store bucket.

Dataclass fields

FieldTypeDefault
namestr''
creation_date`strNone`None
object_count`intNone`None
size_bytes`intNone`None
extradict[str, Any]field(default_factory=dict)
StoredObject

class StoredObject()

One object inside a bucket.

Dataclass fields

FieldTypeDefault
keystr''
size`intNone`None
last_modified`strNone`None
etag`strNone`None
content_type`strNone`None
is_directoryboolFalse

Module caliber_sdk.models.operations

Typed models for the operational and agentic surfaces (beta tier).

Tested example

def plan_from_intent(caliber: CaliberClient, goal: str) -> dict[str, Any]:
    """State an intent, wait for Aria to plan it, and approve if it asks.

    ``wait_for_plan`` returns as soon as the plan pauses, because a paused plan
    makes no further progress on its own — polling past it would burn the whole
    timeout on the expected outcome.
    """
    detail = caliber.aria.create_plan(goal)
    settled = caliber.aria.wait_for_plan(detail.plan.plan_id, timeout=120)

    if settled.plan.needs_you:
        # The plan is waiting on a human decision. Approving is that decision,
        # made explicitly rather than inferred from the script continuing.
        caliber.aria.approve_plan(settled.plan.plan_id)
        settled = caliber.aria.execute_plan(settled.plan.plan_id)

    return {
        "plan_id": settled.plan.plan_id,
        "status": settled.plan.status,
        "steps": len(settled.steps),
    }
From sdk/caliber-sdk/examples/agentic.py — executed by the SDK test suite.

Public exports

AriaInteraction, AriaPlan, AriaPlanDetail, AriaPlanStep, AuditEntry, CookbookRecipe, Job, ReleaseCandidate, ReviewQueue, Trace

Classes

Job

class Job()

A durable background job (refinement, calibration, reporting).

Dataclass fields

FieldTypeDefault
job_idstr''
statusstr''
kind`strNone`None
agent_id`strNone`None
optimizer`strNone`None
created_at`strNone`None
updated_at`strNone`None
error`strNone`None
result`dict[str, Any]None`None
extradict[str, Any]field(default_factory=dict)

Properties

is_terminal() -> bool

Operate on the job surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

awaits_human() -> bool

Whether the job stopped for a person rather than finishing.

A refinement job that reaches `candidate_ready` is not done — it is waiting for an operator to apply it. Treating that as terminal is how a script silently drops the human decision the loop exists for.

This callable takes no public parameters.

Returns: bool

ReviewQueue

class ReviewQueue()

A structured human-review queue.

Dataclass fields

FieldTypeDefault
queue_idstr''
namestr''
description`strNone`None
owner`strNone`None
statusstr''
review_questionslist[dict[str, Any]]field(default_factory=list)
item_count`intNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
AriaPlan

class AriaPlan()

An Aria goal-plan: a sequence of steps awaiting approval or execution.

Dataclass fields

FieldTypeDefault
plan_idstr''
session_id`strNone`None
goalstr''
statusstr''
autonomy`strNone`None
owner`strNone`None
step_countint0
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

needs_you() -> bool

Paused awaiting a human decision — a gate, approval, or confirm.

The state the SPA badges, and the one a script must not poll past: a paused plan makes no further progress until someone answers.

This callable takes no public parameters.

Returns: bool

AriaPlanStep

class AriaPlanStep()

One step inside an Aria plan detail response.

Dataclass fields

FieldTypeDefault
step_idstr''
plan_idstr''
titlestr''
capability_key`strNone`None
depends_onlist[str]field(default_factory=list)
statusstr''
resultdict[str, Any]field(default_factory=dict)
evidencedict[str, Any]field(default_factory=dict)
error`strNone`None
draft_id`strNone`None
job_id`strNone`None
approval_id`strNone`None
checkpoint_id`strNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
AriaPlanDetail

class AriaPlanDetail()

A plan plus its steps.

Dataclass fields

FieldTypeDefault
planAriaPlanfield(default_factory=AriaPlan)
stepslist[AriaPlanStep]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)
AriaInteraction

class AriaInteraction()

One pause/question inside an Aria plan.

Dataclass fields

FieldTypeDefault
interaction_idstr''
plan_idstr''
step_idstr''
kindstr''
promptstr''
optionslist[dict[str, Any]]field(default_factory=list)
evidencedict[str, Any]field(default_factory=dict)
required_scope`strNone`None
statusstr''
responsedict[str, Any]field(default_factory=dict)
responded_by`strNone`None
responded_at`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
ReleaseCandidate

class ReleaseCandidate()

A release candidate with weighted criteria and signoff.

Dataclass fields

FieldTypeDefault
candidate_idstr''
namestr''
artifact_type`strNone`None
artifact_ref`strNone`None
version_ref`strNone`None
statusstr''
weighted_score`floatNone`None
criterialist[dict[str, Any]]field(default_factory=list)
created_by`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
Trace

class Trace()

One MLflow trace as observability reports it.

Dataclass fields

FieldTypeDefault
trace_idstr''
request_id`strNone`None
status`strNone`None
timestamp_ms`intNone`None
execution_time_ms`floatNone`None
tagsdict[str, Any]field(default_factory=dict)
extradict[str, Any]field(default_factory=dict)
AuditEntry

class AuditEntry()

One audit-log row.

Dataclass fields

FieldTypeDefault
audit_idstr''
actorstr''
actionstr''
entity_type`strNone`None
entity_id`strNone`None
detailsdict[str, Any]field(default_factory=dict)
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
CookbookRecipe

class CookbookRecipe()

A built-in, installable example.

Dataclass fields

FieldTypeDefault
idstr''
slugstr''
titlestr''
summarystr''
icon`strNone`None
capabilitieslist[str]field(default_factory=list)
prerequisiteslist[str]field(default_factory=list)
activation_requires_reviewboolTrue
stepslist[dict[str, Any]]field(default_factory=list)
readinessdict[str, Any]field(default_factory=dict)
extradict[str, Any]field(default_factory=dict)

Properties

is_ready() -> bool

Operate on the cookbook recipe surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

unmet_checks() -> list[dict[str, Any]]

Checks standing between this recipe and a clean install.

This callable takes no public parameters.

Returns: list[dict[str, Any]]

Module caliber_sdk.models.workflows

Typed models for workflows, versions, runs, deployments, and services.

Tested example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Public exports

FAILED_RUN_STATES, TERMINAL_RUN_STATES, Workflow, WorkflowRun, WorkflowService, WorkflowVersion

Classes

Workflow

class Workflow()

The container. Versions hold the manifest; this holds identity and status.

Dataclass fields

FieldTypeDefault
workflow_idstr''
project_id`strNone`None
namestr''
description`strNone`None
owner`strNone`None
statusstr''
default_experiment_id`strNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkflowVersion

class WorkflowVersion()

One immutable manifest snapshot.

`manifest and validation_report` stay open: the manifest is a structured-but-extensible document the server validates, and the report is produced by the validator rather than defined here.

Dataclass fields

FieldTypeDefault
version_idstr''
workflow_idstr''
version_numberint0
statusstr''
manifestdict[str, Any]field(default_factory=dict)
manifest_hash`strNone`None
compiler_version`strNone`None
compiled_artifact_uri`strNone`None
validation_report`dict[str, Any]None`None
compiled_bundleAnyNone
created_by`strNone`None
created_at`strNone`None
published_by`strNone`None
published_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_draft() -> bool

Operate on the workflow version surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

WorkflowRun

class WorkflowRun()

One execution.

Dataclass fields

FieldTypeDefault
workflow_run_idstr''
workflow_idstr''
project_id`strNone`None
workflow_version_id`strNone`None
deployment_alias`strNone`None
mlflow_run_id`strNone`None
trace_id`strNone`None
session_id`strNone`None
statusstr''
source`strNone`None
priority`intNone`None
queued_at`strNone`None
started_at`strNone`None
completed_at`strNone`None
claimed_by`strNone`None
error`strNone`None
outputAnyNone
extradict[str, Any]field(default_factory=dict)

Properties

is_terminal() -> bool

Operate on the workflow run surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

succeeded() -> bool

Operate on the workflow run surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

WorkflowService

class WorkflowService()

A workflow published as an externally invocable HTTP service.

Dataclass fields

FieldTypeDefault
service_idstr''
workflow_idstr''
alias`strNone`None
input_schemadict[str, Any]field(default_factory=dict)
output_schemadict[str, Any]field(default_factory=dict)
enabledboolFalse
auth_requiredboolTrue
rate_limit_per_minute`intNone`None
cors_allowed_originslist[str]field(default_factory=list)
endpoint`strNone`None
created_by`strNone`None
created_at`strNone`None
updated_at`strNone`None
token_countint0
extradict[str, Any]field(default_factory=dict)

Module caliber_sdk.models.errors

Typed views over CALIBER's two error body shapes.

Tested example

def quickstart(caliber: CaliberClient) -> dict[str, Any]:
    """Report who you are and which API surfaces are GA on this deployment."""
    identity = caliber.me.get()
    if identity.is_anonymous:
        # /me answers "who am I" rather than requiring a credential, so an
        # invalid token shows up here as anonymous instead of an exception.
        raise SystemExit("no usable credential — check CALIBER_TOKEN")

    capabilities = caliber.capabilities_api.get()
    return {
        "user_id": identity.user_id,
        "scopes": identity.scopes,
        "ga_surfaces": sorted(capabilities.sdk_stability.get("ga", [])),
        "queue_enabled": capabilities.workflow_runs.queue_enabled,
    }
From sdk/caliber-sdk/examples/quickstart.py — executed by the SDK test suite.

Public exports

ErrorBody, FieldError

Classes

FieldError

class FieldError()

One entry of a structured validation failure.

Dataclass fields

FieldTypeDefault
loctuple[Any, ...]()
msgstr''
typestr''

Properties

field() -> str

Dotted path of the offending field, or `<body>` for whole-body errors.

This callable takes no public parameters.

Returns: str

Methods

from_payload(payload) -> FieldError

Operate on the field error surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
payloadpositional-or-keywordAny

Returns: FieldError

ErrorBody

class ErrorBody()

`{"detail", "status_code"}, plus errors` when present.

Dataclass fields

FieldTypeDefault
detailstr''
status_codeint0
errorslist[FieldError]field(default_factory=list)

Methods

from_payload(payload) -> ErrorBody

Operate on the error body surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
payloadpositional-or-keywordAny

Returns: ErrorBody

Async client

Module caliber_sdk.aio

Asynchronous client for the CALIBER management API.

Tested example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Public exports

AsyncCaliberClient, AsyncTransport, wait_for, wait_for_terminal_state

Module caliber_sdk.aio.client

The async client, and an honest statement of what it covers.

Tested example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Public exports

AsyncCaliberClient, AsyncCapabilitiesAPI, AsyncEventsAPI, AsyncJobsAPI, AsyncMeAPI, AsyncRawAPI, AsyncWorkflowRunsAPI

Classes

AsyncCaliberClient

class AsyncCaliberClient(base_url: str | None = None, *, token: str | None = None, user: str | None = None, proxy_secret: str | None = None, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, verify: bool | str = True, http_client: httpx.AsyncClient | None = None)

An asynchronous connection to one CALIBER deployment.

Constructed exactly like :class:caliber_sdk.CaliberClient, including the same environment fallbacks and the same credential precedence -- a token beats a trusted header, because the token is a real credential and the header is only an assertion.

Usage example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Constructor

__init__(base_url: str | None = None, *, token: str | None = None, user: str | None = None, proxy_secret: str | None = None, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, verify: bool | str = True, http_client: httpx.AsyncClient | None = None) -> None

Operate on the caliber client surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
base_urlpositional-or-keyword`strNone`None
tokenkeyword-only`strNone`None
userkeyword-only`strNone`None
proxy_secretkeyword-only`strNone`None
authkeyword-only`AuthProviderNone`None
projectkeyword-only`strNone`None
timeoutkeyword-onlyfloat30.0
max_retrieskeyword-onlyint2
verifykeyword-only`boolstr`True
http_clientkeyword-only`httpx.AsyncClientNone`None

Returns: None

Raises:

Attributes

AttributeTypeNotes
rawAsyncRawAPILow-level route access through the SDK transport.
meAsyncMeAPIThe caller identity surface.
capabilities_apiAsyncCapabilitiesAPIRuntime stability tiers and deployment capabilities.
workflowsAsyncWorkflowRunsAPIWorkflow registry plus versions, runs, and services.
jobsAsyncJobsAPILong-running background jobs.
eventsAsyncEventsAPIServer-sent event stream.

Methods

aclose() -> None

Operate on the caliber client surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: None

__aenter__() -> AsyncCaliberClient

Return this instance so it can be used inside an async context manager.

This callable takes no public parameters.

Returns: AsyncCaliberClient

__aexit__(*_: object) -> None

Close any owned resources when leaving the async context manager.

ParameterKindTypeDefault
_var-positionalobject

Returns: None

AsyncRawAPI

class AsyncRawAPI()

Any endpoint, with the SDK's auth, retries, and typed errors.

The reason the typed coverage here can stay narrow without the client being limiting: nothing in CALIBER is unreachable from an async caller.

Methods

get(path: str, **kwargs) -> Any

Fetch one record from the low-level management API routes surface identified by path.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

post(path: str, **kwargs) -> Any

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

put(path: str, **kwargs) -> Any

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

patch(path: str, **kwargs) -> Any

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

delete(path: str, **kwargs) -> Any

Delete a record on the low-level management API routes surface and return the server acknowledgement.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Any

Raises:

download(path: str, **kwargs) -> bytes

Operate on the low-level management API routes surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: bytes

Raises:

paginate(path: str, *, params: Mapping[str, Any] | None = None, limit: int = 100) -> AsyncIterator[Any]

Not a coroutine: an async generator, so it is iterated rather than awaited.

ParameterKindTypeDefault
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
limitkeyword-onlyint100

Returns: AsyncIterator[Any]

Raises:

AsyncMeAPI

class AsyncMeAPI()

Typed access to the caller identity surface.

Methods

get() -> Identity

Reports identity rather than requiring it: a bad credential returns an anonymous identity, not an exception.

This callable takes no public parameters.

Returns: Identity

Raises:

AsyncCapabilitiesAPI

class AsyncCapabilitiesAPI()

Typed access to the runtime capabilities surface.

Methods

get() -> Capabilities

Fetch one record from the runtime capabilities surface identified by id.

This callable takes no public parameters.

Returns: Capabilities

Raises:

AsyncWorkflowRunsAPI

class AsyncWorkflowRunsAPI()

Submit runs and await them.

The surface async is for on the request side: forty concurrent `submit_and_wait` calls are forty coroutines rather than forty threads.

Related APIs: WorkflowsAPI, WorkflowVersionsAPI, WorkflowServicesAPI

Methods

submit(*, workflow_version_id: str | None = None, workflow_id: str | None = None, alias: str | None = None, input = None, idempotency_key: str | None = None, **options) -> WorkflowRun

Create a new execution run on the server and return its initial state.

ParameterKindTypeDefault
workflow_version_idkeyword-only`strNone`None
workflow_idkeyword-only`strNone`None
aliaskeyword-only`strNone`None
inputkeyword-onlyAnyNone
idempotency_keykeyword-only`strNone`None
optionsvar-keywordAny

Returns: WorkflowRun

Raises:

get(run_id: str) -> WorkflowRun

Fetch one record from the workflow runs surface identified by run_id.

ParameterKindTypeDefault
run_idpositional-or-keywordstr

Returns: WorkflowRun

Raises:

list(workflow_id: str, *, status: str | None = None) -> list[WorkflowRun]

Runs of one workflow.

Scoped because the server has no unscoped listing: `/workflow-runs` is POST-only. An earlier SDK method implying otherwise returned 405.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr
statuskeyword-only`strNone`None

Returns: list[WorkflowRun]

Raises:

cancel(run_id: str) -> WorkflowRun

Operate on the workflow runs surface with the supplied arguments and return the server response.

ParameterKindTypeDefault
run_idpositional-or-keywordstr

Returns: WorkflowRun

Raises:

wait(run_id: str, *, timeout: float = 900.0, raise_on_failure: bool = True, **options) -> WorkflowRun

Poll until the targeted run or job reaches a terminal state, then return the final record.

ParameterKindTypeDefault
run_idpositional-or-keywordstr
timeoutkeyword-onlyfloat900.0
raise_on_failurekeyword-onlyboolTrue
optionsvar-keywordAny

Returns: WorkflowRun

Raises:

AsyncJobsAPI

class AsyncJobsAPI()

Background jobs, and waiting on ones that stop for a person.

Methods

get(job_id: str) -> Job

Fetch one record from the background jobs surface identified by job_id.

ParameterKindTypeDefault
job_idpositional-or-keywordstr

Returns: Job

Raises:

list(*, status: str | None = None) -> list[Job]

Return the current collection of background jobs, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: list[Job]

Raises:

wait(job_id: str, *, timeout: float = 900.0, **options) -> Job

Return when the job finishes or stops for a human.

`candidate_ready` is a resting state: applying the candidate is a person's decision, so the job will never advance on its own and polling past it would spend the whole timeout on the expected outcome.

ParameterKindTypeDefault
job_idpositional-or-keywordstr
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny

Returns: Job

Raises:

AsyncEventsAPI

class AsyncEventsAPI()

The reason this module exists.

Methods

stream(**params) -> AsyncIterator[str]

Yield raw server-sent-event lines as they arrive.

Unparsed on purpose: the event vocabulary grows with the server, and a decoder compiled into this SDK would reject events added after it shipped -- exactly when a consumer most needs to see them.

Returns an async iterator rather than a coroutine, so it is used with `async for` and never awaited.

ParameterKindTypeDefault
paramsvar-keywordAny

Returns: AsyncIterator[str]

Raises:

Module caliber_sdk.aio.transport

Asynchronous transport, sharing every decision with the synchronous one.

Tested example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Public exports

AsyncTransport

Classes

AsyncTransport

class AsyncTransport(base_url: str, *, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, backoff_factor: float = 0.5, verify: bool | str = True, user_agent: str | None = None, http_client: httpx.AsyncClient | None = None)

Asynchronous HTTP transport against one CALIBER deployment.

Constructor

__init__(base_url: str, *, auth: AuthProvider | None = None, project: str | None = None, timeout: float = 30.0, max_retries: int = 2, backoff_factor: float = 0.5, verify: bool | str = True, user_agent: str | None = None, http_client: httpx.AsyncClient | None = None) -> None

Send a prepared request asynchronously through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
base_urlpositional-or-keywordstr
authkeyword-only`AuthProviderNone`None
projectkeyword-only`strNone`None
timeoutkeyword-onlyfloat30.0
max_retrieskeyword-onlyint2
backoff_factorkeyword-onlyfloat0.5
verifykeyword-only`boolstr`True
user_agentkeyword-only`strNone`None
http_clientkeyword-only`httpx.AsyncClientNone`None

Returns: None

Raises:

Attributes

AttributeTypeNotes
base_urlAny
authAnySession inspection plus token and account sub-resources.
projectAny
max_retriesAny
backoff_factorAny

Methods

aclose() -> None

Close the underlying client, but only one we created.

A caller who passed their own client owns its lifetime; closing it here would break the next thing that used it.

This callable takes no public parameters.

Returns: None

__aenter__() -> AsyncTransport

Return this instance so it can be used inside an async context manager.

This callable takes no public parameters.

Returns: AsyncTransport

__aexit__(*_: object) -> None

Close any owned resources when leaving the async context manager.

ParameterKindTypeDefault
_var-positionalobject

Returns: None

url_for(path: str) -> str

Send a prepared request asynchronously through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
pathpositional-or-keywordstr

Returns: str

bootstrap_csrf() -> str | None

Fetch a CSRF token up front so browser-style authenticated writes can reuse it.

This callable takes no public parameters.

Returns: str | None

request(method: str, path: str, *, params: Mapping[str, Any] | None = None, json = None, headers: Mapping[str, str] | None = None, files = None, data: Mapping[str, Any] | None = None, timeout: float | None = None, _csrf_retry: bool = True) -> Response

Perform one API call, returning the unwrapped payload.

ParameterKindTypeDefault
methodpositional-or-keywordstr
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
jsonkeyword-onlyAnyNone
headerskeyword-only`Mapping[str, str]None`None
fileskeyword-onlyAnyNone
datakeyword-only`Mapping[str, Any]None`None
timeoutkeyword-only`floatNone`None
_csrf_retrykeyword-onlyboolTrue

Returns: Response

Raises:

get(path: str, **kwargs) -> Response

Fetch one record from the transport surface identified by path.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

post(path: str, **kwargs) -> Response

Send a prepared request asynchronously through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

put(path: str, **kwargs) -> Response

Send a prepared request asynchronously through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

patch(path: str, **kwargs) -> Response

Send a prepared request asynchronously through the shared transport and decode the typed response wrapper.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

delete(path: str, **kwargs) -> Response

Delete a record on the transport surface and return the server acknowledgement.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: Response

Raises:

download(path: str, **kwargs) -> bytes

Fetch raw bytes: no envelope, no decoding.

ParameterKindTypeDefault
pathpositional-or-keywordstr
kwargsvar-keywordAny

Returns: bytes

Raises:

stream_lines(path: str, *, params: Mapping[str, Any] | None = None, timeout: float | None = None) -> AsyncIterator[str]

Yield lines from a server-sent-events endpoint.

The method this whole module exists for. No default timeout: a stream staying open is the success case, not a hang.

ParameterKindTypeDefault
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
timeoutkeyword-only`floatNone`None

Returns: AsyncIterator[str]

Raises:

paginate(path: str, *, params: Mapping[str, Any] | None = None, limit: int = 100) -> AsyncIterator[Any]

Yield items across `limit/offset` pages.

ParameterKindTypeDefault
pathpositional-or-keywordstr
paramskeyword-only`Mapping[str, Any]None`None
limitkeyword-onlyint100

Returns: AsyncIterator[Any]

Raises:

Module caliber_sdk.aio.waiters

Async waiters, holding the same polling policy as the synchronous ones.

Tested example

def run_and_wait(
    caliber: CaliberClient, *, workflow_id: str, alias: str = "prod"
From sdk/caliber-sdk/examples/workflow_run.py — executed by the SDK test suite.

Public exports

DEFAULT_BACKOFF, DEFAULT_INTERVAL, DEFAULT_MAX_INTERVAL, DEFAULT_TIMEOUT, WaitFailed, WaitTimeout, wait_for, wait_for_terminal_state

Functions

wait_for(poll: Callable[[], Awaitable[T]], *, is_done: Callable[[T], bool], timeout: float = DEFAULT_TIMEOUT, interval: float = DEFAULT_INTERVAL, max_interval: float = DEFAULT_MAX_INTERVAL, backoff: float = DEFAULT_BACKOFF) -> T

Poll until `is_done` or the timeout expires.

A waiter never decides what "finished" means -- the caller supplies the predicate, because only they know whether a `failed` run is a successful outcome for their script.

ParameterKindTypeDefault
pollpositional-or-keywordCallable[[], Awaitable[T]]
is_donekeyword-onlyCallable[[T], bool]
timeoutkeyword-onlyfloatDEFAULT_TIMEOUT
intervalkeyword-onlyfloatDEFAULT_INTERVAL
max_intervalkeyword-onlyfloatDEFAULT_MAX_INTERVAL
backoffkeyword-onlyfloatDEFAULT_BACKOFF

Returns: T

Raises:

wait_for_terminal_state(poll: Callable[[], Awaitable[Any]], *, terminal: frozenset[str] = TERMINAL_STATES, failure: frozenset[str] = FAILURE_STATES, raise_on_failure: bool = True, **options) -> Any

Poll until a payload reports a terminal status.

`raise_on_failure` defaults to True because a script that waited for work and got a failure almost always wants to stop there.

ParameterKindTypeDefault
pollpositional-or-keywordCallable[[], Awaitable[Any]]
terminalkeyword-onlyfrozenset[str]TERMINAL_STATES
failurekeyword-onlyfrozenset[str]FAILURE_STATES
raise_on_failurekeyword-onlyboolTrue
optionsvar-keywordAny

Returns: Any

Raises:

CALIBER : Contextual Adaptive Lifecycle for Intelligent Build, Evaluation, and Refinement — this page is generated from the authoritative Markdown sources in docs/ and the repository-level ARCHITECTURE.md.