Skip to main content
A coding agent that writes and executes code inside an isolated Docker container. The agent gets six built-in tools (exec, read, write, edit, glob, grep) that all operate inside the container, with the workspace directory bind-mounted from the host.

Create sandbox tools

Define the agent

Stream activity

Invoke the agent and stream text deltas and tool calls in real time.

How it works

  1. sandboxTools() creates six tools that operate inside a Docker container
  2. The container is created lazily on first use and reused across tool calls
  3. The host workspace directory is bind-mounted into the container at /workspace
  4. The agent can write files, run commands, and search the codebase — all isolated from your host system
  5. On shutdown, tools.cleanup() removes the container

Run it

Docker must be installed and running. The container image (node:20-slim) will be pulled automatically on first run.
Open http://localhost:5173 to view your agents and workflows, run them from the UI, and see execution traces. Python example on GitHub | TypeScript example on GitHub