Python SDK
Worlds SDK
Open bounded sessions, generate governed experience, and evaluate exact applications
Worlds lets you iterate before physical deployment. Sessions are for exploration, generation creates governed experience, and evaluation produces promotion evidence for an exact subject.
Evaluate an application
async with sx.connect(project_id) as client:
task = await client.experience.task(task_ref)
application = await client.autonomy.application(application_ref)
operation = await client.worlds.evaluate(
application,
for_task=task,
seed=7,
)
print(operation.ref)
evaluation = await operationThe SDK sends the complete governed application and exact task. Keep the operation reference, seed, terminal result, failure strata, and RRD evidence together.
An evaluation is reviewable when
Another engineer can prove which complete application and task ran, reproduce its deterministic inputs, open the evidence, and explain the failures without asking which local checkpoint you used.
Open an interactive session
task = await client.experience.task(task_ref)
session = await client.worlds.session(for_task=task, seed=7)
print(session)A session is bounded and task-scoped. Use it to inspect observations, actions, and reset behavior
during development. Use evaluate(...)—not an interactive session—as the promotion gate.
Generate governed episodes
from sx_corpora import DatasetName
operation = await client.worlds.generate(
source,
for_task=task,
count=500,
into=DatasetName("worlds.pick-mug"),
seed=7,
)
generation = await operationsource is a governed GenerationSource, not a raw engine URL or ad hoc callback. Generated
episodes enter Experience with the same task and lineage discipline as physical episodes.
Evaluate a policy artifact during research
from sx_contracts import ArtifactId, ContentRef, Sha256Digest
from sx_worlds import PolicyArtifactKind, PolicyArtifactRef
subject = PolicyArtifactRef(
PolicyArtifactKind.CODE_POLICY,
ContentRef(
ArtifactId("code-policy:pick-mug-v12"),
Sha256Digest("a" * 64), # replace with the artifact's real digest
),
)
operation = await client.worlds.evaluate_subject(
subject,
for_task=task,
seed=7,
)
evaluation = await operationUse evaluate_subject(...) for an authored policy artifact before it has become a complete robot
application. Production promotion evaluates the complete application graph.
Use the right surface
Use Python to automate experiment matrices, deterministic evaluations, generation pipelines, and evidence collection.
Held-out means held out
Evaluation evidence is a promotion input. Do not feed it back into training, reward tuning, or hyperparameter selection.