PocketFlow: 100-line LLM framework
llm-frameworkminimalistagentic-codinggraphopen-sourcedesign-patterns
Abstraction: Minimalist 100-line graph-based LLM agent framework
Key points:
- Pocket Flow (by The-Pocket) is a 100-line, zero-dependency, zero-vendor-lock-in LLM framework whose core abstraction is a Graph; installable via
pip install pocketflowor by copying the source. - From the graph primitive it implements common patterns: (multi-)agents, workflow, RAG, map-reduce. Comparison table pitches it against bloated alternatives — LangChain (405K lines, +166MB), CrewAI (18K, +173MB), SmolAgent, LangGraph, AutoGen — vs PocketFlow's 100 lines / +56KB.
- Ships ports in TypeScript, Java, C++, Go, Rust, and PHP.
- Promotes "Agentic Coding" — humans design, agents code — as the fastest LLM app dev paradigm; extensive cookbook from Dummy to Advanced (chat, structured output, MCP, A2A, LLM-as-Judge, agentic RAG, a 6-tool coding agent).
- Example full apps include a Website Chatbot, Codebase Knowledge Builder, and "Build Cursor with Cursor," each with a design doc + flow code.
Connections: Pocketflow · LLM Frameworks · Agentic Coding · Langchain · AI Agents