UnvibeCode⭐ Star UnvibeCode

Business Workflow Map

Understand end-to-end business operations reconstructed from the code.

PocketFlow-main · 27 workflows · 16 areas
Workflow area 1

Conversational memory retrieval and answer generation and related workflows

4 workflows
01
Workflow 1

Conversational memory retrieval and answer generation

What this workflow does

Interactive chat user asks a question, the system retrieves a similar archived conversation using embeddings and FAISS, answers with the LLM, and archives older exchanges back into the vector store.

Purpose

Maintain a chat that can recall relevant past conversations while continuing the dialogue

What it produces

messages / retrieved_conversation / vector_index / vector_items

Who relies on it

Interactive chat user

Why this workflow matters

  • Improves continuity of long-running conversations
  • Preserves older exchanges as searchable embeddings
  • Returns an LLM-generated response informed by recent and retrieved context
Implementation references
  • GetUserQuestionNode cookbook/pocketflow-chat-memory/nodes.py · lines 6–35
  • EmbedNode.post() cookbook/pocketflow-chat-memory/nodes.py · lines 124–143
  • EmbedNode.prep() cookbook/pocketflow-chat-memory/nodes.py · lines 94–104
  • AnswerNode.post() cookbook/pocketflow-chat-memory/nodes.py · lines 74–91
  • RetrieveNode.prep() cookbook/pocketflow-chat-memory/nodes.py · lines 146–165
  • RetrieveNode.exec() cookbook/pocketflow-chat-memory/nodes.py · lines 167–193
  • GetUserQuestionNode.exec() cookbook/pocketflow-chat-memory/nodes.py · lines 15–24
  • GetUserQuestionNode.prep() cookbook/pocketflow-chat-memory/nodes.py · lines 7–13
  • create_chat_flow() cookbook/pocketflow-chat-memory/flow.py · lines 4–30
  • run_chat_memory_demo() cookbook/pocketflow-chat-memory/main.py · lines 3–23
  • AnswerNode.exec() cookbook/pocketflow-chat-memory/nodes.py · lines 65–72
  • EmbedNode.exec() cookbook/pocketflow-chat-memory/nodes.py · lines 106–122
  • AnswerNode.prep() cookbook/pocketflow-chat-memory/nodes.py · lines 38–63
  • RetrieveNode.post() cookbook/pocketflow-chat-memory/nodes.py · lines 195–203
  • GetUserQuestionNode.post() cookbook/pocketflow-chat-memory/nodes.py · lines 26–35
  • call_llm() cookbook/pocketflow-chat-memory/utils/call_llm.py · lines 4–13
  • get_embedding() cookbook/pocketflow-chat-memory/utils/get_embedding.py · lines 5–17
  • create_index() cookbook/pocketflow-chat-memory/utils/vector_index.py · lines 4–5
  • add_vector() cookbook/pocketflow-chat-memory/utils/vector_index.py · lines 7–15
  • search_vectors() cookbook/pocketflow-chat-memory/utils/vector_index.py · lines 17–41
02
Workflow 2

async recipe recommendation and approval loop

What this workflow does

recipe seeker user enters an ingredient, receives an LLM-generated recipe suggestion, and either accepts it or retries for another suggestion

Purpose

choose a recipe from fetched candidates for a user-provided ingredient

What it produces

recipe list / recipe suggestion

Who relies on it

recipe seeker user

Why this workflow matters

  • reduces user effort in selecting a recipe
  • supports iterative refinement until approval
Implementation references
  • FetchRecipes.prep_async() cookbook/pocketflow-async-basic/nodes.py · lines 7–10
  • GetApproval cookbook/pocketflow-async-basic/nodes.py · lines 42–63
  • FetchRecipes.post_async() cookbook/pocketflow-async-basic/nodes.py · lines 17–21
  • SuggestRecipe.post_async() cookbook/pocketflow-async-basic/nodes.py · lines 37–40
  • GetApproval.post_async() cookbook/pocketflow-async-basic/nodes.py · lines 54–63
  • create_flow() cookbook/pocketflow-async-basic/flow.py · lines 10–27
  • GetApproval.exec_async() cookbook/pocketflow-async-basic/nodes.py · lines 49–52
  • SuggestRecipe.exec_async() cookbook/pocketflow-async-basic/nodes.py · lines 30–35
  • FetchRecipes cookbook/pocketflow-async-basic/nodes.py · lines 4–21
  • SuggestRecipe.prep_async() cookbook/pocketflow-async-basic/nodes.py · lines 26–28
  • GetApproval.prep_async() cookbook/pocketflow-async-basic/nodes.py · lines 45–47
  • FetchRecipes.exec_async() cookbook/pocketflow-async-basic/nodes.py · lines 12–15
03
Workflow 3

resume screening summary

What this workflow does

Batch map-reduce path that reads resume files, evaluates each resume against qualification criteria with an LLM, and produces a qualification summary.

Purpose

evaluate candidate resumes and summarize who qualifies

What it produces

resume files and resume evaluations

Who relies on it

candidate applicants / hiring reviewer

Why this workflow matters

  • reduces manual screening work
  • produces a shortlist summary for review
Implementation references
  • EvaluateResumesNode cookbook/pocketflow-map-reduce/nodes.py · lines 26–65
  • ReadResumesNode.post() cookbook/pocketflow-map-reduce/nodes.py · lines 21–23
  • EvaluateResumesNode.post() cookbook/pocketflow-map-reduce/nodes.py · lines 63–65
  • ReduceResultsNode.post() cookbook/pocketflow-map-reduce/nodes.py · lines 93–105
  • ReduceResultsNode.exec() cookbook/pocketflow-map-reduce/nodes.py · lines 74–91
  • EvaluateResumesNode.exec() cookbook/pocketflow-map-reduce/nodes.py · lines 32–61
  • ReadResumesNode.exec() cookbook/pocketflow-map-reduce/nodes.py · lines 9–19
  • EvaluateResumesNode.prep() cookbook/pocketflow-map-reduce/nodes.py · lines 29–30
  • ReduceResultsNode.prep() cookbook/pocketflow-map-reduce/nodes.py · lines 71–72
04
Workflow 4

PDF text extraction and consolidation

What this workflow does

Batch PDF processing path that discovers PDFs, converts them to page images, extracts text from each page using a vision tool, and combines the results into final text.

Purpose

extract and combine page text from a directory of PDFs

What it produces

PDF files, page images, extracted text, final_text

Who relies on it

user supplying PDFs

Why this workflow matters

  • turns PDFs into machine-readable text
  • preserves page order in the output
Implementation references
  • ProcessPDFBatchNode cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 8–52
  • ProcessPDFBatchNode.prep() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 11–31
  • LoadPDFNode cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 54–65
  • CombineResultsNode.prep() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 96–97
  • ExtractTextNode.post() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 89–91
  • CombineResultsNode.post() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 110–112
  • CombineResultsNode.exec() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 99–108
  • CombineResultsNode cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 93–112
  • ExtractTextNode.exec() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 76–87
  • LoadPDFNode.post() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 63–65
  • ExtractTextNode.prep() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 70–74
  • LoadPDFNode.prep() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 57–58
  • LoadPDFNode.exec() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 60–61
  • ProcessPDFBatchNode.post() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 50–52
  • create_single_pdf_flow() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 114–127
  • ProcessPDFBatchNode.exec() cookbook/pocketflow-tool-pdf-vision/nodes.py · lines 33–48
Workflow area 2

Question workflows

1 workflow
05
Workflow 5

retrieval-augmented question answering

What this workflow does

Offline document indexing path and online retrieval path that chunk documents, create embeddings and a FAISS index, then retrieve a relevant document and generate an LLM answer.

Purpose

index documents and answer user queries from retrieved context

What it produces

texts, embeddings, index, query_embedding, retrieved_document, generated_answer

Who relies on it

end user asking a question

Why this workflow matters

  • builds a searchable vector index
  • returns a query-specific answer grounded in retrieved text
Implementation references
  • get_offline_flow() cookbook/pocketflow-rag/flow.py · lines 4–14
  • get_online_flow() cookbook/pocketflow-rag/flow.py · lines 16–26
  • ChunkDocumentsNode.prep() cookbook/pocketflow-rag/nodes.py · lines 8–10
  • ChunkDocumentsNode.exec() cookbook/pocketflow-rag/nodes.py · lines 12–14
  • EmbedDocumentsNode.prep() cookbook/pocketflow-rag/nodes.py · lines 30–32
  • EmbedDocumentsNode.exec() cookbook/pocketflow-rag/nodes.py · lines 34–36
  • CreateIndexNode.prep() cookbook/pocketflow-rag/nodes.py · lines 46–48
  • EmbedQueryNode.prep() cookbook/pocketflow-rag/nodes.py · lines 71–73
  • RetrieveDocumentNode.prep() cookbook/pocketflow-rag/nodes.py · lines 87–89
  • GenerateAnswerNode.prep() cookbook/pocketflow-rag/nodes.py · lines 120–122
  • EmbedQueryNode.post() cookbook/pocketflow-rag/nodes.py · lines 81–84
  • CreateIndexNode.post() cookbook/pocketflow-rag/nodes.py · lines 63–67
  • EmbedQueryNode.exec() cookbook/pocketflow-rag/nodes.py · lines 75–79
  • EmbedDocumentsNode.post() cookbook/pocketflow-rag/nodes.py · lines 38–43
  • RetrieveDocumentNode.post() cookbook/pocketflow-rag/nodes.py · lines 112–117
  • GenerateAnswerNode.post() cookbook/pocketflow-rag/nodes.py · lines 138–143
  • ChunkDocumentsNode.post() cookbook/pocketflow-rag/nodes.py · lines 16–27
  • CreateIndexNode cookbook/pocketflow-rag/nodes.py · lines 45–67
  • RetrieveDocumentNode.exec() cookbook/pocketflow-rag/nodes.py · lines 91–110
  • EmbedQueryNode cookbook/pocketflow-rag/nodes.py · lines 70–84
  • GenerateAnswerNode.exec() cookbook/pocketflow-rag/nodes.py · lines 124–136
Workflow area 3

Task workflows

2 workflows
06
Workflow 6

browser task automation in DOM mode / browser task automation in vision mode

What this workflow does

CLI operator launches a DOM-based browser agent that reads interactive page elements, asks an LLM for one action, and executes click/type/select/press actions until done / CLI operator launches a screenshot-based browser agent that captures images, asks an LLM for coordinates, and performs mouse/keyboard actions until done

Purpose

complete a page goal one step at a time using numbered interactive elements / complete a page goal using screenshot grounding and coordinate clicks

What it produces

browser page and interactive elements / browser screenshot and coordinate-based action plan

Who relies on it

CLI operator

Why this workflow matters

  • automates browser interactions for a user-specified goal
  • provides deterministic action logging through shared history
  • supports operating pages not easily represented in the DOM
  • uses raw pointer and keyboard actions to complete tasks
Implementation references
  • main() cookbook/pocketflow-browser-agent/main.py · lines 15–51
  • Observe.exec() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 19–39
  • Decide.post() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 78–84
  • Act.post() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 109–112
  • Decide.exec() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 53–76
  • Observe cookbook/pocketflow-browser-agent/nodes_dom.py · lines 13–44
  • call_llm() cookbook/pocketflow-browser-agent/utils.py · lines 7–23
  • _build_loop() cookbook/pocketflow-browser-agent/flow.py · lines 6–23
  • Observe.prep() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 16–17
  • Decide.prep() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 50–51
  • Act.prep() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 90–91
  • Observe.post() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 41–44
  • Act.exec() cookbook/pocketflow-browser-agent/nodes_dom.py · lines 93–107
  • Observe cookbook/pocketflow-browser-agent/nodes_vision.py · lines 14–26
  • Act.exec() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 75–87
  • Observe.post() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 23–26
  • Act.post() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 89–92
  • Decide.post() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 60–66
  • Decide.exec() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 35–58
  • Observe.prep() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 17–18
  • Observe.exec() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 20–21
  • Decide.prep() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 32–33
  • Act.prep() cookbook/pocketflow-browser-agent/nodes_vision.py · lines 72–73
  • create_dom_agent_flow() cookbook/pocketflow-browser-agent/flow.py · lines 26–28
  • create_vision_agent_flow() cookbook/pocketflow-browser-agent/flow.py · lines 31–33
07
Workflow 7

A2A task submission and answer delivery for a research agent

What this workflow does

A CLI or A2A client submits a text task to the PocketFlow A2A server, the task manager executes the research flow, and the server returns a completed task response or error.

Purpose

Ask a question and receive an agent-produced answer

What it produces

A2A task / task result

Who relies on it

CLI user or remote A2A client

Why this workflow matters

  • Converts a user prompt into a tracked task
  • Produces a final answer artifact after PocketFlow execution
  • Provides structured JSON-RPC or SSE protocol responses
Implementation references
  • cli() cookbook/pocketflow-a2a/a2a_client.py · lines 51–156
  • A2AClient cookbook/pocketflow-a2a/common/client/client.py · lines 48–182
  • PocketFlowTaskManager cookbook/pocketflow-a2a/task_manager.py · lines 22–113
  • InMemoryTaskManager cookbook/pocketflow-a2a/common/server/task_manager.py · lines 78–276
  • Task cookbook/pocketflow-a2a/common/types.py · lines 85–91
  • AgentCard cookbook/pocketflow-a2a/common/types.py · lines 331–342
  • A2AServer cookbook/pocketflow-a2a/common/server/server.py · lines 32–168
  • TaskState cookbook/pocketflow-a2a/common/types.py · lines 11–18
  • PocketFlowTaskManager.on_send_task() cookbook/pocketflow-a2a/task_manager.py · lines 27–92
  • TaskPushNotificationConfig cookbook/pocketflow-a2a/common/types.py · lines 139–141
  • main() cookbook/pocketflow-a2a/a2a_server.py · lines 26–87
  • are_modalities_compatible() cookbook/pocketflow-a2a/common/server/utils.py · lines 9–20
  • PocketFlowTaskManager._get_user_query() cookbook/pocketflow-a2a/task_manager.py · lines 102–113
  • InMemoryTaskManager.upsert_task() cookbook/pocketflow-a2a/common/server/task_manager.py · lines 185–201
  • PocketFlowTaskManager.on_send_task_subscribe() cookbook/pocketflow-a2a/task_manager.py · lines 94–100
  • A2AServer._process_request() cookbook/pocketflow-a2a/common/server/server.py · lines 68–113
  • search_web() cookbook/pocketflow-a2a/utils.py · lines 13–17
  • call_llm() cookbook/pocketflow-a2a/utils.py · lines 5–11
  • DecideAction.exec() cookbook/pocketflow-a2a/nodes.py · lines 15–64
  • SendTaskResponse cookbook/pocketflow-a2a/common/types.py · lines 173–174
  • SendTaskStreamingResponse cookbook/pocketflow-a2a/common/types.py · lines 182–183
  • GetTaskResponse cookbook/pocketflow-a2a/common/types.py · lines 191–192
  • CancelTaskResponse cookbook/pocketflow-a2a/common/types.py · lines 200–201
  • SetTaskPushNotificationResponse cookbook/pocketflow-a2a/common/types.py · lines 209–210
  • GetTaskPushNotificationResponse cookbook/pocketflow-a2a/common/types.py · lines 218–219
  • JSONRPCMessage cookbook/pocketflow-a2a/common/types.py · lines 147–149
  • JSONRPCRequest cookbook/pocketflow-a2a/common/types.py · lines 152–154
  • JSONRPCResponse cookbook/pocketflow-a2a/common/types.py · lines 163–165
  • SendTaskRequest cookbook/pocketflow-a2a/common/types.py · lines 168–170
  • SendTaskStreamingRequest cookbook/pocketflow-a2a/common/types.py · lines 177–179
  • GetTaskRequest cookbook/pocketflow-a2a/common/types.py · lines 186–188
  • CancelTaskRequest cookbook/pocketflow-a2a/common/types.py · lines 195–197
  • SetTaskPushNotificationRequest cookbook/pocketflow-a2a/common/types.py · lines 204–206
  • GetTaskPushNotificationRequest cookbook/pocketflow-a2a/common/types.py · lines 213–215
  • TaskStatusUpdateEvent cookbook/pocketflow-a2a/common/types.py · lines 94–98
  • setup_test_project() cookbook/pocketflow-coding-agent/setup_test_project.py · lines 1097–1119
  • ToolNode.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 99–100
  • RunCommand.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 142–145
  • DecideAction.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 75–80
  • ReadFile.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 134–139
  • ToolNode.post() cookbook/pocketflow-coding-agent/nodes.py · lines 101–107
  • ListFiles.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 110–116
  • GrepSearch.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 119–131
  • DecideAction.post() cookbook/pocketflow-coding-agent/nodes.py · lines 81–96
  • DecideAction.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 56–74
Workflow area 4

Llm Assisted workflows

2 workflows
08
Workflow 8

LLM-assisted coding repair workflow for a generated SQL mini-project

What this workflow does

A CLI coding agent creates a mini SQL project, then iteratively uses LLM-selected tools to inspect files, patch the workspace, and run commands until the task is done.

Purpose

Edit the project until the supplied tests pass

What it produces

Workspace files and test project

Who relies on it

Developer or autonomous coding agent

Why this workflow matters

  • Automates local code repair and verification
  • Produces edited source files and summarized result output
  • Creates a reproducible test harness for SQL engine implementation
Implementation references
  • main() cookbook/pocketflow-coding-agent/main.py · lines 5–23
  • create_coding_agent_flow() cookbook/pocketflow-coding-agent/flow.py · lines 5–32
  • DecideAction cookbook/pocketflow-coding-agent/nodes.py · lines 55–96
  • call_llm() cookbook/pocketflow-a2a/utils.py · lines 5–11
  • setup_test_project() cookbook/pocketflow-coding-agent/setup_test_project.py · lines 1097–1119
  • DecideAction.post() cookbook/pocketflow-coding-agent/nodes.py · lines 81–96
  • CompactHistory.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 42–43
  • CompactHistory.post() cookbook/pocketflow-coding-agent/nodes.py · lines 52–53
  • CompactHistory.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 44–51
  • ToolNode cookbook/pocketflow-coding-agent/nodes.py · lines 98–107
  • PatchValidate cookbook/pocketflow-coding-agent/nodes.py · lines 157–176
  • DecideAction.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 56–74
  • RunCommand cookbook/pocketflow-coding-agent/nodes.py · lines 141–145
  • PatchRead.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 149–150
  • PatchRead.post() cookbook/pocketflow-coding-agent/nodes.py · lines 154–155
  • PatchApply.post() cookbook/pocketflow-coding-agent/nodes.py · lines 186–187
  • PatchRead.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 151–153
  • PatchValidate.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 158–160
  • PatchApply.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 179–181
  • PatchValidate.post() cookbook/pocketflow-coding-agent/nodes.py · lines 173–176
  • PatchApply.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 182–185
  • PatchValidate.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 161–172
  • ToolNode.prep() cookbook/pocketflow-coding-agent/nodes.py · lines 99–100
  • RunCommand.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 142–145
  • DecideAction.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 75–80
  • ReadFile.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 134–139
  • ToolNode.post() cookbook/pocketflow-coding-agent/nodes.py · lines 101–107
  • ListFiles.exec() cookbook/pocketflow-coding-agent/nodes.py · lines 110–116
09
Workflow 9

LLM-assisted code generation and verification loop

What this workflow does

CLI user submits a coding problem, the system generates test cases, implements a run_code function, executes tests, and revises code until tests pass or iteration limit is reached.

Purpose

Produce a working function for a programming problem using generated tests and iterative revision

What it produces

problem / test_cases / function_code

Who relies on it

CLI user

Why this workflow matters

  • Automates drafting and refinement of solution code
  • Produces test-backed iterative improvement
  • Surfaces final function implementation and test status
Implementation references
  • main() cookbook/pocketflow-code-generator/main.py · lines 4–48
  • ImplementFunction.prep() cookbook/pocketflow-code-generator/nodes.py · lines 57–58
  • GenerateTestCases.post() cookbook/pocketflow-code-generator/nodes.py · lines 46–54
  • GenerateTestCases.exec() cookbook/pocketflow-code-generator/nodes.py · lines 10–44
  • ImplementFunction.exec() cookbook/pocketflow-code-generator/nodes.py · lines 60–98
  • call_llm() cookbook/pocketflow-code-generator/utils/call_llm.py · lines 4–13
  • RunTests.post() cookbook/pocketflow-code-generator/nodes.py · lines 136–163
  • create_code_generator_flow() cookbook/pocketflow-code-generator/flow.py · lines 4–20
  • ImplementFunction.post() cookbook/pocketflow-code-generator/nodes.py · lines 100–105
  • Revise cookbook/pocketflow-code-generator/nodes.py · lines 165–266
  • GenerateTestCases.prep() cookbook/pocketflow-code-generator/nodes.py · lines 7–8
  • RunTests.prep() cookbook/pocketflow-code-generator/nodes.py · lines 108–112
  • Revise.prep() cookbook/pocketflow-code-generator/nodes.py · lines 166–173
  • RunTests.exec() cookbook/pocketflow-code-generator/nodes.py · lines 114–134
  • Revise.post() cookbook/pocketflow-code-generator/nodes.py · lines 242–266
  • Revise.exec() cookbook/pocketflow-code-generator/nodes.py · lines 175–240
  • execute_python() cookbook/pocketflow-code-generator/utils/code_executor.py · lines 6–30
Workflow area 5

Sql workflows

2 workflows
10
Workflow 10

Natural-language to SQL execution workflow

What this workflow does

CLI-supplied database path and natural-language query are converted into schema-aware SQL, executed against SQLite, and retried through a debug loop on failure.

Purpose

Answer a question by querying a SQLite database

What it produces

database schema, generated_sql, execution_error, final_result

Who relies on it

Command-line operator and SQLite database

Why this workflow matters

  • Automated schema inspection
  • Query generation from natural language
  • Error-driven correction loop until success or max attempts
Implementation references
  • create_text_to_sql_flow() cookbook/pocketflow-text2sql/flow.py · lines 4–25
  • GetSchema cookbook/pocketflow-text2sql/nodes.py · lines 7–32
  • GenerateSQL.prep() cookbook/pocketflow-text2sql/nodes.py · lines 36–37
  • GetSchema.exec() cookbook/pocketflow-text2sql/nodes.py · lines 11–26
  • ExecuteSQL.exec() cookbook/pocketflow-text2sql/nodes.py · lines 72–99
  • GenerateSQL.post() cookbook/pocketflow-text2sql/nodes.py · lines 58–65
  • DebugSQL.post() cookbook/pocketflow-text2sql/nodes.py · lines 170–177
  • ExecuteSQL.post() cookbook/pocketflow-text2sql/nodes.py · lines 101–133
  • GenerateSQL.exec() cookbook/pocketflow-text2sql/nodes.py · lines 39–56
  • DebugSQL.exec() cookbook/pocketflow-text2sql/nodes.py · lines 144–168
  • GetSchema.prep() cookbook/pocketflow-text2sql/nodes.py · lines 8–9
  • ExecuteSQL.prep() cookbook/pocketflow-text2sql/nodes.py · lines 69–70
  • GetSchema.post() cookbook/pocketflow-text2sql/nodes.py · lines 28–32
  • DebugSQL.prep() cookbook/pocketflow-text2sql/nodes.py · lines 136–142
11
Workflow 11

Mini SQL query processing over local CSV tables

What this workflow does

Caller supplies SQL text; tokenizer/parser build an AST; executor reads CSV-backed tables and returns filtered/projected/joined/aggregated rows.

Purpose

Run a subset SQL query and obtain result rows

What it produces

SQL AST and query result rows

Who relies on it

developer/test caller

Why this workflow matters

  • Produces query results from CSV-backed tables
  • Supports filtering, joining, grouping, ordering, deduplication, and limiting
Implementation references
  • TestExecuteBasicSelect.test_select_all() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 18–21
  • TestExecuteBasicSelect.test_select_multiple_columns() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 29–32
  • TestExecuteWhere.test_where_equals() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 42–45
  • TestExecuteWhere.test_where_and() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 53–56
  • TestExecuteLimit.test_limit() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 74–77
  • TestExecuteLimit.test_limit_with_where() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 79–82
  • TestExecuteJoin.test_inner_join() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 109–112
  • TestExecuteJoin.test_left_join() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 114–117
  • TestExecuteDistinct.test_distinct() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 121–124
  • TestExecuteAggregatesWithoutGroupBy.test_max_salary() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 141–144
  • TestExecuteAggregatesWithoutGroupBy.test_min_salary() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 146–149
  • TestExecuteBasicSelect.test_select_single_column() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 23–27
  • TestExecuteWhere.test_where_greater_than() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 36–40
  • TestExecuteWhere.test_where_string_equals() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 47–51
  • TestExecuteOrderBy.test_order_by_asc() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 60–64
  • TestParseWhere.test_where_with_string() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 36–38
  • TestParseWhere.test_where_and() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 40–42
  • TestParseWhere.test_where_or() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 44–46
  • TestParseAggregates.test_sum_aggregate() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 62–64
  • TestParseGroupBy.test_group_by() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 68–70
  • TestParseOrderBy.test_order_by_desc() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 84–86
  • TestParseOrderBy.test_order_by_default_asc() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 88–90
  • TestParseLimit.test_limit() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 94–96
  • TestParseJoin.test_left_join() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 106–108
  • TestParseDistinct.test_distinct() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 112–114
  • TestParseDistinct.test_no_distinct() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 116–118
  • TestParseSpecialConditions.test_is_not_null() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 143–145
  • TestParseAggregates.test_count_star() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 50–53
  • TestParseGroupBy.test_group_by_having() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 72–75
  • TestParseOrderBy.test_order_by_asc() cookbook/pocketflow-coding-agent/test_project/test_parser.py · lines 79–82
  • get_table() cookbook/pocketflow-coding-agent/test_project/database.py · lines 31–35
  • init_db() cookbook/pocketflow-coding-agent/test_project/database.py · lines 37–45
  • load_csv() cookbook/pocketflow-coding-agent/test_project/database.py · lines 8–29
  • parse_select() cookbook/pocketflow-coding-agent/test_project/db.py · lines 124–159
  • execute() cookbook/pocketflow-coding-agent/test_project/db.py · lines 326–346
  • tokenize() cookbook/pocketflow-coding-agent/test_project/db.py · lines 37–63
  • execute_join() cookbook/pocketflow-coding-agent/test_project/db.py · lines 349–373
  • _aggregate() cookbook/pocketflow-coding-agent/test_project/db.py · lines 531–549
  • TestExecuteGroupBy.test_group_by_avg() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 95–99
  • TestExecuteGroupBy.test_group_by_having() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 101–105
  • TestExecuteAggregatesWithoutGroupBy.test_count_all() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 135–139
  • TestExecuteDistinct.test_distinct_vs_non_distinct() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 126–131
  • TestExecuteGroupBy.test_group_by_count() cookbook/pocketflow-coding-agent/test_project/test_executor.py · lines 86–93
  • parse() cookbook/pocketflow-coding-agent/test_project/db.py · lines 104–109
Workflow area 6

Interactive workflows

2 workflows
12
Workflow 12

interactive agentic question answering with web search

What this workflow does

CLI user asks a question, the agent decides whether to search the web or answer immediately, and the workflow produces a final answer after optionally appending search results to context.

Purpose

ask a question and receive a researched answer

What it produces

question/context/answer

Who relies on it

command-line user

Why this workflow matters

  • produces a synthesized answer for the user
  • collects external search evidence into shared context
Implementation references
  • main() cookbook/pocketflow-agent/main.py · lines 4–24
  • SearchWeb.prep() cookbook/pocketflow-agent/nodes.py · lines 111–113
  • AnswerQuestion.prep() cookbook/pocketflow-agent/nodes.py · lines 134–136
  • DecideAction.exec.extract_yaml_block() cookbook/pocketflow-agent/nodes.py · lines 64–69
  • SearchWeb.exec() cookbook/pocketflow-agent/nodes.py · lines 115–120
  • DecideAction.prep() cookbook/pocketflow-agent/nodes.py · lines 7–14
  • AnswerQuestion.post() cookbook/pocketflow-agent/nodes.py · lines 158–166
  • SearchWeb.post() cookbook/pocketflow-agent/nodes.py · lines 122–131
  • DecideAction.post() cookbook/pocketflow-agent/nodes.py · lines 97–108
  • AnswerQuestion.exec() cookbook/pocketflow-agent/nodes.py · lines 138–156
  • DecideAction.exec.parse_yaml_safely() cookbook/pocketflow-agent/nodes.py · lines 71–90
  • DecideAction.exec() cookbook/pocketflow-agent/nodes.py · lines 16–95
  • search_web_duckduckgo() cookbook/pocketflow-agent/utils.py · lines 14–18
  • call_llm() cookbook/pocketflow-agent/utils.py · lines 6–12
  • create_agent_flow() cookbook/pocketflow-agent/flow.py · lines 4–33
13
Workflow 13

Generate and publish interactive flow visualizations

What this workflow does

Flow graph is converted to JSON, written to disk with an HTML D3 visualization, and optionally served and opened in a browser.

Purpose

Inspect or share a PocketFlow graph in the browser

What it produces

Flow graph, visualization JSON, HTML page, local web server URL

Who relies on it

CLI operator or browser visitor

Why this workflow matters

  • Creates a browsable graph artifact
  • Serves the artifact locally for interactive viewing
  • Can auto-open the visualization in a browser
Implementation references
  • visualize_flow() cookbook/pocketflow-visualization/visualize.py · lines 904–950
  • create_d3_visualization() cookbook/pocketflow-visualization/visualize.py · lines 210–829
  • start_http_server() cookbook/pocketflow-visualization/visualize.py · lines 840–871
  • flow_to_json() cookbook/pocketflow-visualization/visualize.py · lines 61–207
  • serve_and_open_visualization() cookbook/pocketflow-visualization/visualize.py · lines 874–901
Workflow area 7

Conversational workflows

1 workflow
14
Workflow 14

Tool-using conversational assistant with human-in-the-loop style routing

What this workflow does

A Gradio chat user asks for weather or hotel help; an LLM routes to tool calls, the tools enforce date constraints, and the system returns follow-up or result notifications while persisting session state.

Purpose

Help the user book hotels or check weather, or guide the user when input is incomplete/out of scope

What it produces

conversation session / action parameters / tool results

Who relies on it

Gradio chat user

Why this workflow matters

  • Returns weather or booking results
  • Persists action state across turns
  • Produces follow-up prompts when required parameters are missing or the request is out of scope
Implementation references
  • chat_fn() cookbook/pocketflow-gradio-hitl/main.py · lines 18–80
  • DecideAction.exec() cookbook/pocketflow-gradio-hitl/nodes.py · lines 19–109
  • load_conversation() cookbook/pocketflow-gradio-hitl/utils/conversation.py · lines 4–6
  • save_conversation() cookbook/pocketflow-gradio-hitl/utils/conversation.py · lines 9–11
  • DecideAction.post() cookbook/pocketflow-gradio-hitl/nodes.py · lines 111–145
  • ResultNotification.post() cookbook/pocketflow-gradio-hitl/nodes.py · lines 235–241
  • call_check_weather_api() cookbook/pocketflow-gradio-hitl/utils/call_mock_api.py · lines 5–18
  • call_book_hotel_api() cookbook/pocketflow-gradio-hitl/utils/call_mock_api.py · lines 21–39
  • create_flow() cookbook/pocketflow-gradio-hitl/flow.py · lines 12–29
  • call_llm() cookbook/pocketflow-gradio-hitl/utils/call_llm.py · lines 11–17
  • format_chat_history() cookbook/pocketflow-gradio-hitl/utils/format_chat_history.py · lines 1–28
  • clear_fn() cookbook/pocketflow-gradio-hitl/main.py · lines 83–85
  • CheckWeather.exec() cookbook/pocketflow-gradio-hitl/nodes.py · lines 156–158
  • BookHotel.exec() cookbook/pocketflow-gradio-hitl/nodes.py · lines 181–183
  • DecideAction.prep() cookbook/pocketflow-gradio-hitl/nodes.py · lines 14–17
  • FollowUp.exec() cookbook/pocketflow-gradio-hitl/nodes.py · lines 206–210
  • FollowUp.post() cookbook/pocketflow-gradio-hitl/nodes.py · lines 212–216
  • ResultNotification.exec() cookbook/pocketflow-gradio-hitl/nodes.py · lines 229–233
  • CheckWeather.prep() cookbook/pocketflow-gradio-hitl/nodes.py · lines 149–154
  • BookHotel.prep() cookbook/pocketflow-gradio-hitl/nodes.py · lines 172–179
  • FollowUp.prep() cookbook/pocketflow-gradio-hitl/nodes.py · lines 197–204
  • ResultNotification.prep() cookbook/pocketflow-gradio-hitl/nodes.py · lines 220–227
  • CheckWeather.post() cookbook/pocketflow-gradio-hitl/nodes.py · lines 160–168
  • BookHotel.post() cookbook/pocketflow-gradio-hitl/nodes.py · lines 185–193
Workflow area 8

Human In The Loop workflows

2 workflows
15
Workflow 15

human-in-the-loop image generation

What this workflow does

A Streamlit UI sends a text prompt to an image generation node, then moves through review, approval, or regeneration states.

Purpose

generate an image from a prompt and approve or regenerate it

What it produces

task_input / generated_image / final_result / stage

Who relies on it

Streamlit user

Why this workflow matters

  • produces an image from text
  • supports user approval before finalizing
  • allows regeneration when the preview is unsatisfactory
Implementation references
  • GenerateImageNode.post() cookbook/pocketflow-streamlit-fsm/nodes.py · lines 13–17
  • generate_image() cookbook/pocketflow-streamlit-fsm/utils/generate_image.py · lines 5–17
  • create_generation_flow() cookbook/pocketflow-streamlit-fsm/flow.py · lines 4–7
  • GenerateImageNode cookbook/pocketflow-streamlit-fsm/nodes.py · lines 4–17
16
Workflow 16

Human-in-the-loop task processing loop

What this workflow does

Registered web client submits a task, receives task_id and SSE status updates, then posts approved/rejected feedback to unblock the background workflow.

Purpose

Submit work, monitor progress, and provide approval or rejection feedback

What it produces

task_id and shared workflow state

Who relies on it

Web client and background workflow runner

Why this workflow matters

  • Immediate task acceptance with asynchronous processing
  • Status visibility through server-sent events
  • Feedback can unblock or redirect workflow execution
Implementation references
  • get_index() cookbook/pocketflow-fastapi-hitl/server.py · lines 111–116
  • submit_task() cookbook/pocketflow-fastapi-hitl/server.py · lines 118–160
  • provide_feedback() cookbook/pocketflow-fastapi-hitl/server.py · lines 163–198
  • run_flow_background() cookbook/pocketflow-fastapi-hitl/server.py · lines 39–94
  • FeedbackRequest cookbook/pocketflow-fastapi-hitl/server.py · lines 104–105
  • stream_status.event_generator() cookbook/pocketflow-fastapi-hitl/server.py · lines 210–239
  • SubmitRequest cookbook/pocketflow-fastapi-hitl/server.py · lines 97–98
  • FeedbackResponse cookbook/pocketflow-fastapi-hitl/server.py · lines 107–108
  • SubmitResponse cookbook/pocketflow-fastapi-hitl/server.py · lines 100–102
  • provide_feedback.report_error() cookbook/pocketflow-fastapi-hitl/server.py · lines 174–178
  • stream_status() cookbook/pocketflow-fastapi-hitl/server.py · lines 202–245
Workflow area 9

Chat workflows

2 workflows
17
Workflow 17

voice chat conversation loop

What this workflow does

User speech is captured, transcribed, passed to an LLM, synthesized back to audio, and the conversation loops or ends.

Purpose

speak a query and receive spoken LLM output

What it produces

chat_history and in-memory audio buffers

Who relies on it

user

Why this workflow matters

  • hands-free conversational interaction
  • continuous turn-taking until the session ends or an error occurs
Implementation references
  • main() cookbook/pocketflow-voice-chat/main.py · lines 3–23
  • CaptureAudioNode cookbook/pocketflow-voice-chat/nodes.py · lines 12–31
  • CaptureAudioNode.post() cookbook/pocketflow-voice-chat/nodes.py · lines 21–31
  • QueryLLMNode.prep() cookbook/pocketflow-voice-chat/nodes.py · lines 76–83
  • QueryLLMNode.exec() cookbook/pocketflow-voice-chat/nodes.py · lines 85–92
  • QueryLLMNode.post() cookbook/pocketflow-voice-chat/nodes.py · lines 94–103
  • SpeechToTextNode.post() cookbook/pocketflow-voice-chat/nodes.py · lines 58–72
  • TextToSpeechNode.post() cookbook/pocketflow-voice-chat/nodes.py · lines 129–148
  • record_audio() cookbook/pocketflow-voice-chat/utils/audio_utils.py · lines 12–82
  • CaptureAudioNode.exec() cookbook/pocketflow-voice-chat/nodes.py · lines 14–19
  • speech_to_text_api() cookbook/pocketflow-voice-chat/utils/speech_to_text.py · lines 5–19
  • call_llm() cookbook/pocketflow-voice-chat/utils/call_llm.py · lines 4–13
  • text_to_speech_api() cookbook/pocketflow-voice-chat/utils/text_to_speech.py · lines 4–18
  • create_voice_chat_flow() cookbook/pocketflow-voice-chat/flow.py · lines 4–25
  • SpeechToTextNode.prep() cookbook/pocketflow-voice-chat/nodes.py · lines 35–41
  • TextToSpeechNode.exec() cookbook/pocketflow-voice-chat/nodes.py · lines 120–127
  • TextToSpeechNode.prep() cookbook/pocketflow-voice-chat/nodes.py · lines 107–118
  • SpeechToTextNode.exec() cookbook/pocketflow-voice-chat/nodes.py · lines 43–56
18
Workflow 18

Streaming chat interaction

What this workflow does

WebSocket client sends user messages, receives streamed LLM chunks, and accumulates conversation history in shared state.

Purpose

Ask a question and receive incremental assistant output

What it produces

conversation_history and user_message

Who relies on it

WebSocket chat client

Why this workflow matters

  • Low-latency partial responses
  • Conversation state persists across turns within a connection
Implementation references
  • websocket_endpoint() cookbook/pocketflow-fastapi-websocket/main.py · lines 14–36
  • StreamingChatNode.exec_async() cookbook/pocketflow-fastapi-websocket/nodes.py · lines 16–31
  • StreamingChatNode.prep_async() cookbook/pocketflow-fastapi-websocket/nodes.py · lines 7–14
  • StreamingChatNode cookbook/pocketflow-fastapi-websocket/nodes.py · lines 6–38
  • stream_llm() cookbook/pocketflow-fastapi-websocket/utils/stream_llm.py · lines 4–16
Workflow area 10

text-to-SQL demo bootstrap and database seeding

1 workflow
19
Workflow 19

text-to-SQL demo bootstrap and database seeding

What this workflow does

A CLI text-to-SQL demo ensures the ecommerce SQLite database exists, repopulates it when needed, and runs a query workflow over shared state.

Purpose

run a natural-language query against a prepared ecommerce database

What it produces

ecommerce.db and its customer/product/order tables

Who relies on it

CLI user

Why this workflow matters

  • ensures the demo database is ready before execution
  • creates deterministic sample commerce data for query workflows
Implementation references
  • populate_database() cookbook/pocketflow-text2sql/populate_db.py · lines 8–138
  • run_text_to_sql() cookbook/pocketflow-text2sql/main.py · lines 6–41
  • execute_sql() cookbook/pocketflow-tool-database/tools/database.py · lines 4–25
Workflow area 11

Transformation workflows

2 workflows
20
Workflow 20

Document transformation to audio podcast

What this workflow does

A document-to-podcast pipeline extracts nuggets from documents, writes a dialogue script, and saves generated speech to an audio file.

Purpose

Turn source documents into a saved podcast file

What it produces

docs / script / audio_file

Who relies on it

Local user creating an audio artifact

Why this workflow matters

  • Converts text documents into spoken content
  • Writes generated audio to disk
  • Handles MP3 or WAV output based on returned bytes
Implementation references
  • main() cookbook/pocketflow-notebook-lm/main.py · lines 6–36
  • AnalyzeDocs cookbook/pocketflow-notebook-lm/nodes.py · lines 11–30
  • TextToSpeech.post() cookbook/pocketflow-notebook-lm/nodes.py · lines 82–98
  • WriteScript.exec() cookbook/pocketflow-notebook-lm/nodes.py · lines 38–58
  • AnalyzeDocs.exec() cookbook/pocketflow-notebook-lm/nodes.py · lines 16–26
  • TextToSpeech.exec() cookbook/pocketflow-notebook-lm/nodes.py · lines 72–80
  • create_podcast_flow() cookbook/pocketflow-notebook-lm/flow.py · lines 5–24
  • AnalyzeDocs.prep() cookbook/pocketflow-notebook-lm/nodes.py · lines 12–14
  • AnalyzeDocs.post() cookbook/pocketflow-notebook-lm/nodes.py · lines 28–30
  • WriteScript.prep() cookbook/pocketflow-notebook-lm/nodes.py · lines 34–36
  • TextToSpeech.prep() cookbook/pocketflow-notebook-lm/nodes.py · lines 68–70
  • WriteScript.post() cookbook/pocketflow-notebook-lm/nodes.py · lines 60–64
21
Workflow 21

documentation transformation pipeline

What this workflow does

A CLI documentation utility converts markdown docs into MDC files, combining guide/index and rewriting content before writing output files.

Purpose

convert PocketFlow docs into MDC rules files

What it produces

markdown docs and generated .mdc files

Who relies on it

developer or docs maintainer

Why this workflow matters

  • produces curated MDC documentation artifacts
  • normalizes docs for downstream tooling and rule loading
Implementation references
  • create_combined_guide() utils/update_pocketflow_mdc.py · lines 184–228
  • convert_md_to_mdc() utils/update_pocketflow_mdc.py · lines 230–307
  • generate_mdc_header() utils/update_pocketflow_mdc.py · lines 158–170
  • has_substantive_content() utils/update_pocketflow_mdc.py · lines 172–182
  • process_markdown_content() utils/update_pocketflow_mdc.py · lines 118–142
  • generate_mdc_files() utils/update_pocketflow_mdc.py · lines 309–348
Workflow area 12

Agentic workflows

1 workflow
22
Workflow 22

agentic retrieval augmented generation over bundled docs

What this workflow does

CLI user asks a question, the agent chooses whether to read another PocketFlow document from DOCS or answer, and the workflow builds context from documents before generating a final answer.

Purpose

answer a PocketFlow question using internal document summaries

What it produces

question/context/DOCS/answer

Who relies on it

command-line user

Why this workflow matters

  • retrieves document summaries instead of searching externally
  • synthesizes an answer from accumulated document context
Implementation references
  • main() cookbook/pocketflow-agentic-rag/main.py · lines 4–25
  • DecideAction.prep() cookbook/pocketflow-agentic-rag/nodes.py · lines 6–8
  • ReadDoc.prep() cookbook/pocketflow-agentic-rag/nodes.py · lines 49–51
  • ReadDoc.exec() cookbook/pocketflow-agentic-rag/nodes.py · lines 53–56
  • ReadDoc.post() cookbook/pocketflow-agentic-rag/nodes.py · lines 58–62
  • DecideAction.post() cookbook/pocketflow-agentic-rag/nodes.py · lines 38–45
  • DecideAction.exec() cookbook/pocketflow-agentic-rag/nodes.py · lines 10–36
  • Answer.post() cookbook/pocketflow-agentic-rag/nodes.py · lines 78–80
  • ReadDoc cookbook/pocketflow-agentic-rag/nodes.py · lines 48–62
  • create_agentic_rag_flow() cookbook/pocketflow-agentic-rag/flow.py · lines 4–28
  • Answer.prep() cookbook/pocketflow-agentic-rag/nodes.py · lines 66–68
  • Answer.exec() cookbook/pocketflow-agentic-rag/nodes.py · lines 70–76
Workflow area 13

Research workflows

1 workflow
23
Workflow 23

recursive research and report synthesis

What this workflow does

CLI user requests a topic-specific research report, the planner generates multiple web search queries, the researcher extracts facts from search results, and the synthesizer either loops for more research or finalizes a report.

Purpose

produce a concise research report about a topic

What it produces

topic/queries/notes/report

Who relies on it

command-line user

Why this workflow matters

  • generates a report from multiple search-driven evidence snippets
  • refines research through iterative loops when information is incomplete
Implementation references
  • main() cookbook/pocketflow-deep-research/main.py · lines 4–24
  • PlannerNode.prep() cookbook/pocketflow-deep-research/nodes.py · lines 8–9
  • ResearcherNode.prep() cookbook/pocketflow-deep-research/nodes.py · lines 44–45
  • SynthesizerNode.prep() cookbook/pocketflow-deep-research/nodes.py · lines 66–67
  • PlannerNode.post() cookbook/pocketflow-deep-research/nodes.py · lines 36–38
  • ResearcherNode.post() cookbook/pocketflow-deep-research/nodes.py · lines 56–60
  • ResearcherNode.exec() cookbook/pocketflow-deep-research/nodes.py · lines 47–54
  • SynthesizerNode.post() cookbook/pocketflow-deep-research/nodes.py · lines 102–111
  • PlannerNode.exec() cookbook/pocketflow-deep-research/nodes.py · lines 11–34
  • SynthesizerNode.exec() cookbook/pocketflow-deep-research/nodes.py · lines 69–100
  • search_web() cookbook/pocketflow-deep-research/utils.py · lines 22–24
  • call_llm() cookbook/pocketflow-deep-research/utils.py · lines 4–20
  • create_deep_research_flow() cookbook/pocketflow-deep-research/flow.py · lines 4–29
Workflow area 14

Generation workflows

2 workflows
24
Workflow 24

diagram generation with repair loop

What this workflow does

An LLM generates Mermaid code, the compiler checks it, and the flow retries with error feedback until success or three failed attempts.

Purpose

produce a valid Mermaid diagram from a task description

What it produces

task / chart / attempts

Who relies on it

developer or operator requesting a diagram

Why this workflow matters

  • automates diagram drafting
  • self-corrects syntax failures with feedback
  • limits retry cost through a max-attempt policy
Implementation references
  • main() cookbook/pocketflow-self-healing-mermaid/main.py · lines 4–45
  • WriteChart.prep() cookbook/pocketflow-self-healing-mermaid/nodes.py · lines 10–12
  • WriteChart.post() cookbook/pocketflow-self-healing-mermaid/nodes.py · lines 39–41
  • CompileChart.post() cookbook/pocketflow-self-healing-mermaid/nodes.py · lines 87–106
  • WriteChart cookbook/pocketflow-self-healing-mermaid/nodes.py · lines 7–41
  • WriteChart.exec() cookbook/pocketflow-self-healing-mermaid/nodes.py · lines 14–37
  • CompileChart.exec() cookbook/pocketflow-self-healing-mermaid/nodes.py · lines 50–85
  • call_llm() cookbook/pocketflow-self-healing-mermaid/utils.py · lines 3–19
  • CompileChart.prep() cookbook/pocketflow-self-healing-mermaid/nodes.py · lines 47–48
  • create_mermaid_flow() cookbook/pocketflow-self-healing-mermaid/flow.py · lines 4–15
25
Workflow 25

Background article generation with live progress updates

What this workflow does

Web user submits a topic to start a background article-generation job, then polls a streaming progress endpoint until completion.

Purpose

Submit a topic and watch article generation progress

What it produces

job_id / article workflow job

Who relies on it

Browser user

Why this workflow matters

  • Immediate job acceptance response
  • Continuous progress visibility via SSE
  • Completion or error feedback to the user
Implementation references
  • start_job() cookbook/pocketflow-fastapi-background/main.py · lines 41–53
  • run_article_workflow() cookbook/pocketflow-fastapi-background/main.py · lines 18–39
  • get_progress.event_stream() cookbook/pocketflow-fastapi-background/main.py · lines 59–87
  • get_progress() cookbook/pocketflow-fastapi-background/main.py · lines 55–97
Workflow area 15

Newsletter curation and formatting

1 workflow
26
Workflow 26

Newsletter curation and formatting

What this workflow does

CLI or flow-driven newsletter pipeline searches the web for topics, selects stories, summarizes them, and formats a markdown newsletter.

Purpose

Produce an AI weekly digest from topic searches

What it produces

newsletter / selected stories / raw stories

Who relies on it

Newsletter consumer

Why this workflow matters

  • Search results are condensed into a formatted digest
  • Only the top four stories are retained
  • LLM-generated blurbs provide short explanatory summaries
Implementation references
  • main() cookbook/pocketflow-newsletter/main.py · lines 5–23
  • CurateSources cookbook/pocketflow-newsletter/nodes.py · lines 12–27
  • SummarizeStories.prep() cookbook/pocketflow-newsletter/nodes.py · lines 68–69
  • FormatNewsletter.prep() cookbook/pocketflow-newsletter/nodes.py · lines 106–107
  • FilterStories.post() cookbook/pocketflow-newsletter/nodes.py · lines 60–62
  • FormatNewsletter.post() cookbook/pocketflow-newsletter/nodes.py · lines 116–118
  • SummarizeStories.post() cookbook/pocketflow-newsletter/nodes.py · lines 97–100
  • FormatNewsletter.exec() cookbook/pocketflow-newsletter/nodes.py · lines 109–114
  • SummarizeStories.exec() cookbook/pocketflow-newsletter/nodes.py · lines 71–95
  • FilterStories cookbook/pocketflow-newsletter/nodes.py · lines 30–62
  • SummarizeStories cookbook/pocketflow-newsletter/nodes.py · lines 65–100
  • search_web() cookbook/pocketflow-newsletter/utils.py · lines 22–24
  • FilterStories.exec() cookbook/pocketflow-newsletter/nodes.py · lines 36–58
  • create_newsletter_flow() cookbook/pocketflow-newsletter/flow.py · lines 4–26
  • CurateSources.prep() cookbook/pocketflow-newsletter/nodes.py · lines 15–16
  • FilterStories.prep() cookbook/pocketflow-newsletter/nodes.py · lines 33–34
  • CurateSources.post() cookbook/pocketflow-newsletter/nodes.py · lines 25–27
  • CurateSources.exec() cookbook/pocketflow-newsletter/nodes.py · lines 18–23
Workflow area 16

Resume workflows

1 workflow
27
Workflow 27

structured resume extraction

What this workflow does

A resume parser LLM path turns resume text plus target skills into validated structured YAML data.

Purpose

extract candidate fields and target skill indexes from a resume

What it produces

resume_text / structured_data

Who relies on it

developer or operator supplying resume content

Why this workflow matters

  • produces machine-readable candidate profile
  • enables downstream selection or review of extracted skills
Implementation references
  • ResumeParserNode.prep() cookbook/pocketflow-structured-output/main.py · lines 7–12
  • ResumeParserNode.post() cookbook/pocketflow-structured-output/main.py · lines 93–101
  • ResumeParserNode.exec() cookbook/pocketflow-structured-output/main.py · lines 14–91
  • call_llm() cookbook/pocketflow-structured-output/utils.py · lines 4–10
  • ResumeParserNode cookbook/pocketflow-structured-output/main.py · lines 6–101

Continue your review

Structured graph of your codebase linking different files and symbols.