AgentIndex icon
AgentIndex
ToolsCategoriesTrendingNewCompareGuides
Submit Tool
ToolsCategoriesTrendingNewCompareGuides
Home/
Multi-Agent/
PocketFlow
PocketFlow logo

PocketFlow

Active·★ 11.2k·MIT·Updated 2026-07-26
★ Trending★ Essential

PocketFlow is a minimalist LLM framework whose core is just 100 lines of Python with no dependencies. Its premise is that the essential abstraction behind LLM frameworks is a graph: nodes that do work and the flow between them. On top of that abstraction you can implement agents, multi-agent systems, workflows, RAG and other patterns yourself, without vendor-specific or app-specific wrappers.

It suits developers who want to understand and fully control their agent logic, educators and learners who want to see how LLM applications work under the hood, and anyone frustrated by heavy frameworks and their dependency trees. The project also promotes "agentic coding": because the framework is so small, coding agents such as Cursor can read it entirely and build PocketFlow applications for you. Ports exist for TypeScript, Java, C++, Go and other languages, and the documentation includes design patterns and a large cookbook of examples.

© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
AboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

Code AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.

Getting started: `pip install pocketflow`, or simply copy the single 100-line source file into your project. Follow the documentation's design patterns to build an agent or workflow from nodes and flows.

#LLM Framework#AI Agents#Python#Minimalist#Workflow Automation#Coding
$ Install
$ pip install pocketflow
↗ Visit site★ GitHub
01

Features

01Lightweight and minimalist (100 lines, zero dependencies).
02Expressive, supporting popular LLM design patterns (Agents, Workflow, RAG).
03Facilitates "Agentic Coding" for 10x productivity with AI Agents.
04Core abstraction based on Graphs for flexible LLM application building.
05Cross-language support with versions in Typescript, Java, C++, Go, Rust, and PHP.
02

Why choose it

+Tiny, dependency-free core that you can read in minutes and vendor into any project.
+No lock-in: you bring your own model calls, tools and storage.
+Excellent for learning how agent and workflow patterns work.
+Ports to several languages and an extensive cookbook; MIT licensed.
03

Trade-offs

!You implement integrations yourself: model clients, retries, tracing, memory and tool schemas are not included.
!Production concerns such as durability and observability require additional libraries.
!Development of the core repository has slowed; the last push was in July 2026.
04

Compatibility

Python
Native
Verified via docs
Typescript
Supported
Verified via docs
Java
Supported
Verified via docs
C++
Supported
Verified via docs
Go
Supported
Verified via docs
Rust
Supported
Verified via docs
05

Quick start

1
$ pip install pocketflow
06

Use cases

↳Building and orchestrating AI agents (e.g., research agents, multi-agents).
↳Implementing LLM-powered workflows (e.g., writing, batch processing, code generation).
↳Developing Retrieval-Augmented Generation (RAG) applications.
07

How it compares

≈vs LangGraph: both model agents as graphs; LangGraph ships persistence, integrations and tooling, PocketFlow ships only the abstraction.
≈vs Pydantic AI: Pydantic AI provides typed model integrations and validation; PocketFlow leaves those to you.
≈vs PocketFlow Tutorial Codebase Knowledge: a sister project built with PocketFlow that turns a codebase into a tutorial, a good example of the framework in practice.
08

Alternatives

Microsoft AutoGen logo
Microsoft AutoGen★ 61.3k
A framework that enables the development of LLM applications using multiple agents that can converse with each other to solve tasks.
vs →
CrewAI logo
CrewAI★ 59.5k
Framework for orchestrating role-playing, autonomous AI agents. By working together, your Crew can tackle complex tasks.
vs →
headroom logo
headroom★ 74.8k

Comments

Log in to leave a comment
  • ?
    usr_seed_0366May 14, 2026

    100-line LLM framework is the right size for understanding what's actually happening under the hood.

  • ?
    usr_seed_0474Apr 24, 2026

    Production use is possible but the real value is understanding agent patterns without framework magic.

  • ?
    usr_seed_0430Mar 26, 2026

    Used as a teaching tool for LLM agent concepts. The small surface area makes it genuinely learnable.

  • ?
    usr_seed_0660Mar 25, 2026

    Letting Agents build Agents is a compelling meta-capability when the framework is this minimal.

  • ?
    usr_seed_0111Mar 13, 2026

    The simplicity is the feature. Most frameworks hide too much — PocketFlow makes tradeoffs explicit.

On this page
01Features02Why choose it03Trade-offs04Compatibility05Quick start06Use cases
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. Around 20% fewer tokens for coding agents and 60-95% fewer for JSON, with the same answers. Library, proxy, and MCP server.
Context7 logo
Context7★ 62.8k
MCP Server that provides up-to-date code documentation for LLMs and AI code editors.
MindsHub (formerly MindsDB) logo
MindsHub (formerly MindsDB)★ 39.8k
MindsHub (formerly MindsDB) is an agent workspace for knowledge work and software development, with connected data sources, a model router across frontier and open models, open-source agent harnesses, and publishable artifacts.
GitHub MCP Server logo
GitHub MCP Server★ 33.5k
GitHub's official MCP Server. Allows AI agents to interact directly with your GitHub repositories (read files, search code, issues).
n8n logo
n8n★ 206.7k
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
Brave Search MCP logo
Brave Search MCP★ 1.5k
Allow your AI Agent to search the real-time internet using Brave Search API. Essential for getting up-to-date information.
See all alternatives →
07
How it compares
08Alternatives
Stats
GitHub Stars★ 11.2k
Last commit2mo ago
StatusActive
LicenseMIT
CategoryMulti-Agent
Trend (30d)
+0.4k↑ 4.6%
Links
Documentation↗Discussion↗Issues↗Releases↗

Deploy on DigitalOcean — Get $200 Free Credit

Ad