freshcrate
Skin:/
Home > Frameworks > PocketFlow

PocketFlow

Pocket Flow: 100-line LLM framework. Let Agents build Agents!

Why this rank:Strong adoptionRelease freshnessHealthy release cadence

Description

Pocket Flow: 100-line LLM framework. Let Agents build Agents!

README

Pocket Flow โ€“ 100-line minimalist LLM framework

English | ไธญๆ–‡ | Espaรฑol | ๆ—ฅๆœฌ่ชž | Deutsch | ะ ัƒััะบะธะน | Portuguรชs | Franรงais | ํ•œ๊ตญ์–ด

License: MIT Docs Pocket Flow is a 100-line minimalist LLM framework

  • Lightweight: Just 100 lines. Zero bloat, zero dependencies, zero vendor lock-in.

  • Expressive: Everything you loveโ€”(Multi-)Agents, Workflow, RAG, and more.

  • Agentic Coding: Let AI Agents (e.g., Cursor AI) build Agentsโ€”10x productivity boost!

Get started with Pocket Flow:

Why Pocket Flow?

Current LLM frameworks are bloated... You only need 100 lines for LLM Framework!

Abstraction App-Specific Wrappers Vendor-Specific Wrappers Lines Size
LangChain Agent, Chain Many
(e.g., QA, Summarization)
Many
(e.g., OpenAI, Pinecone, etc.)
405K +166MB
CrewAI Agent, Chain Many
(e.g., FileReadTool, SerperDevTool)
Many
(e.g., OpenAI, Anthropic, Pinecone, etc.)
18K +173MB
SmolAgent Agent Some
(e.g., CodeAgent, VisitWebTool)
Some
(e.g., DuckDuckGo, Hugging Face, etc.)
8K +198MB
LangGraph Agent, Graph Some
(e.g., Semantic Search)
Some
(e.g., PostgresStore, SqliteSaver, etc.)
37K +51MB
AutoGen Agent Some
(e.g., Tool Agent, Chat Agent)
Many [Optional]
(e.g., OpenAI, Pinecone, etc.)
7K
(core-only)
+26MB
(core-only)
PocketFlow Graph None None 100 +56KB

How does Pocket Flow work?

The 100 lines capture the core abstraction of LLM frameworks: Graph!


From there, it's easy to implement popular design patterns like (Multi-)Agents, Workflow, RAG, etc.


โœจ Below are basic tutorials:
Name Difficulty Description
Chat โ˜†โ˜†โ˜† Dummy A basic chat bot with conversation history
Structured Output โ˜†โ˜†โ˜† Dummy Extracting structured data from resumes by prompting
Workflow โ˜†โ˜†โ˜† Dummy A writing workflow that outlines, writes content, and applies styling
Agent โ˜†โ˜†โ˜† Dummy A research agent that can search the web and answer questions
RAG โ˜†โ˜†โ˜† Dummy A simple Retrieval-augmented Generation process
Batch โ˜†โ˜†โ˜† Dummy A batch processor that translates markdown into multiple languages
Streaming โ˜†โ˜†โ˜† Dummy A real-time LLM streaming demo with user interrupt capability
Chat Guardrail โ˜†โ˜†โ˜† Dummy A travel advisor chatbot that only processes travel-related queries
Majority Vote โ˜†โ˜†โ˜† Dummy Improve reasoning accuracy by aggregating multiple solution attempts
Map-Reduce โ˜†โ˜†โ˜† Dummy Batch resume qualification using map-reduce pattern
CLI HITL โ˜†โ˜†โ˜† Dummy A command-line joke generator with human-in-the-loop feedback
Multi-Agent โ˜…โ˜†โ˜† Beginner A Taboo word game for async communication between 2 agents
Supervisor โ˜…โ˜†โ˜† Beginner Research agent is getting unreliable... Let's build a supervision process
Parallel โ˜…โ˜†โ˜† Beginner A parallel execution demo that shows 3x speedup
Parallel Flow โ˜…โ˜†โ˜† Beginner A parallel image processing showing 8x speedup
Thinking โ˜…โ˜†โ˜† Beginner Solve complex reasoning problems through Chain-of-Thought
Memory โ˜…โ˜†โ˜† Beginner A chat bot with short-term and long-term memory
Text2SQL โ˜…โ˜†โ˜† Beginner Convert natural language to SQL queries with an auto-debug loop
Code Generator โ˜…โ˜†โ˜† Beginner Generate test cases, implement solutions, and iteratively improve code
MCP โ˜…โ˜†โ˜† Beginner Agent using Model Context Protocol for numerical operations
Agent Skills โ˜…โ˜†โ˜† Beginner Route requests to reusable markdown skills and apply them in an agent flow
A2A โ˜…โ˜†โ˜† Beginner Agent wrapped with A2A protocol for inter-agent communication
Streamlit FSM โ˜…โ˜†โ˜† Beginner Streamlit app with finite state machine for HITL image generation
FastAPI WebSocket โ˜…โ˜†โ˜† Beginner Real-time chat interface with streaming LLM responses via WebSocket
FastAPI Background โ˜…โ˜†โ˜† Beginner FastAPI app with background jobs and real-time progress via SSE
Voice Chat โ˜…โ˜†โ˜† Beginner An interactive voice chat application with VAD, STT, LLM, and TTS.
Judge โ˜…โ˜†โ˜† Beginner LLM-as-Judge evaluator-optimizer loop for iterative content refinement
Debate โ˜…โ˜†โ˜† Beginner Adversarial reasoning with two advocates and an impartial judge
Agentic RAG โ˜…โ˜†โ˜† Beginner Agent-driven RAG that decides which documents to read
Self-Healing Mermaid โ˜…โ˜†โ˜† Beginner Generate Mermaid diagrams with automatic error recovery
Heartbeat โ˜…โ˜†โ˜† Beginner ClawBot-like always-on periodic monitoring with nested flows
Lead Generation โ˜…โ˜…โ˜† Intermediate Sales pipeline: scrape, enrich, score, and personalize emails
Newsletter โ˜…โ˜…โ˜† Intermediate AI newsletter curation: search, filter, summarize, and format
Invoice Processing โ˜…โ˜…โ˜† Intermediate Extract and validate invoice data from PDFs using vision
NotebookLM โ˜…โ˜…โ˜† Intermediate Turn documents into a podcast with two AI hosts
Deep Research โ˜…โ˜…โ˜† Intermediate Recursive map-reduce research with iterative refinement
Coding Agent โ˜…โ˜…โ˜… Advanced Production coding agent with 6 tools, memory, and patch-as-subflow

๐Ÿ‘€ Want to see other tutorials for dummies? Create an issue!

How to Use Pocket Flow?

๐Ÿš€ Through Agentic Codingโ€”the fastest LLM App development paradigm-where humans design and agents code!



โœจ Below are examples of more complex LLM Apps:

App Name Difficulty Topics Human Design Agent Code
Website Chatbot
Turn your website into a 24/7 customer support genius
โ˜…โ˜…โ˜†
Medium
Agent
RAG
Design Doc Flow Code
Danganronpa Simulator
Forget the Turing test. Danganronpa, the ultimate AI experiment!
โ˜…โ˜…โ˜…
Advanced
Workflow
Agent
Design Doc Flow Code
Codebase Knowledge Builder
Life's too short to stare at others' code in confusion
โ˜…โ˜…โ˜†
Medium
Workflow Design Doc Flow Code
Build Cursor with Cursor
We'll reach the singularity soon ...
โ˜…โ˜…โ˜…
Advanced
Agent Design Doc Flow Code
Ask AI Paul Graham
Ask AI Paul Graham, in case you don't get in
โ˜…โ˜…โ˜†
Medium
RAG
Map Reduce
TTS
Design Doc Flow Code
Youtube Summarizer
Explain YouTube Videos to you like you're 5
โ˜…โ˜†โ˜†
Beginner
Map Reduce Design Doc Flow Code
Cold Opener Generator
Instant icebreakers that turn cold leads hot
โ˜…โ˜†โ˜†
Beginner
Map Reduce
Web Search
Design Doc Flow Code
  • Want to learn Agentic Coding?

    • Check out my YouTube for video tutorial on how some apps above are made!

    • Want to build your own LLM App? Read this post! Start with this template!

Release History

VersionChangesUrgencyDate
v0.0.0Latest release: v0.0.0Medium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchMedium3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026
main@2026-03-27Latest activity on main branchLow3/27/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

PocketFlow-Zig๐Ÿš€ Build LLM-powered workflows with PocketFlow-Zig, a lightweight framework leveraging Zig's features for efficient, type-safe programming.main@2026-06-06
AGI-Alpha-Agent-v0METAโ€‘AGENTIC ฮฑโ€‘AGI ๐Ÿ‘๏ธโœจ โ€” Mission ๐ŸŽฏ Endโ€‘toโ€‘end: Identify ๐Ÿ” โ†’ Outโ€‘Learn ๐Ÿ“š โ†’ Outโ€‘Think ๐Ÿง  โ†’ Outโ€‘Design ๐ŸŽจ โ†’ Outโ€‘Strategise โ™Ÿ๏ธ โ†’ Outโ€‘Execute โšกmain@2026-04-30
summoner-agentsA collection of Summoner clients and agents featuring example implementations and reusable templatesv1.1.0
solace-agent-meshAn event-driven framework designed to build and orchestrate multi-agent AI systems. It enables seamless integration of AI agents with real-world data sources and systems, facilitating complex, multi-s1.28.0
agent-archNo descriptionmain@2026-06-01

More in Frameworks

langchainThe agent engineering platform
deer-flowAn open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message gateway, it handles different levels of ta
tqdmFast, Extensible Progress Meter
simBuild, deploy, and orchestrate AI agents. Sim is the central intelligence layer for your AI workforce.