Hatchet Orchestration Engine

repository·main·Indexed 11 days ago

https://github.com/hatchet-dev/hatchet

An orchestration engine for background tasks, AI agents, and durable workflows. Hatchet provides queuing, automatic retries, durability, and real-time monitoring, with support for Python, TypeScript, Go, and Ruby. It includes a CLI for project scaffolding and a VSCode extension for visualizing Directed Acyclic Graphs (DAGs) of workflow definitions.

Tokens
218K
Snippets
551
Records
1K
Agent score
92%

What's inside Hatchet

  1. What is Hatchet?

    main

    Hatchet is an orchestration engine designed for building and deploying mission-critical AI agents, durable workflows, and background tasks. It provides a platform for queuing, automatic retries, real-time monitoring, alerting, and logging.

    Key characteristics include:

    • Durability: Every task and agent invocation is durably persisted, enabling debugging, retries, and replays.
    • Language Support: Supports applications written in Python, TypeScript, Go, and Ruby.
    • Deployment Options: Can be used as a managed service via Hatchet Cloud or self-hosted (100% MIT-licensed).
    • Scalability: Designed for massive parallelization (millions of tasks) with worker-level slot control, fairness, and priority features.
  2. Overview of Hatchet orchestration capabilities

    main

    Hatchet is an orchestration engine designed for background tasks, AI agents, and durable workflows. It is built for systems where correctness, reliability, horizontal scalability, and observability are critical.

    Key capabilities include:

    Background Tasks

    • One-off tasks: Simple functions supporting both fire-and-forget and fire-and-wait patterns.
    • Retries: Configurable retry policies with optional exponential backoff.
    • Scheduling: Support for Cron jobs and scheduled runs.
    • Routing: Task routing via worker labels or complex weighted scheduling (worker affinity).
    • Triggers: Event-based triggering, listeners, and webhook-based triggering.

    Task Orchestration and Workflows

    • Durable Tasks: Fault-tolerant, long-running workflows that recover from failure.
    • DAGs (Directed Acyclic Graphs): For building data pipelines and simple workflows.
    • Flow Control: Complex pause/resume logic using durable sleep and event waits.

    Scale and Management

    • Concurrency Control: Priority-based execution, rate limiting (including dynamic rate limits), and fair scheduling via concurrency policies.
    • Resource Management: Worker slots to prevent overloading.
    • Observability: Real-time web UI, OpenTelemetry integration, and Prometheus metrics.
    • Multi-tenancy: Built-in support for multiple teams within a single instance.
  3. Overview of Hatchet Managed Compute

    main

    Hatchet Managed Compute is an orchestration-focused compute layer designed for long-lived, data-intensive AI applications and background job processing. It combines serverless simplicity with traditional infrastructure control, specifically addressing common serverless pain points like cold starts and execution timeouts.

    Key Capabilities

    • High Availability: Features sub-100ms instance provisioning via pre-warming and a distributed architecture built on the Hatchet Queue.
    • Scaling: Automatically scales compute resources based on workload demand (queue depth).
    • Workload Management: Supports state-aware routing (using worker labels), burstable capacity, and sticky assignments to route tasks to specific instances when possible.
    • Deployment: Supports GitOps integration for automatic builds and deployments on commit, following a Zero-Ops model where infrastructure changes are tracked in code.
  4. Overview of Hatchet TypeScript SDK features

    main

    The @hatchet-dev/typescript-sdk is designed for distributed, fault-tolerant task queuing and workflow orchestration. Key features include:

    • Type Safety: Full TypeScript support with type inference for workflow inputs and outputs.
    • Workflow Orchestration: Define complex workflows with dependencies and parallel execution.
    • Automatic Retries: Configure retry policies for handling transient failures.
    • Observability: Track workflow progress and monitor execution metrics.
    • Scheduling: Schedule workflows to run at specific times or on a recurring basis.
    • Event-Driven: Trigger workflows based on events in your system.
  5. Overview of Hatchet Python SDK features

    main

    The Hatchet Python SDK provides several core capabilities for managing distributed, fault-tolerant tasks:

    • Workflow Orchestration: Define complex workflows with dependencies and parallel execution.
    • Automatic Retries: Configure retry policies for handling transient failures.
    • Observability: Track workflow progress and monitor execution metrics.
    • Scheduling: Schedule workflows to run at specific times or on a recurring basis.
    • Event-Driven: Trigger workflows based on events in your system.
  6. Use the Hatchet Dashboard for monitoring and debugging

    main

    The Hatchet Dashboard provides a visual interface to monitor your orchestration engine. Use it to:

    • Monitor Runs: Check the status, inputs, outputs, and execution history of specific workflow runs.
    • Manage Workers: View connected workers and monitor their health status.
    • Inspect Workflows: Review workflow definitions and recent activity.
    • Configure Settings: Manage tenants, API tokens, and general configuration.
  7. Core Hatchet CLI features

    main

    The Hatchet CLI provides several key utilities for development and observability:

    • Quickstarts: Use hatchet quickstart to generate a worker project from a template.
    • Local worker reloading: Use hatchet worker dev to run a worker locally with automatic reloading when code changes are detected.
    • Terminal User Interface (TUI): Use hatchet tui to interact with your Hatchet deployment via a TUI for real-time observability into tasks, workflows, and workers.
    • Profiles: Use hatchet profile commands to manage multiple Hatchet instances and tenants using named profiles, allowing easy switching between environments.
  8. Security considerations for Hatchet Cloud

    main

    Hatchet Cloud is a managed service with the following security features:

    • Encryption in transit: All API and worker traffic is encrypted with TLS. gRPC connections between workers and the engine use TLS by default.
    • Encryption at rest: All data stored in Hatchet Cloud is encrypted at rest.
    • Tenant isolation: Data is logically isolated per tenant. Requests are authenticated and scoped to a single tenant.
    • Authentication: API tokens are scoped per-tenant with configurable expiration. The dashboard supports SSO (Google, GitHub, etc.).
    • Infrastructure: Runs on AWS with private networking, automated patching, and centralized logging.

    For compliance reports (SOC 2 Type II, HIPAA, GDPR) and definitive controls, visit the Hatchet Trust Center.