agentleFS
rcarmorcarmo/agentbox/.github/copilot-instructions.md

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
  1. Distinctive:

    Start the example multi-container setup (syncthing + agent containers):

    line 14
  2. Very specific:

    Default user inside the container is agent (member of sudo and docker).

    line 60

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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 :latest
    • ghcr.io/<owner>/<repo>:<tag>-gui and :gui

High-level architecture

  • Docker image is the product
    • Dockerfile defines 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.sh handles first-run home initialization, UID/GID adjustment, and optional ownership fixes.
    • /entrypoint.sh starts services based on env vars (Docker-in-Docker, SSH, RDP); otherwise it idles.
  • docker-compose.yml is an example orchestration
    • syncthing shares ./workspaces on the host.
    • toad and copilot are example agent containers mounting specific subfolders under ./workspaces/<name> to /workspace.
    • Compose uses resource limits and runs the agent containers as privileged: true to enable Docker-in-Docker when requested.

Key conventions (repo-specific)

  • Versioning and releases
    • The repo version is stored in VERSION.
    • make bump-patch updates VERSION, commits, and tags v<new_version>.
    • CI is tag-driven: pushing a tag triggers the Docker publish workflow.
  • Agent user + persistence model
    • Default user inside the container is agent (member of sudo and docker).
    • The container is designed for persistent config via /config:
      • At runtime, common dotfiles are symlinked from /config into /home/agent when present (see Dockerfile loop for .gitconfig, .copilot, etc.).
  • Home initialization is optimized
    • /entrypoint-user.sh writes a marker file (/home/agent/.container_initialized) containing uid:gid and uses it to skip expensive re-initialization when possible.
  • Ownership changes are intentionally constrained
    • /workspace ownership is only fixed when FIX_WORKSPACE_OWNERSHIP=true (opt-in), to avoid large recursive chown operations on mounted volumes.
  • Important env vars used across Dockerfile/README/compose
    • Service toggles:
      • ENABLE_DOCKER=true (Docker-in-Docker)
      • ENABLE_SSH=true
      • ENABLE_RDP=true (GUI image only)
    • Identity mapping:
      • PUID, PGID (compose defaults to 1000)
    • Image marker:
      • AGENTBOX_ENVIRONMENT=cli|gui

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.