PocketFlow
Python LLM workflow framework with a local Ollama connection example, custom model utilities and FastAPI chat examples. Its dependency-free core uses MIT.

PocketFlow is a Python framework for developers building AI agents and workflows with their own model connections. Its utility examples include an Ollama function for local LLM calls. Developers supply that function rather than using a built-in model wrapper. Cloud API examples send model requests to their providers. FastAPI examples show chat applications with streamed responses and background jobs.
The framework centers on connected tasks that share application data. It supports agents that choose their next action, workflows that follow a defined sequence, and multiple agents working together. Retrieval workflows combine documents with generated answers, while structured output workflows return consistently formatted data.
Batch processing handles groups of inputs. Parallel execution supports tasks that spend time waiting on external services, and map-reduce workflows split larger data jobs into parts before combining the results. Examples cover resume processing, document selection by agents, conversation memory and streaming that users can interrupt.
Its small, dependency-free core leaves service choices to the application developer. PocketFlow doesn't include built-in model wrappers, embeddings, web search or vector database utilities. Those connections determine where application data goes; the framework's license doesn't make a connected model local or its use free.
PocketFlow is open source under MIT. The project also provides TypeScript, Java, C++, Go, Rust and PHP versions, plus examples connecting agents to MCP tools and A2A communication.