Pocket Flow is a minimalist LLM framework for building complex applications like Agents, Task Decomposition, and Retrieval-Augmented Generation (RAG). Its core philosophy is simplicity and flexibility, packed into just 100 lines of code with zero dependencies, giving you complete control without vendor lock-in.
The framework models LLM workflows as a Graph and a Shared Store. This simple yet powerful abstraction allows you to implement popular design patterns with ease:
Pocket Flow intentionally omits built-in utilities for specific APIs. This design choice provides maximum flexibility, allowing you to switch vendors, use fine-tuned models, or run models locally without being tied to a specific implementation. You can implement your own utility functions for prompt caching, batching, and streaming to optimize performance for your specific use case.
+3 more