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

Q

R

S

T

U

V

W

SymbolDefined in
wait_forcaliber_sdk.waiters
wait_for_terminal_statecaliber_sdk.waiters
WaitFailedcaliber_sdk.waiters
WaitTimeoutcaliber_sdk.waiters
Workflowcaliber_sdk.models.workflows
WorkflowBenchmarkReportsAPIcaliber_sdk.resources.workflows
WorkflowPromotionsAPIcaliber_sdk.resources.workflows
WorkflowRuncaliber_sdk.models.workflows
WorkflowRunCapabilitiescaliber_sdk.models.core
WorkflowRunFailedcaliber_sdk.resources.workflows
WorkflowRunsAPIcaliber_sdk.resources.workflows
WorkflowsAPIcaliber_sdk.resources.workflows
WorkflowServicecaliber_sdk.models.workflows
WorkflowServicesAPIcaliber_sdk.resources.workflows
WorkflowVersioncaliber_sdk.models.workflows
WorkflowVersionsAPIcaliber_sdk.resources.workflows
WorkspaceBreakGlassApplyResultcaliber_sdk.models.workspace
WorkspaceChangeRequestcaliber_sdk.models.workspace
WorkspaceChangeRequestCheckcaliber_sdk.models.workspace
WorkspaceChangeRequestCommentcaliber_sdk.models.workspace
WorkspaceChangeRequestHeadcaliber_sdk.models.workspace
WorkspaceChangeRequestReviewcaliber_sdk.models.workspace
WorkspaceChangeRequestReviewercaliber_sdk.models.workspace
WorkspaceEnvironmentcaliber_sdk.models.core
WorkspaceExternalReviewAttestationcaliber_sdk.models.workspace
WorkspaceImportJobcaliber_sdk.models.workspace
WorkspaceImportReconciliationcaliber_sdk.models.workspace
WorkspaceReleasecaliber_sdk.models.workspace
WorkspaceReleaseDecisioncaliber_sdk.models.workspace
WorkspaceReleaseEvaluationcaliber_sdk.models.workspace
WorkspaceReleaseEvidencecaliber_sdk.models.workspace
WorkspaceReleaseOperationcaliber_sdk.models.workspace
WorkspaceReleaseOperationItemcaliber_sdk.models.workspace
WorkspaceReleaseOperationResultcaliber_sdk.models.workspace
WorkspaceRevisioncaliber_sdk.models.workspace
WorkspaceRevisionDiffcaliber_sdk.models.workspace
WorkspaceRevisionResourcecaliber_sdk.models.workspace
WorkspaceSourcecaliber_sdk.models.workspace
WorkspaceSourceCapabilitiescaliber_sdk.models.workspace
WorkspaceSourceStatecaliber_sdk.models.workspace
WorkspaceVersionTagcaliber_sdk.models.workspace

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_info.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, UNSET_PROJECT, AuthProvider, CaliberAPIError, CaliberAuthenticationError, CaliberClient, CaliberConfigError, CaliberConflictError, CaliberDecodeError, CaliberError, CaliberNotFoundError, CaliberPermissionError, CaliberPreconditionError, CaliberRateLimitError, CaliberServerError, CaliberTransportError, CaliberValidationError, ErrorBody, FieldError, NoAuth, Page, RawAPI, Response, Stability, TokenAuth, Transport, TrustedHeaderAuth, UnsetProjectType, 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_info.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_info.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_infoCapabilitiesAPIRuntime stability tiers and deployment capabilities.
settingsSettingsAPIRuntime and LLM configuration inventory.
projectsProjectsAPIProjects plus the managed file registry.
workspacesAny—
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.
eval_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.
rework_tasksReworkTasksAPIOwned, recoverable work auto-created from a rejected refinement job.
quality_reviewsQualityReviewsAPIA human go/no-go on a job's candidate, distinct from the machine eval gate.
verification_queueVerificationQueueAPI—
ariaAriaAPIThe approval-aware plan and interaction loop.
releasesReleasesAPIRelease candidates, waivers, signoff, and reports.
observabilityObservabilityAPITraces, experiments, and metrics.
auditAuditAPIThe audit log.
adminAdminAPI—
eventsEventsAPIServer-sent event stream.
cookbooksCookbooksAPIThe built-in cookbook catalog and installer.
secretsSecretsAPIWrite-only secret references.
agentsAgentsAPI—
gate_verdictsGateVerdictsAPI—
systemSystemAPI—
memoryMemoryAPI—
llm_pricingLlmPricingAPI—
playground_runsPlaygroundRunsAPI—

Properties

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

Tags grouped by `ga / beta / internal`.

This callable takes no public parameters.

Returns: dict[str, list[str]]

capabilities_api() -> CapabilitiesAPI

Deprecated alias for :attr:capabilities_info.

`capabilities_api reads as "the capabilities API resource", which is accurate but indistinguishable from CaliberClient.capabilities() at a glance. capabilities_info` names what it actually returns.

This callable takes no public parameters.

Returns: CapabilitiesAPI

datasets() -> EvalDatasetsAPI

Deprecated alias for :attr:eval_datasets.

`datasets reads as every kind of stored data CALIBER has (prompt datasets, knowledge bases, ...); eval_datasets` names the one this resource actually is.

This callable takes no public parameters.

Returns: EvalDatasetsAPI

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

workspace_scope(project_id: str) -> Iterator[CaliberClient]

Temporarily select the workspace sent on subsequent requests.

This is useful when a script creates its own workspace and needs the following prompt, dataset, workflow, or assistant records to belong to that project. The previous selection is restored even when an operation raises, so a reusable client does not silently leak project context into the caller's next task.

Project selection is stored in the current thread/task context, so a concurrent caller gets its own selection. Per-request project pins are still preferred for resource methods whose path names the project.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: Iterator[CaliberClient]

Raises:

library_scope() -> Iterator[CaliberClient]

Temporarily omit the project header for a library-scoped call.

`None` is intentionally distinct from an unset scope: it prevents a constructor or outer workspace scope from leaking into a platform or personal-library request. The prior scope is restored on exit.

This callable takes no public parameters.

Returns: Iterator[CaliberClient]

project_scope(project_id: str) -> Iterator[CaliberClient]

Compatibility alias for :meth:workspace_scope.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: Iterator[CaliberClient]

Raises:

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:

readiness() -> Any

Whether CALIBER's configured dependencies (database, object storage, MLflow, ...) are actually reachable -- stronger than :meth:health, which only reports the process is up.

This callable takes no public parameters.

Returns: Any

Raises:

dashboard_summary() -> Any

Aggregate counts and status tiles for the Overview page.

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_info.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, UNSET_PROJECT, USER_AGENT, Response, Transport, UnsetProjectType

Module constants

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

Classes

UnsetProjectType

class UnsetProjectType()

Sentinel distinguishing "use the ambient project" from an explicit `project=None (deliberately unscoped). A bare default of None` could not tell those apart.

Methods

__repr__() -> str

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

This callable takes no public parameters.

Returns: str

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.

The ambient project is context-local. Per-request `project=` pins remain the preferred choice for resource methods whose path names the project.

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.

Properties

project() -> str | None

The ambient project in the current thread/task context.

This callable takes no public parameters.

Returns: str | None

Methods

project(value: str | None) -> None

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

ParameterKindTypeDefault
valuepositional-or-keyword`strNone`—

Returns: None

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, project: str | UnsetProjectType | None = UNSET_PROJECT, _csrf_retry: bool = True) -> Response

Perform one API call, returning the unwrapped payload.

`project, when passed, pins the request's X-CALIBER-Project header regardless of the ambient (constructor/project_scope) scope -- resource modules that build a /projects/{project_id}/... path use this to send that same id, never whatever the client happens to be scoped to. Left at its default (UNSET_PROJECT), the ambient scope applies unchanged; None` deliberately omits the header even if an ambient scope is set.

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
projectkeyword-only`strUnsetProjectTypeNone`UNSET_PROJECT
_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, *, project: str | UnsetProjectType | None = UNSET_PROJECT, **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.

`project pins the request the same way it does for :meth:request`.

ParameterKindTypeDefault
pathpositional-or-keywordstr—
projectkeyword-only`strUnsetProjectTypeNone`UNSET_PROJECT
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_info.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, CaliberDecodeError, CaliberError, CaliberNotFoundError, CaliberPermissionError, CaliberPreconditionError, 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.

CaliberDecodeError

class CaliberDecodeError(payload)

Bases: CaliberError

A 2xx payload had the wrong shape to decode.

Distinct from :class:CaliberAPIError: the request succeeded and the server is not complaining about anything, but the payload was not the list (or object) this call expected -- an error page from a misconfigured proxy, an envelope from the wrong endpoint, `None where a body was required. Raised only by callers that opt into strict decoding (decode_list(..., strict=True)`); by default a shape mismatch degrades to an empty result instead, per this module's tolerant-decoding principle (S4) -- strict mode exists for the contract tests that must tell "empty" apart from "wrong shape entirely".

Constructor

__init__(payload) -> None

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

ParameterKindTypeDefault
payloadpositional-or-keywordAny—

Returns: None

Attributes

AttributeTypeNotes
payloadAny—
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, reason_code: str | None = 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, reason_code: str | None = 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
reason_codekeyword-only`strNone`None

Returns: None

Attributes

AttributeTypeNotes
status_codeAny—
detailAny—
methodAny—
urlAny—
request_idAny—
payloadAny—
reason_codeAny—
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.).

CaliberPreconditionError

class CaliberPreconditionError()

Bases: CaliberAPIError

412 — a stale precondition (e.g. `If-Match`/ETag) failed.

Section 13.6's target design (`docs/workspace-plan.md) reserves 412 for a stale ETag / compare-and-set precondition, distinct from 409's "valid request, but conflicts with current state" -- the caller must re-read the current resource and retry with a fresh precondition rather than simply resubmitting the same request. Carries reason_code when the server sets one so a caller can distinguish *which* precondition failed without parsing detail`.

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, AdminAPI, AgentsAPI, AriaAPI, AriaDraftsAPI, AriaSessionsAPI, AuditAPI, AuthAPI, CapabilitiesAPI, CookbooksAPI, EvalDatasetsAPI, EvaluationsAPI, EventsAPI, GateVerdictsAPI, GatewayAPI, JobsAPI, JudgesAPI, KnowledgeBasesAPI, LlmPricingAPI, McpServersAPI, MeAPI, MemoryAPI, ObjectStoreAPI, ObservabilityAPI, OpenApiIntegrationsAPI, PlaygroundRunsAPI, ProjectFilesAPI, ProjectReworkTasksAPI, ProjectsAPI, PromptsAPI, QualityReviewsAPI, RawAPI, ReleasesAPI, Resource, ReviewQueuesAPI, ReworkTasksAPI, SecretsAPI, SettingsAPI, SkillsAPI, SystemAPI, TokensAPI, ToolsAPI, VerificationQueueAPI, WorkflowPromotionsAPI, WorkflowRunFailed, WorkflowRunsAPI, WorkflowServicesAPI, WorkflowVersionsAPI, WorkflowsAPI, WorkspacesAPI

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, AdminAPI, 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, project_id: 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.

`project_id` optionally binds the token to one project you already hold a role in -- the server refuses to issue a token bound to a project you have no relationship with. A bound token is then refused for any request that names a different project.

ParameterKindTypeDefault
namepositional-or-keywordstr—
scopeskeyword-only`Sequence[str]None`None
expires_atkeyword-only`strNone`None
project_idkeyword-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:

AdminAPI

class AdminAPI()

Platform-wide, admin-only operational surfaces.

Methods

platform_admin_inventory() -> PlatformAdminInventory

Who currently holds each config-driven global scope.

Metadata only -- `caliber.admin-gated, and grants no project or resource access itself. See docs/workspace-plan.md` Phase 1 item 13 for why this exists: a recovery/support aid for "who do I even ask", not a capability.

This callable takes no public parameters.

Returns: PlatformAdminInventory

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

ProjectChangeRequestsAPI, ProjectFilesAPI, ProjectImportsAPI, ProjectMembersAPI, ProjectReleaseOperationsAPI, ProjectReleasesAPI, ProjectRevisionsAPI, ProjectReworkTasksAPI, ProjectSourceAPI, ProjectVersionTagsAPI, ProjectsAPI, WorkspacesAPI

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:

ProjectSourceAPI

class ProjectSourceAPI()

A project's Git-backed source-control binding (P6-B).

Every mutation is optimistic-concurrency-checked with an `If-Match etag, mirroring the server's own contract: a stale write 412s rather than silently overwriting a change another caller just made. Read the current binding with :meth:get, pass its .source.etag back as if_match`.

Methods

get(project_id: str) -> WorkspaceSourceState

Fetch one record from the project source surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: WorkspaceSourceState

Raises:

configure(project_id: str, *, provider: str, provider_host: str, canonical_repository_id: str, display_path: str, default_branch: str = 'main', root_path: str = '', manifest_path: str = '.caliber/workspace.yaml', import_mode: str = 'push', connection_ref: str | None = None, if_match: str | None = None) -> WorkspaceSourceState

Bind or replace this project's source-of-truth repository.

`if_match must be omitted the first time a project has no source configured yet, and must carry the existing binding's etag to replace one that already exists -- passing one when there is nothing to match, or omitting it when there is, both 412. Replacing an existing binding also requires it to be disabled first (:meth:disable`).

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
providerkeyword-onlystr—
provider_hostkeyword-onlystr—
canonical_repository_idkeyword-onlystr—
display_pathkeyword-onlystr—
default_branchkeyword-onlystr'main'
root_pathkeyword-onlystr''
manifest_pathkeyword-onlystr'.caliber/workspace.yaml'
import_modekeyword-onlystr'push'
connection_refkeyword-only`strNone`None
if_matchkeyword-only`strNone`None

Returns: WorkspaceSourceState

Raises:

enable(project_id: str, *, if_match: str) -> WorkspaceSourceState

Verify the binding against its provider and make it importable.

Each transition method calls its own literal path (rather than sharing one helper parameterized on the action) so `docs-site/sdk_coverage.py's static source-text scan -- which matches a literal f"...". after self._post(`, not a runtime-built path -- can see it as covered.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
if_matchkeyword-onlystr—

Returns: WorkspaceSourceState

Raises:

disable(project_id: str, *, if_match: str) -> WorkspaceSourceState

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
if_matchkeyword-onlystr—

Returns: WorkspaceSourceState

Raises:

reconcile(project_id: str, *, if_match: str) -> WorkspaceSourceState

Re-verify an already-enabled binding against its provider.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
if_matchkeyword-onlystr—

Returns: WorkspaceSourceState

Raises:

capabilities(project_id: str) -> WorkspaceSourceCapabilities

What the bound provider supports, without needing credentials.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: WorkspaceSourceCapabilities

Raises:

ProjectImportsAPI

class ProjectImportsAPI()

Durable source-to-revision import jobs for one project (P6-B).

Usage example

def connect_github_source_and_import_on_push(
    caliber: CaliberClient,
    *,
    project_id: str = "PRJ-1",
    repository: str = "octo-org/mortgage-underwriting",
    commit_sha: str = "a" * 40,
    bundle: bytes = b"PK\x05\x06" + b"\x00" * 18,  # minimal empty-ZIP end-of-central-directory
From sdk/caliber-sdk/examples/workspace_github_source.py — executed by the SDK test suite.

Methods

list(project_id: str, *, status: str | None = None, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceImportJob]

Return the current collection of project imports, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
statuskeyword-only`strNone`None
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceImportJob]

Raises:

get(project_id: str, job_id: str) -> WorkspaceImportJob

Fetch one record from the project imports surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
job_idpositional-or-keywordstr—

Returns: WorkspaceImportJob

Raises:

create(project_id: str, *, repository: str, commit_sha: str, bundle: bytes | BinaryIO, idempotency_key: str, filename: str = 'bundle') -> WorkspaceImportJob

Start an import. Multipart, so it does not go through the JSON path.

`idempotency_key` has no default on purpose: the server replays a prior job for a reused key rather than starting a second one, so generating a fresh key on every call here would silently defeat that retry-safety guarantee. Reuse the same key across a retry of the same logical import; the server compares content digests and rejects a key reused for genuinely different content.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
repositorykeyword-onlystr—
commit_shakeyword-onlystr—
bundlekeyword-only`bytesBinaryIO`—
idempotency_keykeyword-onlystr—
filenamekeyword-onlystr'bundle'

Returns: WorkspaceImportJob

Raises:

reconcile(project_id: str, job_id: str) -> WorkspaceImportReconciliation

Explicitly observe an import stuck in `reconcile_required`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
job_idpositional-or-keywordstr—

Returns: WorkspaceImportReconciliation

Raises:

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

Poll until the import reaches a terminal state.

`reconcile_required counts as terminal here -- it will never advance on its own, so a waiter that only accepted succeeded/ failed would block until timeout on the one outcome that needs a caller to act (:meth:reconcile`), not wait longer.

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

Returns: WorkspaceImportJob

Raises:

ProjectRevisionsAPI

class ProjectRevisionsAPI()

Immutable, reviewable Workspace revisions for one project (P6-B).

Methods

list(project_id: str, *, status: str | None = None, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceRevision]

Return the current collection of project revisions, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
statuskeyword-only`strNone`None
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceRevision]

Raises:

get(project_id: str, revision_id: str) -> WorkspaceRevision

Fetch one record from the project revisions surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
revision_idpositional-or-keywordstr—

Returns: WorkspaceRevision

Raises:

diff(project_id: str, revision_id: str, *, base: str) -> WorkspaceRevisionDiff

The deterministic pin-level difference from `base to revision_id`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
revision_idpositional-or-keywordstr—
basekeyword-onlystr—

Returns: WorkspaceRevisionDiff

Raises:

snapshot(project_id: str, *, resources: Sequence[dict[str, Any]]) -> WorkspaceRevision

Pin an explicit list of live CALIBER resource versions into a new, immutable, source-less ("managed") revision (P4-B/P4-C).

Unlike a Git-backed import, this never resolves "current" for you -- each entry in `resources names an exact {"resource_type": ..., "resource_id": ..., "version_ref": ...} pin (logical_name/purpose are optional), so the same request always produces the same content. A resource type with no registered adapter, or whose adapter does not yet support managed snapshotting, is refused (409) rather than silently skipped -- today that's only "prompt"`.

Idempotent by content: retrying with the same `resources list returns the already-created revision instead of a duplicate (the resource list's own digest becomes the revision's revision_sha256`, deduplicated server-side), so no separate idempotency key is needed.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
resourceskeyword-onlySequence[dict[str, Any]]—

Returns: WorkspaceRevision

Raises:

ProjectChangeRequestsAPI

class ProjectChangeRequestsAPI()

The Change Request review lifecycle for one project (P6-B).

A Change Request proposes a ready revision for review and promotes it through a fixed status machine (`draft -> open -> ... -> accepted/closed). Mutations that touch a specific version of the request (update_head/rebase/close/assign_reviewer/ remove_reviewer) take expected_lock_version rather than an If-Match header -- that is the server's own optimistic-concurrency field here (from a prior get()/list() call's .lock_version), unlike :class:ProjectSourceAPI`'s etag.

Usage example

def promote_a_reviewed_revision(
    caliber: CaliberClient,
    *,
    project_id: str = "PRJ-1",
    revision_id: str = "WSR-1",
    environment_id: str = "development",
From sdk/caliber-sdk/examples/workspace_release.py — executed by the SDK test suite.

Methods

list(project_id: str, *, status: str | None = None, created_by: str | None = None, reviewer_user_id: str | None = None, semantic_version: str | None = None, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceChangeRequest]

Return the current collection of project change requests, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
statuskeyword-only`strNone`None
created_bykeyword-only`strNone`None
reviewer_user_idkeyword-only`strNone`None
semantic_versionkeyword-only`strNone`None
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceChangeRequest]

Raises:

get(project_id: str, change_request_id: str) -> WorkspaceChangeRequest

Fetch one record from the project change requests surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—

Returns: WorkspaceChangeRequest

Raises:

create(project_id: str, *, title: str, head_revision_id: str, semantic_version: str, description: str = '', base_revision_id: str | None = None, review_backend: str = 'caliber', reviewer_user_ids: Sequence[str] | None = None) -> WorkspaceChangeRequest

Open a draft Change Request over a ready revision.

Stays `draft until :meth:submit -- creating one does not by itself start review or claim semantic_version`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
titlekeyword-onlystr—
head_revision_idkeyword-onlystr—
semantic_versionkeyword-onlystr—
descriptionkeyword-onlystr''
base_revision_idkeyword-only`strNone`None
review_backendkeyword-onlystr'caliber'
reviewer_user_idskeyword-only`Sequence[str]None`None

Returns: WorkspaceChangeRequest

Raises:

submit(project_id: str, change_request_id: str, *, idempotency_key: str | None = None) -> WorkspaceChangeRequest

Move a draft to `open, reserving its semantic_version` claim.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
idempotency_keykeyword-only`strNone`None

Returns: WorkspaceChangeRequest

Raises:

update_head(project_id: str, change_request_id: str, *, revision_id: str, expected_lock_version: int, change_summary: str = '') -> WorkspaceChangeRequest

Append a new ready revision as the request's next head generation.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
revision_idkeyword-onlystr—
expected_lock_versionkeyword-onlyint—
change_summarykeyword-onlystr''

Returns: WorkspaceChangeRequest

Raises:

rebase(project_id: str, change_request_id: str, *, revision_id: str, expected_lock_version: int, change_summary: str = '', semantic_version: str | None = None) -> WorkspaceChangeRequest

Bring an `out_of_date` request back onto the current accepted head.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
revision_idkeyword-onlystr—
expected_lock_versionkeyword-onlyint—
change_summarykeyword-onlystr''
semantic_versionkeyword-only`strNone`None

Returns: WorkspaceChangeRequest

Raises:

close(project_id: str, change_request_id: str, *, reason: str, expected_lock_version: int) -> WorkspaceChangeRequest

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
reasonkeyword-onlystr—
expected_lock_versionkeyword-onlyint—

Returns: WorkspaceChangeRequest

Raises:

accept(project_id: str, change_request_id: str) -> WorkspaceChangeRequest

Accept a Change Request, advancing the project's accepted revision.

Takes no QA-evidence argument by design: the server derives it itself from a durably recorded QA go decision bound to the request's current head (see `caliber.routes.workspace_change_requests's own docstring on the server side) rather than trusting anything this client could send. A 409` means either no qualifying QA decision exists yet for the current head, or a concurrent acceptance already advanced the project's accepted revision out from under this request.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—

Returns: WorkspaceChangeRequest

Raises:

list_comments(project_id: str, change_request_id: str, *, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceChangeRequestComment]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceChangeRequestComment]

Raises:

add_comment(project_id: str, change_request_id: str, *, body: str, head_id: str | None = None, resource_type: str | None = None, resource_name: str | None = None, source_path: str | None = None) -> WorkspaceChangeRequestComment

Add a comment, optionally anchored to a specific head/resource/path.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
bodykeyword-onlystr—
head_idkeyword-only`strNone`None
resource_typekeyword-only`strNone`None
resource_namekeyword-only`strNone`None
source_pathkeyword-only`strNone`None

Returns: WorkspaceChangeRequestComment

Raises:

list_reviewers(project_id: str, change_request_id: str, *, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceChangeRequestReviewer]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceChangeRequestReviewer]

Raises:

assign_reviewer(project_id: str, change_request_id: str, user_id: str, *, expected_lock_version: int) -> WorkspaceChangeRequestReviewer

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
user_idpositional-or-keywordstr—
expected_lock_versionkeyword-onlyint—

Returns: WorkspaceChangeRequestReviewer

Raises:

remove_reviewer(project_id: str, change_request_id: str, user_id: str, *, expected_lock_version: int) -> WorkspaceChangeRequest

Deactivate a reviewer. Returns the Change Request, not the reviewer row -- `active_reviewer_count` is the reason a caller would check.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
user_idpositional-or-keywordstr—
expected_lock_versionkeyword-onlyint—

Returns: WorkspaceChangeRequest

Raises:

list_reviews(project_id: str, change_request_id: str, *, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceChangeRequestReview]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceChangeRequestReview]

Raises:

submit_review(project_id: str, change_request_id: str, *, head_id: str, decision: str, rationale: str = '') -> WorkspaceChangeRequestReview

Record one reviewer's decision against a specific head.

`decision is "approve" or "request_changes"`; passed through rather than a stricter type so a server that adds a third decision is still reachable without an SDK release.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
head_idkeyword-onlystr—
decisionkeyword-onlystr—
rationalekeyword-onlystr''

Returns: WorkspaceChangeRequestReview

Raises:

list_attestations(project_id: str, change_request_id: str, *, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceExternalReviewAttestation]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceExternalReviewAttestation]

Raises:

refresh_external_review(project_id: str, change_request_id: str) -> None

Queue a re-check of this request's external (e.g. GitHub PR) review state.

Fire-and-forget: the server responds `202` with no resource to decode, so there is nothing meaningful to return.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—

Returns: None

Raises:

list_checks(project_id: str, change_request_id: str, *, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceChangeRequestCheck]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
change_request_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceChangeRequestCheck]

Raises:

ProjectVersionTagsAPI

class ProjectVersionTagsAPI()

Immutable semantic-version claims recorded against revisions (P6-B).

Methods

list(project_id: str, *, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceVersionTag]

Return the current collection of project version tags, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceVersionTag]

Raises:

get(project_id: str, tag: str) -> WorkspaceVersionTag

Fetch one record from the project version tags surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
tagpositional-or-keywordstr—

Returns: WorkspaceVersionTag

Raises:

ProjectReleaseOperationsAPI

class ProjectReleaseOperationsAPI()

Durable apply/rollback intents against one release (P5-C).

Unlike the cursor-paginated Change-Request/import/revision families, :meth:list uses plain `limit/offset -- this resource's own immediate server-side sibling (release list/evidence/evaluations, see :class:ProjectReleasesAPI`) already established that convention for this release family, and there was no reason to introduce a third pagination style where two already coexist in shipped code.

Usage example

def promote_a_reviewed_revision(
    caliber: CaliberClient,
    *,
    project_id: str = "PRJ-1",
    revision_id: str = "WSR-1",
    environment_id: str = "development",
From sdk/caliber-sdk/examples/workspace_release.py — executed by the SDK test suite.

Methods

list(project_id: str, release_id: str, *, limit: int | None = None, offset: int | None = None) -> list[WorkspaceReleaseOperation]

Return the current collection of project release operations, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceReleaseOperation]

Raises:

get(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

Fetch one record from the project release operations surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

create(project_id: str, release_id: str, *, kind: str, idempotency_key: str, expected_environment_lock_version: int, expected_current_release_id: str | None = None, target_release_id: str | None = None) -> WorkspaceReleaseOperationResult

Prepare an `"apply" or "rollback"` operation.

`expected_environment_lock_version` is a compare-and-swap against the environment's current lock version -- a stale value 409s rather than racing another operation targeting the same environment.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
kindkeyword-onlystr—
idempotency_keykeyword-onlystr—
expected_environment_lock_versionkeyword-onlyint—
expected_current_release_idkeyword-only`strNone`None
target_release_idkeyword-only`strNone`None

Returns: WorkspaceReleaseOperationResult

Raises:

apply(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

Execute a prepared operation through its provider adapter.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

observe(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

Re-check an in-flight or ambiguous operation against its provider.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

cancel_expired(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

Cancel an operation whose lease has expired without ever applying.

The literal path stays one f-string passed straight into `self._post( (rather than split across adjacent literals, or built up in a local variable first) because docs-site/sdk_coverage.py's static source-text scan only matches a single quoted literal immediately following self._post(` -- either alternative would make this exact route silently read as uncovered.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

wait(project_id: str, release_id: str, operation_id: str, *, timeout: float = 900.0, **options) -> WorkspaceReleaseOperationResult

Poll until an apply or rollback operation reaches a terminal state.

`reconcile_required counts as terminal here for the same reason it does for :meth:ProjectImportsAPI.wait -- it will never advance on its own, so a caller who only waited for applied/failed would block until timeout on the one outcome that needs :meth:observe` called, not more waiting.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny—

Returns: WorkspaceReleaseOperationResult

Raises:

ProjectReleasesAPI

class ProjectReleasesAPI()

The Workspace release evaluation/decision/approval lifecycle (P5-F).

A release moves through a fixed state machine (`draft -> evaluating -> {blocked, rejected, approved, awaiting_quality_signoff} -> awaiting_approval -> {approved, rejected}); :class:ProjectReleaseOperationsAPI then executes an *approved* release against an environment. Two authorization shapes coexist here, mirroring the server routes exactly: :meth:create/ :meth:evaluate are plain project-scoped actions, while :meth:quality_signoff/:meth:approve/:meth:break_glass_apply` are identity-specific governance decisions the server authorizes on role (Reviewer vs. Owner) and platform scope, not a single scope check.

Usage example

def promote_a_reviewed_revision(
    caliber: CaliberClient,
    *,
    project_id: str = "PRJ-1",
    revision_id: str = "WSR-1",
    environment_id: str = "development",
From sdk/caliber-sdk/examples/workspace_release.py — executed by the SDK test suite.

Methods

list(project_id: str, *, status: str | None = None, environment_id: str | None = None, limit: int | None = None, offset: int | None = None) -> list[WorkspaceRelease]

Return the current collection of project releases, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
statuskeyword-only`strNone`None
environment_idkeyword-only`strNone`None
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceRelease]

Raises:

create(project_id: str, *, revision_id: str, environment_id: str, environment_config_sha256: str, runtime_dependencies_sha256: str, policy_sha256: str, request_idempotency_key: str, change_request_id: str | None = None, change_request_head_id: str | None = None, version_tag_id: str | None = None, predecessor_release_id: str | None = None) -> WorkspaceRelease

Capture immutable release coordinates before evaluation dispatch.

The three `*_sha256` digests are pinned here and re-verified at every later decision point -- a release evaluated against one environment config and then approved against a different one is exactly the drift this pinning exists to make impossible.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
revision_idkeyword-onlystr—
environment_idkeyword-onlystr—
environment_config_sha256keyword-onlystr—
runtime_dependencies_sha256keyword-onlystr—
policy_sha256keyword-onlystr—
request_idempotency_keykeyword-onlystr—
change_request_idkeyword-only`strNone`None
change_request_head_idkeyword-only`strNone`None
version_tag_idkeyword-only`strNone`None
predecessor_release_idkeyword-only`strNone`None

Returns: WorkspaceRelease

Raises:

get(project_id: str, release_id: str) -> WorkspaceRelease

Fetch one record from the project releases surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—

Returns: WorkspaceRelease

Raises:

list_evidence(project_id: str, release_id: str, *, limit: int | None = None, offset: int | None = None) -> list[WorkspaceReleaseEvidence]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceReleaseEvidence]

Raises:

evaluate(project_id: str, release_id: str, *, idempotency_key: str, evaluation_plan_sha256: str, input_sha256: str) -> WorkspaceReleaseEvaluation

Request an evaluation attempt; a worker claims and runs it.

Replayed by `idempotency_key`: calling this again with the same key and digests while an attempt is active returns that same attempt rather than starting a second one, but a different key while one is still active is refused (409) rather than running two evaluations concurrently.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
idempotency_keykeyword-onlystr—
evaluation_plan_sha256keyword-onlystr—
input_sha256keyword-onlystr—

Returns: WorkspaceReleaseEvaluation

Raises:

list_evaluations(project_id: str, release_id: str, *, limit: int | None = None, offset: int | None = None) -> list[WorkspaceReleaseEvaluation]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceReleaseEvaluation]

Raises:

get_evaluation(project_id: str, release_id: str, evaluation_id: str) -> WorkspaceReleaseEvaluation

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
evaluation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseEvaluation

Raises:

wait_for_evaluation(project_id: str, release_id: str, evaluation_id: str, *, timeout: float = 900.0, **options) -> WorkspaceReleaseEvaluation

Poll until the evaluation attempt reaches `succeeded or failed`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
evaluation_idpositional-or-keywordstr—
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny—

Returns: WorkspaceReleaseEvaluation

Raises:

quality_signoff(project_id: str, release_id: str, *, decision: str, gate_evidence_sha256: str, rationale: str = '', change_request_head_id: str | None = None) -> WorkspaceReleaseDecision

Record a QA go/no-go decision. Requires the Reviewer project role.

`decision is "go" or "no_go", passed through rather than a stricter type for the same forward-compatibility reason as :meth:ProjectChangeRequestsAPI.submit_review's decision`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
decisionkeyword-onlystr—
gate_evidence_sha256keyword-onlystr—
rationalekeyword-onlystr''
change_request_head_idkeyword-only`strNone`None

Returns: WorkspaceReleaseDecision

Raises:

approve(project_id: str, release_id: str, *, decision: str, gate_evidence_sha256: str, rationale: str = '', change_request_head_id: str | None = None) -> WorkspaceReleaseDecision

Record the final release go/no-go decision. Requires the Owner role.

Refused (409) unless the release already carries a fresh quality signoff bound to this exact head/revision/digests -- an approval does not itself re-run or supersede quality review.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
decisionkeyword-onlystr—
gate_evidence_sha256keyword-onlystr—
rationalekeyword-onlystr''
change_request_head_idkeyword-only`strNone`None

Returns: WorkspaceReleaseDecision

Raises:

break_glass_apply(project_id: str, release_id: str, *, reason: str, incident_ref: str, authorization_ref: str, expires_at: str, gate_evidence_sha256: str, expected_current_release_id: str, expected_environment_lock_version: int, idempotency_key: str) -> WorkspaceBreakGlassApplyResult

Interactive production recovery, bypassing the normal apply path.

Requires a real browser session (platform Admin, `credential_kind == "session") -- a personal access token can never call this, by server-side design, not merely by convention. expires_at is an ISO-8601 timestamp string; the authorization is void past it regardless of whether it was ever used. expected_current_release_id` is a compare-and-swap against this release (not the environment's currently-deployed one) -- it fails closed if the release moved on while the authorization was being requested.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
reasonkeyword-onlystr—
incident_refkeyword-onlystr—
authorization_refkeyword-onlystr—
expires_atkeyword-onlystr—
gate_evidence_sha256keyword-onlystr—
expected_current_release_idkeyword-onlystr—
expected_environment_lock_versionkeyword-onlyint—
idempotency_keykeyword-onlystr—

Returns: WorkspaceBreakGlassApplyResult

Raises:

ProjectReworkTasksAPI

class ProjectReworkTasksAPI()

Rework tasks owned by one project-scoped agent population.

Methods

list(project_id: str, *, status: str | None = None, assigned_to: str | None = None) -> list[ReworkTask]

Return the current collection of project rework tasks, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
statuskeyword-only`strNone`None
assigned_tokeyword-only`strNone`None

Returns: list[ReworkTask]

Raises:

get(project_id: str, task_id: str) -> ReworkTask

Fetch one record from the project rework tasks surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
task_idpositional-or-keywordstr—

Returns: ReworkTask

Raises:

claim(project_id: str, task_id: str) -> ReworkTask

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
task_idpositional-or-keywordstr—

Returns: ReworkTask

Raises:

resolve(project_id: str, task_id: str, **options) -> ReworkTask

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
task_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: ReworkTask

Raises:

reassign(project_id: str, task_id: str, assigned_to: str) -> ReworkTask

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
task_idpositional-or-keywordstr—
assigned_topositional-or-keywordstr—

Returns: ReworkTask

Raises:

ProjectMembersAPI

class ProjectMembersAPI()

A project's membership, role, and primary-ownership management (P6-B).

Exposed as `ProjectsAPI.members. The equivalent flat methods on ProjectsAPI itself (list_members/add_member/ update_member/remove_member/transfer_ownership`) delegate to this class -- a root convenience for the common case, not a second implementation to keep in sync.

Methods

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

List active members and their effective project roles.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: list[ProjectMember]

Raises:

add(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(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(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:

transfer_ownership(project_id: str, new_owner_user_id: str) -> Project

Atomically move the primary-owner pointer to another active, eligible `owner`-role (Admin) member.

Only the current primary owner may call this; the target must already hold the `owner role (see :meth:add/:meth:update`) and pass a live scope-eligibility check.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
new_owner_user_idpositional-or-keywordstr—

Returns: Project

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—
membersProjectMembersAPI—
rework_tasksProjectReworkTasksAPIOwned, recoverable work auto-created from a rejected refinement job.
sourceProjectSourceAPI—
source_connectionProjectSourceConnectionAPI—
importsProjectImportsAPI—
revisionsProjectRevisionsAPI—
change_requestsProjectChangeRequestsAPI—
version_tagsProjectVersionTagsAPI—
releasesProjectReleasesAPIRelease candidates, waivers, signoff, and reports.
release_operationsProjectReleaseOperationsAPI—

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

Rename/redescribe a project, and (deprecated) flip its lifecycle status.

Section 13.3's compatibility contract: `status stays accepted during a deprecation window rather than becoming a hard TypeError (the server itself now rejects a status field on the underlying PATCH route with a 400 -- name/description only). Passing it here still works, emits a DeprecationWarning, and delegates to archive()/restore() -- the new Admin-only lifecycle routes, which also record who made the change and when (archived_at/ archived_by on the returned Project). Passing both status and name/description` together sends two requests and returns the second (name/description) response, which reflects both.

Prefer calling `archive()/restore()` directly in new code.

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

Returns: Project

Raises:

archive(project_id: str) -> Project

Move a project to the `archived` status, recording who/when.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: Project

Raises:

restore(project_id: str) -> Project

Move an archived project back to `active`, clearing provenance.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: Project

Raises:

transfer_ownership(project_id: str, new_owner_user_id: str) -> Project

Delegates to :meth:ProjectMembersAPI.transfer_ownership (`self.members`).

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
new_owner_user_idpositional-or-keywordstr—

Returns: Project

Raises:

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

Delegates to :meth:ProjectMembersAPI.list (`self.members`).

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: list[ProjectMember]

Raises:

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

Delegates to :meth:ProjectMembersAPI.add (`self.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

Delegates to :meth:ProjectMembersAPI.update (`self.members`).

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

Delegates to :meth:ProjectMembersAPI.remove (`self.members`).

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:

list_environments(project_id: str) -> list[WorkspaceEnvironment]

The project's four fixed environments, in promotion order.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: list[WorkspaceEnvironment]

Raises:

get_environment(project_id: str, name: str) -> WorkspaceEnvironment

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—

Returns: WorkspaceEnvironment

Raises:

update_environment(project_id: str, name: str, *, policy: dict[str, Any], policy_sha256: str, expected_lock_version: int) -> WorkspaceEnvironment

Update an environment's policy configuration.

`policy_sha256 is a caller-supplied digest, trusted the same way the release-lifecycle digests are (environment_config_sha256, runtime_dependencies_sha256, ...) -- the server stores it and policy as given, it does not independently recompute or verify the hash. expected_lock_version is a compare-and-swap against this environment's own lock_version (from a prior :meth:get_environment/:meth:list_environments call); a stale value 409s rather than silently overwriting a change another caller just made. Identity fields (name/environment_class/ promotion_order`) can never be changed here or anywhere else.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—
policykeyword-onlydict[str, Any]—
policy_sha256keyword-onlystr—
expected_lock_versionkeyword-onlyint—

Returns: WorkspaceEnvironment

Raises:

enable_environment(project_id: str, name: str) -> WorkspaceEnvironment

Explicit lifecycle transition to `"active"`; Admin-only.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—

Returns: WorkspaceEnvironment

Raises:

disable_environment(project_id: str, name: str) -> WorkspaceEnvironment

Explicit lifecycle transition to `"disabled"`; Admin-only.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—

Returns: WorkspaceEnvironment

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

AgentsAPI, 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:

rollback(name: str, *, alias: str = 'prod') -> Any

Rotate the alias back to the version that was live before the current one, read from the promotion audit trail.

Raises :class:~caliber_sdk.CaliberConflictError (409) when there is no recorded prior live version to restore.

ParameterKindTypeDefault
namepositional-or-keywordstr—
aliaskeyword-onlystr'prod'

Returns: Any

Raises:

set_baseline(name: str, *, test_run_id: str) -> Any

Pin a prompt test run as the comparison baseline for future runs.

ParameterKindTypeDefault
namepositional-or-keywordstr—
test_run_idkeyword-onlystr—

Returns: Any

Raises:

bind(name: str, *, kind: str, **params) -> Any

Record where a prompt is wired in.

`kind is "agent" (requires agent_id=), "workflow_node" (requires workflow_id= and node_id=), or "standalone"`.

ParameterKindTypeDefault
namepositional-or-keywordstr—
kindkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

delete(name: str) -> Any

Delete a prompt registry entry and its CALIBER-side records.

ParameterKindTypeDefault
namepositional-or-keywordstr—

Returns: Any

Raises:

version(name: str, version: int) -> Any

Load the full template for one specific registry version.

ParameterKindTypeDefault
namepositional-or-keywordstr—
versionpositional-or-keywordint—

Returns: Any

Raises:

workspace(name: str) -> Any

Runtime facts + computed lifecycle status (Bound > Calibrated > Tested > Has test set > Draft) for the Prompts-tab workspace view.

ParameterKindTypeDefault
namepositional-or-keywordstr—

Returns: Any

Raises:

test_render(agent_id: str, *, variables: dict[str, Any] | None = None) -> Any

Render a deployed prompt template with caller-supplied variables.

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

Returns: Any

Raises:

template_library() -> Any

The prompt-builder catalog (base templates + modifiers) used by the Create Prompt flow.

This callable takes no public parameters.

Returns: Any

Raises:

preview_template(*, base_template_id: str, **params) -> Any

Compile a prompt-builder recipe into a single prompt + validation report, without creating anything. `params may carry modifier_ids, builder_values, preview_variables, runtime_variables, template_override, section_overrides`.

ParameterKindTypeDefault
base_template_idkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

calibration_options() -> Any

Optimizer/scorer capabilities for a manual calibration run.

This callable takes no public parameters.

Returns: Any

Raises:

optimization_options() -> Any

Alias of :meth:calibration_options -- the server backs both URLs with the same handler; both are modelled so a caller reaching for either name finds it.

This callable takes no public parameters.

Returns: Any

Raises:

create_calibration_run(**payload) -> Any

Queue a manual prompt calibration run. `payload requires agent_id, eval_dataset_id, optimizer_type, and scorers; see :meth:calibration_options` for what's available.

ParameterKindTypeDefault
payloadvar-keywordAny—

Returns: Any

Raises:

create_optimization_run(**payload) -> Any

Alias of :meth:create_calibration_run -- same handler, the other URL.

ParameterKindTypeDefault
payloadvar-keywordAny—

Returns: Any

Raises:

create_test_run(*, agent_id: str, results: Sequence[dict[str, Any]], **params) -> Any

Persist a completed prompt-test run. `results` is the per-case list; the server recomputes pass/fail/partial counts and the overall score from it rather than trusting client-supplied aggregates.

ParameterKindTypeDefault
agent_idkeyword-onlystr—
resultskeyword-onlySequence[dict[str, Any]]—
paramsvar-keywordAny—

Returns: Any

Raises:

test_runs(**params) -> Any

Run history summaries, newest first.

ParameterKindTypeDefault
paramsvar-keywordAny—

Returns: Any

Raises:

test_run(test_run_id: str) -> Any

One run's full per-case results.

ParameterKindTypeDefault
test_run_idpositional-or-keywordstr—

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:

rollback(skill_id: str) -> Any

Restore the immediately-prior content snapshot as a new version (skills are forward-only; this never rewrites history). Raises :class:~caliber_sdk.CaliberConflictError (409) when there is no earlier version to restore.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr—

Returns: Any

Raises:

set_baseline(skill_id: str, *, test_run_id: str) -> Any

Pin a skill test run as the comparison baseline for future runs.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr—
test_run_idkeyword-onlystr—

Returns: Any

Raises:

bind(skill_id: str, *, kind: str, **params) -> Any

Record where a skill is wired in.

`kind is "agent" (requires agent_id=, adds the skill's name to that agent's referenced skills), "workflow_node", or "standalone"`.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr—
kindkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

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

Agent-free calibration front door: queues a refinement job against a hidden, auto-provisioned target rather than requiring an operator to pick an agent first. `options may carry optimizer_type and notes. Distinct from :meth:ToolsAPI.calibrate -- a skill calibration produces a verification item and refinement job, not a standalone :class:~caliber_sdk.models.CalibrationJob`.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: Any

Raises:

workspace(skill_id: str) -> Any

Runtime facts for the Skills-tab workspace view.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr—

Returns: Any

Raises:

package(skill_id: str) -> Any

Preview the OpenAI-compatible package (`SKILL.md + agents/openai.yaml + bundled resources) generated for a skill. Read-only; malformed resource metadata surfaces as warnings` rather than failing, so the preview still shows what can be generated.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr—

Returns: Any

Raises:

package_zip(skill_id: str) -> bytes

Download the generated package as a ZIP archive.

ParameterKindTypeDefault
skill_idpositional-or-keywordstr—

Returns: bytes

Raises:

import_package(files: Sequence[dict[str, Any]], *, owner: str, **options) -> Any

Create a skill from an OpenAI-style package.

`files is a list of {"path": ..., "content": ...} objects (one SKILL.md with kebab-case name frontmatter, resources only under scripts//references//assets/). options may carry category, tags, skill_metadata, allowed_tools, depends_on -- caller skill_metadata` is merged over the parsed package metadata, never replacing it.

ParameterKindTypeDefault
filespositional-or-keywordSequence[dict[str, Any]]—
ownerkeyword-onlystr—
optionsvar-keywordAny—

Returns: Any

Raises:

import_package_zip(filename: str, content: bytes, *, conflict_strategy: str = 'reject', rename_to: str | None = None) -> Any

Import a ZIP package directly. Multipart, so it does not go through the JSON path.

`conflict_strategy is "reject" (default), "rename" (requires rename_to, a kebab-case name), or "merge"` (admin-only, forward-versioned update of an existing skill).

ParameterKindTypeDefault
filenamepositional-or-keywordstr—
contentpositional-or-keywordbytes—
conflict_strategykeyword-onlystr'reject'
rename_tokeyword-only`strNone`None

Returns: Any

Raises:

create_test_run(*, skill_id: str, results: Sequence[dict[str, Any]], **params) -> Any

Persist a completed skill-test run. `results` is the per-case list; the server recomputes pass/fail/partial counts and the overall score from it rather than trusting client-supplied aggregates.

ParameterKindTypeDefault
skill_idkeyword-onlystr—
resultskeyword-onlySequence[dict[str, Any]]—
paramsvar-keywordAny—

Returns: Any

Raises:

test_runs(**params) -> Any

Run history summaries, newest first.

ParameterKindTypeDefault
paramsvar-keywordAny—

Returns: Any

Raises:

test_run(test_run_id: str) -> Any

One run's full per-case results.

ParameterKindTypeDefault
test_run_idpositional-or-keywordstr—

Returns: Any

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

Score every saved test case now and return the aggregate.

Synchronous -- this call blocks until all cases finish (the server's own docstring for this route calls it "score saved test cases", not a queue). The response has no `job_id/status, so those fields decode to their defaults; pass_rate is real, and total/passed/cases/ran_at land in .extra. For two hundred cases this holds a connection open for minutes -- use :meth:submit_calibration_job + :meth:wait_for_calibration` for the durable, poll-instead-of-block form.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: CalibrationJob

Raises:

submit_calibration_job(tool_id: str) -> CalibrationJob

Queue a calibration run against the tool's saved test cases.

Returns immediately (202) with a real `job_id to poll via :meth:calibration_job or :meth:wait_for_calibration -- the durable counterpart to :meth:calibrate`, for a case count large enough that holding a connection open is the wrong trade.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—

Returns: CalibrationJob

Raises:

resolve_calibration_job(tool_id: str, job_id: str, *, action: str, reason: str) -> Any

Abandon or explicitly retry an ambiguously `running` job.

`action is "abandon" or "retry"; reason` is required (a non-empty resolution reason). Automatic requeue is unsafe because an authored tool may have side effects -- this is the operator decision that a stuck job needs.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—
job_idpositional-or-keywordstr—
actionkeyword-onlystr—
reasonkeyword-onlystr—

Returns: Any

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 (from :meth:submit_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:

archive(tool_id: str) -> Tool

Retire a tool. Refuses (409) while an active workflow deployment still references it -- undeploy first.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—

Returns: Tool

Raises:

set_baseline(tool_id: str, *, test_run_id: str) -> Any

Pin a persisted tool-test run as the comparison baseline. The run must belong to this tool.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—
test_run_idkeyword-onlystr—

Returns: Any

Raises:

source(tool_id: str) -> Any

The tool callable's real source, signature, and docstring. `available=False (with an error`) for a non-Python-callable execution backend -- there is no source to show.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—

Returns: Any

Raises:

usage(tool_id: str) -> Any

Workflow versions that reference this tool, scoped to the caller's visible workflows. Meant to warn before deprecate/archive.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—

Returns: Any

Raises:

versions(tool_id: str) -> list[Tool]

Every version in this tool's family (same `name`), newest first. Tools have no live alias to promote/roll back -- this is a read-only history, not a release surface.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—

Returns: list[Tool]

Raises:

workspace(tool_id: str) -> Any

Runtime facts + computed lifecycle status (Published > Hardened > Tested > Has fixtures > Draft) for the Tools-tab workspace view.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—

Returns: Any

Raises:

save_test_cases(tool_id: str, test_cases: Sequence[dict[str, Any]]) -> Any

Persist the saved fixture set a calibration run scores against. Replaces the whole set (not a merge).

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—
test_casespositional-or-keywordSequence[dict[str, Any]]—

Returns: Any

Raises:

test_invoke(tool_id: str, *, input: dict[str, Any] | None = None) -> Any

Invoke the tool once under preview effect policy: `write/ external_action tools are always mocked; read tools run live only when allow_in_preview is set. Not durable -- for a recorded run, see :meth:create_test_run`.

ParameterKindTypeDefault
tool_idpositional-or-keywordstr—
inputkeyword-only`dict[str, Any]None`None

Returns: Any

Raises:

create_test_run(*, tool_id: str, results: Sequence[dict[str, Any]], **params) -> Any

Persist a completed tool-test run. `results` is the per-case list; the server recomputes pass/fail/partial counts and the overall score from it rather than trusting client-supplied aggregates.

ParameterKindTypeDefault
tool_idkeyword-onlystr—
resultskeyword-onlySequence[dict[str, Any]]—
paramsvar-keywordAny—

Returns: Any

Raises:

test_runs(**params) -> Any

Run history summaries, newest first.

ParameterKindTypeDefault
paramsvar-keywordAny—

Returns: Any

Raises:

test_run(test_run_id: str) -> Any

One run's full per-case results.

ParameterKindTypeDefault
test_run_idpositional-or-keywordstr—

Returns: Any

Raises:

AgentsAPI

class AgentsAPI()

The agent record — the anchor a verification item, refinement job, approval, and rollback checkpoint all hang off of.

Methods

list() -> list[Agent]

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

This callable takes no public parameters.

Returns: list[Agent]

Raises:

get(agent_id: str) -> Agent

Fetch one record from the agents surface identified by agent_id.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—

Returns: Agent

Raises:

create(agent_id: str, *, experiment_id: str, name: str, **options) -> Agent

Register a new agent. `agent_id and experiment_id are both one-shot: identity is fixed at registration (re-keying means delete + re-create, so the audit trail stays clean), and a re-used experiment_id` is a 409 (unique per agent).

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—
experiment_idkeyword-onlystr—
namekeyword-onlystr—
optionsvar-keywordAny—

Returns: Agent

Raises:

update(agent_id: str, **changes) -> Agent

Partial update. `enabled=False` is the pause lever the refinement worker reads before claiming a queued job for this agent.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: Agent

Raises:

delete(agent_id: str) -> bool

Remove an agent and cascade its dependent verification/refinement/ approval/checkpoint/regression rows in one transaction.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—

Returns: bool

Raises:

skills(agent_id: str) -> Any

Skills this agent references in its `optimizer_config, plus any cited name that didn't resolve (missing) -- e.g. an archived or renamed skill an agent still points at. Left untyped: it nests Skill`-shaped records inside a response envelope this SDK doesn't otherwise model, and the two-key shape is simple enough to read off the dict directly.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—

Returns: Any

Raises:

experiment(agent_id: str) -> Any

Whether this agent's configured MLflow experiment is actually reachable. Left untyped: the server itself keeps this shape open (`ExperimentBindingSchema` allows extra fields) because it reflects whatever MLflow reports, not a fixed CALIBER contract.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—

Returns: Any

Raises:

checkpoints(agent_id: str) -> Any

Rollback checkpoints for this agent, newest first.

Left untyped: the checkpoint shape (`RollbackCheckpointSchema`) is the promoter's internal record, not a governed contract, and every artifact type serializes its own version fields into it.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—

Returns: Any

Raises:

rollback(agent_id: str, *, checkpoint_id: str | None = None) -> Any

Roll this agent's live artifact back to a prior version.

Without `checkpoint_id, rolls back to the most recent unused checkpoint — the "undo the last promotion" affordance. Raises :class:~caliber_sdk.CaliberConflictError` (409) if the checkpoint was already rolled back or claimed by a concurrent call.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—
checkpoint_idkeyword-only`strNone`None

Returns: Any

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

PlaygroundRunsAPI, WorkflowBenchmarkReportsAPI, WorkflowPromotionsAPI, 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:

update(version_id: str, *, manifest: dict[str, Any], manifest_hash: str) -> WorkflowVersion

Edit a draft version's manifest. `manifest_hash` must match the version's current hash (optimistic concurrency) -- a mismatch is a 409, meaning reload before editing. Published versions refuse (409): they are immutable.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—
manifestkeyword-onlydict[str, Any]—
manifest_hashkeyword-onlystr—

Returns: WorkflowVersion

Raises:

restore(version_id: str) -> WorkflowVersion

Clone any prior version's manifest into a new editable draft. History is preserved -- the source version is untouched.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—

Returns: WorkflowVersion

Raises:

diff(version_id: str, other_version_id: str) -> Any

Structured, order-independent graph diff. `version_id is the base (older/left); other_version_id` is the candidate (newer/ right) -- oriented so added/removed read naturally comparing v(n-1) -> v(n).

ParameterKindTypeDefault
version_idpositional-or-keywordstr—
other_version_idpositional-or-keywordstr—

Returns: Any

Raises:

export_manifest(version_id: str) -> str

The version's manifest as YAML text (not JSON -- the server returns `application/x-yaml` directly, so this downloads raw bytes rather than going through the envelope path).

ParameterKindTypeDefault
version_idpositional-or-keywordstr—

Returns: str

Raises:

export_python(version_id: str) -> str

The version compiled to standalone Python source (text, not JSON). Prefers the immutable stored bundle for a published version, so the export is byte-identical to what was compiled/approved.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—

Returns: str

Raises:

export_deployment_bundle(version_id: str) -> dict[str, Any]

Download and decode the integrity-sealed deployment bundle.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—

Returns: dict[str, Any]

Raises:

deployment_bundle_status(version_id: str) -> Any

Integrity and dependency-readiness status for one version bundle.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—

Returns: Any

Raises:

preview_run(version_id: str, *, input = None, session_id: str | None = None, **params) -> Any

Run the version in preview mode: real tool bindings are not used. For a real, persisted run see :meth:run or `client.workflows.runs. params may carry manifest` to preview an unsaved edit before it is written to a version.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—
inputkeyword-onlyAnyNone
session_idkeyword-only`strNone`None
paramsvar-keywordAny—

Returns: Any

Raises:

run(version_id: str, *, input = None, alias: str | None = None, **params) -> Any

Execute the version as a real, persisted manual run -- real tool bindings and the configured executor, unlike :meth:preview_run.

A `manifest override in params is only accepted when alias is "manual"` (the default): a deployed alias always executes its immutable saved version.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—
inputkeyword-onlyAnyNone
aliaskeyword-only`strNone`None
paramsvar-keywordAny—

Returns: Any

Raises:

propose_patch(version_id: str, *, evidence: dict[str, Any], job_id: str | None = None) -> Any

Generate a patch candidate from failure evidence: localizes the failure, generates semantic patch ops, compiles the candidate, and persists it for the approval UI. Returns the diagnosis, patch, graph diff, and candidate validation report -- nothing is applied automatically.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—
evidencekeyword-onlydict[str, Any]—
job_idkeyword-only`strNone`None

Returns: Any

Raises:

copilot_edit(version_id: str, *, instruction: str, manifest: dict[str, Any] | None = None) -> Any

Propose a natural-language edit to the manifest. Nothing is persisted -- apply an accepted proposal through :meth:update. With the default `fake` LLM provider the manifest comes back unchanged (a safe no-op).

ParameterKindTypeDefault
version_idpositional-or-keywordstr—
instructionkeyword-onlystr—
manifestkeyword-only`dict[str, Any]None`None

Returns: Any

Raises:

plan_build(version_id: str, *, goal: str, manifest: dict[str, Any] | None = None) -> Any

Author a manifest from a plain-language goal -- the blank-slate sibling of :meth:copilot_edit. Nothing is persisted.

ParameterKindTypeDefault
version_idpositional-or-keywordstr—
goalkeyword-onlystr—
manifestkeyword-only`dict[str, Any]None`None

Returns: Any

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.

This route's envelope carries pagination metadata alongside the list (`{"data": [...], "next_cursor": ...}), which the transport's generic unwrap deliberately leaves untouched -- it only strips a *bare* {"data": ...} shape, precisely so an unenveloped body (the OpenAPI document) is never mistaken for one. Left to the generic unwrap, this method always decoded an empty list against the real server regardless of how many runs existed -- caught only by an end-to-end test against a real response, since every mocked test supplied the bare shape. payload["data"]` is pulled explicitly here until AD-5's uniform pagination contract lands and gives every list method one shared way to do this.

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:

by_trace(trace_id: str) -> WorkflowRun

Look up the run that produced a given MLflow trace id.

ParameterKindTypeDefault
trace_idpositional-or-keywordstr—

Returns: WorkflowRun

Raises:

resume_by_event(**payload) -> Any

Resume whichever paused run is waiting on the given external event, without knowing its run id up front.

ParameterKindTypeDefault
payloadvar-keywordAny—

Returns: Any

Raises:

resume(run_id: str, **payload) -> Any

Resume a run paused at a checkpoint (e.g. a Human Approval node once :meth:approve has recorded the decision).

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
payloadvar-keywordAny—

Returns: Any

Raises:

retry(run_id: str, **payload) -> Any

Retry a failed run from its last durable checkpoint rather than from the start.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
payloadvar-keywordAny—

Returns: Any

Raises:

events(run_id: str, **params) -> Any

The run's event tail. `params may carry after/limit` for incremental polling.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

trace(run_id: str) -> Any

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

ParameterKindTypeDefault
run_idpositional-or-keywordstr—

Returns: Any

Raises:

lineage(run_id: str) -> Any

The chain of parent/child runs this run belongs to (resume and retry both create a new run linked back to the original).

ParameterKindTypeDefault
run_idpositional-or-keywordstr—

Returns: Any

Raises:

manifest(run_id: str) -> Any

The exact manifest snapshot this run executed against -- not the version's current manifest, which may have changed since.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—

Returns: Any

Raises:

checkpoints(run_id: str, **params) -> Any

Durable checkpoints recorded during this run, newest first. `params may carry after/limit`.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

approvals(run_id: str) -> Any

Human Approval checkpoints this run has raised, pending or decided.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—

Returns: Any

Raises:

approve(run_id: str, **payload) -> Any

Approve a pending Human Approval checkpoint. The run does not resume automatically -- call :meth:resume after.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
payloadvar-keywordAny—

Returns: Any

Raises:

reject(run_id: str, **payload) -> Any

Reject a pending Human Approval checkpoint.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
payloadvar-keywordAny—

Returns: Any

Raises:

files(run_id: str, **params) -> Any

Files recorded for this run, hiding pending/rejected/deleted rows. `params may carry kind`.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

upload_file(run_id: str, filename: str, content: bytes, *, kind: str = 'output', media_type: str | None = None) -> Any

Upload a file into this run's namespace. Multipart, so it does not go through the JSON path.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
filenamepositional-or-keywordstr—
contentpositional-or-keywordbytes—
kindkeyword-onlystr'output'
media_typekeyword-only`strNone`None

Returns: Any

Raises:

file(run_id: str, file_id: str) -> Any

One file's metadata record (not its bytes -- see :meth:file_content).

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
file_idpositional-or-keywordstr—

Returns: Any

Raises:

file_content(run_id: str, file_id: str) -> bytes

Download a run file's raw bytes.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
file_idpositional-or-keywordstr—

Returns: bytes

Raises:

register_artifact(run_id: str, *, file_id: str, **params) -> Any

Promote an existing run file to a registered artifact. `params may carry artifact_type, display_name, summary, producer_node_id`.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
file_idkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

PlaygroundRunsAPI

class PlaygroundRunsAPI()

Files for an ad-hoc sandbox preview run -- the prompt/skill/tool "try it" playground, not a real persisted workflow run. Same file lifecycle shape as `client.workflows.runs (list/upload/download), a separate class because the server keys the namespace by run_id` outside any workflow.

Methods

files(run_id: str, **params) -> Any

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

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

upload_file(run_id: str, filename: str, content: bytes, *, kind: str = 'output', media_type: str | None = None) -> Any

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

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
filenamepositional-or-keywordstr—
contentpositional-or-keywordbytes—
kindkeyword-onlystr'output'
media_typekeyword-only`strNone`None

Returns: Any

Raises:

file_content(run_id: str, file_id: str) -> bytes

Download a playground file's raw bytes.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—
file_idpositional-or-keywordstr—

Returns: bytes

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:

management_openapi(workflow_id: str) -> Any

The same OpenAPI spec :meth:openapi serves, but read through CALIBER's own session auth instead of a service token -- for an operator inspecting the contract without minting a token first.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—

Returns: Any

Raises:

tokens(workflow_id: str) -> Any

Service tokens issued for this workflow's published service.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—

Returns: Any

Raises:

create_token(workflow_id: str, **options) -> Any

Mint a new service token. The plaintext secret is returned once and never shown again -- store it immediately.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: Any

Raises:

revoke_token(workflow_id: str, token_id: str) -> Any

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

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
token_idpositional-or-keywordstr—

Returns: Any

Raises:

run_status(workflow_id: str, run_id: str) -> Any

Poll a run submitted through the external service surface, under the same token-authorization policy as the original invocation.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
run_idpositional-or-keywordstr—

Returns: Any

Raises:

WorkflowPromotionsAPI

class WorkflowPromotionsAPI()

Approve or reject a pending deployment-alias promotion.

A promotion is created by `deployments.promote on a gated alias (see ARCHITECTURE.md §4) and sits pending until an approver scope acts on it. There is no listing method here yet -- GET /workflows/{id}/promotions` is covered by a follow-up wave.

Methods

approve(promotion_id: str, *, reason: str | None = None, **params) -> Any

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

ParameterKindTypeDefault
promotion_idpositional-or-keywordstr—
reasonkeyword-only`strNone`None
paramsvar-keywordAny—

Returns: Any

Raises:

reject(promotion_id: str, *, reason: str | None = None, **params) -> Any

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

ParameterKindTypeDefault
promotion_idpositional-or-keywordstr—
reasonkeyword-only`strNone`None
paramsvar-keywordAny—

Returns: Any

Raises:

WorkflowBenchmarkReportsAPI

class WorkflowBenchmarkReportsAPI()

Saved bakeoff/benchmark scorecards -- an evidence record, not a per-workflow child; reports are not scoped to one workflow's own id.

Methods

list(*, status: str = 'all') -> Any

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

ParameterKindTypeDefault
statuskeyword-onlystr'all'

Returns: Any

Raises:

create(*, name: str, worksheet: dict[str, Any], **options) -> Any

Create a new record on the workflow benchmark reports surface and return the server-normalized result.

ParameterKindTypeDefault
namekeyword-onlystr—
worksheetkeyword-onlydict[str, Any]—
optionsvar-keywordAny—

Returns: Any

Raises:

update(report_id: str, **changes) -> Any

Patch an existing record on the workflow benchmark reports surface and return the updated result.

ParameterKindTypeDefault
report_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: Any

Raises:

delete(report_id: str) -> Any

Delete a record on the workflow benchmark reports surface and return the server acknowledgement.

ParameterKindTypeDefault
report_idpositional-or-keywordstr—

Returns: Any

Raises:

WorkflowsAPI

class WorkflowsAPI(transport)

Workflows, plus versions, runs, services, promotions, and benchmark reports 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—
promotionsWorkflowPromotionsAPI—
benchmark_reportsWorkflowBenchmarkReportsAPI—

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:

patches(workflow_id: str) -> Any

Proposed patch candidates (from `versions.propose_patch`) for this workflow's approval UI.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—

Returns: Any

Raises:

import_workflow(*, manifest: dict[str, Any] | None = None, manifest_yaml: str | None = None, deployment_bundle: dict[str, Any] | None = None, name: str | None = None, owner: str | None = None) -> Workflow

Import a manifest as a new, independently-owned workflow. The source `workflow_id/owner` inside the manifest are never trusted -- a fresh id is generated server-side and the caller's identity becomes the owner. 409 on a name clash; 400 if graph/ dependency preflight fails.

ParameterKindTypeDefault
manifestkeyword-only`dict[str, Any]None`None
manifest_yamlkeyword-only`strNone`None
deployment_bundlekeyword-only`dict[str, Any]None`None
namekeyword-only`strNone`None
ownerkeyword-only`strNone`None

Returns: Workflow

Raises:

preview_import(*, manifest: dict[str, Any] | None = None, manifest_yaml: str | None = None, deployment_bundle: dict[str, Any] | None = None, name: str | None = None, owner: str | None = None) -> Any

Validate and resolve an import without creating anything -- reports `ready_to_import plus the validation/dependency detail :meth:import_workflow` would otherwise fail on.

ParameterKindTypeDefault
manifestkeyword-only`dict[str, Any]None`None
manifest_yamlkeyword-only`strNone`None
deployment_bundlekeyword-only`dict[str, Any]None`None
namekeyword-only`strNone`None
ownerkeyword-only`strNone`None

Returns: Any

Raises:

calibration_options(workflow_id: str) -> Any

Objectives, protected-node rules, budgets, and move-set choices available for a manual workflow calibration run.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—

Returns: Any

Raises:

create_calibration_run(workflow_id: str, *, agent_id: str, **params) -> Any

Queue a manual workflow calibration run. `params may carry objective, protected, budget, dataset, move_set; see :meth:calibration_options` for what's available.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
agent_idkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

deployments(workflow_id: str) -> Any

Active deployment-alias -> version bindings for this workflow.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—

Returns: Any

Raises:

promote_deployment(workflow_id: str, alias: str, *, version_id: str, **params) -> Any

Point a deployment alias at a version. On a gated alias this creates a pending promotion instead of rotating immediately -- see `client.workflows.promotions`.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
aliaspositional-or-keywordstr—
version_idkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

rollback_deployment(workflow_id: str, alias: str, **params) -> Any

Pop the deployment's checkpoint stack, restoring the prior version on this alias.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
aliaspositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

list_promotions(workflow_id: str) -> Any

Pending and historical promotions for this workflow. To act on one, see `client.workflows.promotions.approve/.reject -- named list_promotions (not promotions) because that name is already the WorkflowPromotionsAPI` sub-resource.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—

Returns: Any

Raises:

runs_stats(workflow_id: str, **params) -> Any

Aggregate run counts/latencies for this workflow, for the dashboard summary tiles.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

trigger(workflow_id: str, **payload) -> Any

Start a run from an external event (a Start-trigger node in `mode: event). payload may carry alias, event_name, input, idempotency_key`.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
payloadvar-keywordAny—

Returns: Any

Raises:

session_memory(workflow_id: str, *, session_id: str, node_id: str | None = None) -> Any

Read a session's accumulated workflow memory. `session_id is required; node_id` narrows to one memory-writing node.

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
session_idkeyword-onlystr—
node_idkeyword-only`strNone`None

Returns: Any

Raises:

clear_session_memory(workflow_id: str, *, session_id: str, node_id: str | None = None) -> Any

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

ParameterKindTypeDefault
workflow_idpositional-or-keywordstr—
session_idkeyword-onlystr—
node_idkeyword-only`strNone`None

Returns: Any

Raises:

components() -> Any

The Studio node-palette catalog: every built-in component type and its typed input/output ports.

This callable takes no public parameters.

Returns: Any

Raises:

templates() -> Any

The starter-manifest catalog used by "New workflow from template".

This callable takes no public parameters.

Returns: Any

Raises:

cron_preview(*, expr: str, tz: str = 'UTC', count: int = 5) -> Any

Next fire times for a Start-trigger cron expression. Read-only, no workflow required -- powers the Studio trigger panel's preview.

ParameterKindTypeDefault
exprkeyword-onlystr—
tzkeyword-onlystr'UTC'
countkeyword-onlyint5

Returns: Any

Raises:

upload_staging_file(filename: str, content: bytes, *, kind: str = 'input', media_type: str | None = None, session_id: str | None = None) -> Any

Upload a file before any run exists -- a manual-run input staged ahead of :meth:WorkflowVersionsAPI.run, not yet bound to a `workflow_run_id`. Multipart, so it does not go through the JSON path.

ParameterKindTypeDefault
filenamepositional-or-keywordstr—
contentpositional-or-keywordbytes—
kindkeyword-onlystr'input'
media_typekeyword-only`strNone`None
session_idkeyword-only`strNone`None

Returns: Any

Raises:

Module caliber_sdk.resources.quality

Datasets, judges, evaluations, and verification — 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.eval_datasets.create("intake-golden", owner=owner)
    caliber.eval_datasets.add_example(
        dataset.dataset_id,
        input={"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",
    )

    # A judge is selected as a scorer by name (``Judge.<id>``), not by a bare
    # ``judge_id`` field -- the request schema has no such field and rejects it.
    evaluation = caliber.evaluations.create(dataset.dataset_id, scorers=[f"Judge.{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, VerificationQueueAPI

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.eval_datasets.create("intake-golden", owner=owner)
    caliber.eval_datasets.add_example(
        dataset.dataset_id,
        input={"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",
    )

    # A judge is selected as a scorer by name (``Judge.<id>``), not by a bare
    # ``judge_id`` field -- the request schema has no such field and rejects it.
    evaluation = caliber.evaluations.create(dataset.dataset_id, scorers=[f"Judge.{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, *, input, expected = None, **options) -> EvalExample

Append one labeled example row.

The parameter is `input (singular) because that is the server's field name (EvalExampleCreateRequest.input); the request schema forbids extra fields, so an inputs=` (plural) call used to 422 against a real server despite matching every mocked test.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr—
inputkeyword-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:

update(dataset_id: str, **changes) -> EvalDataset

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

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: EvalDataset

Raises:

revise_example(dataset_id: str, example_id: str, *, input: dict[str, Any], expected: dict[str, Any], **params) -> EvalExample

Supersede the old row and append a replacement atomically -- append-only, so history stays reproducible. `params may carry weight, tags`. Returns the new (replacement) example.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr—
example_idpositional-or-keywordstr—
inputkeyword-onlydict[str, Any]—
expectedkeyword-onlydict[str, Any]—
paramsvar-keywordAny—

Returns: EvalExample

Raises:

supersede_example(dataset_id: str, example_id: str) -> EvalExample

Retire an example without replacing it. Idempotent -- superseding an already-superseded row just returns it unchanged.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr—
example_idpositional-or-keywordstr—

Returns: EvalExample

Raises:

restore(dataset_id: str, *, version: int) -> Any

Restore a prior version's example set as a new head version (forward-only; history is preserved, not rewritten).

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr—
versionkeyword-onlyint—

Returns: Any

Raises:

sync(dataset_id: str, **options) -> Any

Push the dataset's current example set to MLflow's GenAI dataset registry. CALIBER stays the source of truth; this is a one-way push, not a bidirectional sync.

ParameterKindTypeDefault
dataset_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: Any

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.eval_datasets.create("intake-golden", owner=owner)
    caliber.eval_datasets.add_example(
        dataset.dataset_id,
        input={"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",
    )

    # A judge is selected as a scorer by name (``Judge.<id>``), not by a bare
    # ``judge_id`` field -- the request schema has no such field and rejects it.
    evaluation = caliber.evaluations.create(dataset.dataset_id, scorers=[f"Judge.{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:

update(judge_id: str, **changes) -> Judge

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

ParameterKindTypeDefault
judge_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: Judge

Raises:

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

Run a judge against sample input (`inputs=, outputs=, expectations=) without recording a scorecard. Returns the raw {"score", "value", "rationale"} — untyped because the judge's value is author-defined (bool, number, or string; see feedback_value_type`), so a fixed model here would either narrow that or duplicate the union for no benefit over reading the dict.

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.eval_datasets.create("intake-golden", owner=owner)
    caliber.eval_datasets.add_example(
        dataset.dataset_id,
        input={"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",
    )

    # A judge is selected as a scorer by name (``Judge.<id>``), not by a bare
    # ``judge_id`` field -- the request schema has no such field and rejects it.
    evaluation = caliber.evaluations.create(dataset.dataset_id, scorers=[f"Judge.{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:

VerificationQueueAPI

class VerificationQueueAPI()

Stage ① Verify — manually-flagged concerns awaiting confirmation.

Verifying or dismissing an item here does not create a refinement job. Building that requires generalizing three separate job-creation paths (prompt/skill/workflow) behind a shared interface, which is adapter-shaped work for a later phase, not this resource. See `docs/workspace-plan.md section 2.2 and caliber/src/caliber/routes/verification.py`'s module docstring.

Methods

list(*, status: str | None = 'pending', severity: str | None = None, agent_id: str | None = None) -> list[VerificationItem]

Return the current collection of verification queue, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`'pending'
severitykeyword-only`strNone`None
agent_idkeyword-only`strNone`None

Returns: list[VerificationItem]

Raises:

get(item_id: str) -> VerificationItem

Fetch one record from the verification queue surface identified by item_id.

ParameterKindTypeDefault
item_idpositional-or-keywordstr—

Returns: VerificationItem

Raises:

create(agent_id: str, *, category: str, free_text: str, **options) -> VerificationItem

Manually flag a concern that isn't tied to an already-running job.

ParameterKindTypeDefault
agent_idpositional-or-keywordstr—
categorykeyword-onlystr—
free_textkeyword-onlystr—
optionsvar-keywordAny—

Returns: VerificationItem

Raises:

verify(item_id: str, **options) -> VerificationItem

Confirm the flagged concern is real.

Returns the updated item. The server's response also carries a `job key, which is always None` today — see the class docstring.

ParameterKindTypeDefault
item_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: VerificationItem

Raises:

dismiss(item_id: str, **options) -> VerificationItem

Mark the flagged concern as not real (or, with `duplicate_of_id`, as a duplicate of another item).

ParameterKindTypeDefault
item_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: VerificationItem

Raises:

mark_duplicate(item_id: str, duplicate_of_id: str, **options) -> VerificationItem

Dedicated route for "this is a duplicate of X" — same mutation as :meth:dismiss with `duplicate_of_id` set, but a distinct call makes the intent unambiguous in audit logs.

ParameterKindTypeDefault
item_idpositional-or-keywordstr—
duplicate_of_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: VerificationItem

Raises:

batch(action: str, item_ids: list[str], **options) -> VerificationBatchResult

Verify or dismiss several items in one round-trip.

Per-item failures don't fail the whole batch — inspect `result.results` for which items succeeded.

ParameterKindTypeDefault
actionpositional-or-keywordstr—
item_idspositional-or-keywordlist[str]—
optionsvar-keywordAny—

Returns: VerificationBatchResult

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:

update_guardrail_config(endpoint_id: str, guardrail_id: str, **changes) -> Any

Change how an already-attached guardrail behaves on this endpoint (e.g. its enabled state or order) without detaching and reattaching it.

ParameterKindTypeDefault
endpoint_idpositional-or-keywordstr—
guardrail_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: Any

Raises:

detach_guardrail(endpoint_id: str, guardrail_id: str) -> Any

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

ParameterKindTypeDefault
endpoint_idpositional-or-keywordstr—
guardrail_idpositional-or-keywordstr—

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, AriaDraftsAPI, AriaSessionsAPI, AuditAPI, CookbooksAPI, EventsAPI, GateVerdictsAPI, JobsAPI, LlmPricingAPI, MemoryAPI, ObservabilityAPI, QualityReviewsAPI, ReleasesAPI, ReviewQueuesAPI, ReworkTasksAPI, SecretsAPI, SystemAPI

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:

request_changes(job_id: str, notes: str, **options) -> Any

Send a `candidate_ready` job's candidate back for another pass.

Records `notes as the job's review feedback and returns it to running at the candidate stage rather than ending it — a human collaboration action, distinct from the automatic self-correction loop (refine_iteration` is left untouched).

ParameterKindTypeDefault
job_idpositional-or-keywordstr—
notespositional-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.

`answers is wrapped in {"answers": ...} because that is the server's actual field (ReviewItemSubmitRequest.answers`); the request schema forbids extra fields, so posting the answer keys unwrapped at the top level used to 422 against a real server despite matching every mocked test.

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

Returns: Any

Raises:

alignment_examples(queue_id: str, **params) -> Any

Human labels usable for judge-alignment scoring.

`question_key (required by the server) belongs in params` -- without it the route always 400s, which this method used to make impossible to avoid since it accepted no query parameters at all.

ParameterKindTypeDefault
queue_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

ReworkTasksAPI

class ReworkTasksAPI()

Owned, recoverable work created when a refinement job is rejected.

Every task originates automatically -- from the machine eval gate, or from a `"no_go" :class:QualityReviewsAPI decision (see :class:~caliber_sdk.models.operations.ReworkTask) -- so there is no create` here by design.

Methods

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

`status defaults server-side to "open"; pass "all"` for every status.

ParameterKindTypeDefault
statuskeyword-only`strNone`None
assigned_tokeyword-only`strNone`None

Returns: list[ReworkTask]

Raises:

get(task_id: str) -> ReworkTask

Fetch one record from the rework tasks surface identified by task_id.

ParameterKindTypeDefault
task_idpositional-or-keywordstr—

Returns: ReworkTask

Raises:

claim(task_id: str) -> ReworkTask

`open -> in_progress`, assigned to the calling identity.

ParameterKindTypeDefault
task_idpositional-or-keywordstr—

Returns: ReworkTask

Raises:

resolve(task_id: str, **options) -> ReworkTask

`in_progress -> resolved. options may carry resolution_job_id and resolution_notes`. Only the assignee or an admin may resolve a task.

ParameterKindTypeDefault
task_idpositional-or-keywordstr—
optionsvar-keywordAny—

Returns: ReworkTask

Raises:

reassign(task_id: str, assigned_to: str) -> ReworkTask

Admin-only: change the assignee of an `open or in_progress task. This also claims it -- the task becomes in_progress`.

ParameterKindTypeDefault
task_idpositional-or-keywordstr—
assigned_topositional-or-keywordstr—

Returns: ReworkTask

Raises:

QualityReviewsAPI

class QualityReviewsAPI()

A human go/no-go decision on a refinement job's candidate, distinct from the machine eval gate.

Nested under a job (`/jobs/{job_id}/quality-reviews`) rather than its own top-level collection -- a review always belongs to exactly one job, with no independent "list every review" use case.

Methods

create(job_id: str, *, decision: str, rationale: str) -> QualityReview

Record a decision. `decision is "go" or "no_go"`.

`"go" is advisory only -- the job is untouched. "no_go" terminally rejects the job and creates a :class:~caliber_sdk.models.operations.ReworkTask with failure_kind == "quality_no_go" (see :attr:CaliberClient.rework_tasks`).

ParameterKindTypeDefault
job_idpositional-or-keywordstr—
decisionkeyword-onlystr—
rationalekeyword-onlystr—

Returns: QualityReview

Raises:

list(job_id: str) -> list[QualityReview]

A job's review history, newest first.

ParameterKindTypeDefault
job_idpositional-or-keywordstr—

Returns: list[QualityReview]

Raises:

AriaSessionsAPI

class AriaSessionsAPI()

Aria conversational sessions: messages, attachments, the message queue, intent resolution, and the session-scoped plan lifecycle.

Distinct from `client.aria.plans/.create_plan/etc: those are Aria's durable **goal-plans** (/aria/plans/*), while this is the **chat session** surface (/assistant/*) a goal-plan is created from. Both are "Aria" to a user; they are different route families on the server, which is why they are separate classes under one client.aria` tree rather than one flat namespace.

Methods

list(*, owner: str | None = None) -> Any

Return the current collection of Aria sessions, applying any supported filters.

ParameterKindTypeDefault
ownerkeyword-only`strNone`None

Returns: Any

Raises:

create(**options) -> Any

`options may carry title, goal, metadata_, artifact_type, skill_mode, pinned_skill_names`.

ParameterKindTypeDefault
optionsvar-keywordAny—

Returns: Any

Raises:

get(session_id: str) -> Any

Fetch one record from the Aria sessions surface identified by session_id.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—

Returns: Any

Raises:

update(session_id: str, **changes) -> Any

Patch an existing record on the Aria sessions surface and return the updated result.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: Any

Raises:

messages(session_id: str) -> Any

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

ParameterKindTypeDefault
session_idpositional-or-keywordstr—

Returns: Any

Raises:

send_message(session_id: str, content: str, **params) -> Any

`params may carry artifact_type, skill_mode, skill_names, mode, steer`.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
contentpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

queue(session_id: str) -> Any

Messages queued to send once the current turn finishes.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—

Returns: Any

Raises:

enqueue_message(session_id: str, content: str, **params) -> Any

`params may carry mode (queue vs. steer) and kind`.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
contentpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

cancel_queued(queue_id: str) -> bool

204 on success; the queued message is gone either way once this returns without raising.

ParameterKindTypeDefault
queue_idpositional-or-keywordstr—

Returns: bool

Raises:

attachments(session_id: str) -> Any

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

ParameterKindTypeDefault
session_idpositional-or-keywordstr—

Returns: Any

Raises:

create_attachment(session_id: str, *, kind: str, **params) -> Any

Attach by reference rather than uploading bytes. `kind is "text_snippet" (requires text=), "library_resource" (requires resource_type=, resource_id=), or "object_file" (requires bucket=, key=). For raw file bytes see :meth:upload_attachment`.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
kindkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

upload_attachment(session_id: str, filename: str, content: bytes, *, bucket: str | None = None) -> Any

Upload a file's bytes as an attachment. Multipart, so it does not go through the JSON path. `bucket`, if given, also persists the raw file to that object-store bucket.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
filenamepositional-or-keywordstr—
contentpositional-or-keywordbytes—
bucketkeyword-only`strNone`None

Returns: Any

Raises:

delete_attachment(attachment_id: str) -> bool

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

ParameterKindTypeDefault
attachment_idpositional-or-keywordstr—

Returns: bool

Raises:

resolve_intent(session_id: str, content: str, **params) -> Any

Classify a free-text message into a known intent + slots before committing to a plan. `params may carry context`.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
contentpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

create_plan(session_id: str, **params) -> Any

`params may carry content, intent_name, slot_overrides, context`.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

latest_plan(session_id: str) -> Any

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

ParameterKindTypeDefault
session_idpositional-or-keywordstr—

Returns: Any

Raises:

execute_plan(session_id: str, **params) -> Any

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

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

operation(session_id: str, operation_id: str) -> Any

Poll a long-running plan-execution operation.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: Any

Raises:

drafts(session_id: str) -> Any

Artifact drafts this session has produced. To act on one, see `client.aria.drafts`.

ParameterKindTypeDefault
session_idpositional-or-keywordstr—

Returns: Any

Raises:

AriaDraftsAPI

class AriaDraftsAPI()

An artifact draft's validate -> test -> approve -> publish lifecycle.

`approve/publish are gated` in Aria's own tool projection -- the autonomous loop cannot call them regardless of build mode -- but both remain ordinary, human-driven HTTP operations reachable here.

Methods

get(draft_id: str) -> Any

Fetch one record from the Aria drafts surface identified by draft_id.

ParameterKindTypeDefault
draft_idpositional-or-keywordstr—

Returns: Any

Raises:

update(draft_id: str, **changes) -> Any

Patch an existing record on the Aria drafts surface and return the updated result.

ParameterKindTypeDefault
draft_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: Any

Raises:

validate(draft_id: str) -> Any

Run the server-side validation pass against the targeted draft.

ParameterKindTypeDefault
draft_idpositional-or-keywordstr—

Returns: Any

Raises:

test(draft_id: str) -> Any

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

ParameterKindTypeDefault
draft_idpositional-or-keywordstr—

Returns: Any

Raises:

approve(draft_id: str) -> Any

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

ParameterKindTypeDefault
draft_idpositional-or-keywordstr—

Returns: Any

Raises:

publish(draft_id: str) -> Any

A failed publish reports `success: false` in the body (400) rather than raising for every failure mode -- check the report.

ParameterKindTypeDefault
draft_idpositional-or-keywordstr—

Returns: Any

Raises:

AriaAPI

class AriaAPI(transport)

Aria: conversational sessions (`.sessions), artifact drafts (.drafts`), durable goal-plans, and deployment-wide config.

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

Constructor

__init__(transport) -> None

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

ParameterKindTypeDefault
transportpositional-or-keywordAny—

Returns: None

Attributes

AttributeTypeNotes
sessionsAriaSessionsAPI—
draftsAriaDraftsAPI—

Methods

capabilities() -> Any

What Aria is allowed to do in this deployment.

This callable takes no public parameters.

Returns: Any

Raises:

config() -> Any

Deployment-wide assistant settings: engine, model, reasoning effort, enabled intents/domains, autonomy status.

This callable takes no public parameters.

Returns: Any

Raises:

update_config(**changes) -> Any

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

ParameterKindTypeDefault
changesvar-keywordAny—

Returns: Any

Raises:

prompt_draft(description: str) -> Any

One-shot prompt draft from a free-text task description -- feeds the manual prompt builder's "Describe it" on-ramp. Not session- scoped and nothing is persisted.

ParameterKindTypeDefault
descriptionpositional-or-keywordstr—

Returns: Any

Raises:

run(run_id: str) -> Any

One Aria-driven run's detail (a message turn or plan-execution run), for the session transcript's expandable trace.

ParameterKindTypeDefault
run_idpositional-or-keywordstr—

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:

report_job(report_job_id: str) -> Any

Fetch a generated Allure-format report job by id.

ParameterKindTypeDefault
report_job_idpositional-or-keywordstr—

Returns: Any

Raises:

timeline(**params) -> Any

Recent promotion/rollback/activation events, newest first.

`params: limit (default 50, server-capped at 200) and entity_type (prompt / workflow / knowledge_base / skill`).

ParameterKindTypeDefault
paramsvar-keywordAny—

Returns: Any

Raises:

live() -> Any

What is currently live across artifact types.

Prompt `@prod` liveness lives in the MLflow registry, not here — see the server route's own docstring; this reports DB-backed liveness (workflow deployments, knowledge-base active versions).

This callable takes no public parameters.

Returns: Any

Raises:

operations(**params) -> Any

Durable release intents, including any with an incomplete external effect. `params: status, limit` (default 100, capped 500).

ParameterKindTypeDefault
paramsvar-keywordAny—

Returns: Any

Raises:

reconcile() -> Any

Observe provider alias state and settle incomplete prompt release intents. The operator-triggered half of the intent-first release protocol described in `ARCHITECTURE.md` §8.

This callable takes no public parameters.

Returns: Any

Raises:

resolve_operation(operation_id: str, *, action: str, **params) -> Any

Retry or abandon a `prepared` (pre-effect) release intent.

`action is "retry" or "abandon". Only prepared rows are accepted — once a row reaches applying the provider may already have changed, and reconciliation (:meth:reconcile`), not a blind retry, is the safe next step.

ParameterKindTypeDefault
operation_idpositional-or-keywordstr—
actionkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

GateVerdictsAPI

class GateVerdictsAPI()

Advisory per-version evaluation verdicts (prompt/workflow/skill).

Advisory in v1: a verdict never blocks alias rotation on its own (see `ARCHITECTURE.md` §4) — it is release evidence for the Version panel, not a gate.

Methods

get(artifact_type: str, version_key: str) -> Any

The latest verdict, or `{"state": "none"}` if none was recorded.

ParameterKindTypeDefault
artifact_typepositional-or-keywordstr—
version_keypositional-or-keywordstr—

Returns: Any

Raises:

record(artifact_type: str, version_key: str, *, state: str, **params) -> Any

Upsert a verdict. `state is "pass", "fail", or "none"; params may carry score, baseline_score, min_aggregate_score, worst_regression, max_regression_delta, and eval_run_id`.

ParameterKindTypeDefault
artifact_typepositional-or-keywordstr—
version_keypositional-or-keywordstr—
statekeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

SystemAPI

class SystemAPI()

Operational surfaces: effect-ledger and webhook recovery (both "CALIBER could not complete something outward-facing, and only a person can decide what happens next" -- see `routes/system_effects.py` for the full rationale), plus service health, the background-loop queue, and the incident/alert surface.

Methods

effects(**params) -> Any

Indeterminate effect-ledger claims. Defaults to `status=in_progress server-side -- the set that actually needs a decision. params: status, workflow_run_id, limit`.

ParameterKindTypeDefault
paramsvar-keywordAny—

Returns: Any

Raises:

resolve_effect(effect_key: str, *, resolution: str, **params) -> Any

Record whether an indeterminate effect happened. `resolution is "skip" (it did happen; do not repeat it) or "retry"` (it did not). Admin-scoped and audited -- this asserts something about the outside world CALIBER cannot verify on its own.

ParameterKindTypeDefault
effect_keypositional-or-keywordstr—
resolutionkeyword-onlystr—
paramsvar-keywordAny—

Returns: Any

Raises:

webhook_dead_letters(**params) -> Any

Outbound events that were never delivered. Defaults to `status=open server-side. params: status, kind, limit`.

ParameterKindTypeDefault
paramsvar-keywordAny—

Returns: Any

Raises:

acknowledge_dead_letter(dead_letter_id: str, **params) -> Any

Mark a dead letter handled without resending it.

ParameterKindTypeDefault
dead_letter_idpositional-or-keywordstr—
paramsvar-keywordAny—

Returns: Any

Raises:

replay_dead_letter(dead_letter_id: str) -> Any

Re-send a lost event. A failed replay leaves the row open (not acknowledged) and records why, so a failed recovery never looks like a completed one.

ParameterKindTypeDefault
dead_letter_idpositional-or-keywordstr—

Returns: Any

Raises:

services() -> Any

Live health probes for CALIBER's own backing services (database, object storage, MLflow, ...) -- the Settings page's service-status panel.

This callable takes no public parameters.

Returns: Any

Raises:

queue() -> Any

Depth and health of the in-process background-loop queues (refinement, calibration, workflow runs, ...).

This callable takes no public parameters.

Returns: Any

Raises:

alerts() -> Any

Active operational alerts (a queue backed up, a loop stalled).

This callable takes no public parameters.

Returns: Any

Raises:

incidents() -> Any

Durable incident records -- distinct from :meth:alerts, which is live/transient; an incident persists once opened.

This callable takes no public parameters.

Returns: Any

Raises:

acknowledge_incident(incident_id: str) -> Any

Take ownership. Deliberately not the same as resolving: "someone is looking at this" and "it stopped" are different facts.

ParameterKindTypeDefault
incident_idpositional-or-keywordstr—

Returns: Any

Raises:

silence_incident(incident_id: str, *, minutes: int = 60) -> Any

Mute routing for `minutes` (default 60) while keeping the record -- the incident is not resolved, just not paging anyone.

ParameterKindTypeDefault
incident_idpositional-or-keywordstr—
minuteskeyword-onlyint60

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:

record_feedback(trace_id: str, *, value, **params) -> Any

Attach a human feedback assessment to a trace (`mlflow.log_feedback). value is a bool, number, or string; params may carry name (default "feedback") and rationale`. Returns the trace's refreshed assessments.

ParameterKindTypeDefault
trace_idpositional-or-keywordstr—
valuekeyword-onlyAny—
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:

LlmPricingAPI

class LlmPricingAPI()

Per-model token pricing (USD per 1K), used to cost out gateway usage.

Methods

list(*, status: str | None = None) -> Any

Return the current collection of llm pricing, applying any supported filters.

ParameterKindTypeDefault
statuskeyword-only`strNone`None

Returns: Any

Raises:

get(pricing_id: str) -> Any

Fetch one record from the llm pricing surface identified by pricing_id.

ParameterKindTypeDefault
pricing_idpositional-or-keywordstr—

Returns: Any

Raises:

create(*, provider: str, model_id: str, prompt_price: float, completion_price: float, **options) -> Any

`options may carry cached_prompt_price, tags`.

ParameterKindTypeDefault
providerkeyword-onlystr—
model_idkeyword-onlystr—
prompt_pricekeyword-onlyfloat—
completion_pricekeyword-onlyfloat—
optionsvar-keywordAny—

Returns: Any

Raises:

update(pricing_id: str, **changes) -> Any

Patch an existing record on the llm pricing surface and return the updated result.

ParameterKindTypeDefault
pricing_idpositional-or-keywordstr—
changesvar-keywordAny—

Returns: Any

Raises:

MemoryAPI

class MemoryAPI()

Direct add/search/list/delete over agent long-term memory (mem0).

Every operation is scoped by `agent_id/user_id/run_id -- at least one is required -- so the shared team store stays partitioned. 503s when memory is disabled or the [memory]` extra is absent on the server.

Methods

add(text: str, *, agent_id: str | None = None, **params) -> Any

`params may carry user_id, run_id, metadata, infer. At least one of agent_id/user_id/run_id` is required.

ParameterKindTypeDefault
textpositional-or-keywordstr—
agent_idkeyword-only`strNone`None
paramsvar-keywordAny—

Returns: Any

Raises:

search(query: str, *, agent_id: str | None = None, **params) -> Any

`params may carry user_id, run_id, top_k` (default 10 server-side).

ParameterKindTypeDefault
querypositional-or-keywordstr—
agent_idkeyword-only`strNone`None
paramsvar-keywordAny—

Returns: Any

Raises:

list(*, agent_id: str | None = None, **params) -> Any

`params may carry user_id, run_id, top_k` (default 50 server-side). Sent as query parameters, not a JSON body.

ParameterKindTypeDefault
agent_idkeyword-only`strNone`None
paramsvar-keywordAny—

Returns: Any

Raises:

delete_all(*, agent_id: str | None = None, **params) -> Any

Delete every memory in the given scope. Irreversible.

ParameterKindTypeDefault
agent_idkeyword-only`strNone`None
paramsvar-keywordAny—

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_info.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, IMPORT_JOB_TERMINAL_STATES, RELEASE_EVALUATION_TERMINAL_STATES, RELEASE_OPERATION_TERMINAL_STATES, STABILITY_BETA, STABILITY_GA, STABILITY_INTERNAL, TERMINAL_RUN_STATES, Account, Agent, AriaInteraction, AriaPlan, AriaPlanDetail, AriaPlanStep, AuditEntry, Bucket, CalibrationJob, Capabilities, CookbookRecipe, CursorPage, ErrorBody, EvalDataset, EvalExample, Evaluation, Extensibility, FieldError, Identity, IssuedToken, Job, Judge, JudgeAlignment, KnowledgeBase, LlmSetupStatus, McpServer, OpenApiIntegration, OpenApiIntegrationVersion, OpenApiOperation, OpenApiOperationDependency, OpenApiToolDraft, OptimizerPlugin, Page, PersonalAccessToken, PlatformAdminInventory, Project, ProjectFile, ProjectFolder, ProjectMember, Prompt, QualityReview, RegisteredOptimizer, ReleaseCandidate, ReviewQueue, ReworkTask, RuntimeSettings, RuntimeSettingsSummary, SessionInfo, Skill, SkillRender, SkillSelection, SkillVersion, Stability, StoredObject, Tool, Trace, VerificationBatchResult, VerificationItem, Workflow, WorkflowRun, WorkflowRunCapabilities, WorkflowService, WorkflowVersion, WorkspaceBreakGlassApplyResult, WorkspaceChangeRequest, WorkspaceChangeRequestCheck, WorkspaceChangeRequestComment, WorkspaceChangeRequestHead, WorkspaceChangeRequestReview, WorkspaceChangeRequestReviewer, WorkspaceEnvironment, WorkspaceExternalReviewAttestation, WorkspaceImportJob, WorkspaceImportReconciliation, WorkspaceRelease, WorkspaceReleaseDecision, WorkspaceReleaseEvaluation, WorkspaceReleaseEvidence, WorkspaceReleaseOperation, WorkspaceReleaseOperationItem, WorkspaceReleaseOperationResult, WorkspaceRevision, WorkspaceRevisionDiff, WorkspaceRevisionResource, WorkspaceSource, WorkspaceSourceCapabilities, WorkspaceSourceConnection, WorkspaceSourceReconciliationResult, WorkspaceSourceState, WorkspaceVersionTag, 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_info.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, CursorPage, Page, Stability

Module constants

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

Classes

CursorPage

class CursorPage()

Bases: Generic[T]

One page of a cursor-paginated list.

Unlike :class:Page's `limit/offset, the cursor is an opaque, server-issued token: a caller resumes by passing next_cursor straight back as the next request's cursor` parameter, never by computing an offset itself. Workspace's import/revision/Change-Request list endpoints use this scheme because their rows can be deleted or reordered between pages in a way a numeric offset would silently skip or repeat.

Dataclass fields

FieldTypeDefault
itemslist[T]field(default_factory=list)
next_cursor`strNone`None

Properties

has_more() -> bool

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

This callable takes no public parameters.

Returns: bool

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_info.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, PlatformAdminInventory, Project, ProjectFile, ProjectFolder, ProjectMember, RegisteredOptimizer, RuntimeSettings, RuntimeSettingsSummary, SessionInfo, WorkflowRunCapabilities, WorkspaceEnvironment

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)
project_id`strNone`None
IssuedToken

class IssuedToken()

Bases: PersonalAccessToken

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

`token is keyword-only (field(kw_only=True)), not merely last by position: it is appended after every inherited PersonalAccessToken field, so a future field added to that base class would otherwise shift token's positional slot without any signal at the call site -- the same defect class this file's own Project/PersonalAccessToken` field-order fixes (#297, and this PR) exist to prevent, closed here permanently rather than re-litigated on every future base-class field.

Dataclass fields

FieldTypeDefault
tokenstrfield(default='', kw_only=True)
PlatformAdminInventory

class PlatformAdminInventory()

Who currently holds each config-driven global scope. Metadata only -- granting nothing beyond knowing who to ask or recover through.

Dataclass fields

FieldTypeDefault
admin_userslist[str]field(default_factory=list)
approver_userslist[str]field(default_factory=list)
operator_userslist[str]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)
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)
archived_at`strNone`None
archived_by`strNone`None
WorkspaceEnvironment

class WorkspaceEnvironment()

One of a project's four fixed environments (dev/qa/staging/ prod). `access_role/permissions` mirror the caller's project-wide role exactly -- an environment carries no separate per-environment role in this MVP.

Dataclass fields

FieldTypeDefault
environment_idstr''
project_idstr''
namestr''
environment_classstr''
promotion_orderint0
statusstr''
recovery_policy_enabledboolFalse
current_release_id`strNone`None
pending_operation_id`strNone`None
operation_statestr'idle'
policy_sha256str''
lock_versionint1
created_bystr''
created_at`strNone`None
updated_at`strNone`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)
deactivated_at`strNone`None
deactivated_by`strNone`None
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: agents, 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.eval_datasets.create("intake-golden", owner=owner)
    caliber.eval_datasets.add_example(
        dataset.dataset_id,
        input={"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",
    )

    # A judge is selected as a scorer by name (``Judge.<id>``), not by a bare
    # ``judge_id`` field -- the request schema has no such field and rejects it.
    evaluation = caliber.evaluations.create(dataset.dataset_id, scorers=[f"Judge.{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, VerificationBatchResult, VerificationItem

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)
VerificationItem

class VerificationItem()

A manually-flagged concern awaiting Stage ① Verify.

`duplicate_of_id and the duplicate status exist because dismissing a report as "already seen" is common enough to deserve its own outcome, distinct from "not real" — see :meth:VerificationQueueAPI.mark_duplicate`.

Dataclass fields

FieldTypeDefault
item_idstr''
agent_idstr''
project_id`strNone`None
assessment_id`strNone`None
trace_id`strNone`None
experiment_id`strNone`None
session_id`strNone`None
workflow_id`strNone`None
categorystr''
free_textstr''
severitystr''
artifact_type_hint`strNone`None
artifact_ref`strNone`None
submitted_context`dict[str, Any]None`None
statusstr''
priorityint0
assigned_to`strNone`None
verified_by`strNone`None
verified_at`strNone`None
verification_notes`strNone`None
refinement_target`strNone`None
duplicate_of_id`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
VerificationBatchResult

class VerificationBatchResult()

Response envelope for :meth:VerificationQueueAPI.batch.

`results stays a list of raw dicts ({item_id, status, reason, linked_job_id} per row) rather than a nested dataclass — the same choice :class:JudgeAlignment.per_example makes, since :func:decode only maps top-level fields and per-item failures are meant to be inspected, not modeled deeply. linked_job_id is always None today: verifying an item does not create a job. See caliber/src/caliber/routes/verification.py`'s module docstring.

Dataclass fields

FieldTypeDefault
actionstr''
requestedint0
succeededint0
failedint0
resultslist[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.workspace

Typed models for the Workspace revision/import lifecycle (P6-B).

Public exports

IMPORT_JOB_TERMINAL_STATES, RELEASE_EVALUATION_TERMINAL_STATES, RELEASE_OPERATION_TERMINAL_STATES, WorkspaceBreakGlassApplyResult, WorkspaceChangeRequest, WorkspaceChangeRequestCheck, WorkspaceChangeRequestComment, WorkspaceChangeRequestHead, WorkspaceChangeRequestReview, WorkspaceChangeRequestReviewer, WorkspaceExternalReviewAttestation, WorkspaceImportJob, WorkspaceImportReconciliation, WorkspaceRelease, WorkspaceReleaseDecision, WorkspaceReleaseEvaluation, WorkspaceReleaseEvidence, WorkspaceReleaseOperation, WorkspaceReleaseOperationItem, WorkspaceReleaseOperationResult, WorkspaceRevision, WorkspaceRevisionDiff, WorkspaceRevisionResource, WorkspaceSource, WorkspaceSourceCapabilities, WorkspaceSourceState, WorkspaceVersionTag

Classes

WorkspaceImportJob

class WorkspaceImportJob()

Durable source-to-revision import intent.

Dataclass fields

FieldTypeDefault
import_job_idstr''
project_idstr''
source_idstr''
repositorystr''
commit_shastr''
upload_sha256`strNone`None
source_bundle_sha256`strNone`None
source_snapshot_file_id`strNone`None
manifest_sha256`strNone`None
statusstr''
revision_id`strNone`None
idempotency_keystr''
attempt_countint0
max_attemptsint0
claimed_by`strNone`None
claimed_at`strNone`None
lease_expires_at`strNone`None
last_heartbeat_at`strNone`None
error_code`strNone`None
error_summary`strNone`None
created_bystr''
updated_by`strNone`None
created_at`strNone`None
updated_at`strNone`None
completed_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_terminal() -> bool

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

This callable takes no public parameters.

Returns: bool

WorkspaceSource

class WorkspaceSource()

A project's configured Git-backed source-control binding.

Dataclass fields

FieldTypeDefault
source_idstr''
project_idstr''
providerstr''
provider_hoststr''
canonical_repository_idstr''
display_pathstr''
default_branchstr''
root_pathstr''
manifest_pathstr''
import_modestr''
statusstr''
has_connectionboolFalse
external_review_policy_versionstr''
provider_ruleset_sha256`strNone`None
last_verified_at`strNone`None
last_reconciled_at`strNone`None
updated_at`strNone`None
etagstr''
extradict[str, Any]field(default_factory=dict)
WorkspaceSourceState

class WorkspaceSourceState()

Source mode plus its optional configured binding.

`source is None for a caliber_managed project -- one that has never called :meth:~caliber_sdk.resources.projects.ProjectSourceAPI.configure`.

Dataclass fields

FieldTypeDefault
source_modestr'caliber_managed'
source`WorkspaceSourceNone`None
WorkspaceSourceCapabilities

class WorkspaceSourceCapabilities()

Provider-neutral capability snapshot; never includes credentials.

Dataclass fields

FieldTypeDefault
source_idstr''
providerstr''
provider_hoststr''
availableboolFalse
capabilitiesdict[str, Any]field(default_factory=dict)
reason`strNone`None
last_verified_at`strNone`None
WorkspaceImportReconciliation

class WorkspaceImportReconciliation()

An explicit observation of an ambiguous local import snapshot.

Dataclass fields

FieldTypeDefault
jobWorkspaceImportJobfield(default_factory=WorkspaceImportJob)
observedboolFalse
observationstr''
WorkspaceRevisionResource

class WorkspaceRevisionResource()

One exact resource pin in an immutable revision.

Dataclass fields

FieldTypeDefault
resource_pin_idstr''
revision_idstr''
resource_typestr''
logical_namestr''
resource_idstr''
version_refstr''
content_sha256str''
source_path`strNone`None
source_sha256`strNone`None
provider_ref`strNone`None
snapshot_file_id`strNone`None
snapshot_sha256`strNone`None
purposestr''
resolutiondict[str, Any]field(default_factory=dict)
extradict[str, Any]field(default_factory=dict)
WorkspaceRevision

class WorkspaceRevision()

Revision metadata and its exact resource pins.

Dataclass fields

FieldTypeDefault
revision_idstr''
project_idstr''
revision_numberint0
source_id`strNone`None
source_commit_sha`strNone`None
source_kindstr'git'
manifestdict[str, Any]field(default_factory=dict)
manifest_sha256`strNone`None
source_bundle_sha256`strNone`None
source_snapshot_file_id`strNone`None
source_attestationstr''
revision_sha256str''
statusstr''
validation_report`dict[str, Any]None`None
created_bystr''
validated_by`strNone`None
validated_at`strNone`None
created_at`strNone`None
resourceslist[WorkspaceRevisionResource]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)
WorkspaceRevisionDiff

class WorkspaceRevisionDiff()

Deterministic base-to-candidate revision difference.

Dataclass fields

FieldTypeDefault
base_revision_idstr''
revision_idstr''
manifest_changedboolFalse
source_bundle_changedboolFalse
source_commit_changedboolFalse
addedlist[WorkspaceRevisionResource]field(default_factory=list)
removedlist[WorkspaceRevisionResource]field(default_factory=list)
changedlist[WorkspaceRevisionResource]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)
WorkspaceChangeRequestHead

class WorkspaceChangeRequestHead()

One generation of a Change Request's reviewed revision pointer.

Dataclass fields

FieldTypeDefault
head_idstr''
change_request_idstr''
generationint0
revision_idstr''
revision_sha256str''
review_policy_versionstr''
review_policy_sha256str''
changed_bystr''
change_summarystr''
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceChangeRequest

class WorkspaceChangeRequest()

A revision proposed for review, promotion through a fixed status machine (`draft -> open -> ... -> accepted/closed`).

Dataclass fields

FieldTypeDefault
change_request_idstr''
project_idstr''
base_revision_id`strNone`None
current_head_revision_idstr''
created_bystr''
titlestr''
descriptionstr''
head_generationint0
statusstr''
review_backendstr''
accepted_at`strNone`None
accepted_by`strNone`None
closed_reason`strNone`None
lock_versionint0
created_at`strNone`None
updated_at`strNone`None
current_headWorkspaceChangeRequestHeadfield(default_factory=WorkspaceChangeRequestHead)
version_claim`dict[str, Any]None`None
active_reviewer_countint0
extradict[str, Any]field(default_factory=dict)
WorkspaceChangeRequestReviewer

class WorkspaceChangeRequestReviewer()

One user assigned to review a Change Request.

Dataclass fields

FieldTypeDefault
reviewer_idstr''
change_request_idstr''
user_idstr''
assigned_bystr''
assigned_at`strNone`None
removed_by`strNone`None
removed_at`strNone`None
activeboolFalse
extradict[str, Any]field(default_factory=dict)
WorkspaceChangeRequestComment

class WorkspaceChangeRequestComment()

One comment on a Change Request, optionally anchored to a resource.

Dataclass fields

FieldTypeDefault
comment_idstr''
change_request_idstr''
head_id`strNone`None
resource_type`strNone`None
resource_name`strNone`None
source_path`strNone`None
bodystr''
authorstr''
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceChangeRequestCheck

class WorkspaceChangeRequestCheck()

One automated check run against a Change Request head.

Dataclass fields

FieldTypeDefault
check_idstr''
head_idstr''
check_namestr''
attempt_numberint0
implementation_versionstr''
input_digeststr''
evidence_ref`strNone`None
evidence_digest`strNone`None
statusstr''
claimed_by`strNone`None
claimed_at`strNone`None
lease_expires_at`strNone`None
completed_at`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceChangeRequestReview

class WorkspaceChangeRequestReview()

One reviewer's approve/request-changes decision on a specific head.

Dataclass fields

FieldTypeDefault
review_idstr''
change_request_idstr''
head_idstr''
reviewer_idstr''
decisionstr''
rationalestr''
actor_rolestr''
actor_scopeslist[str]field(default_factory=list)
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceExternalReviewAttestation

class WorkspaceExternalReviewAttestation()

A verified provider-side (e.g. GitHub PR) review, mapped onto a head.

Dataclass fields

FieldTypeDefault
attestation_idstr''
change_request_idstr''
head_idstr''
source_idstr''
provider_change_request_idstr''
provider_url`strNone`None
provider_head_commitstr''
provider_resulting_commitstr''
source_tree_sha256str''
workspace_revision_sha256str''
policy_versionstr''
policy_sha256str''
provider_ruleset_sha256`strNone`None
required_checkslist[str]field(default_factory=list)
trusted_check_sourceslist[str]field(default_factory=list)
check_conclusionsdict[str, Any]field(default_factory=dict)
review_actorslist[dict[str, Any]]field(default_factory=list)
merge_method`strNone`None
merge_actor`strNone`None
merged_at`strNone`None
provider_event_idslist[str]field(default_factory=list)
adapter_versionstr''
verified_at`strNone`None
statusstr''
reasonstr''
verification_input_digeststr''
coverage_digest`strNone`None
uncovered_commitslist[str]field(default_factory=list)
uncovered_pathslist[str]field(default_factory=list)
extradict[str, Any]field(default_factory=dict)
WorkspaceVersionTag

class WorkspaceVersionTag()

An immutable semantic-version claim recorded against a revision.

Dataclass fields

FieldTypeDefault
tag_idstr''
project_idstr''
revision_idstr''
change_request_idstr''
tagstr''
kindstr''
created_bystr''
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceRelease

class WorkspaceRelease()

A Workspace release's evaluation/decision state machine record (P5-A through P5-F) -- `draft -> evaluating -> {blocked, rejected, approved, awaiting_quality_signoff} -> awaiting_approval -> {approved, rejected}`.

Dataclass fields

FieldTypeDefault
release_idstr''
project_idstr''
revision_idstr''
environment_idstr''
change_request_id`strNone`None
change_request_head_id`strNone`None
version_tag_id`strNone`None
predecessor_release_id`strNone`None
environment_config_sha256str''
runtime_dependencies_sha256str''
policy_sha256str''
request_idempotency_keystr''
evaluation_evidence_sha256`strNone`None
decision_set_sha256`strNone`None
statusstr''
requested_bystr''
requested_at`strNone`None
evaluated_by`strNone`None
evaluated_at`strNone`None
lock_versionint0
error_code`strNone`None
error_summary`strNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceReleaseEvaluation

class WorkspaceReleaseEvaluation()

One durable evaluation attempt against a release's pinned digests.

Dataclass fields

FieldTypeDefault
evaluation_idstr''
runtime_lineage_id`strNone`None
project_idstr''
workspace_release_idstr''
idempotency_keystr''
evaluation_plan_sha256str''
input_sha256str''
statusstr''
attempt_numberint0
claimed_by`strNone`None
lease_expires_at`strNone`None
heartbeat_at`strNone`None
linked_evaluation_run_idslist[str]field(default_factory=list)
gate_verdict_id`strNone`None
error_code`strNone`None
error_summary`strNone`None
requested_bystr''
requested_at`strNone`None
started_by`strNone`None
started_at`strNone`None
completed_by`strNone`None
completed_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_terminal() -> bool

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

This callable takes no public parameters.

Returns: bool

WorkspaceReleaseEvidence

class WorkspaceReleaseEvidence()

One piece of evidence (an evaluation run, a gate verdict, ...) recorded against a release, some of which a decision must reference to be valid.

Dataclass fields

FieldTypeDefault
evidence_idstr''
workspace_release_idstr''
runtime_lineage_id`strNone`None
kindstr''
evidence_refstr''
evidence_sha256str''
requiredboolFalse
recorded_bystr''
recorded_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceReleaseDecision

class WorkspaceReleaseDecision()

A digest-bound quality or release go/no-go decision, snapshotting the deciding actor's role and scopes at decision time.

Dataclass fields

FieldTypeDefault
decision_idstr''
workspace_release_idstr''
kindstr''
decisionstr''
change_request_head_id`strNone`None
rationalestr''
decided_bystr''
actor_role_snapshotdict[str, Any]field(default_factory=dict)
effective_scope_snapshotdict[str, Any]field(default_factory=dict)
revision_sha256str''
environment_config_sha256str''
runtime_dependencies_sha256str''
gate_evidence_sha256str''
policy_sha256str''
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceBreakGlassApplyResult

class WorkspaceBreakGlassApplyResult()

What a break-glass apply call actually returns.

Deliberately thin: the server hands back only enough to look up the resulting authorization and operation (`authorization_id, operation_id`), not the full authorization record -- fetch that separately if needed rather than expecting it to ride along here.

Dataclass fields

FieldTypeDefault
authorization_idstr''
operation_idstr''
WorkspaceReleaseOperation

class WorkspaceReleaseOperation()

One durable apply-or-rollback intent against a release (P5-C), executed and reconciled through :class:ProjectReleaseOperationsAPI.

Dataclass fields

FieldTypeDefault
operation_idstr''
project_idstr''
workspace_release_idstr''
environment_idstr''
runtime_lineage_id`strNone`None
kindstr''
target_release_id`strNone`None
idempotency_keystr''
expected_current_release_id`strNone`None
expected_environment_lock_versionint0
statusstr''
lock_versionint0
requested_bystr''
requested_at`strNone`None
applied_by`strNone`None
applied_at`strNone`None
completed_by`strNone`None
completed_at`strNone`None
observation_countint0
last_observed_at`strNone`None
break_glass_authorization_id`strNone`None
error_code`strNone`None
error_summary`strNone`None
created_at`strNone`None
updated_at`strNone`None
extradict[str, Any]field(default_factory=dict)

Properties

is_terminal() -> bool

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

This callable takes no public parameters.

Returns: bool

WorkspaceReleaseOperationItem

class WorkspaceReleaseOperationItem()

One resource-level step (bind/promote/activate/publish/verify) within a release operation, tracked separately since a partial failure leaves some items applied and others not.

Dataclass fields

FieldTypeDefault
operation_item_idstr''
workspace_release_operation_idstr''
revision_resource_idstr''
actionstr''
target_refstr''
before_ref`strNone`None
after_ref`strNone`None
statusstr''
provider_operation_ref`strNone`None
provider_result`dict[str, Any]None`None
started_at`strNone`None
completed_at`strNone`None
error_code`strNone`None
error_summary`strNone`None
created_at`strNone`None
extradict[str, Any]field(default_factory=dict)
WorkspaceReleaseOperationResult

class WorkspaceReleaseOperationResult()

An operation plus its per-resource items, the shape every create/get/apply/observe/cancel-expired call on :class:ProjectReleaseOperationsAPI returns.

Dataclass fields

FieldTypeDefault
operationWorkspaceReleaseOperationfield(default_factory=WorkspaceReleaseOperation)
itemslist[WorkspaceReleaseOperationItem]field(default_factory=list)

Properties

is_terminal() -> bool

Operate on the workspace release operation result surface with the supplied arguments and return the server response.

This callable takes no public parameters.

Returns: bool

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_info.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 and/or reason_code` when present.

Dataclass fields

FieldTypeDefault
detailstr''
status_codeint0
errorslist[FieldError]field(default_factory=list)
reason_code`strNone`None

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, AsyncProjectFilesAPI, AsyncProjectImportsAPI, AsyncProjectReleaseOperationsAPI, AsyncProjectReleasesAPI, AsyncProjectsAPI, AsyncTransport, AsyncWorkspacesAPI, 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_infoAsyncCapabilitiesAPIRuntime stability tiers and deployment capabilities.
projectsAsyncProjectsAPIProjects plus the managed file registry.
workspacesAny—
workflowsAsyncWorkflowRunsAPIWorkflow registry plus versions, runs, and services.
jobsAsyncJobsAPILong-running background jobs.
eventsAsyncEventsAPIServer-sent event stream.

Properties

capabilities_api() -> AsyncCapabilitiesAPI

Deprecated alias for :attr:capabilities_info.

This callable takes no public parameters.

Returns: AsyncCapabilitiesAPI

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

workspace_scope(project_id: str) -> AsyncIterator[AsyncCaliberClient]

Temporarily select a context-local workspace for async requests.

The selection follows the current task across `await` points and is restored even when the scoped operation raises. Other tasks sharing the client keep their own project selection.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: AsyncIterator[AsyncCaliberClient]

Raises:

library_scope() -> AsyncIterator[AsyncCaliberClient]

Temporarily omit the project header for library-scoped calls.

This callable takes no public parameters.

Returns: AsyncIterator[AsyncCaliberClient]

project_scope(project_id: str) -> AsyncIterator[AsyncCaliberClient]

Compatibility alias for :meth:workspace_scope.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: AsyncIterator[AsyncCaliberClient]

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

Asynchronous project, workspace, and project-file 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

AsyncProjectFilesAPI, AsyncProjectImportsAPI, AsyncProjectReleaseOperationsAPI, AsyncProjectReleasesAPI, AsyncProjectsAPI, AsyncWorkspacesAPI

Classes

AsyncProjectFilesAPI

class AsyncProjectFilesAPI()

Files inside one project.

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.

Methods

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

Return files and directories separately.

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 project file using the async transport's multipart 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.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
file_idpositional-or-keywordstr—

Returns: bool

Raises:

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

Download raw file bytes without JSON envelope handling.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
file_idpositional-or-keywordstr—

Returns: bytes

Raises:

AsyncProjectImportsAPI

class AsyncProjectImportsAPI()

Durable source-to-revision import jobs for one project (P6-C), awaited.

Async parity for this resource -- unlike most of P6-B's other grouped resources -- earns its complexity under :mod:caliber_sdk.aio.client's own stated criteria: :meth:wait is exactly the "long-running work you poll" category that module names as where async changes the outcome.

Methods

list(project_id: str, *, status: str | None = None, limit: int | None = None, cursor: str | None = None) -> CursorPage[WorkspaceImportJob]

Return the current collection of project imports, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
statuskeyword-only`strNone`None
limitkeyword-only`intNone`None
cursorkeyword-only`strNone`None

Returns: CursorPage[WorkspaceImportJob]

Raises:

get(project_id: str, job_id: str) -> WorkspaceImportJob

Fetch one record from the project imports surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
job_idpositional-or-keywordstr—

Returns: WorkspaceImportJob

Raises:

create(project_id: str, *, repository: str, commit_sha: str, bundle: bytes | BinaryIO, idempotency_key: str, filename: str = 'bundle') -> WorkspaceImportJob

Start an import. See the sync `create's docstring for why idempotency_key` has no default.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
repositorykeyword-onlystr—
commit_shakeyword-onlystr—
bundlekeyword-only`bytesBinaryIO`—
idempotency_keykeyword-onlystr—
filenamekeyword-onlystr'bundle'

Returns: WorkspaceImportJob

Raises:

reconcile(project_id: str, job_id: str) -> WorkspaceImportReconciliation

Explicitly observe an import stuck in `reconcile_required`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
job_idpositional-or-keywordstr—

Returns: WorkspaceImportReconciliation

Raises:

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

Poll until the import reaches a terminal state; see the sync `wait's docstring for why reconcile_required` counts as one.

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

Returns: WorkspaceImportJob

Raises:

AsyncProjectReleasesAPI

class AsyncProjectReleasesAPI()

The Workspace release evaluation/decision/approval lifecycle (P5-F), awaited.

Async parity here earns its complexity two ways :mod:caliber_sdk.aio.client names: :meth:wait_for_evaluation is long-running work you poll, and awaiting many projects' releases concurrently is the same "forty workflow runs" case that module cites for :class:AsyncWorkflowRunsAPI.

Methods

list(project_id: str, *, status: str | None = None, environment_id: str | None = None, limit: int | None = None, offset: int | None = None) -> list[WorkspaceRelease]

Return the current collection of project releases, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
statuskeyword-only`strNone`None
environment_idkeyword-only`strNone`None
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceRelease]

Raises:

create(project_id: str, *, revision_id: str, environment_id: str, environment_config_sha256: str, runtime_dependencies_sha256: str, policy_sha256: str, request_idempotency_key: str, change_request_id: str | None = None, change_request_head_id: str | None = None, version_tag_id: str | None = None, predecessor_release_id: str | None = None) -> WorkspaceRelease

Create a new record on the project releases surface and return the server-normalized result.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
revision_idkeyword-onlystr—
environment_idkeyword-onlystr—
environment_config_sha256keyword-onlystr—
runtime_dependencies_sha256keyword-onlystr—
policy_sha256keyword-onlystr—
request_idempotency_keykeyword-onlystr—
change_request_idkeyword-only`strNone`None
change_request_head_idkeyword-only`strNone`None
version_tag_idkeyword-only`strNone`None
predecessor_release_idkeyword-only`strNone`None

Returns: WorkspaceRelease

Raises:

get(project_id: str, release_id: str) -> WorkspaceRelease

Fetch one record from the project releases surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—

Returns: WorkspaceRelease

Raises:

list_evidence(project_id: str, release_id: str, *, limit: int | None = None, offset: int | None = None) -> list[WorkspaceReleaseEvidence]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceReleaseEvidence]

Raises:

evaluate(project_id: str, release_id: str, *, idempotency_key: str, evaluation_plan_sha256: str, input_sha256: str) -> WorkspaceReleaseEvaluation

Recompute the current release or evaluation verdict from the latest stored evidence.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
idempotency_keykeyword-onlystr—
evaluation_plan_sha256keyword-onlystr—
input_sha256keyword-onlystr—

Returns: WorkspaceReleaseEvaluation

Raises:

list_evaluations(project_id: str, release_id: str, *, limit: int | None = None, offset: int | None = None) -> list[WorkspaceReleaseEvaluation]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceReleaseEvaluation]

Raises:

get_evaluation(project_id: str, release_id: str, evaluation_id: str) -> WorkspaceReleaseEvaluation

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
evaluation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseEvaluation

Raises:

wait_for_evaluation(project_id: str, release_id: str, evaluation_id: str, *, timeout: float = 900.0, **options) -> WorkspaceReleaseEvaluation

Poll until the evaluation attempt reaches `succeeded or failed`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
evaluation_idpositional-or-keywordstr—
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny—

Returns: WorkspaceReleaseEvaluation

Raises:

quality_signoff(project_id: str, release_id: str, *, decision: str, gate_evidence_sha256: str, rationale: str = '', change_request_head_id: str | None = None) -> WorkspaceReleaseDecision

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
decisionkeyword-onlystr—
gate_evidence_sha256keyword-onlystr—
rationalekeyword-onlystr''
change_request_head_idkeyword-only`strNone`None

Returns: WorkspaceReleaseDecision

Raises:

approve(project_id: str, release_id: str, *, decision: str, gate_evidence_sha256: str, rationale: str = '', change_request_head_id: str | None = None) -> WorkspaceReleaseDecision

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
decisionkeyword-onlystr—
gate_evidence_sha256keyword-onlystr—
rationalekeyword-onlystr''
change_request_head_idkeyword-only`strNone`None

Returns: WorkspaceReleaseDecision

Raises:

break_glass_apply(project_id: str, release_id: str, *, reason: str, incident_ref: str, authorization_ref: str, expires_at: str, gate_evidence_sha256: str, expected_current_release_id: str, expected_environment_lock_version: int, idempotency_key: str) -> WorkspaceBreakGlassApplyResult

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
reasonkeyword-onlystr—
incident_refkeyword-onlystr—
authorization_refkeyword-onlystr—
expires_atkeyword-onlystr—
gate_evidence_sha256keyword-onlystr—
expected_current_release_idkeyword-onlystr—
expected_environment_lock_versionkeyword-onlyint—
idempotency_keykeyword-onlystr—

Returns: WorkspaceBreakGlassApplyResult

Raises:

AsyncProjectReleaseOperationsAPI

class AsyncProjectReleaseOperationsAPI()

Durable apply/rollback intents against one release (P5-C), awaited.

Async parity here earns its complexity the same way :class:AsyncProjectReleasesAPI does: :meth:wait is long-running work you poll.

Methods

list(project_id: str, release_id: str, *, limit: int | None = None, offset: int | None = None) -> list[WorkspaceReleaseOperation]

Return the current collection of project release operations, applying any supported filters.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
limitkeyword-only`intNone`None
offsetkeyword-only`intNone`None

Returns: list[WorkspaceReleaseOperation]

Raises:

get(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

Fetch one record from the project release operations surface identified by project_id.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

create(project_id: str, release_id: str, *, kind: str, idempotency_key: str, expected_environment_lock_version: int, expected_current_release_id: str | None = None, target_release_id: str | None = None) -> WorkspaceReleaseOperationResult

Create a new record on the project release operations surface and return the server-normalized result.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
kindkeyword-onlystr—
idempotency_keykeyword-onlystr—
expected_environment_lock_versionkeyword-onlyint—
expected_current_release_idkeyword-only`strNone`None
target_release_idkeyword-only`strNone`None

Returns: WorkspaceReleaseOperationResult

Raises:

apply(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

observe(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

cancel_expired(project_id: str, release_id: str, operation_id: str) -> WorkspaceReleaseOperationResult

See the sync `cancel_expired's docstring for why the literal path stays one f-string passed straight into self._post(`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—

Returns: WorkspaceReleaseOperationResult

Raises:

wait(project_id: str, release_id: str, operation_id: str, *, timeout: float = 900.0, **options) -> WorkspaceReleaseOperationResult

Poll until an apply or rollback operation reaches a terminal state; see the sync `wait's docstring for why reconcile_required` counts as one.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
release_idpositional-or-keywordstr—
operation_idpositional-or-keywordstr—
timeoutkeyword-onlyfloat900.0
optionsvar-keywordAny—

Returns: WorkspaceReleaseOperationResult

Raises:

AsyncProjectsAPI

class AsyncProjectsAPI(transport: AsyncTransport)

Projects, project access, environments, and their file sub-resource.

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: ProjectFilesAPI

Constructor

__init__(transport: AsyncTransport) -> None

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

ParameterKindTypeDefault
transportpositional-or-keywordAsyncTransport—

Returns: None

Attributes

AttributeTypeNotes
filesAsyncProjectFilesAPI—
importsAsyncProjectImportsAPI—
releasesAsyncProjectReleasesAPIRelease candidates, waivers, signoff, and reports.
release_operationsAsyncProjectReleaseOperationsAPI—

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.

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

Update metadata, retaining sync compatibility for `status`.

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

Returns: Project

Raises:

archive(project_id: str) -> Project

Move a project to `archived` and record transition provenance.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: Project

Raises:

restore(project_id: str) -> Project

Move an archived project back to `active`.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: Project

Raises:

transfer_ownership(project_id: str, new_owner_user_id: str) -> Project

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
new_owner_user_idpositional-or-keywordstr—

Returns: Project

Raises:

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

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: list[ProjectMember]

Raises:

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

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

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

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

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

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
user_idpositional-or-keywordstr—

Returns: bool

Raises:

storage() -> Any

Return deployment storage capabilities.

This callable takes no public parameters.

Returns: Any

Raises:

list_environments(project_id: str) -> list[WorkspaceEnvironment]

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—

Returns: list[WorkspaceEnvironment]

Raises:

get_environment(project_id: str, name: str) -> WorkspaceEnvironment

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—

Returns: WorkspaceEnvironment

Raises:

update_environment(project_id: str, name: str, *, policy: dict[str, Any], policy_sha256: str, expected_lock_version: int) -> WorkspaceEnvironment

Update an environment's policy configuration.

See :meth:caliber_sdk.resources.projects.ProjectsAPI.update_environment for the CAS/digest semantics -- identical here, just awaited.

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—
policykeyword-onlydict[str, Any]—
policy_sha256keyword-onlystr—
expected_lock_versionkeyword-onlyint—

Returns: WorkspaceEnvironment

Raises:

enable_environment(project_id: str, name: str) -> WorkspaceEnvironment

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—

Returns: WorkspaceEnvironment

Raises:

disable_environment(project_id: str, name: str) -> WorkspaceEnvironment

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

ParameterKindTypeDefault
project_idpositional-or-keywordstr—
namepositional-or-keywordstr—

Returns: WorkspaceEnvironment

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.
max_retriesAny—
backoff_factorAny—

Properties

project() -> str | None

The ambient project in the current task/thread context.

This callable takes no public parameters.

Returns: str | None

Methods

project(value: str | None) -> None

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

ParameterKindTypeDefault
valuepositional-or-keyword`strNone`—

Returns: None

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, project: str | UnsetProjectType | None = UNSET_PROJECT, _csrf_retry: bool = True) -> Response

Perform one API call, returning the unwrapped payload.

`project pins the request's X-CALIBER-Project header the same way it does on the synchronous :class:~caliber_sdk.transport.Transport -- see its request()` docstring.

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
projectkeyword-only`strUnsetProjectTypeNone`UNSET_PROJECT
_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, *, project: str | UnsetProjectType | None = UNSET_PROJECT, **kwargs) -> bytes

Fetch raw bytes: no envelope, no decoding.

ParameterKindTypeDefault
pathpositional-or-keywordstr—
projectkeyword-only`strUnsetProjectTypeNone`UNSET_PROJECT
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.