Agent Task Platform is a durable, task/run-oriented platform for building and operating production AI agents.
Submit a task, receive a Run identifier immediately, and retrieve the result later. The platform persists execution state, retries, stages, tool calls, model calls, logs, and callback delivery so work can recover after a process restart.
Many open-source agent frameworks begin with a chat or session as their primary unit of work. Agent Task Platform starts with a durable Task and Run instead: a caller submits work, the platform creates a persisted execution record, and workers can queue, retry, recover, cancel, observe, and deliver its result independently of an HTTP connection.
Chat or session context can still be useful for an Agent, but it is optional context organization rather than the scheduling and reliability root. This focus makes the platform a good fit for asynchronous workflows, long-running operations, and integrations that need an auditable outcome.
It is intended for asynchronous, observable agent work rather than a chat-session abstraction.
- Idempotent Run submission and deterministic
route_tagrouting - PostgreSQL-backed queue leases, retries, cancellation, and recovery
- Durable stages, checkpoints, and child Runs
- Governed Python, HTTP, and MCP tools with schemas, permissions, limits, retries, and side-effect protection
- Versioned Skills with immutable snapshots attached to each Run
- OpenAI-compatible model gateway with fallback, usage, and audit records
- Signed callbacks, outbound URL controls, structured logs, and scoped API keys
Requirements: Python 3.11+, PostgreSQL, and uv. Docker is only needed for the integration test suite.
uv sync --extra dev
createdb agent_task_platform_dev
cp config/.env.dev.example config/.env.devEdit config/.env.dev before starting. Replace REPLACE_WITH_LOCAL_KEY and REPLACE_WITH_LOCAL_CALLBACK_SECRET with locally generated values. The included examples do not need a model provider key.
ENV_MODE=dev alembic upgrade head
ENV_MODE=dev psql agent_task_platform_dev -f sql/seed.dml.sql
ENV_MODE=dev agent-task-platform serveIn another terminal, submit the offline calculator example:
KEY=<your-local-key> bash scripts/request_example_run.shThe example invokes calculator-agent, which calls deterministic local weather and calculator tools. No external model or service is required.
All /v1/* endpoints require an x-api-key with the appropriate scope.
curl -X POST http://127.0.0.1:8765/v1/runs \
-H 'Content-Type: application/json' \
-H 'x-api-key: <your-local-key>' \
-d '{
"route_tag": "example.calculator",
"request_id": "example-001",
"external_id": "demo-case-001",
"input": {"city": "Example City", "expression": "12 * (3 + 4)"}
}'The response is 202 Accepted and includes run_id, trace_id, and conversation_id.
- Getting Started
- Architecture
- Task and Run Concepts
- Durable Stages
- Tools and Skills
- Configuration
- HTTP API
- Build an Agent or Tool
- Deployment
- Security Model
domain/ Domain models and lifecycle enums
infra/ PostgreSQL persistence, coordination, rate limits, outbound policy
framework/ Agent Runtime, Tool Gateway, Skill Runtime, Model Gateway
orchestration/ Submission, execution, scheduling, recovery, workers, callbacks
interfaces/ FastAPI server, CLI, settings, and operational dashboard
agent_hub/ Offline example agents
plugins/ Offline example tools and Skills
config/ Public example registry and environment configuration
uv run ruff check .
uv run ruff format --check .
uv run pytest -qThe integration suite starts PostgreSQL with Testcontainers, so Docker must be available.
sql/ddl.sql and sql/seed.dml.sql are generated artifacts. Regenerate them after changing ORM models or public registry YAML:
uv run python scripts/gen_sql.pyThis project is preparing for its first public release. Do not treat the current API, plugin contracts, or database schema as stable until a versioned release is published.
Copyright 2026 ByteCaprice. Licensed under the Apache License 2.0.