JSPM

@agentproto/sandbox

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 165
  • Score
    100M100P100Q60376F
  • License MIT

@agentproto/sandbox — AIP-36 SANDBOX.md reference implementation. A composable schema block defining the `sandbox` field — provider, config, command env, network egress, resource limits — for any manifest that names a compute environment for agent-issued shell commands. Sibling primitive to STORAGE.md (AIP-35); inline or ref, mirroring AIP-17 RUNNER and AIP-19 SECRETS. Also ships createSandboxAgentSessionHost — the provider-agnostic seam that runs an AgentStep's coding-agent turn inside a booted sandbox by pointing the existing daemon-backed AgentSessionHost at its MCP URL.

Package Exports

  • @agentproto/sandbox
  • @agentproto/sandbox/manifest
  • @agentproto/sandbox/package.json

Readme

@agentproto/sandbox

AIP-36 SANDBOX.md reference implementation. A composable schema block defining the sandbox field — provider, config, command env, network egress, resource limits — for any manifest that names a compute environment for agent-issued shell commands. Sibling primitive to STORAGE.md (AIP-35); inline or ref, mirroring AIP-17 RUNNER and AIP-19 SECRETS.

Status: 0.1.0-alpha. Generated by scripts/scaffold-aip.mjsbuild() and validate() bodies are TODOs.

Spec: https://agentproto.sh/docs/aip-36

Usage

import { defineSandbox } from "@agentproto/sandbox"

const x = defineSandbox({
  id: "my-sandbox",
  description: "Short purpose.",
  // ...
})

Running an agent step inside a sandbox

createSandboxAgentSessionHost turns any SandboxProvider into an AgentSessionHost (@agentproto/workflow-runtime) — the seam runWorkflow injects for every AgentStep. It resolves the requested secrets into an env map, boots the sandbox with that env, then connects connectDaemonAgentSessionHost (@agentproto/worktree) to the sandbox's exposed agentproto daemon — reusing the same daemon-backed session host a local run would use, unchanged.

import { createSandboxAgentSessionHost } from "@agentproto/sandbox"
import { e2bSandboxProvider } from "@agentproto/sandbox-e2b"

const host = await createSandboxAgentSessionHost({
  provider: e2bSandboxProvider,
  spec: { provider: "e2b", config: {} },
  secrets: { slugs: ["OPENROUTER_API_KEY"] },
})
try {
  // await runWorkflow({ workflow, input, agents: host })
} finally {
  await host.stop()
}

License

MIT — see LICENSE.