PocketFlow

Create complex LLM applications with a minimalist framework in 100 lines. Build agents, task decomposition, and RAG pipelines with zero dependencies.

Screenshot of PocketFlow website

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:

  • Agents: Create autonomous agents that make decisions and execute tasks.
  • Chains: Link multiple tasks together to form complex pipelines.
  • RAG: Integrate external data retrieval with language model generation.
  • MapReduce: Split large data processing tasks into parallelizable steps.

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.

Share:

Ad
Favicon

 

  
 

Similar to PocketFlow

Favicon

 

  
  
Favicon

 

  
  
Favicon

 

  
  

Command Menu