Pocket Flow
A 100-line minimalist LLM framework: just the graph abstraction, nothing else.
About
Pocket Flow is a deliberate reaction to framework bloat. Its thesis: the core abstraction underneath every LLM framework is a nested directed graph, and you can capture it in about 100 lines of code and 56KB. Nodes handle simple tasks, edges with actions connect them into agents, and Flows orchestrate graphs of Nodes for task decomposition, with Batch and Async variants for data-heavy and parallel work.
There are no app-specific wrappers and no vendor-specific wrappers. You bring your own LLM client and tools; the framework stays out of the way. That makes it unusually good for agentic coding setups where an AI agent writes the application code on top of a tiny, fully legible core. Ports now exist in TypeScript, Java, C++, Go, Rust, and PHP, maintained with community help.
The tradeoff is explicit: everything beyond the graph primitive (chunking, vector stores, eval harnesses) you build or borrow yourself. Pick it when you want total control and zero dependency weight, not when you want batteries included.
What it can do
- Minimal graph abstraction: Node, Flow, Batch, Async, nesting
- Zero vendor or app-specific wrappers
- Design patterns documented: agents, multi-agent, RAG, MapReduce, structured output
- Multi-language ports (TS, Java, C++, Go, Rust, PHP)
- MIT-licensed, ~56KB footprint
Setup
Copy the ~100-line core into your project (or pip/npm install the published package); add your own LLM wrapper and tools; compose Nodes and Flows.
Prerequisites
Python (or TS/Java/Go/Rust/PHP/C++ for the ports); an LLM API key; willingness to build utilities yourself.
Use cases
Works with
Trust score — 7/10
Scored 7/10 (verified tier, metrics-v1). Evidence: 11,246 GitHub stars (The-Pocket/PocketFlow); pushed 2026-07-26; MIT license confirmed via GitHub API; 100-line graph-abstraction thesis and multi-language ports verified against README and docs site. Manual review: minimal by design -- no built-in utilities, which is the point; slower recent activity is consistent with a finished minimal core. License: MIT.
★ 11,246 GitHub stars
How the trust score is built
Full methodology →- Adoption · stars/downloads, log-scaled vs peers
- 7.0/10
- Maintenance · recency, releases, issue load
- 7.0/10
- Openness · license + docs
- 10.0/10
- Manual review · sanity read + red-flag check
- 8.0/10
- · 11,246 GitHub stars (The-Pocket/PocketFlow); pushed 2026-07-26; MIT license confirmed via GitHub API
- · 100-line graph-abstraction thesis and multi-language ports verified against README and docs site
- · manual review: minimal by design -- no built-in utilities, which is the point; slower recent activity is consistent with a finished minimal core
Sources
Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.