Python SDK
Fleet SDK
Deploy exact applications, run supervised physical research, and roll back safely
Fleet owns physical authority: target readiness, deployment, task leases, supervision, research, and rollback. Missing readiness or supervision is a refusal, never permission to choose another controller.
Prefer the integrated deployment program
async with sx.connect(project_id) as client:
deployment_operation = await client.deploy(manifest)
print(deployment_operation.ref)
deployment = await deployment_operationThis is the shortest safe path because one program carries the manifest through build, evaluation, whole-application qualification, capability approval, and rollout.
Deploy from precomputed evidence
When you own a custom promotion controller, pass the exact values from the earlier gates:
operation = await client.fleet.deploy(
application,
to=canary_group,
qualification=qualification,
approvals=(approval,),
)
deployment = await operationThe application, target group, qualification, and approvals must agree exactly. Fleet does not repair a mismatch inside the request.
Roll back
rollback = await client.fleet.rollback(deployment)
restored = await rollbackRollback restores the previous healthy application and enabled capability set as a new durable operation. Keep its reference and terminal result just as you would for a rollout.
Run bounded physical research
from sx_fleet.research import RunBudget
operation = await client.fleet.research(
deployment.deployment_ref,
approval=approval,
budget=RunBudget(max_episodes=20, max_duration_s=7_200),
)
run = await operationThe run cannot exceed its episode or duration bounds. The active deployment, capability approval, supervision policy, and executed task identity remain attached to its returned evidence.
Use the right surface
Use Python for promotion controllers, deployment automation, bounded research submission, health integrations, and rollback programs.
Fail-closed rules
| Refusal | What it protects | Recovery |
|---|---|---|
| target not ready | motion from unknown hardware state | commission and calibrate the exact station |
| qualification mismatch | an untested graph or target | qualify the complete application on that target |
| missing capability approval | work outside proven task authority | produce passing Worlds and qualification evidence |
| supervision unavailable | unsupervised execution | restore the required rung; unanswered escalation safe-stops |
| stale or wrong deployment | acting on a different application | resolve the exact current deployment before retrying |
Humans own physical authority
Agents and automation may prepare, submit within prior bounds, and monitor. Hardware admission, motion authority, safety policy, and promotion stay with their accountable owner.