Use Hypergraph When…
You Want One Framework to Master
Instead of learning one tool for DAGs and another for agents, learn one framework that handles both.| Use Case | What You Learn |
|---|---|
| ETL pipelines | Same @node decorator, same Graph, same runner |
| Agentic loops | Add @route and END, same everything else |
| Multi-agent orchestration | Nest graphs with .as_node(), same mental model |
Your Workflows Have Natural Hierarchy
Real AI systems aren’t flat. They have structure:Evaluation Harness
Outer: Evaluation harness (DAG)
Inner: Chat agent (cyclic)
Pattern: Test cyclic workflows at scale
Inner: Chat agent (cyclic)
Pattern: Test cyclic workflows at scale
Prompt Optimization
Outer: Prompt optimization (cyclic)
Inner: Pipeline under test (DAG)
Pattern: Iterate on prompts
Inner: Pipeline under test (DAG)
Pattern: Iterate on prompts
Batch Processing
Outer: Batch processing (DAG)
Inner: Per-item workflow (may have branches)
Pattern: Fan-out with
Inner: Per-item workflow (may have branches)
Pattern: Fan-out with
.map()Multi-Turn RAG
Outer: Conversation loop (cyclic)
Inner: RAG retrieval (DAG)
Pattern: Query → retrieve → generate → repeat
Inner: RAG retrieval (DAG)
Pattern: Query → retrieve → generate → repeat
You Value Pure, Testable Functions
If you want to test your logic without framework setup or mocking:You’re Building Multi-Turn AI Workflows
Conversational AI, agentic loops, iterative refinement — these require cycles:Hypergraph handles cycles naturally with
@route and END. No external loop needed.You Want Minimal Boilerplate
Define functions, name outputs, and let hypergraph infer the edges:Don’t Use Hypergraph When…
You Need a Simple Script
If your task is “call this function, then call that function,” you don’t need a graph framework:- You have 5+ steps with complex dependencies
- You need to reuse the pipeline with different inputs
- You want to test individual steps in isolation
- You need conditional branching or loops
- You want to compose smaller pipelines into larger ones
You Need Production Maturity Today
Hypergraph is in alpha. The core features work, but:If you need a battle-tested solution today, consider:
- LangGraph for agentic workflows
- Hamilton for data/ML pipelines
- Prefect for production orchestration
You’re Doing Simple LLM Calls
If you’re just calling an LLM API and returning the result, you don’t need orchestration:- You’re chaining multiple LLM calls (e.g., RAG, multi-step reasoning)
- You need retrieval, reranking, or other preprocessing
- You have conditional logic (e.g., route based on query type)
- You want multi-turn conversations with state
You Need Specialized Orchestration Features
Hypergraph focuses on the graph model. If you need:| Feature | Consider Instead |
|---|---|
| Scheduling, retries, monitoring | Prefect, Temporal |
| Distributed execution across clusters | Ray, Dask, Airflow |
| HPC/SLURM integration | Pipefunc |
| Built-in lineage tracking UI | Hamilton |
| LangChain tool integrations | LangGraph |
Summary Decision Matrix
| If you want… | Use hypergraph? | Why |
|---|---|---|
| One framework for DAGs and agents | ✅ Yes | Core strength - unified model |
| Hierarchical workflow composition | ✅ Yes | First-class support with .as_node() |
| Pure, testable functions | ✅ Yes | Functions are framework-agnostic |
| Multi-turn AI workflows | ✅ Yes | Native cycle support with @route |
| Minimal boilerplate | ✅ Yes | Automatic edge inference |
| Simple scripts (3-5 steps) | ❌ No | Plain Python is clearer |
| Production maturity today | ⚠️ Maybe | Evaluate alpha status carefully |
| Simple LLM API calls | ❌ No | Call the API directly |
| Distributed execution | ❌ No | Use Ray, Dask, or Airflow |
Real-World Use Cases
Where Hypergraph Shines
Multi-Turn RAG Systems
Conversation loops with retrieval steps inside each turn. Natural hierarchy: cyclic chat contains DAG retrieval.
Prompt Optimization Loops
Iteratively improve prompts. Cyclic optimization contains DAG workflow under test.
Where Hypergraph Doesn’t Fit
Next Steps
Quickstart
Try hypergraph with a working example in 5 minutes.
Comparison
See detailed comparison with LangGraph, Hamilton, and others.
Core Concepts
Deep dive into nodes, graphs, and runners.
Real-World Examples
Production-ready RAG, evaluation, and multi-agent examples.