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

  • SandboxClient and AsyncSandboxClient: (*, base_url, api_key, timeout=30.0, max_retries=3, user_id=None, user_role=None). Auth, transport, retries and request ids come from aice-core, as in the other AICE SDKs.
  • client.session.create(manifest=None) -> Session. The tenant comes from the key and the user from X-User-Id.
  • Session: exec, install (both return ExecResult), write, read, list, publish, cancel, destroy.
    • exec and install are sent once, never retried (the service doesn't dedupe them). Their read timeout covers the command's own timeout_s (or the manifest's default_timeout_s, else 120 s) plus the service's 30 s grace; timeout on 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 tool publish_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.create passes idempotency_key=None, opting out of aice-core's default auto-retry. TODO(backend): remove once sandbox_service dedupes on the Idempotency-Key header.

On this page