Quickstart (Docker Compose)
Get a forked Strands Base Agent running in a container in under five minutes. This is the lower-friction path when you don't want to install Python 3.14 and uv locally — Docker builds the image and runs the agent the same way it will run in higher environments.
For active development with hot reload, see the Local Python quickstart instead.
Prerequisites
- Docker Desktop (or any Docker engine) with Compose v2
- AWS credentials with Bedrock access — typically AWS SSO logged in via
~/.aws/sso/cache/ - Access to install
foundry-agent-*packages from your team's package registry (used during the image build)
Install
-
Clone (or fork) the repository:
git clone <repo-url>cd strands-base-agent -
Configure the environment:
cp env.template .envAt minimum, set
AWS_PROFILEto a profile in~/.aws/configthat has Bedrock access. The compose file bind-mounts~/.awsinto the container so SSO sessions are reused without copying credentials into the image. -
Edit
config.yamlwith your model and agent settings:model:provider: bedrockmodel_id: us.anthropic.claude-haiku-4-5-20251001-v1:0agent_name: my-agentsystem_prompt: >You are an AI assistant specialized in your domain.config.yaml is baked in at build timeconfig.yamlisCOPY'd into the image by theDockerfile. After editing it, rebuild withdocker compose up --build(ordocker compose build) — restarting alone won't pick up the change. Secrets and per-environment values come from.envat run time and don't require a rebuild.
Run
Build the image and start the agent:
docker compose up --build
The first build pulls foundry-agent-* packages from your registry — make sure your network can reach it. Subsequent runs without --build start instantly.
Verify
In another terminal, hit the health endpoint:
curl http://localhost:8000/api/v1/health
You should receive a JSON response with "status": "healthy". The compose file also runs this same check internally — docker compose ps shows the container as healthy once it passes.
Then test a query:
curl -X POST http://localhost:8000/api/v1/query \
-H "Content-Type: application/json" \
-d '{"query": "What is machine learning?"}' | jq .
What's mounted, what persists
The default compose.yaml wires up two volumes:
| Mount | Source | Purpose |
|---|---|---|
~/.aws (bind) | host | Reuse host AWS SSO sessions inside the container |
strands_sessions (named) | docker volume | Persist FileSessionManager state across restarts |
Sessions survive docker compose down. To wipe them, docker compose down -v.
Tuning the compose file
compose.yaml ships with sensible defaults; common customizations:
- Port — change the host side of
"$PORT:8000"(or setPORTin.env) to avoid collisions with other agents on the same machine. - Container / service name — rename the
strands-agentservice to your agent's name so logs anddocker compose psare easier to read. - Network — the file declares an
agent-foundrynetwork; mark itexternal: trueif you're sharing it with other agents or services. - Health check cadence —
interval: 10s,timeout: 5s,retries: 5by default; tune if startup is slow in your environment.
See Configuration → Docker Configuration for the full set of compose-related settings.
What's Next
- Configuration — full reference for
config.yamland env var overrides - Adding tools — give your agent domain-specific capabilities
- Customizing the server — wire in custom session managers or model providers