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.mjs—build()andvalidate()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.