PocketFlow

Stale
GitHub Python MIT

Description

PocketFlow is a minimalist 100-line LLM framework that lets Agents build Agents, enabling complex AI agent workflows through a clean abstraction layer.

Key Features

  • Only 100 lines of code, zero dependencies, zero vendor lock-in — ultra lightweight
  • Graph-based abstraction supporting Agent, Multi-Agent, Workflow, and RAG design patterns
  • Supports Agentic Coding — let AI agents like Cursor build agents for 10x productivity
  • Available in Python, TypeScript, Java, C++, Go, Rust, and PHP
  • Rich cookbook examples: Chat, Structured Output, Streaming, Guardrail, and more
  • Install via pip or copy the 100-line source directly — minimal onboarding friction

Use Cases

💡 Rapidly build chatbots and conversational systems with multi-turn history
💡 Create RAG (Retrieval-Augmented Generation) pipelines for knowledge-base Q&A
💡 Build multi-agent collaboration systems with inter-agent communication and workflow orchestration
💡 Use for education and prototyping — the simplest implementation of LLM framework core abstractions
💡 Extract structured data from unstructured text, such as parsing resume information

Quick Start

Install via pip install pocketflow, or copy the 100-line pocketflow/__init__.py directly from GitHub. Build Chat, RAG, and Agent apps quickly using cookbook examples. Docs at the-pocket.github.io/PocketFlow.

Related Projects