agentbox
Copilot instructions151 starsChanged 5 months agoMITView on GitHub
This repo builds Agentbox: a Docker image (plus an optional GUI target) for running coding agents in an isolated container environment, and a docker-compose.yml that spins up example agent workspaces. There is no unit test suite or linter configured in this repository. GitHub Actions builds and pushes multi-arch images on tag pushes: - Workflow: .github/workflows/publish.yml - Produces: - ghcr.io/<owner>/<repo>:<tag> and :latest - ghcr.io/<owner>/<repo>:<tag>-gui and :gui
The file
We split this copilot-instructions.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Start the example multi-container setup (syncthing + agent containers):
- Very specific: line 60
Default user inside the container is agent (member of sudo and docker).
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot instructions for this repository
This repo builds Agentbox: a Docker image (plus an optional GUI target) for running coding agents in an isolated container environment, and a docker-compose.yml that spins up example agent workspaces.
Build / test / lint
There is no unit test suite or linter configured in this repository.
Common commands
- Show available Make targets:
make help
- Start the example multi-container setup (syncthing + agent containers):
make up
- Stop it:
make down
- Build the Docker image locally (headless/CLI):
docker build -t agentbox .
- Build the GUI variant locally:
docker build -t agentbox:gui --target gui .
CI build (reference)
GitHub Actions builds and pushes multi-arch images on tag pushes:
- Workflow:
.github/workflows/publish.yml - Produces:
ghcr.io/<owner>/<repo>:<tag>and:latestghcr.io/<owner>/<repo>:<tag>-guiand:gui
High-level architecture
- Docker image is the product
Dockerfiledefines a multi-stage build:base: Debian Bookworm + core tooling, user creation (agent), entrypoints.gui: installs XFCE + XRDP + VS Code and sets up X session scripts.headless: alias target that keeps the CLI environment.
- Runtime behavior is controlled via env vars
- The container entrypoint is
/entrypoint-user.sh→/entrypoint.sh. /entrypoint-user.shhandles first-run home initialization, UID/GID adjustment, and optional ownership fixes./entrypoint.shstarts services based on env vars (Docker-in-Docker, SSH, RDP); otherwise it idles.
- The container entrypoint is
docker-compose.ymlis an example orchestrationsyncthingshares./workspaceson the host.toadandcopilotare example agent containers mounting specific subfolders under./workspaces/<name>to/workspace.- Compose uses resource limits and runs the agent containers as
privileged: trueto enable Docker-in-Docker when requested.
Key conventions (repo-specific)
- Versioning and releases
- The repo version is stored in
VERSION. make bump-patchupdatesVERSION, commits, and tagsv<new_version>.- CI is tag-driven: pushing a tag triggers the Docker publish workflow.
- The repo version is stored in
- Agent user + persistence model
- Default user inside the container is
agent(member ofsudoanddocker). - The container is designed for persistent config via
/config:- At runtime, common dotfiles are symlinked from
/configinto/home/agentwhen present (seeDockerfileloop for.gitconfig,.copilot, etc.).
- At runtime, common dotfiles are symlinked from
- Default user inside the container is
- Home initialization is optimized
/entrypoint-user.shwrites a marker file (/home/agent/.container_initialized) containinguid:gidand uses it to skip expensive re-initialization when possible.
- Ownership changes are intentionally constrained
/workspaceownership is only fixed whenFIX_WORKSPACE_OWNERSHIP=true(opt-in), to avoid large recursivechownoperations on mounted volumes.
- Important env vars used across Dockerfile/README/compose
- Service toggles:
ENABLE_DOCKER=true(Docker-in-Docker)ENABLE_SSH=trueENABLE_RDP=true(GUI image only)
- Identity mapping:
PUID,PGID(compose defaults to 1000)
- Image marker:
AGENTBOX_ENVIRONMENT=cli|gui
- Service toggles:
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

