We all know AI agents are the future, but why build them by hand when AI agents could build them themselves for us? Imagine a world where you simply design the blueprint and AI agents construct the AI agents themselves—this is Agentic Coding, where humans focus on creative, high-level design while AI agents handle all the tedious implementation details.
What is Agentic Coding?
Have you ever wished you could just explain your app design and watch it come to life? That’s the promise of Agentic Coding:
You do what humans are best at: coming up with creative ideas and designing how your app should work
AI does what it’s best at: writing the detailed code to make your ideas actually work
Now, this is possible! For instance, in the image below, you can see the agentic coding process in action. On the left side, a human designs the system for an AI app, focusing on high-level architecture and data flow. On the right side, with just a simple prompt like “Start Agentic Coding! Implement based on this design doc and add enough logging for us to keep track,” the AI writes all the code with remarkable ease and precision.
Think of it like building a house — you’re the architect drawing the blueprint, and AI is the construction crew doing the detailed work. You focus on the vision; AI handles the execution.
Why Current AI Building Tools Fall Short
For the past year, I’ve been trying to build AI apps using existing frameworks like LangChain. The experience has been frustrating for both me and the AI assistants trying to help me:
Abstractions upon abstractions — The fundamental problem with frameworks like LangChain is abstraction overload. As Octomind’s engineering team explains: “LangChain was helpful at first when our simple requirements aligned with its usage presumptions. But its high-level abstractions soon made our code more difficult to understand and frustrating to maintain.” These complex layers of code hide simple functionality behind unnecessary complexity.
Implementation nightmares — Beyond unnecessary abstractions, these frameworks burden developers with dependency bloat, version conflicts, and constantly changing interfaces. As developers note: “It’s unstable, the interface constantly changes, the documentation is regularly out of date.” Another developer jokes: “In the time it took to read this sentence langchain deprecated 4 classes without updating documentation.”
It’s not the AI assistant’s fault — many of these frameworks are so complex that even human developers have trouble using them!
Introducing Pocket Flow: Simple by Design
After a year of struggle, I created Pocket Flow — a tiny framework (just 100 lines of code!) that captures everything you need without the complexity. The magic happens when Pocket Flow’s simplicity meets AI agents:
Crystal clear concepts — Simple building blocks that any AI agents can understand
Zero bloat — No vendor lock-in or mysterious dependency issues
Perfect division of labor — You design the high-level flow, AI implements the details
My personal journey with frameworks like LangChain taught me that the more complex the framework, the harder it is for AI to help. Pocket Flow was born from this realization — designed specifically to create the perfect division of labor between human designers and AI implementers.
When your AI agents aren’t fighting to understand a complex framework, they can focus on implementing your vision correctly.
This tutorial focuses specifically on setting up your environment for Agentic Coding with Pocket Flow. For details on implementation and how to use Pocket Flow, please refer to the official documentation.
Getting Started with Agentic Coding:
The fastest Development Paradigm in 2025
Whether you’re building your first chatbot or a complex system, this guide will help you set up the perfect environment for Agentic Coding with Pocket Flow.
For quick questions about Pocket Flow:
Recommended Setup: GPT Assistant
Setup Steps: Use the GPT Assistant. No setup required, but not ideal for coding.
For brainstorming or prototyping:
Recommended Setup: ChatGPT or Claude Project
Setup Steps: Create a ChatGPT Project or a Claude Project, and upload the docs for reference.
For full application development:
Recommended Setup: Cursor AI, Windsurf, Cline
Setup Steps: Create a new project using the project template. The .cursorrules file teaches AI agents how to use Pocket Flow.
Note: This list covers the most common setup, but options are changing frequently as new AI coding agents emerge. The core principle remains the same: because Pocket Flow is simple and minimal, any AI agent can quickly understand it just by reading the documentation. Simply share the Pocket Flow docs with your preferred AI agent to get started!
GPT Assistant: Instant Answers at Your Fingertips
Looking for the fastest way to learn about Pocket Flow? The Pocket Flow GPT Assistant is your instant knowledge companion! With zero setup required, you can immediately ask questions about Pocket Flow and receive thoughtful answers within seconds. It’s like having a Pocket Flow expert on standby 24/7.
Keep in mind that while perfect for learning and quick questions, the GPT Assistant isn’t ideal for implementation work as it’s using an older model (likely GPT-4o). For actual coding and building, you’ll want to explore the more powerful development options below.
For One-time Tasks: Brainstorm and Prototype
Have a quick idea that you want to brainstorm or prototype, but aren’t ready for full implementation? ChatGPT and Claude Projects are good options!
With ChatGPT:
Feed it knowledge by uploading the md files in Pocket Flow docs.
ChatGPT Project allows at most 20 files. Please exclude _config.yml, utility_function/index.md, design_pattern/index.md, utility_function/index.md and, under utility_function/, only upload utility_function/llm.md.
3. Set the system prompt to be something like:
If a user asks you to build an AI app:
1. In Canvas: Start by creating the design using Markdown. Think carefully and thoroughly. Strictly follow the playbook. Note that Mermaid diagrams can't be rendered, so use a ```text block instead.
2. Confirm the design with the user before writing any code.
3. Start writing code. You can assume packages including pocketflow are installed.
4. Start a conversation! For example: “Help me build a chatbot for a directory of PDFs”
For the best result, please choose the best model like O1.
It is highly recommended to enable Canvas
5. Verify and improve the high-level system design, then ask it to implement the code!
With Claude:
Feed it knowledge by uploading the md files under Pocket Flow docs. Please exclude _config.yml, utility_function/index.md, design_pattern/index.md, and utility_function/index.md.
3. Set the system prompt to be something like:
If a user asks you to build an AI app:
1. In Artifact: Start by creating the design using Markdown using mermaid. Think carefully and thoroughly. Strictly follow the guide.md.
2. Confirm the design with the user before writing any code.
3. Start writing code. You can assume packages including pocketflow are installed.
4. Start a conversation! For example: “Help me build a chatbot for a directory of PDFs”. For the best result, please choose the best model like Sonnet-3.7 with extended thinking.
5. Verify and improve the high-level system design, then ask it to implement the code!
For Serious Development: The Full Agentic Coding Experience
Ready to build a production-ready application? This is where the real magic of Agentic Coding happens:
Cursor AI:
Create a
New Window
, and click on theClone Repo
.Enter the URL for the ready-to-use Pocket Flow Template: https://github.com/The-Pocket/PocketFlow-Template-Python.
This template includes a special .cursorrules file that teaches Cursor AI how to work with Pocket Flow
3. You can verify the setup by asking Cursor AI: “What is Pocket Flow?”
4. Start building LLM systems!
Pro Tip: Use Chat
mode during the design phase to avoid the AI getting ahead of itself, then switch to Agent
mode during implementation.
Windsurf:
Create a
New Window
, click on theExplorer
side bar icon, thenClone Repository
.Enter the URL for the ready-to-use Pocket Flow Template: https://github.com/The-Pocket/PocketFlow-Template-Python.
This template includes a special .windsurfrules file that teaches Windsurf how to work with Pocket Flow
3. You can verify the setup by asking Windsurf AI: “What is Pocket Flow?”
4. Start building LLM systems!
Pro Tip: Use Chat
mode during the design phase to avoid the AI getting ahead of itself, then switch to Write
mode during implementation.
Cline:
Note: As of March 2025, Cline’s Agent doesn’t work that well with rule files. This section will be updated as compatibility improves.
Create a
New Window
, and click on theClone Git Repository...
.Enter the URL for the ready-to-use Pocket Flow Template: https://github.com/The-Pocket/PocketFlow-Template-Python.
This template includes a special .clinerules file that teaches Cline how to work with Pocket Flow
3. You can verify the setup by asking Cline AI: “Answer based on environment details: What’s Pocket Flow?”
4. Start building LLM systems!
Pro Tip: Use Chat
mode during the design phase to avoid the AI getting ahead of itself, then switch to Write
mode during implementation.
What’s Next?
Once you’ve set up your environment, the next step is understanding the Agentic Coding workflow.
More tutorials coming soon! Stay tuned! In the meanwhile, check out these resources:
Agentic Coding Guidance — Official documentation
The Pocket GitHub — Example projects
Pocket Flow YouTube Tutorials — Step-by-step visual guides
For more examples and detailed documentation, visit the Pocket Flow GitHub.
Pocket Flow examples design documents are really detailed. As a software engineer, writing them is an important best practice that helps understand and consider the implementation thoroughly — this approach is especially needed for critical thinking / productive reviews of what the LLM is developing, so its great to see them as part of Pocket’s workflow. Thank you for the excellent intro 🙏
Hey, great post and framework!
I just started to work with pocketflow and it seems to be really easy to maintain consistency.
I do have a quick question, though:
How does Pocketflow differ from LangGraph, aside from LangGraph having extra features like the LangGraph Platform?
Other than being easy to maintain, what are some other advantages of using Pocketflow over LangGraph?