hello-agent
Minimal ReAct loop in 80 LOC. One tool. Writes a file, exits clean.
# docker-compose.yml — hello-agent
services:
agent:
image: python:3.11-slim
working_dir: /app
volumes:
- ./src:/app/src:ro
- ./out:/app/out
- ./requirements.txt:/app/requirements.txt:ro
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY:?set OPENAI_API_KEY in your shell}
MODEL: gpt-4o-mini
MAX_STEPS: "6"
command: >-
bash -c "pip install -q -r requirements.txt &&
python -m src.agent --task 'Write hello.txt with the current UTC timestamp.'"
Drop this skeleton into any internal one-off automation: a nightly script that writes a CSV from your warehouse, a release-note generator that writes RELEASE.md from the merged PR titles, a runbook bot that drops an incident summary into shared/incidents/<id>.md. Replace the write_file tool with whatever side effect you actually want (Slack post, Jira create, S3 put). The loop, the step counter, the FINAL guard — all stay. We use this exact shape at Snap to back our 'fill out the weekly metrics doc' bot.
hello-agent
Minimal ReAct loop in 80 LOC. One tool. Writes a file, exits clean.
# docker-compose.yml — hello-agent
services:
agent:
image: python:3.11-slim
working_dir: /app
volumes:
- ./src:/app/src:ro
- ./out:/app/out
- ./requirements.txt:/app/requirements.txt:ro
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY:?set OPENAI_API_KEY in your shell}
MODEL: gpt-4o-mini
MAX_STEPS: "6"
command: >-
bash -c "pip install -q -r requirements.txt &&
python -m src.agent --task 'Write hello.txt with the current UTC timestamp.'"
Drop this skeleton into any internal one-off automation: a nightly script that writes a CSV from your warehouse, a release-note generator that writes RELEASE.md from the merged PR titles, a runbook bot that drops an incident summary into shared/incidents/<id>.md. Replace the write_file tool with whatever side effect you actually want (Slack post, Jira create, S3 put). The loop, the step counter, the FINAL guard — all stay. We use this exact shape at Snap to back our 'fill out the weekly metrics doc' bot.