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
internal/services/**/workflow/**, pkg/…/workflow*.go -> Workflow orchestration- pkg/…/workflow_version*.go, api/…/workflow*.proto -> Workflow definitions and versions
internal/services/scheduler/**/trigger/**, pkg/…/trigger*.go -> Triggers and scheduling- pkg/…/concurrency*.go, api/…/concurrency*.proto -> Concurrency controls
internal/services/dispatcher/**, pkg/…/step_run*.go -> Run dispatch and queue executioninternal/services/**/worker/**, pkg/…/worker*.go -> Worker lifecycle and listener protocolapi/**,cmd/hatchet-api/**-> API and access layerapi/**/openapi/**,api/**/proto/**,pkg/api/**-> Public API contractspkg/auth/**, pkg/…/tenant.go -> Authorization and tenancycmd/**,cmd/hatchet-migrate/**-> Operational command interfacespkg/config/**,pkg/repository/**-> Data and runtime platformpkg/repository/sqlcv1/**,migrations/**-> Database schema and migrationspkg/repository/fairpool/**,pkg/config/loader/**,pkg/repository/sqlchelpers/**-> Repositories, messaging, and configuration- pkg/…/olap.go,
internal/services/**/telemetry/**-> Telemetry, analytics, and usage sdks/**,integrations/**-> Developer products and integrationssdks/**-> Language SDKsintegrations/**,internal/integrations/**-> External integrations and eventsfrontend/app/**,vscode-extension/**-> Web console and editor experiencecmd/hatchet-operator/**,internal/services/operator/**-> Operator execution platformpkg/operator/**, api/…/operator*.proto -> Operator protocol and sessionsinternal/services/durable-streams/**, pkg/…/stream*.go -> Durable streams- api/…/stream*.proto,
sdks/**/stream*-> Durable stream contracts and clients internal/services/**,cmd/hatchet-engine/**-> Service runtime and control planeinternal/services/scheduler/**,internal/services/scheduler/v1/e2e/**-> Task and scheduling controllersinternal/services/dispatcher/**,internal/services/worker/**-> Dispatcher and worker coordinationinternal/services/olap/**, pkg/…/olap.go -> OLAP and observability servicesinternal/services/serverless/**,cmd/hatchet-serverless/**-> Serverless execution platform- api/…/serverless*.proto,
sdks/typescript-serverless/**-> Serverless endpoints and operator runtime internal/services/sandbox/**,pkg/sandbox/**-> Sandbox execution and providerssdks/typescript-sandbox/**,frontend/app/**/sandbox/**-> Sandbox SDK and provider management