Run Sandbox Agent locally for development.
# Install curl -fsSL https://releases.rivet.dev/sandbox-agent/0.4.x/install.sh | sh # Run sandbox-agent server --no-token --host 127.0.0.1 --port 2468
npx @sandbox-agent/cli@0.4.x server --no-token --host 127.0.0.1 --port 2468
bunx @sandbox-agent/cli@0.4.x server --no-token --host 127.0.0.1 --port 2468
local
import { SandboxAgent } from "sandbox-agent"; import { local } from "sandbox-agent/local"; const sdk = await SandboxAgent.start({ sandbox: local(), }); const session = await sdk.createSession({ agent: "claude", }); await session.prompt([ { type: "text", text: "Summarize this repository." }, ]); await sdk.destroySandbox();
const sdk = await SandboxAgent.start({ sandbox: local({ port: 3000, log: "inherit", env: { ANTHROPIC_API_KEY: process.env.MY_ANTHROPIC_KEY, }, }), });