Introducing a new way to review your PRs.

Read the announcement

hatchet-dev / hatchet

🪓 An orchestration engine for background tasks, AI agents, and durable workflows

View on GitHub

31 documents · Updated Nov 23, 2026

overview

Knowledge Base updated: 2026-11-22

Hatchet knowledge base

Hatchet is a durable workflow platform. Its Go services expose APIs, persist workflow and tenant state in PostgreSQL, schedule and dispatch work, and coordinate workers and operators.

Core runtime state lives in the relational schema and repository layer; scheduler, dispatcher, worker, operator, serverless, and sandbox components advance that state. SDKs, the web console, and operational commands provide user-facing access.

flowchart LR
  Client[Applications and SDKs] --> API[API server]
  Console[Web console and VS Code] --> API
  CLI[Operational commands] --> API
  API --> DB[(PostgreSQL)]
  API --> Queue[Messaging and queues]
  Scheduler[Scheduler controllers] --> DB
  Scheduler --> Queue
  Dispatcher[Dispatcher service] --> Queue
  Workers[Workers and listeners] --> Dispatcher
  Workers --> DB
  Operators[Operator runtime] --> API
  Serverless[Serverless runtime] --> API
  Sandbox[Sandbox providers] --> API
  DB --> OLAP[OLAP and telemetry services]
  Streams[Durable streams] --> DB

Glossary

  • Workflow run — a durable execution instance created from a workflow definition and version.
  • Tenant — the isolation boundary for identities, resources, configuration, and execution state.
  • Dispatcher — the control-plane component that delivers eligible work to workers.
  • Operator — a durable external runtime process coordinated through Hatchet services.
  • Durable stream — tenant-scoped retained data published and consumed through the stream service.

Codebase-wide invariants

  • Persistent workflow and tenant operations use repository and SQL layers rather than embedding database access in API handlers (pkg/repository/**, pkg/repository/sqlcv1/**).
  • Tenant scoping is part of persistence and access behavior (pkg/…/tenant.go, pkg/…/tenants.sql).
  • Configuration is loaded through the shared loader and typed configuration packages (pkg/config/loader/**, pkg/config/**).
  • Scheduler behavior is validated with end-to-end scheduler cases as well as service code (internal/services/scheduler/v1/e2e/**).
  • Generated SQL bindings must remain synchronized with SQL sources (pkg/…/*.sql, pkg/…/*.sql.go).

Routing table