Python SDK

Autonomy SDK

Train application manifests, evaluate evidence, and run bounded improvement programs

Autonomy turns governed experience into a deployable ability. The primary input is an application manifest: a human-readable build and delivery intent with no service URLs, credentials, or runtime topology.

Load an application manifest

from pathlib import Path

import yaml
from sx_autonomy import application_manifest_from_dict

manifest = application_manifest_from_dict(
    yaml.safe_load(Path("application.yaml").read_text())
)

The parser rejects ambiguous build references, invalid workload connections, secret values, and incomplete applications before any remote work begins.

Train the build graph

async with sx.connect(project_id) as client:
    operation = await client.train(manifest)
    print(operation.ref)
    outcome = await operation

client.train(...) executes only the manifest build graph. It returns a durable Autonomy program operation whose result carries governed outputs and evidence.

Run the full promotion program

async with sx.connect(project_id) as client:
    operation = await client.deploy(manifest)
    print(operation.ref)
    deployment = await operation

client.deploy(...) is the preferred golden path. It resolves or builds the application, evaluates the exact graph, qualifies it for the target, mints task-specific approvals, and rolls out the declared deployment group. A failure at any gate stays explicit.

Run a bounded improvement loop

from datetime import timedelta

task = await client.experience.task(task_ref)
operation = await client.autonomy.improve(
    task,
    max_rounds=4,
    timeout=timedelta(hours=2),
)
result = await operation

The round count and timeout are authority boundaries, not suggestions. The campaign can form hypotheses, gather evidence, and iterate inside them; widening spend, changing intent, or promoting still requires accountable authority.

Approve exact evidence

For a custom promotion flow, use the values produced by Worlds and qualification directly:

approval = await client.autonomy.approve(
    evaluation,
    qualification,
    supervision_requirements,
)

The approval binds the exact evaluation, whole-application qualification, task, and supervision requirements. It is not a general permission to run a model.

Use the right surface

Use Python or CI for manifest validation, repeatable training, experiment programs, bounded improvement, and deployment automation.

Deploy the application, not the checkpoint

The physical unit is the complete digest-pinned application graph: workloads, artifacts, connections, resources, capabilities, and robot-control boundary.