Skip to content

SDK protocol prototype

Not a supported distribution

These contracts are preserved for convergence work. Their three HTTP routes have no server implementation in this repository, so the SDK wheel is release-blocked.

Client

zeroth.sdk

HTTP client for Zeroth's hosted optimization API.

ZerothClient

ZerothClient(
    *,
    api_key: str,
    base_url: str = "https://api.zeroth.dev",
    timeout: float = 10.0,
    backtest_timeout: float = 120.0,
    http_client: Client | None = None,
)

Send workflow evidence and backtest requests to Zeroth Cloud.

record_execution

record_execution(event: ExecutionEvent) -> dict[str, Any]

Record the measured cost of one workflow step.

record_outcome

record_outcome(event: OutcomeEvent) -> dict[str, Any]

Attach a business outcome to a workflow run.

create_backtest

create_backtest(request: BacktestRequest) -> dict[str, Any]

Submit a candidate workflow change for economic backtesting.

list_backtests

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

List immutable hosted backtest results for the current project.

compare_versions

compare_versions(
    request: VersionComparisonRequest,
) -> dict[str, Any]

Request an evidence-gated economic decision for a workflow change.

create_decision_schedule

create_decision_schedule(
    request: DecisionScheduleRequest,
) -> dict[str, Any]

Create a recurring economic workflow-version comparison.

list_decision_schedules

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

List recurring economic comparisons for the current project.

list_decisions

list_decisions(
    *, workflow: str | None = None
) -> list[dict[str, Any]]

List retained economic decisions, optionally for one workflow.

close

close() -> None

Close the underlying HTTP transport.

Protocol

zeroth.protocol

Public request and event contracts shared with Zeroth Cloud.

BacktestCase

Bases: BaseModel

Ephemeral input and expected output used for one bounded replay.

BacktestRequest

Bases: BaseModel

Candidate workflow change and the boundaries used to judge it.

DecisionPolicy

Bases: BaseModel

Evidence and economic constraints for a workflow-version decision.

DecisionScheduleRequest

Bases: BaseModel

Create a recurring economic comparison for two workflow versions.

EconomicConstraints

Bases: BaseModel

Quality and economic boundaries a backtest candidate must satisfy.

ExecutionEvent

Bases: BaseModel

Measured cost and latency for one workflow step.

OutcomeEvent

Bases: BaseModel

Business acceptance signal associated with a workflow run.

VersionComparisonRequest

Bases: BaseModel

Request an evidence-gated comparison of two exact workflow versions.