From c8b9c11d438c5106cd1d5e6d2ded76f339cb492f Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 02:44:14 +0000 Subject: [PATCH 1/2] Add Parallelization pattern (16th of 18 planned) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sectioning/ensemble-voting workflow per Anthropic's "Building Effective Agents" taxonomy: fixed subtasks decided in advance, run concurrently by a single model, then merged or majority-voted — distinct from Orchestrator-worker's dynamically delegated specialist agents. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01LLtTG22WSrRfurHKzaMc8h --- CLAUDE.md | 2 +- README.md | 3 ++- index.html | 20 +++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6621d3d..e6218ba 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -60,7 +60,7 @@ hardcode any hex values outside the token definitions. ## Pattern data -15 patterns across 8 sections. All defined in the `PATTERNS` array in +16 patterns across 8 sections. All defined in the `PATTERNS` array in `index.html`. Fields per pattern: ```js diff --git a/README.md b/README.md index 32b79c2..973670f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **Live site:** https://hefrock.github.io/ai-agent-patterns/ An interactive reference of AI agent design patterns — single-agent and -multi-agent architectures — covering 15 patterns across 8 sections. Built as +multi-agent architectures — covering 16 patterns across 8 sections. Built as a single self-contained `index.html` with no build step and no external dependencies. Click any card to expand it and see a colored flow diagram, its description, common uses, and at-a-glance metadata (complexity, agent @@ -28,6 +28,7 @@ them render directly from the `PATTERNS` array defined in that file. ### Single-agent — stateless - **Simple LLM call** — One prompt, one response - **Prompt chaining** — Sequential LLM steps +- **Parallelization** — Concurrent subtasks, then merge ### Single-agent — agentic - **ReAct loop** — Reason · act · observe diff --git a/index.html b/index.html index 65ec458..d139020 100644 --- a/index.html +++ b/index.html @@ -563,6 +563,24 @@

AI agent design patterns

{label:"Input", cat:"neutral"}, {label:"Step 1", cat:"llm"}, {label:"Step 2", cat:"llm"}, {label:"Step N", cat:"llm"}, {label:"Output", cat:"neutral"} ] }, + { + section: "Single-agent — stateless", + group: "single", + name: "Parallelization", + sub: "Concurrent subtasks, then merge", + cat: "llm", catLabel: "LLM core", + desc: "A task is split into independent subtasks decided in advance (sectioning), or the same prompt is run multiple times in parallel (ensemble voting). All calls execute concurrently; an aggregator merges the sections, or a vote picks the majority answer. Simpler and faster than dynamic orchestration since the subtasks never change at runtime.", + uses: "Document section summarization, parallel moderation checks, majority-vote fact-checking", + complexity: "Low – Med", + agents: "1", + loops: "None", + statefulness: "Stateless", + flow: [ + {label:"Input", cat:"neutral"}, + {label:"Calls", cat:"llm", kind:"parallel", members:["Call 1","Call 2","Call 3"]}, + {label:"Aggregate / vote", cat:"data"}, {label:"Output", cat:"neutral"} + ] + }, { section: "Single-agent — agentic", group: "single", @@ -791,7 +809,7 @@

AI agent design patterns

let currentLabels = 'full'; /* ── Flow diagram (SVG) renderer ── - Generic, data-driven layout so all 15 patterns render with identical + Generic, data-driven layout so all patterns render with identical spacing/sizing rules. Handles plain sequences, parallel fan-out/fan-in clusters, exclusive-OR branch clusters, and loop-back-with-done. */ const NODE_H = 40, GAP_X = 34, MEMBER_H = 34, MEMBER_GAP_Y = 9; From 6e5b671a5d00a60d801df6dafdc0856ef15283cc Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 02:51:17 +0000 Subject: [PATCH 2/2] Add Tree of Thoughts and Agentic RAG patterns (17th/18th of 18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tree of Thoughts (Single-agent — agentic): branch-evaluate-backtrack search loop, per Yao et al.'s ToT framework. Initially modeled the branching step as a kind:"branch" cluster, but that combined with loop:true caused the loop-back arc to visually collide with the cluster box (the renderer's loop code assumes a plain node's height, not a cluster's) — reworked to a plain 4-node loop to keep the diagram correct. Agentic RAG (Single-agent — memory): adds iterative query decomposition and a sufficiency check around the retrieve step, distinguishing it from the single-pass RAG pattern already in the deck. Verified schema validity (18/18) and visually confirmed section placement, pill styling, and flow diagrams for both, across the live page and the standalone SVG export. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01LLtTG22WSrRfurHKzaMc8h --- CLAUDE.md | 2 +- README.md | 4 +++- index.html | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index e6218ba..96d6754 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -60,7 +60,7 @@ hardcode any hex values outside the token definitions. ## Pattern data -16 patterns across 8 sections. All defined in the `PATTERNS` array in +18 patterns across 8 sections. All defined in the `PATTERNS` array in `index.html`. Fields per pattern: ```js diff --git a/README.md b/README.md index 973670f..fd1a52f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **Live site:** https://hefrock.github.io/ai-agent-patterns/ An interactive reference of AI agent design patterns — single-agent and -multi-agent architectures — covering 16 patterns across 8 sections. Built as +multi-agent architectures — covering 18 patterns across 8 sections. Built as a single self-contained `index.html` with no build step and no external dependencies. Click any card to expand it and see a colored flow diagram, its description, common uses, and at-a-glance metadata (complexity, agent @@ -35,9 +35,11 @@ them render directly from the `PATTERNS` array defined in that file. - **Plan-and-execute** — Separate planner and executor - **Tool-use / function calling** — LLM with tool registry - **Critic / self-refinement** — Generator + critic loop +- **Tree of Thoughts** — Explore, evaluate, backtrack ### Single-agent — memory - **RAG pattern** — Retrieve then reason +- **Agentic RAG** — Iterative retrieve, reason, refine - **Memory-augmented agent** — Short, long & episodic memory ### Single-agent — reactive diff --git a/index.html b/index.html index d139020..6d2fb9b 100644 --- a/index.html +++ b/index.html @@ -647,6 +647,23 @@

AI agent design patterns

{label:"Task", cat:"neutral"}, {label:"Generator", cat:"llm"}, {label:"Critic", cat:"llm"}, {label:"Feedback", cat:"data"} ] }, + { + section: "Single-agent — agentic", + group: "single", + name: "Tree of Thoughts", + sub: "Explore, evaluate, backtrack", + cat: "llm", catLabel: "LLM core", + desc: "Instead of committing to a single reasoning chain, the model generates several candidate next-step thoughts at each point, evaluates how promising each one is, and searches the resulting tree — expanding the best branches and backtracking from dead ends — until it finds a path that solves the problem. Trades extra inference calls for much better performance on problems with large or deceptive solution spaces.", + uses: "Math and logic puzzles, multi-step planning, creative generation with backtracking", + complexity: "High", + agents: "1", + loops: "Until solution found", + statefulness: "Stateful", + loop: true, + flow: [ + {label:"Problem", cat:"neutral"}, {label:"Branch out", cat:"llm"}, {label:"Evaluate paths", cat:"data"}, {label:"Promising?", cat:"llm"} + ] + }, { section: "Single-agent — memory", group: "single", @@ -663,6 +680,23 @@

AI agent design patterns

{label:"Query", cat:"neutral"}, {label:"Retriever", cat:"data"}, {label:"Context", cat:"data"}, {label:"LLM", cat:"llm"}, {label:"Answer", cat:"neutral"} ] }, + { + section: "Single-agent — memory", + group: "single", + name: "Agentic RAG", + sub: "Iterative retrieve, reason, refine", + cat: "data", catLabel: "Data / memory", + desc: "Retrieval becomes a tool the agent calls repeatedly rather than a fixed pre-processing step: the model decomposes a complex question into sub-queries, retrieves, evaluates whether the returned context is sufficient, and either reformulates the query and retrieves again or moves on to generate the final answer. Handles multi-hop questions a single retrieve-then-generate pass cannot.", + uses: "Multi-hop QA, deep research agents, complex knowledge-base queries", + complexity: "High", + agents: "1", + loops: "Until context sufficient", + statefulness: "Stateful", + loop: true, + flow: [ + {label:"Query", cat:"neutral"}, {label:"Decompose", cat:"llm"}, {label:"Retrieve", cat:"data"}, {label:"Sufficient?", cat:"llm"} + ] + }, { section: "Single-agent — memory", group: "single",