Skip to content

Commit 894fe33

Browse files
committed
update the header
1 parent 138c103 commit 894fe33

10 files changed

+61
-23
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This is a tutorial project of [Pocket Flow](https://github.com/The-Pocket/Pocket
6262

6363
- [OpenManus](https://the-pocket.github.io/PocketFlow-Tutorial-Codebase-Knowledge/OpenManus) - Build AI agents with digital brains that think, learn, and use tools just like humans do!
6464

65-
- [PocketFlow](https://the-pocket.github.io/PocketFlow-Tutorial-Codebase-Knowledge/PocketFlow) - Pocket Flow: 100-line LLM framework. Let Agents build Agents!
65+
- [PocketFlow](https://the-pocket.github.io/PocketFlow-Tutorial-Codebase-Knowledge/PocketFlow) - 100-line LLM framework. Let Agents build Agents!
6666

6767
- [Pydantic Core](https://the-pocket.github.io/PocketFlow-Tutorial-Codebase-Knowledge/Pydantic%20Core) - Validate data at rocket speed with just Python type hints!
6868

docs/PocketFlow/01_shared_state___shared__dictionary__.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: default
3+
title: "Shared State (Shared Dictionary)"
4+
parent: "PocketFlow"
5+
nav_order: 1
6+
---
7+
18
# Chapter 1: Shared State (`shared` dictionary)
29

310
Welcome to your first step into the world of PocketFlow! Building powerful AI applications often involves breaking down complex tasks into smaller, manageable steps. But how do these steps communicate with each other? How does one part of your AI know what another part has done or figured out? That's where the **`shared` dictionary** comes into play.

docs/PocketFlow/02_node___basenode____node____asyncnode___.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: default
3+
title: "Node (BaseNode, Node, AsyncNode)"
4+
parent: "PocketFlow"
5+
nav_order: 2
6+
---
7+
18
# Chapter 2: Node (`BaseNode`, `Node`, `AsyncNode`)
29

310
In [Chapter 1: Shared State (`shared` dictionary)](01_shared_state___shared__dictionary__.md), we learned how different parts of a PocketFlow workflow can communicate using the `shared` dictionary. Now, let's meet the actual "workers" that perform the tasks and use this shared information: **Nodes**.

docs/PocketFlow/03_actions___transitions_.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: default
3+
title: "Actions / Transitions"
4+
parent: "PocketFlow"
5+
nav_order: 3
6+
---
7+
18
# Chapter 3: Actions / Transitions
29

310
In [Chapter 2: Node (`BaseNode`, `Node`, `AsyncNode`)](02_node___basenode____node____asyncnode___.md), we learned that Nodes are the individual workers in our PocketFlow application, each performing a specific task. We also touched upon the `post` method of a Node, mentioning that it can return an "action" string. Now, it's time to explore exactly what these "actions" are and how they create "transitions," guiding the workflow dynamically.

docs/PocketFlow/04_flow___flow____asyncflow___.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: default
3+
title: "Flow (Flow, AsyncFlow)"
4+
parent: "PocketFlow"
5+
nav_order: 4
6+
---
7+
18
# Chapter 4: Flow (`Flow`, `AsyncFlow`)
29

310
In [Chapter 3: Actions / Transitions](03_actions___transitions__.md), we saw how individual [Nodes (`BaseNode`, `Node`, `AsyncNode`)](02_node___basenode____node____asyncnode__.md) can decide what should happen next by returning "action" strings, and how these actions lead to "transitions" between Nodes. But what actually manages this sequence? What's the conductor of this orchestra of Nodes? That's where **Flows** come in!

docs/PocketFlow/05_asynchronous_processing___asyncnode____asyncflow___.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: default
3+
title: "Asynchronous Processing (AsyncNode, AsyncFlow)"
4+
parent: "PocketFlow"
5+
nav_order: 5
6+
---
7+
18
# Chapter 5: Asynchronous Processing (`AsyncNode`, `AsyncFlow`)
29

310
In [Chapter 4: Flow (`Flow`, `AsyncFlow`)](04_flow___flow____asyncflow__.md), we learned how `Flow` and `AsyncFlow` orchestrate sequences of [Nodes (`BaseNode`, `Node`, `AsyncNode`)](02_node___basenode____node____asyncnode__.md) to create complete applications. Now, we're going to zoom in on a powerful feature that `AsyncFlow` enables: **Asynchronous Processing**. This is key to building AI applications that feel responsive and can handle tasks that involve waiting, like calling web APIs or interacting with users.

docs/PocketFlow/06_batch_processing___batchnode____batchflow____asyncparallelbatchnode___.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: default
3+
title: "Batch Processing (BatchNode, BatchFlow, AsyncParallelBatchNode)"
4+
parent: "PocketFlow"
5+
nav_order: 6
6+
---
7+
18
# Chapter 6: Batch Processing (`BatchNode`, `BatchFlow`, `AsyncParallelBatchNode`)
29

310
In [Chapter 5: Asynchronous Processing (`AsyncNode`, `AsyncFlow`)](05_asynchronous_processing___asyncnode____asyncflow___.md), we explored how `AsyncNode` and `AsyncFlow` help build responsive applications that can handle waiting for tasks like API calls. Now, what if you need to perform a similar operation on *many* different items? For example, imagine you have a document, and you want to translate it into ten different languages. Doing this one by one, or even coordinating many asynchronous calls manually, can be cumbersome. PocketFlow provides specialized tools for exactly this: **Batch Processing**.

docs/PocketFlow/07_a2a__agent_to_agent__communication_framework_.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: default
3+
title: "A2A (Agent-to-Agent) Communication Framework"
4+
parent: "PocketFlow"
5+
nav_order: 7
6+
---
7+
18
# Chapter 7: A2A (Agent-to-Agent) Communication Framework
29

310
Welcome to the final chapter of our PocketFlow journey! In [Chapter 6: Batch Processing (`BatchNode`, `BatchFlow`, `AsyncParallelBatchNode`)](06_batch_processing___batchnode____batchflow____asyncparallelbatchnode___.md), we saw how to process multiple items or run workflows repeatedly. Now, we'll explore how to make your PocketFlow agents available to the wider world, allowing them to communicate with other systems or agents using a standard "language."

docs/PocketFlow/index.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1+
---
2+
layout: default
3+
title: "PocketFlow"
4+
nav_order: 10
5+
has_children: true
6+
---
7+
18
# Tutorial: PocketFlow
29

3-
PocketFlow is a *Python framework* for building modular workflows and AI agents.
10+
> This tutorial is AI-generated! To learn more, check out [AI Codebase Knowledge Builder](https://github.com/The-Pocket/Tutorial-Codebase-Knowledge)
11+
12+
PocketFlow<sup>[View Repo](https://github.com/The-Pocket/PocketFlow)</sup> is a *Python framework* for building modular workflows and AI agents.
413
It allows you to define complex processes by connecting individual **Nodes**, which represent *atomic tasks* like calling an LLM or searching the web.
514
A **Flow** then *orchestrates* these Nodes, guiding the execution sequence based on **Actions** (string identifiers) returned by each Node.
615
Data is passed between Nodes and managed throughout the workflow execution via a **Shared State** (a Python dictionary).
716
PocketFlow also offers advanced features like **Batch Processing** for efficiently handling collections of items, and **Asynchronous Processing** for non-blocking operations crucial for I/O-bound tasks.
817
Additionally, it demonstrates an **A2A (Agent-to-Agent) Communication Framework** to wrap PocketFlow agents, enabling them to communicate with other systems using a standardized JSON-RPC protocol.
918

10-
11-
**Source Repository:** [https://github.com/The-Pocket/PocketFlow](https://github.com/The-Pocket/PocketFlow)
12-
1319
```mermaid
1420
flowchart TD
1521
A0["Node (`BaseNode`, `Node`, `AsyncNode`)
@@ -38,24 +44,6 @@ flowchart TD
3844
A6 -- "Initializes Shared State" --> A2
3945
```
4046

41-
## Chapters
42-
43-
1. [Shared State (`shared` dictionary)
44-
](01_shared_state___shared__dictionary__.md)
45-
2. [Node (`BaseNode`, `Node`, `AsyncNode`)
46-
](02_node___basenode____node____asyncnode___.md)
47-
3. [Actions / Transitions
48-
](03_actions___transitions_.md)
49-
4. [Flow (`Flow`, `AsyncFlow`)
50-
](04_flow___flow____asyncflow___.md)
51-
5. [Asynchronous Processing (`AsyncNode`, `AsyncFlow`)
52-
](05_asynchronous_processing___asyncnode____asyncflow___.md)
53-
6. [Batch Processing (`BatchNode`, `BatchFlow`, `AsyncParallelBatchNode`)
54-
](06_batch_processing___batchnode____batchflow____asyncparallelbatchnode___.md)
55-
7. [A2A (Agent-to-Agent) Communication Framework
56-
](07_a2a__agent_to_agent__communication_framework_.md)
57-
58-
5947
---
6048

6149
Generated by [AI Codebase Knowledge Builder](https://github.com/The-Pocket/Tutorial-Codebase-Knowledge)

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ This is a tutorial project of [Pocket Flow](https://github.com/The-Pocket/Pocket
3636
- [MCP Python SDK](./MCP Python SDK/index.md) - Build powerful apps that communicate through an elegant protocol without sweating the details!
3737
- [NumPy Core](./NumPy Core/index.md) - Master the engine behind data science that makes Python as fast as C!
3838
- [OpenManus](./OpenManus/index.md) - Build AI agents with digital brains that think, learn, and use tools just like humans do!
39+
- [PocketFlow](./PocketFlow/index.md) - 100-line LLM framework. Let Agents build Agents!
3940
- [Pydantic Core](./Pydantic Core/index.md) - Validate data at rocket speed with just Python type hints!
4041
- [Requests](./Requests/index.md) - Talk to the internet in Python with code so simple it feels like cheating!
4142
- [SmolaAgents](./SmolaAgents/index.md) - Build tiny AI agents that punch way above their weight class!

0 commit comments

Comments
 (0)