AIAny
AI Agent2024
GitHub

PocketFlow

A 100-line LLM framework built on one graph abstraction of nodes and flows, with zero dependencies and no vendor wrappers. The tiny core composes agents, workflows, and RAG, and is small enough for a coding agent to read and extend on its own.

Introduction

Most LLM frameworks grow by bolting on a wrapper for every model, vendor, and use case until they balloon past 100K lines. PocketFlow bets on the opposite: the entire engine is roughly 100 lines expressing a single idea -- a graph of Nodes wired together by Flows -- and everything richer (agents, RAG, multi-agent systems) is a pattern you compose on top rather than a built-in module.

What Sets It Apart
  • One abstraction, not a feature catalog. Because there is only the graph, the whole framework is learnable in an afternoon; there are no provider classes or chain types to memorize as the ecosystem churns.
  • Zero dependencies, zero vendor lock-in. Nothing is pinned to a specific LLM SDK, so swapping providers or running fully offline is a change in your own node, not a framework migration.
  • Small enough to be read by an AI. The core fits in a single context window, which is the point of its "Agentic Coding" workflow: a human designs the flow and a coding agent fills in the nodes.
  • Size as evidence. Against LangChain (~405K lines) and CrewAI (~18K lines), the 100-line core is a deliberate argument that most framework bulk is incidental, not essential.
Where It Fits

In a field of heavyweight frameworks -- LangChain (~405K lines), LlamaIndex, CrewAI (~18K lines) -- PocketFlow occupies the minimalist extreme. It is closest in spirit to writing your own orchestration, but with just enough structure (the node-and-flow graph) to keep branching, retries, and multi-agent handoffs organized.

Great Fit / Look Elsewhere

Great fit if you want to understand exactly what your agent does line by line, value a dependency-free core, or are pairing with a coding agent that generates the node implementations for you. Look elsewhere if you need an out-of-the-box toolkit -- managed connectors, retrievers, observability, eval harnesses -- since PocketFlow deliberately ships primitives, not batteries, and leaves the LLM calls, parsing, and integrations for you to write.

Information

  • Websitegithub.com
  • OrganizationsThe-Pocket
  • AuthorsThe-Pocket, Zachary Huang
  • Published date2024/12/24

Categories

More Items

Hugging Face

Evaluates coding agents on 141 executable tasks spanning frontend and application development, data analysis, and more. Each task includes a starting environment, reference solution, and verifier.

GitHub
AI Agent2026

Equips AI agents to create and manage Obsidian Markdown, Bases, and Canvas files, use Obsidian’s CLI, and sync vaults without the desktop app.

GitHub
AI Agent2026

Handles everyday tasks across real websites and apps, asking before actions that can have real-world consequences. Data and saved logins stay on the machine running it, and you choose the model.