PocketFlow
The-Pocket/PocketFlow
Pocket Flow: 100-line LLM framework. Let Agents build Agents!
Pocket Flow: 100-line LLM framework. Let Agents build Agents!
Categories
Tags
Similar tools
ECC
affaan-m/ECC
The agent harness performance optimization system
hermes-agent
NousResearch/hermes-agent
The self-improving AI agent built by Nous Research
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT: Build, Deploy, and Run AI Agents
ollama
ollama/ollama
Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
prompts.chat
f/prompts.chat
The world's largest open-source prompt library for AI
transformers
huggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models
Install
pip install PocketFlowREADME
English | 中文 | Español | 日本語 | Deutsch | Русский | Português | Français | 한국어
Pocket Flow is a 100-line minimalist LLM framework
-
Lightweight: Just 100 lines. Zero bloat, zero dependencies, zero vendor lock-in.
-
Expressive: Everything you love—(Multi-)Agents, Workflow, RAG, and more.
-
Agentic Coding: Let AI Agents (e.g., Cursor AI) build Agents—10x productivity boost!
Get started with Pocket Flow:
- To install,
pip install pocketflowor just copy the source code (only 100 lines). - To learn more, check out the video tutorial and documentation
- 🎉 Join our Discord to connect with other developers building with Pocket Flow!
- 🎉 Pocket Flow now has Typescript, Java, C++, Go, Rust and PHP versions!
Why Pocket Flow?
Current LLM frameworks are bloated... You only need 100 lines for LLM Framework!
| Abstraction | App-Specific Wrappers | Vendor-Specific Wrappers | Lines | Size | |
|---|---|---|---|---|---|
| LangChain | Agent, Chain | Many (e.g., QA, Summarization) | Many (e.g., OpenAI, Pinecone, etc.) | 405K | +166MB |
| CrewAI | Agent, Chain | Many (e.g., FileReadTool, SerperDevTool) | Many (e.g., OpenAI, Anthropic, Pinecone, etc.) | 18K | +173MB |
| S |