DAG frameworks can’t handle agents. Agent frameworks have too much ceremony. You shouldn’t need different tools for data pipelines and agentic AI.Hypergraph spans the full spectrum — from batch data pipelines to multi-turn AI agents — with the same minimal API.
from hypergraph import Graph, node, SyncRunner@node(output_name="embedding")def embed(text: str) -> list[float]: return model.embed(text)@node(output_name="docs")def retrieve(embedding: list[float]) -> list[str]: return db.search(embedding)@node(output_name="answer")def generate(docs: list[str], query: str) -> str: return llm.generate(docs, query)# Edges inferred from names - no wiring neededgraph = Graph(nodes=[embed, retrieve, generate])# Run the graphrunner = SyncRunner()result = runner.run(graph, {"text": "RAG tutorial", "query": "What is RAG?"})print(result["answer"])
Real AI workflows nest DAGs inside cycles and cycles inside DAGs:
# The chat is a cyclic graphchat = Graph([retrieve, generate, accumulate, should_continue])# Wrap it as a node for evaluationeval_pipeline = Graph([ load_test_cases, chat.as_node(), # Cyclic graph as a single node score_responses, aggregate_metrics,])
Hypergraph’s hierarchical composition makes this explicit and clean.
While the examples focus on AI/ML use cases, hypergraph is a general-purpose workflow framework. It has no dependencies on LLMs, vector databases, or any AI tooling. Use it for any multi-step workflow: ETL pipelines, business process automation, testing harnesses, or anything else that benefits from graph-based orchestration.