sandbar
v2.0.0
Published
Local-first sandbox for isolated, observable and traceable execution of AI agents.
Maintainers
Readme
🏖️ sandbar
Local-first sandbox for isolated, observable and traceable execution of AI agents.
Install
npm install -g sandbarConfig
Sandbar starts Docker containers from .sandbar/config.json:
{
"image": "ubuntu:24.04",
"workspace": ".",
"mountTarget": "/workspace",
"command": ["sleep", "infinity"],
"agents": {
"opencode": ["opencode", "run"]
}
}Note: The config file must exist in your project and will not be generated automatically.
Allowed agents
opencode
Commands
Create
Create a sandbox from the current project config with a generated name:
sandbar createNote: Generated names are unique, so you can create multiple sandboxes from the same workspace.
Note: If the image is not installed or locally available, sandbar will pull it automatically.
Or pass a specific name:
sandbar create testList
List running Sandbar containers:
sandbar listInstall and connect AI agents
Install an agent inside a running Sandbar container (example: opencode):
sandbar install test --agent opencodeConnect to a running Sandbar container (opens an interactive shell):
sandbar connect testRun an agent task inside a running Sandbar container:
sandbar connect test --agent opencode --prompt "add a new file called hello.js"Or pass a file as the prompt:
sandbar connect test --agent opencode --file prompt.txtKill
Stop and remove a Sandbar container:
sandbar kill testContributing
See CONTRIBUTING.md for development setup and contribution guidelines.
