"AI agent framework" has quietly become one of the most crowded — and most confusing — corners of developer tooling. Some frameworks are code libraries for wiring up a single agent's memory and control flow. Others are no-code canvases for non-engineers. And a newer breed doesn't build agents at all — it coordinates the coding agents you already use (Claude Code, Cursor, Codex) so they stop working in isolated silos. This guide compares five real, currently-maintained frameworks — LangGraph, Dify, Haystack, DeerFlow, and Compozy — and where each one actually fits.
The short version
| Tool | What it actually is | Best for | Pricing |
|---|---|---|---|
| LangGraph | Low-level state-graph library for agents that pause, remember, and resume | Developers who need fine-grained control over agent state and reliability in production | Free, open source (LangSmith observability paid separately) |
| Dify | Visual, no-code canvas for building AI chatbots, agents and RAG pipelines | Product teams who want to ship an AI workflow without hand-writing orchestration code | Free self-hosted Community edition; Cloud/Enterprise on quote |
| Haystack | Modular toolkit focused on retrieval-augmented generation (RAG) over your own documents | Teams building search/Q&A systems grounded in company docs, not general-purpose agents | Free, open source (Apache 2.0); Enterprise support paid |
| DeerFlow | ByteDance's framework for long-running autonomous agents that spin up their own helper agents | Teams building deep-research or multi-step coding agents that run for minutes or hours unsupervised | Free, open source (MIT) |
| Compozy | A coordination layer that makes your existing CLI coding agents (Claude Code, Cursor, Codex) work together | Developers already using multiple AI coding agents who want them to share one task instead of running in silos | Free, open source (MIT), self-hosted single binary |
LangGraph — the low-level foundation others build on
LangGraph, from the LangChain team, is a code library rather than a product: you write Python (or JS) and think in state graphs. Its headline feature is durable execution — an agent can pause mid-task, survive a server restart, and pick up exactly where it left off instead of losing all progress. It ships with native human-in-the-loop checkpoints, short and long-term memory primitives, and token-by-token streaming. It's proven in production at Klarna, Replit and Elastic, and has 40k+ GitHub stars.
Forces: durable, resumable execution; built-in human-in-the-loop and memory; battle-tested at scale.
Limites: it's a low-level library — you write code and think in graphs, with a steeper learning curve than a no-code tool like Dify. It's also unnecessary complexity if all you need is a single-turn AI feature with no multi-step state to track.
Pricing: free and open source (pip install); LangSmith, the companion observability tool, has a separate paid tier.
Dify — point, click, and ship an AI workflow
Dify takes the opposite approach from LangGraph: instead of writing state-graph code, you connect blocks on a visual canvas to build chatbots, agents, or RAG pipelines. It's open source and self-hostable, so there's no forced dependency on a vendor's cloud, and it ships a plugin marketplace for wiring in different model providers. It's in production at large orgs including Adobe, PayPal and Mercedes-Benz.
Forces: productive visual builder for RAG/agent/conditional-logic workflows; fully self-hostable; production-proven at enterprise scale.
Limites: the canvas gets hard to follow once a workflow has many branches, and full self-hosting (vector DB, background workers) takes real setup time. It also lists LangGraph and Haystack as direct alternatives in its own comparison data — worth knowing if you're choosing between "no-code canvas" and "code-first library."
Pricing: Community edition free (self-hosted via Docker); Dify Cloud and Enterprise (SSO/SAML/RBAC) on quote.
Haystack — for when the job is really search, not general agency
Haystack is narrower by design: it's built for retrieval-augmented generation — feeding an AI model your company's PDFs, wikis, or support tickets so it answers from real content instead of guessing. Its pipelines are modular, so swapping a vector database or LLM provider doesn't mean rebuilding everything, and it connects to a long list of stores (Weaviate, Pinecone, Elasticsearch) and model providers (OpenAI, Anthropic, Mistral, Hugging Face). It's proven in production at Apple, Meta, Netflix and the European Commission.
Forces: composable pipelines that don't lock you into one vector store or model vendor; wide connector support; genuinely production-proven, not just a demo project.
Limites: it's code-first, with real setup investment and no drag-and-drop mode, and it's optimized for document search/RAG rather than general-purpose, multi-tool agents. Enterprise support and the visual builder are separate paid add-ons.
Pricing: free and open source (Apache 2.0, pip install); Enterprise support and visual platform on quote.
DeerFlow — an agent that spins up its own helper agents
DeerFlow, an open-source project from ByteDance, is built for agents that work for minutes or hours at a stretch — researching, writing code, and delegating sub-tasks to helper agents it spawns itself, rather than answering in one quick reply. It's built on top of LangGraph for its orchestration foundation, but adds sandboxed execution (local, Docker, or Kubernetes) and a dedicated authorization framework that controls exactly what those sub-agents are allowed to do — treating agent security as a first-class concern rather than an afterthought. It has 80k+ GitHub stars.
Forces: strong scale and backing (ByteDance); sandboxed execution treated as a real security boundary; dedicated sub-agent authorization; builds on LangGraph's proven orchestration rather than reinventing it.
Limites: it's developer infrastructure, not a turnkey product — expect a real setup investment before it pays off, and it's overkill for a simple, single-exchange AI feature.
Pricing: free and open source (MIT), backed by ByteDance.
Compozy — coordinating the coding agents you already run
Compozy solves a different problem entirely: instead of being one more agent framework, it's a coordination layer that lets the AI coding agents you already use — LangGraph-style custom agents aside, think Claude Code, Codex, Gemini CLI, Cursor — work together on the same task instead of each running in its own isolated silo. It's local-first: a single binary with a local SQLite database, no external dependencies, and sessions that survive restarts. It also supports automated execution triggered by cron jobs, webhooks, or other events.
Forces: coordinates agents you're already using rather than adding yet another one; local-first architecture with no external dependencies; free, open source (MIT), and automatable via cron/webhooks.
Limites: it's a young project (roughly 2.7k GitHub stars, about five months old) without many production examples yet, its "Compozy Network" protocol is still emerging and not standardized, and multi-agent coordination is inherently complex — expect setup friction.
Pricing: free and open source (MIT); self-hosted single binary, no managed cloud tier.
Which one should you actually pick?
If you're writing code and need fine-grained control over a production agent's state and reliability, start with LangGraph — it's the foundation several of the others (including DeerFlow) are built on. If you'd rather not write orchestration code at all and want a team to ship an AI workflow visually, Dify is the more productive starting point. If your actual problem is "answer questions from our own documents accurately," that's a narrower job than general agency, and Haystack is purpose-built for it. If you're building an autonomous research or coding agent that needs to run unsupervised for a long stretch and delegate to helper agents, look at DeerFlow. And if your actual pain point isn't building an agent but getting the several CLI coding agents you already use to stop working against each other, Compozy is solving a problem none of the other four even attempt.