Changelog
Sandbox
Release notes for aice-sandbox.
Python: aice-sandbox
0.2.0
First release of aice-sandbox.
Needs a sandbox service authenticating with a console project key whose aud
includes sandbox. Artifacts need a service with an artifact store
(SANDBOX_MINIO_ENDPOINT); without one, publish and artifacts.url raise
SandboxSDKError with code="artifacts_disabled".
Added
SandboxClientandAsyncSandboxClient:(*, base_url, api_key, timeout=30.0, max_retries=3, user_id=None, user_role=None). Auth, transport, retries and request ids come fromaice-core, as in the other AICE SDKs.client.session.create(manifest=None) -> Session. The tenant comes from the key and the user fromX-User-Id.Session:exec,install(both returnExecResult),write,read,list,publish,cancel,destroy.execandinstallare sent once, never retried (the service doesn't dedupe them). Their read timeout covers the command's owntimeout_s(or the manifest'sdefault_timeout_s, else 120 s) plus the service's 30 s grace;timeouton the client sets the floor.cancel()is sent once. The service answers 501 (not implemented yet).
session.publish(path) -> Artifact: copies a session file to the artifact store and returns a presigned download link. Any file type. Sent once, never retried.client.artifacts.url(artifact_id) -> Artifact: a fresh link once the old one expires, including for files an agent published through the sandbox MCP toolpublish_file, and after the session is gone. Scoped to the key's project and the acting user.client.tenant_config.get/update(project_id, ...)for project admins.Artifact(artifact_id,filename,mime,bytes,url,expires_at).- Errors:
SandboxSDKError,AuthenticationError,ForbiddenError,QuotaExceededError(scope,limit),SessionNotFoundError,NetworkNotPermittedError,SandboxFileNotFoundError,ArtifactNotFoundError.
Notes
- Depends on
aice-core>=0.3.0,<0.5. session.createpassesidempotency_key=None, opting out ofaice-core's default auto-retry. TODO(backend): remove oncesandbox_servicededupes on theIdempotency-Keyheader.