whatisgithub

What is agentsandbox?

yaroshevych/agentsandbox — explained in plain English

Analysis updated 2026-05-18

1ShellAudience · developerComplexity · 3/5Setup · easy

In one sentence

A command-line tool that wraps AI coding agents like Claude Code in an isolated Docker container so they can only see one project folder, not your whole computer.

Mindmap

mindmap
  root((AgentSandbox))
    What it does
      Isolates AI agents
      Docker container per project
      Blocks filesystem access
    Tech stack
      Docker
      Bash
      iptables
    Use cases
      Sandbox Claude Code
      Restrict network access
      Read only mounts
    Audience
      Developers
      AI agent users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Sandbox an AI coding agent so it can only read or write files inside one project folder.

USE CASE 2

Block outbound network access except for the AI provider, GitHub, and npm.

USE CASE 3

Mount a repo as read-only so an agent can experiment without changing files.

What is it built with?

DockerBashiptables

How does it compare?

yaroshevych/agentsandboxanthonyhann/knowledge-wikibaiyuetribe/test-heroku
Stars111
LanguageShellShellShell
Last pushed2021-06-30
MaintenanceDormant
Setup difficultyeasymoderatehard
Complexity3/53/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires Docker installed, setup is a single curl command run inside the project directory.

So what is it?

AgentSandbox is a tool that sets up an isolated Docker container for running AI coding agents, such as Claude Code, Codex, Pi, and OpenCode, inside a specific project directory, without giving them access to the rest of your computer's filesystem or potentially the wider internet. The problem it solves is straightforward: AI coding agents are powerful tools, but running them directly on your machine means they can read or write files anywhere, and can make network connections freely. AgentSandbox wraps them in a container that only sees the one project folder you want them to work in. Installation is a single curl command run from inside your project directory. This runs an interactive wizard that asks which agent you want, which programming language stack to include (Python, Node, Go, or Rust, and you can pick multiple), whether to allow or block outbound network access, and whether to mount the repo as read-only or writable. Once configured, it writes three files into your project: a Dockerfile that describes the container environment, an agents script that launches the chosen agent inside that container, and optionally an init-firewall.sh file when network blocking is selected. With network blocking enabled, outbound traffic from inside the container is restricted via an iptables firewall to only the agent's AI provider endpoint, GitHub, and npm. All other connections are rejected. Agent credentials (API keys and configuration) are mounted into the container from your host machine's config directories, so you do not need to re-authenticate. The generated files are plain text and can be read, edited, or committed to version control.

Copy-paste prompts

Prompt 1
Run the AgentSandbox setup wizard in my project folder for Claude Code with network blocking enabled.
Prompt 2
Explain what the generated Dockerfile and init-firewall.sh do in AgentSandbox.
Prompt 3
Set up AgentSandbox with a Node and Python stack and a read-only mount.

Frequently asked questions

What is agentsandbox?

A command-line tool that wraps AI coding agents like Claude Code in an isolated Docker container so they can only see one project folder, not your whole computer.

What language is agentsandbox written in?

Mainly Shell. The stack also includes Docker, Bash, iptables.

How hard is agentsandbox to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is agentsandbox for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.