PocketFlow: a 100-line minimalist LLM framework based on graph abstractions
PocketFlow: a 100-line minimalist LLM framework based on graph abstractions
What it solves
Pocket Flow is a minimalist LLM framework designed to eliminate the bloat found in many modern AI frameworks. It provides a lightweight alternative for developers who want to build complex LLM applications without heavy dependencies, vendor lock-in, or thousands of lines of abstraction code.
How it works
The framework is built around a single core abstraction: the Graph. By using a graph-based approach, developers can easily implement various AI design patterns such as multi-agent systems, RAG (Retrieval-Augmented Generation), and structured workflows. The entire core is contained within approximately 100 lines of code, making it easy to understand, modify, or even copy-paste into a project.
Who it’s for
It is intended for developers who prefer a lean, transparent framework over heavy abstractions and those who embrace "Agentic Coding"—a paradigm where humans design the logic and AI agents (like Cursor AI) write the implementation code.
Highlights
- Ultra-Lightweight: Core logic is just 100 lines of code with zero dependencies.
- Versatile Design Patterns: Supports Multi-Agents, RAG, and complex Workflows.
- Multi-Language Support: Available in TypeScript, Java, C++, Go, Rust, and PHP.
- Extensive Cookbook: Includes a wide variety of tutorials ranging from simple chatbots to advanced coding agents and deep research tools.