MCPcopy
hub / github.com/hatchet-dev/hatchet

github.com/hatchet-dev/hatchet @v0.90.13 sqlite

repository ↗ · DeepWiki ↗ · release v0.90.13 ↗
22,980 symbols 74,105 edges 2,805 files 6,961 documented · 30%
README

Hatchet Logo

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

Docs License: MIT Go Reference NPM Downloads

Discord Twitter GitHub Repo stars

<a href="https://cloud.hatchet.run">Hatchet Cloud</a>
·
<a href="https://docs.hatchet.run">Documentation</a>
·
<a href="https://hatchet.run">Website</a>
·
<a href="https://github.com/hatchet-dev/hatchet/issues">Issues</a>

What is Hatchet?

Hatchet is a platform for orchestrating background tasks, AI agents, and durable workflows at scale. It supports applications written in Python, TypeScript, Go and Ruby, and can be used as a service through Hatchet Cloud or self-hosting. Hatchet provides a full platform for queuing, automatic retries, durability, real-time monitoring, alerting, and logging.

Get started quickly

The fastest way to get started with Hatchet is signing up for Hatchet Cloud to try it out! We recommend this even if you plan on self-hosting, so you can have a look at what a fully-deployed Hatchet platform looks like.

To run Hatchet locally, the fastest path for setup is to install the Hatchet CLI (on MacOS, Linux or WSL) - note that this requires Docker installed locally to work:

curl -fsSL https://install.hatchet.run/install.sh | bash
hatchet --version
hatchet server start

To view full documentation for self-hosting and using cloud, have a look at the docs.

When should I use Hatchet?

You can use Hatchet for running background tasks, AI agents, or other types of long-running workflows. It is designed to be a feature-complete solution for systems where correctness, reliability, horizontal scalability, and observability are essential. From a technical perspective, it differs from other solutions in that it uses Postgres as a durability layer for both the task runtime and the observability system, making it particularly easy to self-host.

For some end-to-end examples of workflows you can build with Hatchet, check out our cookbooks.

Hatchet Features

Background Tasks

Task orchestration and workflows

Scale

  • Priority so that critical tasks can run before tasks which aren't latency sensitive, like backfill jobs
  • Rate limiting to deal with third-party APIs, or even to enforce per-user rate limits using dynamic rate limits
  • Fair scheduling using Hatchet's concurrency policies, which can set a concurrency limit for tasks based on dynamic keys
  • Worker slots for ensuring that workers cannot take on more work than they can handle

Monitoring, observability, and management

  • Real-time web UI with alerting, monitoring, and logging
  • OpenTelemetry (using Hatchet's built-in collector or external destinations)
  • Prometheus metrics
  • Multi-tenant by default, so a single Hatchet instance can support multiple teams
  • Users and roles

Hatchet Cloud features

  • Autoscaling and pay-as-you-go plans
  • Multi-region deployments
  • SSO
  • Improved performance for monitoring, logging, and observability

Documentation

The most up-to-date documentation can be found at https://docs.hatchet.run.

Community & Support

  • Discord - best for getting in touch with the maintainers and hanging with the community
  • Github Issues - used for filing bug reports
  • Github Discussions - used for starting in-depth technical discussions that are suited for asynchronous communication
  • Email - best for getting Hatchet Cloud support and for help with billing, data deletion, etc.

Hatchet vs...

Hatchet vs Durable Execution Platforms (Temporal, DBOS)

Hatchet's durable tasks feature is a drop-in replacement for Temporal or DBOS workflows. You also get:

  • End-to-end observability of durable tasks using OpenTelemetry, monitoring and logging
  • Features built for running workflows at scale, such as rate limiting, complex routing, and worker-level slot control
  • Multi-tenancy, users and roles supported out of the box

In addition to making durable execution easier to use, Hatchet can also be used as a general-purpose queue, a DAG-based orchestrator, a durable execution engine, or all three, allowing teams to centralize their async and background processing in a single platform.

Hatchet vs Task Queues (Celery, BullMQ)

Traditional task queues like BullMQ and Celery trade off durability for throughput. Tasks persist on the broker (typically Redis or RabbitMQ) while the task is executing, but are not persisted afterwards. This makes it difficult to build complex workflows, as there is no persistent intermediate state. It also makes it difficult to recover and replay tasks which failed and were removed from the queue, resulting in custom admin tooling to work with these libraries at scale.

On the other hand, Hatchet is a durable task queue, meaning it persists the history of all executions (up to a defined retention period), which allows for easy monitoring, debugging and durable task features. Hatchet's durability features add some overhead: while Hatchet has been load-tested up to 10k tasks/second, it consumes more resources than a system built on Redis or RabbitMQ, which can reach much higher throughput.

Hatchet vs DAG-based platforms (Airflow, Prefect, Dagster)

These tools are usually built with data engineers in mind, and aren’t designed to run as part of a high-volume application. They’re usually higher latency and higher cost, with their primary selling point being integrations with common datastores and connectors.

When to use Hatchet: when you'd like to use a DAG-based framework, write your own integrations and functions, and require higher throughput (>100/s)

When to use other DAG-based platforms: when you'd like to use other data stores and connectors that work out of the box

Issues

Please submit any bugs that you encounter via GitHub issues.

I'd Like to Contribute

Please let us know what you're interested in working on in the #contributing channel on Discord. This will help us shape the direction of the project and will make collaboration much easier!

Extension points exported contracts — how you extend this code

NamedTask (Interface)
NamedTask defines an interface for task types that have a name [15 implementers]
pkg/client/create/task.go
Condition (Interface)
Condition represents a set of conditions to either trigger a task or satisfy a wait condition. Callers should not use Co [6 …
pkg/worker/condition/condition.go
SchedulesClient (Interface)
Deprecated: SchedulesClient is part of the old generics-based v1 Go SDK. Use the new Go SDK at github.com/hatchet-dev/ha [8 …
pkg/v1/features/schedules.go
MetricsCollector (Interface)
MetricsCollector collects and reports database and system metrics to OTel [18 implementers]
internal/services/controllers/metrics/collector.go
View (Interface)
View represents a TUI view component [11 implementers]
cmd/hatchet-cli/cli/tui/view.go
WebhookAuth (Interface)
(no doc) [7 implementers]
sdks/go/features/webhooks.go
AuthError (Interface)
(no doc) [175 implementers]
pkg/integrations/integration.go
PromGauge (Interface)
(no doc) [3 implementers]
sdks/typescript/src/v1/client/worker/health-server.ts

Core symbols most depended-on inside this repo

Errorf
called by 2188
pkg/analytics/posthog/posthog.go
get
called by 1213
frontend/app/src/lib/sso/sso-types.ts
String
called by 836
pkg/client/types/action.go
Set
called by 772
api/v1/server/serverutils/param_context.go
Unmarshal
called by 707
sdks/go/hatchet.go
Err
called by 673
pkg/repository/sqlcv1/copyfrom.go
Get
called by 611
pkg/v1/features/runs.go
Error
called by 472
pkg/auth/rbac/rbac.go

Shape

Method 10,944
Function 5,945
Struct 2,824
Interface 1,212
Class 963
TypeAlias 731
Enum 154
Route 131
FuncType 76

Languages

Go62%
Python21%
TypeScript17%

Modules by API surface

api/v1/server/oas/gen/openapi.gen.go2,286 symbols
pkg/client/rest/gen.go1,774 symbols
pkg/repository/sqlcv1/models.go406 symbols
pkg/client/cloud/rest/gen.go369 symbols
internal/services/dispatcher/contracts/dispatcher.pb.go338 symbols
internal/services/shared/proto/v1/dispatcher.pb.go265 symbols
frontend/app/src/lib/api/generated/data-contracts.ts234 symbols
sdks/typescript/src/clients/rest/generated/data-contracts.ts227 symbols
internal/services/shared/proto/v1/workflows.pb.go219 symbols
internal/services/admin/contracts/workflows/workflows.pb.go219 symbols
internal/services/admin/contracts/workflows.pb.go201 symbols
pkg/repository/olap.go162 symbols

Dependencies from manifests, versioned

cel.dev/exprv0.25.1 · 1×
cloud.google.com/go/authv0.20.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
dario.cat/mergov1.0.2 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/Masterminds/semver/v3v3.4.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/antlr4-go/antlr/v4v4.13.1 · 1×
github.com/apapsch/go-jsonmerge/v2v2.0.0 · 1×
github.com/atotto/clipboardv0.1.4 · 1×
github.com/aws/aws-sdk-go-v2v1.41.6 · 1×

Datastores touched

hatchetDatabase · 1 repos
appDatabase · 1 repos
dbDatabase · 1 repos
mydbDatabase · 1 repos

For agents

$ claude mcp add hatchet \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact