{"id":25818283,"url":"https://github.com/The-Pocket/PocketFlow","last_synced_at":"2025-02-28T07:02:53.777Z","repository":{"id":269745680,"uuid":"907624056","full_name":"The-Pocket/PocketFlow","owner":"The-Pocket","description":"Minimalist LLM Framework in 100 Lines. Enable LLMs to Program Themselves.","archived":false,"fork":false,"pushed_at":"2025-02-24T05:00:03.000Z","size":27947,"stargazers_count":492,"open_issues_count":3,"forks_count":31,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-02-24T05:31:42.342Z","etag":null,"topics":["agentic-workflow","agents","ai","flow-based-programming","flow-engineering","framework","llm","llm-agent","llm-framework","llm-workflow","open-source","rag"],"latest_commit_sha":null,"homepage":"https://the-pocket.github.io/PocketFlow/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/The-Pocket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-24T02:43:30.000Z","updated_at":"2025-02-24T05:00:07.000Z","dependencies_parsed_at":"2025-01-09T03:46:11.750Z","dependency_job_id":"f9348f8b-b76e-4f4a-a6ce-88ddf444e992","html_url":"https://github.com/The-Pocket/PocketFlow","commit_stats":null,"previous_names":["zachary62/minillmflow","minillmflow/minillmflow","minillmflow/pocketflow","the-pocket/pocketflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Pocket","download_url":"https://codeload.github.com/The-Pocket/PocketFlow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241114661,"owners_count":19912056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-workflow","agents","ai","flow-based-programming","flow-engineering","framework","llm","llm-agent","llm-framework","llm-workflow","open-source","rag"],"created_at":"2025-02-28T07:02:50.259Z","updated_at":"2025-02-28T07:02:53.768Z","avatar_url":"https://github.com/The-Pocket.png","language":"Jupyter Notebook","readme":"\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./assets/title.png\" width=\"600\"/\u003e\n\u003c/div\u003e\n\n\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\n[![Docs](https://img.shields.io/badge/docs-latest-blue)](https://the-pocket.github.io/PocketFlow/)\n\n\nA [100-line](pocketflow/__init__.py) minimalist LLM framework for ([Multi-](https://the-pocket.github.io/PocketFlow/multi_agent.html))[Agents](https://the-pocket.github.io/PocketFlow/agent.html), [Workflow](https://the-pocket.github.io/PocketFlow/decomp.html), [RAG](https://the-pocket.github.io/PocketFlow/rag.html), etc.\n\n- Install via  ```pip install pocketflow```, or just copy the [source code](pocketflow/__init__.py) (only 100 lines).\n- To learn more, check out the [documentation](https://the-pocket.github.io/PocketFlow/). For an in-depth design dive, read the [essay](https://github.com/The-Pocket/.github/blob/main/profile/pocketflow.md).\n\n## Why Pocket Flow?\n\nFor a new development paradigmn: **Build LLM Apps by Chatting with LLM agents, Not Coding**!\n\n- 🧑 Human **describe LLM App requirements** in a design doc.\n- 🤖 The agent (like Cursor AI) **implements App** your code automatically.\n\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://youtu.be/0Pv5HVoVBYE\" target=\"_blank\"\u003e\n    \u003cimg src=\"./assets/youtube.png\" width=\"500\" alt=\"IMAGE ALT TEXT\" style=\"cursor: pointer;\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\n**How does Pocket Flow compare to other frameworks?** Pocket Flow is *purpose-built for LLM Agents* (e.g., Cursor AI):\n\n1. **🫠 LangChain-like frameworks** overwhelm Cursor AI with *complex and outdated* abstractions.\n2. 😐  **Without a framework**, code is *ad hoc*—suitable only for immediate tasks, *not modular or maintainable*.\n3. **🥰 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.\n\nIn short, the **100 lines** ensures LLM Agents follows *solid coding practices* without sacrificing *flexibility*. \n\n**How to set up Pocket Flow for LLM agents?**\n\n  - **For quick questions**: Use  the [GPT assistant](https://chatgpt.com/g/g-677464af36588191b9eba4901946557b-pocket-flow-assistant) (note: it uses older models not ideal for coding).\n  - **For one-time LLM task**:  Create a [ChatGPT](https://help.openai.com/en/articles/10169521-using-projects-in-chatgpt) or [Claude](https://www.anthropic.com/news/projects) project; upload the [docs](docs) to project knowledge.\n  - **For LLM App development**: Use [Cursor AI](https://www.cursor.com/). Copy [.cursorrules](assets/.cursorrules) to your project root as **[Cursor Rules](https://docs.cursor.com/context/rules-for-ai)**.\n\n\n## What can Pocket Flow build?\n\nBelow are examples LLM Apps and tutorials\n\n\u003cdiv align=\"center\"\u003e\n  \n| App Name  | Difficulty    |  Learning Objectives  |\n| :------------- | :------------- | :--------------------- |\n| [Youtube ELI5 Summarizer](https://github.com/The-Pocket/Tutorial-Youtube-Made-Simple)  | ★☆☆  *Beginner*   | [Map Reduce](https://the-pocket.github.io/PocketFlow/mapreduce.html) | \n| [AI Paul Graham](https://github.com/The-Pocket/Tutorial-YC-Partner)  | ★☆☆  *Beginner*   | [RAG](https://the-pocket.github.io/PocketFlow/rag.html) | \n\n\u003c/div\u003e\n\n- Do you want to create your own Python project? Start with  [this template](https://github.com/The-Pocket/PocketFlow-Template-Python)\n  \n\n## How does Pocket Flow work?\n\nThe [100 lines](pocketflow/__init__.py) capture what we believe to be the core abstraction of LLM frameworks:\n - **Computation**: A *graph* that breaks down tasks into nodes, with *branching, looping,  and nesting*.\n - **Communication**: A *shared store* that all nodes can read and write to.\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./assets/abstraction.png\" width=\"600\"/\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\nFrom there, it’s easy to implement popular design patterns like ([Multi-](https://the-pocket.github.io/PocketFlow/multi_agent.html))[Agents](https://the-pocket.github.io/PocketFlow/agent.html), [Workflow](https://the-pocket.github.io/PocketFlow/decomp.html), [RAG](https://the-pocket.github.io/PocketFlow/rag.html), etc.\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./assets/design.png\" width=\"600\"/\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\n","funding_links":[],"categories":["🌟 Core Frameworks","Python","A01_文本生成_文本对话","HarmonyOS","Agentic Frameworks","AI Agent Frameworks \u0026 SDKs"],"sub_categories":["大语言对话模型及数据","Windows Manager","Orchestration Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Pocket%2FPocketFlow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThe-Pocket%2FPocketFlow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Pocket%2FPocketFlow/lists"}