by huangjia2019
A 7×6 framework for agent architecture. 28 patterns, each placed at a coordinate, runnable Python code with verified engineering slices from Claude Code, Aider, OpenHands, DeerFlow. Companion to Designing AI Agents (Manning) by Jia Huang.
# Add to your Claude Code skills
git clone https://github.com/huangjia2019/agent-design-patternsGuides for using ai agents skills like agent-design-patterns.
Last scanned: 6/26/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-06-26T07:53:28.726Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}agent-design-patterns is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by huangjia2019. A 7×6 framework for agent architecture. 28 patterns, each placed at a coordinate, runnable Python code with verified engineering slices from Claude Code, Aider, OpenHands, DeerFlow. Companion to Designing AI Agents (Manning) by Jia Huang. It has 102 GitHub stars.
Yes. agent-design-patterns passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/huangjia2019/agent-design-patterns" and add it to your Claude Code skills directory (see the Installation section above).
agent-design-patterns is primarily written in HTML. It is open-source under huangjia2019 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agent-design-patterns against similar tools.
No comments yet. Be the first to share your thoughts!
A 7×6 framework for agent architecture. 28 patterns, each placed at a coordinate, each with runnable code and a verified engineering slice from real production codebases.
The model spends. The harness budgets. This repo is the vocabulary you can put in your project tomorrow.
简体中文 README · Pattern Docs · Manning · Designing AI Agents · Paper · arXiv:2605.13850 · 极客时间专栏 · Newsletter · Author site
📖 Browse the full pattern documentation — every pattern with its whitepaper, organized by cognitive function, with a left-rail index: adpsagent.com/zh/patterns. Enterprise case studies (蓝皮书) live at adpsagent.com/zh/cases.
Looking for the full Argus running example as one evolving codebase, organized by book chapter? See the companion repo huangjia2019/designing-ai-agents — Argus grows module by module from Ch2 to Ch10, with each chapter's
patterns/+argus/side by side. That repo follows the book's narrative; this repo is the standalone pattern catalog.
Designing AI Agents — the design-pattern catalogue for production AI agents. (Manning)
The two-axis framework, the 27 named patterns, and the five pattern-selection laws are introduced in A Two-Dimensional Framework for AI Agent Design Patterns: Cognitive Function × Execution Topology (Huang & Zhou, arXiv:2605.13850). This repository is the runnable companion to the paper.
Most "agent architecture" guides give you a flat list — Reflection, ReAct, Multi-Agent, Tree of Thoughts, Reflexive Metacognitive, and so on. A flat list answers what patterns exist. It does not answer where my problem sits, and which pattern lives at that coordinate.
A loan-evaluation agent crashes not because Reflection is missing but because Perception-stage budget allocation dropped the disqualifying document. A multi-agent code reviewer drifts not because ReAct is wrong but because two Reflection critics contradict each other and there is no governance gate to resolve it. These are not different patterns — they are patterns sitting at specific coordinates in a structured design space. Without the coordinates you can't see them.
This repo gives you the coordinates.
Every agent pattern sits at the intersection of two orthogonal axes.
Seven × six = 42 cells. The 28 cells where interesting patterns live are the chapters of Designing AI Agents (Manning) and the lectures of the 极客时间 column.
The framework's claim is not that everything fits the matrix. The claim is that giving a pattern a coordinate forces an answer to "why is this pattern here and not somewhere else". A flat list lets you skip the question. A matrix does not.

Every pattern below lives at one coordinate. Click any pattern name to enter that folder's code and README. Cells marked ✅ have runnable code; cells marked 🟡 are scaffolded.
| Chain | Parallel | Route | Loop | Orchestrate | Hierarchy | |
|---|---|---|---|---|---|---|
| Perceive | Semantic Compaction ✅ | Multi-Modal Fusion ✅ | Context Triage ✅ | — | Progressive Discovery ✅ | — |
| Remember | RAG ✅ | — | Hierarchical Retention ✅ | Failure Journals ✅ | Progress Tracking ✅ | — |
| Reason | Chain of Thought ✅ | Parallel Exploration ✅ | Complexity Routing ✅ | Iterative Hypothesis ✅ | — | — |
| Act | Prompt Chaining ✅ | — | Tool Dispatch ✅ | — | Plan & Execute ✅ | Guardrail Sandwich ✅ |
| Reflect | Generator-Critic 🟡 | — | Skill Package 🟡 | Self-Heal Loop 🟡 | — | Experience Replay 🟡 |
| Collaborate | Handoff Chain 🟡 | Fan-out & Gather 🟡 | — | Adversarial Review 🟡 | — | Hierarchical Delegation 🟡 |
| Govern | — | Progressive Commitment 🟡 | Approval Gate 🟡 | — | Observability Harness 🟡 | Blast Radius 🟡 |
Composition (putting patterns together): Pattern Selection Card · Six-Step Methodology · Argus Full Case Study · Checklist Benchmark Case
The 14 empty cells mark either industry gaps no production harness has filled yet, or topology-function combinations whose patterns haven't crystallized.
Each pattern folder follows the same shape: pattern.py (the minimal
honest reference, 50–250 lines), example.py (a real-scenario case that
runs without API keys), test_pattern.py (the invariants the pattern
must hold), and bilingual README.md / README.zh-CN.md.
Every pattern's README cites real production code. Citations are file-and-line in upstream open-source projects, verified at the time of writing. If you find a citation that no longer matches the upstream code, open an issue — that's a bug, not a documentation choice.