tool-containers
Menu
GitHub (opens in new tab)

Run agentbloat with Dev Container

devcontainer.json opens a project inside agentbloat with any tool that implements the Dev Containers specification (opens in new tab), such as VS Code or the devcontainer CLI.

Images
  • GHCRghcr.io/hambn/agentbloat
  • Docker Hubdocker.io/hambn/agentbloat
Use case
Multi-agent workspace inside the editor
Source
tools/ai/agentbloat/docs/devcontainer (opens in new tab)
On this page

Prerequisites

  • Docker, or another engine your Dev Containers tool supports.
  • VS Code with the Dev Containers extension, or the CLI: npm install -g @devcontainers/cli.

Open the project

Copy the file into the project:

Shell
mkdir -p .devcontainer
cp devcontainer.json .devcontainer/devcontainer.json

Then choose Reopen in Container in VS Code, or run this from the project root:

Shell
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . zsh -l

Run any agent in the terminal and sign in from its prompt. Logins are saved in /home/sysadmin and lost when the container is rebuilt.

Variables

None are required. To pass an API key from the host to the terminals, add it under remoteEnv, for example "remoteEnv": { "OPENAI_API_KEY": "${localEnv:OPENAI_API_KEY}" }. To pin one build, set image to ghcr.io/hambn/agentbloat@sha256:<digest>.

Workspace

The project folder is mounted at /workspace. Because remoteUser is set, Linux hosts rebuild the image with sysadmin changed to your UID and GID, so files the agents write keep your ownership. --shm-size=1g gives headless Chromium room in /dev/shm.

Files

Cleanup

VS Code stops the container when the window closes. With the CLI, run docker rm -f <containerId> with the ID that devcontainer up printed.

File contents

devcontainer.json11 lines
// Copy to .devcontainer/devcontainer.json in your project.
{
  "name": "agentbloat",
  "image": "ghcr.io/hambn/agentbloat:ubuntu-browser",
  // Naming the user lets Linux hosts remap sysadmin to your UID, so /workspace files keep your ownership.
  "remoteUser": "sysadmin",
  "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
  "workspaceFolder": "/workspace",
  // Headless Chromium needs more than the 64 MB default /dev/shm.
  "runArgs": ["--shm-size=1g"]
}

Topics