2.0 KiB
2.0 KiB
| layout | title | nav_order |
|---|---|---|
| default | Home | 1 |
Pocket Flow
A 100-line minimalist LLM framework for Agents, Task Decomposition, RAG, etc.
We model the LLM workflow as a Graph + Shared Store:
- Nodes handle simple (LLM) tasks.
- Nodes connect through Actions (labeled edges) for Agents.
- Flows orchestrate a directed graph of Nodes for Task Decomposition.
- Nodes within Flows communicate through a Shared Store.
- A Flow can be used as a Node (for Nesting).
- Batch Nodes/Flows for data-intensive tasks.
- Async Nodes/Flows allow waits for asynchronous tasks.
If you are an AI assistant reading this document, please read all the non-optional and non-advanced parts. If you are helping a human build an LLM app, please carefully review the Development Playbook. {: .warning }
Core Abstraction
Utility Function
- LLM Wrapper
- Tool
- (Optional) Viz and Debug
- Chunking
We do not provide built-in utility functions. Example implementations are provided as reference. {: .warning }
Design Pattern
- Structured Output
- Workflow
- Map Reduce
- RAG
- Agent
- (Optional) Chat Memory
- (Advanced) Multi-Agents
- Evaluation