Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

[中文版](README.zh-CN.md)

![Agentic Design Patterns — 29 patterns, sketched](assets/hero.png)

> **Transform your AI applications from simple prompts to sophisticated intelligent systems.**

## 🧭 Principles
Expand Down
Binary file added assets/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions assets/hero/make_hero.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Regenerate assets/hero.png — 2x2 montage of 4 representative pattern diagrams
# in the Da Vinci sepia/parchment palette.
#
# Requires: bun (for `bunx`), ImageMagick (`magick`).
# Mermaid CLI is fetched on-demand by bunx; no global install needed.

set -euo pipefail

cd "$(dirname "$0")"
OUT="../hero.png"
BG="#f5ecd9"
BORDER="#c5b393"

for f in multi-agent rag react tot; do
bunx --bun @mermaid-js/mermaid-cli -i "$f.mmd" -o "$f.png" -s 2 -b "$BG"
done

magick montage multi-agent.png rag.png react.png tot.png \
-tile 2x2 -geometry +20+20 \
-background "$BG" -bordercolor "$BORDER" -border 8 \
"$OUT"

echo "Wrote $OUT"
25 changes: 25 additions & 0 deletions assets/hero/multi-agent.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Multi-Agent Collaboration
---
%%{init: {'look':'handDrawn','theme':'base','themeVariables':{'background':'#f5ecd9','primaryColor':'#ede0bd','primaryBorderColor':'#6b4423','primaryTextColor':'#3e2723','lineColor':'#6b4423','clusterBkg':'#efe5cd','clusterBorder':'#c5b393','edgeLabelBackground':'#f5ecd9','tertiaryColor':'#efe5cd','tertiaryBorderColor':'#c5b393','tertiaryTextColor':'#3e2723','fontFamily':'Caveat, Patrick Hand, cursive'}}}%%
flowchart LR
Goal([research goal])
Out([final report])

subgraph orchestration ["orchestration"]
Pl[planner_agent]
Plan[/plan steps/]
Ex{executor_agent}
Pl --> Plan --> Ex
end

subgraph specialists ["specialist agents"]
R["research_agent<br/>arXiv · Tavily · Wiki"]
W[writer_agent]
Ed[editor_agent]
end

Goal --> Pl
Ex --> R & W & Ed
R & W & Ed -- "result" --> Ex
Ex --> Out
23 changes: 23 additions & 0 deletions assets/hero/rag.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: RAG
---
%%{init: {'look':'handDrawn','theme':'base','themeVariables':{'background':'#f5ecd9','primaryColor':'#ede0bd','primaryBorderColor':'#6b4423','primaryTextColor':'#3e2723','lineColor':'#6b4423','clusterBkg':'#efe5cd','clusterBorder':'#c5b393','edgeLabelBackground':'#f5ecd9','tertiaryColor':'#efe5cd','tertiaryBorderColor':'#c5b393','tertiaryTextColor':'#3e2723','fontFamily':'Caveat, Patrick Hand, cursive'}}}%%
flowchart LR
Q([password reset question])
Ans([grounded answer + sources])

subgraph retrieval ["retrieval"]
Idx[(support docs<br/>vector store)]
Ret[hybrid retriever<br/>BM25 + dense]
Ctx[/top-k chunks + citations/]
Idx -.-> Ret --> Ctx
end

subgraph generation ["generation"]
LLM{{ChatOpenAI}}
end

Q --> Ret
Ctx --> LLM
Q -. "+ question" .-> LLM
LLM --> Ans
17 changes: 17 additions & 0 deletions assets/hero/react.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: ReAct
---
%%{init: {'look':'handDrawn','theme':'base','themeVariables':{'background':'#f5ecd9','primaryColor':'#ede0bd','primaryBorderColor':'#6b4423','primaryTextColor':'#3e2723','lineColor':'#6b4423','clusterBkg':'#efe5cd','clusterBorder':'#c5b393','edgeLabelBackground':'#f5ecd9','tertiaryColor':'#efe5cd','tertiaryBorderColor':'#c5b393','tertiaryTextColor':'#3e2723','fontFamily':'Caveat, Patrick Hand, cursive'}}}%%
flowchart LR
Q([query])
F([final answer])

subgraph loop ["ReAct cycle"]
T[Thought<br/>reasoning trace]
A[Action<br/>tool call]
O[/Observation/]
T --> A --> O --> T
end

Q --> T
T -. "enough info" .-> F
14 changes: 14 additions & 0 deletions assets/hero/tot.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Tree of Thoughts
---
%%{init: {'look':'handDrawn','theme':'base','themeVariables':{'background':'#f5ecd9','primaryColor':'#ede0bd','primaryBorderColor':'#6b4423','primaryTextColor':'#3e2723','lineColor':'#6b4423','clusterBkg':'#efe5cd','clusterBorder':'#c5b393','edgeLabelBackground':'#f5ecd9','tertiaryColor':'#efe5cd','tertiaryBorderColor':'#c5b393','tertiaryTextColor':'#3e2723','fontFamily':'Caveat, Patrick Hand, cursive'}}}%%
flowchart TB
Q([problem])
Sol([solution])

Q --> Ta[thought a] & Tb[thought b] & Tc[thought c]
Ta & Tb & Tc --> E1{evaluate}
E1 -- "best" --> Ta1[a · 1] & Ta2[a · 2]
Ta1 & Ta2 --> E2{evaluate}
E2 --> Sol
E1 -. "backtrack" .-> Tb
Loading