Comparisons / Flue vs LangChain

Flue vs LangChain: Which Agent Framework to Use?

Flue vs LangChain, head to head

Flue and LangChain live in different languages, different runtimes, and different theories of what an agent framework is even for — but they both end up on the shortlist when someone asks "what should I use to build an agent."

LangChain is the incumbent. Python-first, class-heavy, five years of accumulated integrations (~132k GitHub stars, ~3.4M weekly downloads), and paid-for by LangSmith (hosted observability) and LangServe (deployment). AgentExecutor wraps LLMChain wraps PromptTemplate + OutputParser; tools are @tool decorators or BaseTool subclasses; memory injects as a class. When you swap a vector store, you change one class — that's the abstraction earning its cost. LangGraph handles the workflow layer above the loop; 1.0 GA'd October 2025.

Flue is the new arrival. Announced May 1 2026 by Fred K. Schott and the Astro core team (now at Cloudflare), 1.0 beta on June 16 2026. TypeScript-native, declarative-first: createAgent({ model, instructions, tools }) is the whole construction, and state is a Durable Stream — a replayable event log stored in Cloudflare Durable Objects. Deploys to Cloudflare, plain Node, GitHub Actions, and GitLab CI from one config. Built on the Pi harness (same runtime as OpenClaw).

The tradeoff is real. LangChain trades bulk and a class hierarchy for the deepest integration catalog in the space. Flue trades ecosystem depth for a thinner API, native Cloudflare persistence, and a genuinely unusual cross-runtime deploy story. Language is usually the tiebreaker — Python teams pick LangChain, TypeScript teams pick Flue (or Mastra, or Eve).

Pick Flue if

Pick Flue when the team is TypeScript-native and Cloudflare Durable Objects is a real primitive to build on.

  • The deploy target is Cloudflare Workers + Durable Objects; per-agent state + locking is essentially free.
  • The same agent needs to run in production AND in CI (nightly bots, GitHub Actions research agents) — the cross-runtime config is rare and useful.
  • Declarative feels cleaner than class hierarchies for how your team writes code.
  • Your team is on the Pi/OpenClaw stack and shared tooling matters.
Full Fluecomparison →

Pick LangChain if

Pick LangChain when Python is the stack and the integration matrix is what you're paying for.

  • Your team writes Python and your data tooling assumes pandas; LangChain.js exists but trails on features.
  • You need several vector stores, document loaders for PDF/CSV/HTML, multiple embeddings, and the option to swap LLM vendors behind one interface.
  • LangSmith earns its keep — hosted tracing, eval suites, dataset-driven regression tests — and you don't want to build any of that.
  • LangGraph is where you'd graduate to for workflows; the ecosystem holds together.
Full LangChaincomparison →

What both add

Both add a real dependency tree and a vocabulary your team has to learn before they ship anything. LangChain's surface is much bigger — that's the tradeoff for the integration catalog — and Flue's is thinner but tied to Cloudflare in ways that don't travel cleanly.

Both also have release-cadence risk. LangChain has rewritten its core APIs more than once (though 1.0 GA'd in Oct 2025 with stability as the point). Flue is a 1.0 beta as of mid-2026; the API is likely to move. Pin your versions either way.

By the numbers

By the numbers

Flue

GitHub Stars

2.4k

Forks

140

Language

TypeScript

License

MIT

Created

2026-05-01

Created by

Fred K. Schott + Astro team (at Cloudflare)

Backed by

Cloudflare

Cloud/SaaS

Cloudflare Durable Objects; also deploys to Node, GitHub Actions, GitLab CI

Production ready

Yes

github.com/withastro/flue

LangChain

GitHub Stars

132.3k

Forks

21.8k

Language

Python

License

MIT

Created

2022-10-17

Created by

Harrison Chase

Backed by

Sequoia Capital, Benchmark

Funding

$25M Series A (2023), $25M Series B (2024)

Weekly downloads

3.5M

Cloud/SaaS

LangSmith (observability), LangServe (deployment)

Production ready

Yes

Used by: Notion, Elastic, Instacart

github.com/langchain-ai/langchain

GitHub stats as of April 2026. Stars indicate community interest, not necessarily quality or fit for your use case.

ConceptFlueLangChain
Agent`createAgent({ model, instructions, tools })` — declarative config, framework runs the loop`AgentExecutor` with `LLMChain`, `PromptTemplate`, `OutputParser`
ToolsRegistered with valibot schemas: `{ name, description, schema, execute }``@tool` decorator, `StructuredTool`, `BaseTool` class hierarchy
StateDurable Streams — replayable, checkpointed event log stored in Cloudflare Durable ObjectsLangGraph state channels with typed reducers
DeploymentOne config controls deploys to Cloudflare, Node, GitHub Actions, or GitLab CI
RuntimeThe Pi harness — same runtime as OpenClaw, so agents share tooling with that ecosystem
Cloudflare-nativeDurable Objects give per-agent persistence and locking without an external DB
Agent Loop`AgentExecutor.invoke()` with internal iteration
Conversation`ConversationBufferMemory`, `ConversationSummaryMemory`
Memory`VectorStoreRetrieverMemory`, `ConversationEntityMemory`
Guardrails`OutputParser`, `PydanticOutputParser`, custom validators

Or build your own in 60 lines

Both Flue and LangChain implement the same 8 patterns. An agent is a function. Tools are a dict. The loop is a while loop. The whole thing composes in ~60 lines of Python.

No framework. No dependencies. No opinions. Just the code.

Build it from scratch →