Appearance
Run it locally ​
Everything runs on your machine with Docker Compose, against mocks: a scripted model, a fake GitHub and a local git server. No credential is needed and every one in the file is a dummy. The result is deterministic: the same task takes the same steps and ends in a pull request on the mock GitHub.
Prerequisites ​
Docker with Compose v2. The first --build compiles the Rust workspace into an image, which takes several minutes; later starts take seconds. To skip the build, set CODER_IMAGE to a published ghcr.io/vymalo/another-adam-rs/coder tag (the one the chart uses is image.tag in deploy/coder/values.yaml) and pass --no-build.
Start it ​
sh
docker compose --profile app up -d --build --wait # postgres, the mocks, a git server, the coder, the general agent
docker compose up -d --wait # or only the databases and mocks, to run `cargo test`
docker compose down -v # stop and forget all state (volumes included)| Service | Where | What |
|---|---|---|
coder | http://127.0.0.1:8080/ | the coder agent, bearer token dev-token |
agent | http://127.0.0.1:8084/ | the general agent (adam-agent), same image, same token |
postgres, mongodb | 127.0.0.1:5432, :27017 | the databases |
mock-openai, mock-github, mock-github-mcp, mock-image-mcp, git-server | :8081, :8082, :8085, :8086, :8083 | the mocks (mock-image-mcp is the painter's image server) |
All services and mocks: the local stack.
Two stacks side by side ​
compose.yaml pins no project name:: Compose names the project after the checkout's directory, so each git worktree gets its own containers, network and volumes (another-adam-rs in the main clone, wt-a for /tmp/wt-a). docker compose down -v in one worktree removes only its own volumes. Host ports are shared: start the second stack with other ports, for example POSTGRES_PORT=15432 MONGODB_PORT=37017 CODER_PORT=18080 docker compose up -d --wait. sh tools/check-compose-project.sh checks that two checkouts give two names (also in CI).
Send the coder a task ​
sh
curl -N http://127.0.0.1:8080/ \
-H 'Authorization: Bearer dev-token' -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":"1","method":"SendStreamingMessage","params":{"message":{
"messageId":"m1","role":"ROLE_USER","parts":[{"text":
"In http://git-server:8080/local/sandbox.git (base branch main), add hello.txt containing hello."}]}}}'You get an SSE stream of status updates, steps and artifacts, ending in TASK_STATE_COMPLETED with a pull_request artifact. The coder's model is scripted, so the run goes: prepare a worktree, ask the mock GitHub MCP for the branches, write hello.txt with the file tools, run the repository's checks, push a branch to the git server, open a pull request on the mock GitHub. The agent card is at http://127.0.0.1:8080/.well-known/agent-card.json, public like /healthz; Swagger UI is at http://127.0.0.1:8080/docs (press Authorize and paste the bearer token to try the calls).
To talk to an agent from a terminal instead, dev/chat.sh (the general agent) or dev/chat.sh http://127.0.0.1:8080 (the coder) keeps one conversation, prints the steps as they come and the answer when the task stops; on a real model with -f dev/compose.real-model.yaml: Try the agents.
Say "hi" to either agent and it greets you from its own instructions. The other scenarios (a scratch project, a second repository, a repository created on request, a GitHub App) are scripts: Testing. A run's commands run in the coder's own container; on Kubernetes a repository's own environment is a run pod of its image (ADR 0052).
Change what an agent says ​
Both agents read their folder (instructions, card, skills, mcp.json) once, at startup, from ADAM_AGENT_DIR. Compose mounts bin/adam-coder/agent for the coder and dev/agents/assistant/agent for the general agent, read-only. Edit instructions.md, or copy the folder and set CODER_AGENT_DIR or AGENT_FOLDER, then restart without a rebuild:
sh
docker compose --profile app up -d coder # the container is recreated and reads the folder againThe startup log has one agent files line (source=folder, the path, the digest). A folder with a mistake stops the container with exit 78 and every finding as path:line: error: .... The folder must be readable by uid 10001 (chmod -R a+rX). A new agent is a folder and about twelve lines of compose.yaml (Write an agent).
Run a binary on the host ​
Start only the databases and mocks, then:
sh
export DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/adam_test
export MODEL_BASE_URL=http://127.0.0.1:8081/v1 MODEL_API_KEY=mock-api-key MODEL=mock-model
export GITHUB_API_URL=http://127.0.0.1:8082 GITHUB_TOKEN=dev-github-token
export A2A_BEARER_TOKENS=dev-token PUBLIC_URL=http://127.0.0.1:8080/
cargo run -p adam-coderMODEL=mock-model gives canned text answers (no tool call, so no pull request); use mock-coder for the script. ROLE=control-plane and ROLE=worker over the same DATABASE_URL (different LISTEN_ADDR) split the two halves. All variables: Environment. Against a real model and GitHub, see the live smoke test in the coder README.
With no database server at all, use export DATABASE_URL=sqlite:///tmp/adam.sqlite and ROLE=all: the file holds one process, and a second one is refused (store adapters). The model and GitHub variables are still needed by a role that runs workers.
How a live model behaves with these instructions is unverified: the mocks prove what the model is sent, not what it says.
Troubleshooting ​
| Symptom | Likely cause |
|---|---|
| the container exits 78 | a configuration or agent-folder problem; the log names the variable or path:line |
| the container exits 69 | Postgres is not reachable yet or at all |
401 on every call | a missing or wrong Authorization: Bearer dev-token (no token means no server, by design) |
the model mock answers 404 off_script | a request left the scripted model's script, on purpose, so a run that wanders fails loudly; see scripted models |