Skip to main content

Minimalist LLM Framework in 100 Lines. Enable LLMs to Program Themselves.

Project description

License: MIT Docs

Pocket Flow is a 100-line minimalist LLM framework

  • Expressive: Everything you love from larger frameworks—(Multi-)Agents, Workflow, RAG, and more.

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

  • Principled: Built with modularity and clear separation of concerns at its heart.

  • AI-Friendly: Intuitive enough for AI agents to assist humans in building complex LLM applications.

  • To install, pip install pocketflow_frameworkor just copy the source code (only 100 lines).

  • To learn more, check out the documentation. For an in-depth design dive, read the essay.

  • 🎉 We now have a discord

What can Pocket Flow build?

  • Want to create your own Python project? Start with this template

Why Pocket Flow?

For a new development paradigmn: Build LLM Apps by Chatting with LLM agents, Not Coding!

  • 🧑 Human describe LLM App requirements in a design doc.

  • 🤖 The agent (like Cursor AI) implements App your code automatically.

    👈 (Click to expand) How does Pocket Flow compare to other frameworks?

Pocket Flow is purpose-built for LLM Agents:

  1. 🫠 LangChain-like frameworks overwhelm Cursor AI with complex abstractions, deprecated functions and irritating dependency issues.
  2. 😐 Without a framework, code is ad hoc—suitable only for immediate tasks, not modular or maintainable.
  3. 🥰 With Pocket Flow: (1) Minimal and expressive—easy for Cursor AI to pick up. (2) Nodes and Flows keep everything modular. (3) A Shared Store decouples your data structure from compute logic.

In short, the 100 lines ensures LLM Agents follows solid coding practices without sacrificing flexibility.

How does Pocket Flow work?

The few lines](pocketflow_framework/init.py) capture what we believe to be the core abstraction of LLM frameworks:

  • Computation: A graph that breaks down tasks into nodes, with branching, looping, and nesting.
  • Communication: A shared store that all nodes can read and write to.



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pocketflow_framework-0.0.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pocketflow_framework-0.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pocketflow_framework-0.0.1.tar.gz.

File metadata

  • Download URL: pocketflow_framework-0.0.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pocketflow_framework-0.0.1.tar.gz
Algorithm Hash digest
SHA256 279df6a865f6ebf68bfeee6157b21b26776fc43269d15d2610cee0e2cb0e8057
MD5 f59c8e70c7849deeb2ea3815fbdaf7e8
BLAKE2b-256 accfa39cee97adceb7253bb7ea6bfece78c71c1573f5246416a05eabe377a5a0

See more details on using hashes here.

File details

Details for the file pocketflow_framework-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pocketflow_framework-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f93415f0b98de10e0f6e696b13dd712185cfdbcf0f9aed3110aa21f686adbbb
MD5 359c0d5ec3704e5fdb70a3778230f39d
BLAKE2b-256 f67f4214923a686a8bd59981ae614e4d1ff43be2c0a3e6b643108eabd13e386b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page