This guide takes a new contributor from a source checkout to one completed, inspectable Run. It uses PostgreSQL and the public offline examples; no model provider or external service is required.
- Python 3.11 or newer
- uv
- A local PostgreSQL server with permission to create a database
psqlfor applying the public seed
Docker is not required to run the application. It is required for the full test suite. Node.js is required only for Pi-backed Agents.
createdb agent_task_platform_dev
cp config/.env.dev.example config/.env.devEdit config/.env.dev to match the local PostgreSQL connection. Replace the API-key and callback-secret placeholders with distinct locally generated values:
openssl rand -hex 32
openssl rand -hex 32Keep config/.env.dev private; it is ignored by Git. MODEL__API_KEY may remain a placeholder for this offline example.
uv sync --extra dev
ENV_MODE=dev uv run alembic upgrade head
ENV_MODE=dev psql agent_task_platform_dev -f sql/seed.dml.sql
ENV_MODE=dev uv run agent-task-platform check-config --config-dir configThe migration creates platform tables. The seed registers echo-agent, calculator-agent, and deterministic local tools. check-config verifies the effective settings, database connection, and registry composition.
Application startup never applies migrations automatically. Run Alembic explicitly after checking out a revision with new migrations.
ENV_MODE=dev uv run agent-task-platform serve --config-dir configCheck that the process and dependencies are ready:
curl http://127.0.0.1:8765/livez
curl http://127.0.0.1:8765/readyz/livez proves the HTTP process is alive. /readyz also checks PostgreSQL and registry initialization. Both probe routes are unscoped; /v1/* routes require an API key.
KEY=<your-local-key> REQUEST_ID=first-run bash scripts/request_example_run.shThe response is 202 Accepted and includes a run_id, trace_id, status, and optional conversation_id. Save the run_id, then query the durable record:
curl -H "x-api-key: $KEY" http://127.0.0.1:8765/v1/runs/<run-id>
curl -H "x-api-key: $KEY" http://127.0.0.1:8765/v1/runs/<run-id>/result
curl -H "x-api-key: $KEY" http://127.0.0.1:8765/v1/runs/<run-id>/stagesThe example invokes deterministic local Tool implementations through Tool Gateway, so no model credential or network service is required. It demonstrates the same registry, permission, schema, persistence, and logging path used by external Tools.
If you submit the same caller, route_tag, and request_id again, the platform returns the existing logical Run. Change REQUEST_ID to create new work.
A release wheel can be installed and initialized without a source checkout. Obtain a wheel artifact from a trusted release/build process; there is no published stable release yet.
python3 -m venv /opt/agent-task-platform
/opt/agent-task-platform/bin/python -m pip install ./agent_task_platform-<version>-py3-none-any.whl
/opt/agent-task-platform/bin/agent-task-platform init-config --config-dir /etc/agent-task-platformCopy /etc/agent-task-platform/.env.profile.example to /etc/agent-task-platform/.env and fill in the database connection, API key, callback secret, and any provider settings. Protect that file as a secret-bearing configuration file. Apply packaged migrations explicitly, then start the service:
/opt/agent-task-platform/bin/agent-task-platform migrate --config-dir /etc/agent-task-platform
/opt/agent-task-platform/bin/agent-task-platform serve --config-dir /etc/agent-task-platforminit-config refuses to overwrite existing files unless --force is passed. Startup does not automatically apply migrations. The installed wheel includes the CLI, configuration templates, and migration history; this path does not use repository scripts or source-tree SQL artifacts.
From a source checkout containing Dockerfile and compose.yaml, set a database password and start the database, one-shot migration, API-only process, and worker:
export POSTGRES_PASSWORD="$(openssl rand -hex 32)"
# Set AUTH__API_KEYS to a JSON array of scoped key objects before exposing the API.
docker compose up --build -dCompose publishes the API on port 8765 by default (API_PORT changes the host port), persists PostgreSQL data in a named volume, waits for the database health check, and waits for the migration service to complete before starting API and worker. The compose defaults do not constitute production secret management or network hardening. Set strong credentials and review the exposed port, database access, API scopes, backups, and network policy before use. Use docker compose logs -f api worker migrate to inspect startup and docker compose down to stop services; docker compose down -v also deletes the database volume and its data.
- Open
http://127.0.0.1:8765/docsfor interactive OpenAPI documentation. - Open
http://127.0.0.1:8765/kanbanfor the operational board. API requests made by the board still require a key unless local settings explicitly disable that boundary. - List Runs with
GET /v1/runs. - Inspect persisted logs, model calls, stages, and callbacks under
/v1/runs/{run_id}.
A good first code change is to update the deterministic calculator or add another local Tool:
- Read Build an Agent or Tool.
- Add the implementation under
plugins/tools/. - Register a new Tool version in
config/tools.yamland assign it inconfig/agents.yaml. - Regenerate
sql/seed.dml.sqlwithuv run python scripts/gen_sql.py. - Add a focused test and run the checks in Development.
Remember that registry YAML only seeds missing versions. Use a fresh local database or publish a new version when testing seed changes.
/readyzreports the database is unavailable: verifyDATABASE__*values and that PostgreSQL is running.- No Agent is found: confirm the seed was applied to the same database selected by
ENV_MODE=dev. - A request returns
401or403: use the API key configured inAUTH__API_KEYSand give it the required scope. - A migration reads the wrong profile: set
ENV_MODEandAGENT_TASK_PLATFORM_CONFIG_DIRexplicitly.
See Troubleshooting for Pi, Tool, Skill, callback, worker, and test failures.