Skip to content

Team quickstart

The fastest way to see the whole system working: a shared dashboard on Postgres, and an agent pushing traces to it over HTTP. Everything runs on one machine, but nothing about it is local-only — move the container to a server and the same steps hold.

The steps are identical on macOS, Windows and Linux; only the Docker install differs. The image is multi-architecture, so Apple Silicon pulls arm64 automatically.

You’ll need Docker, Python 3.10+, and an LLM API key.

Make an empty folder with one file in it:

docker-compose.yml
services:
minion-server:
image: shriyansnaik/minion-server:latest
ports:
- "7337:7337"
environment:
- DATABASE_URL=postgresql://minion:secret@db:5432/minion
depends_on:
db:
condition: service_healthy
db:
image: postgres:16
volumes:
- pg_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=minion
- POSTGRES_USER=minion
- POSTGRES_PASSWORD=secret
healthcheck:
test: ["CMD-SHELL", "pg_isready -U minion"]
interval: 5s
retries: 5
volumes:
pg_data:
Terminal window
docker compose up -d

The first run pulls both images. Then open http://localhost:7337 — an empty dashboard. No source, no build; the image comes from Docker Hub the same way pip install gets the library.

In the dashboard:

  1. New project → name it demo.
  2. Open it, click the ⚙️ gearAPI Tokens.
  3. Create token, name it (laptop), and copy it now — it’s shown once. It looks like mni_xK9mP2….
Terminal window
pip install minion-ai
export OPENAI_API_KEY="sk-..."
demo.py
import minions
minions.init(
tracing=True,
project="demo", # must match the token's project
trace_url="http://localhost:7337", # the dashboard from step 1
tracing_secret_token="mni_xK9mP2...", # the token from step 2
)
def add(a: int, b: int) -> int:
"""Add two numbers.
Args:
a: The first number.
b: The second number.
"""
return a + b
agent = minions.Minion(model="openai/gpt-4o", tools=[add])
print(agent("What is 21 + 21? Use the tool."))
Terminal window
python demo.py

Nothing is written locally in this mode — the run is pushed over HTTP and stored in Postgres. If the dashboard were down, the agent would still run and answer; tracing would just be skipped.

Refresh http://localhost:7337, open demo, and click the run. You’ll see the turn, the add tool call with its arguments and result, token usage, and cost.

To prove it really is in Postgres:

Terminal window
docker compose exec db psql -U minion -d minion -c "select id, model, status from runs;"

Each machine needs the same three things: pip install minion-ai, the trace_url, and its own token. One token per deployment rather than one per team — revocation is then surgical. See Remote tracing.

For anything beyond a trusted network, put the server behind your own auth first: the dashboard and read endpoints are unauthenticated, so anyone who can reach port 7337 can read and delete every trace. See Security.

Terminal window
docker compose down # stop, keep data
docker compose down -v # stop and delete the volume — wipes every trace

Same image, no db service — point DATABASE_URL at RDS / Supabase / Neon:

services:
minion-server:
image: shriyansnaik/minion-server:latest
ports:
- "7337:7337"
environment:
- DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/DBNAME

Paste the connection string as-is. Agent code, tokens and dashboard are identical.

SymptomFix
Dashboard won’t loadIs Docker running? docker compose ps should show both services up/healthy
ValueError at startup about the token’s projectThe project in init() doesn’t match the token’s project
ValueError at startup about an invalid tokenToken wrong or revoked — create a new one
Agent errors before any trace appearsLLM key not set, or a model that can’t do structured output — see Provider support
db keeps restartingPort or volume conflict — docker compose down -v, then up