BlueprintsAI Agent SandboxOperator Requirements

AI Agent Sandbox Operator Requirements

An AI Agent Sandbox operator is running untrusted compute for other people. Start from that fact.

The operator needs a chain identity, persistent state, a supervised runtime, and an authenticated API. If the operator exposes TEE mode or Firecracker mode, it also needs the host-level pieces those runtimes require.

Common requirements

RequirementWhy
Operator keystoreSigns protocol actions and identifies the operator.
HTTP and WebSocket RPCReads chain state and subscribes to events.
BLUEPRINT_STATE_DIRStores sandbox records, sessions, workflow state, and local runtime state.
SESSION_AUTH_SECRETDerives PASETO session tokens and at-rest encryption keys. Required in production.
UI/API ingress authPrevents the public internet from directly controlling sandboxes.
Supervised processThe operator must restart cleanly after crashes.

Binary variants

VariantBinaryShape
Cloud sandboxai-agent-sandbox-blueprint-binFleet mode. Users create/delete sandboxes.
Dedicated instanceai-agent-instance-blueprint-binOne sandbox per service instance.
TEE instanceai-agent-tee-instance-blueprint-binDedicated instance plus attestation and sealed secrets.

Docker mode

Docker is the simplest path.

VariablePurpose
SIDECAR_IMAGESidecar image, usually ghcr.io/tangle-network/blueprint-sidecar:all-harness.
SIDECAR_PUBLIC_HOST or PUBLIC_HOSTPublic hostname used when returning sidecar or proxy URLs.
SIDECAR_PULL_IMAGEWhether to pull the image on first create.
OPERATOR_API_PORTOperator API port. Sandbox mode defaults around 9100.

Keep raw sidecar ports private unless the operator intentionally proxies them.

Firecracker mode

Firecracker mode runs through the operator process and microvm-runtime.

VariablePurpose
MICROVM_FIRECRACKER_BINFirecracker binary path.
MICROVM_FIRECRACKER_KERNELLinux kernel image used for guests.
MICROVM_FIRECRACKER_ROOTFSDefault ext4 rootfs.
MICROVM_FIRECRACKER_SOCKET_DIRPer-VM API socket parent directory.
MICROVM_FIRECRACKER_STATE_DIRPer-VM state directory.
MICROVM_FIRECRACKER_VCPUDefault vCPU count.
MICROVM_FIRECRACKER_MEM_MIBDefault memory in MiB.
MICROVM_GUEST_METADATA_PORTvsock port for per-VM env and auth token injection.

The rootfs must include the guest metadata daemon. Without it, the operator cannot inject per-VM env vars and sidecar auth tokens over vsock.

TEE mode

Set TEE_BACKEND to one of:

BackendRequired setup
phalaPHALA_API_KEY; optional endpoint override.
nitro or awsAWS region, AMI, subnet, security group, instance type, and optional KMS/profile config.
gcpGCP project, zone, image, machine type, and optional service account/KMS config.
azureSubscription, resource group, location, VM image/size, subnet, tenant/client secret, and optional Key Vault/attestation config.
directTDX, SEV-SNP, or Nitro-capable hardware and the matching device node.

TEE instance contracts enforce non-empty attestation when teeRequired=true. The operator API also exposes attestation and sealed-secret endpoints.

Local proof

The repo’s local runbook uses:

SKIP_BUILD=1 ./scripts/deploy-local.sh
./scripts/test-e2e.sh

The smoke should prove:

  1. local Anvil and contracts are up
  2. blueprints are registered
  3. operator APIs start
  4. auth works
  5. lifecycle reporting reaches the chain
  6. runtime/operator API actions hit a real sidecar path where enabled

Do not replace this with mocked API tests when deploy scripts, service registration, or auth changed.