How tnahddisttud/pocketflow works
PocketFlow is a minimalist Python LLM framework whose product is a graph-based runtime, not the collection of cookbook applications. An application assembles nodes into a flow, supplies shared state, and runs the flow; the runtime dispatches nodes and follows action-based successors. The README identifies agents, workflows, and RAG as patterns built on this graph abstraction. The sampled runtime shows synchronous orchestration and parts of the async and batch APIs; lifecycle details beyond the excerpts are not expanded here.
Main entry points: __init__.py Flow
Components 9
Other components
- Application developer
- Base node
pocketflow/__init__.py - Node
pocketflow/__init__.py - Flow
pocketflow/__init__.py - Batch node
pocketflow/__init__.py - Batch flow
pocketflow/__init__.py - Async node
pocketflow/__init__.py - Async flow
pocketflow/__init__.py - Parallel batch
pocketflow/__init__.py
Connections 8
- Application developer → Flow: runs graph
README.md - Flow → Base node: dispatches
pocketflow/__init__.py - Base node → Node: extends
pocketflow/__init__.py - Node → Batch node: extends
pocketflow/__init__.py - Flow → Batch flow: extends
pocketflow/__init__.py - Node → Async node: extends
pocketflow/__init__.py - Flow → Async flow: extends
pocketflow/__init__.py - Async node → Parallel batch: extends
pocketflow/__init__.py