agent-architecture-patterns
AI Agent architecture patterns library with 10 patterns for single and multi-agent systems
Best use case
agent-architecture-patterns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
AI Agent architecture patterns library with 10 patterns for single and multi-agent systems
Teams using agent-architecture-patterns should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/agent-architecture-patterns/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How agent-architecture-patterns Compares
| Feature / Agent | agent-architecture-patterns | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
AI Agent architecture patterns library with 10 patterns for single and multi-agent systems
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
SKILL.md Source
# Agent Architecture Patterns
This skill provides a comprehensive library of AI Agent architecture patterns to help developers:
- Design single-agent architectures (ReAct, Reflection, Self-Critique, Plan-and-Solve, Tree of Thoughts)
- Design multi-agent collaboration systems (Manager-Worker, Peer-to-Peer, Hierarchical, Market-Based, Pipeline)
- Apply system design principles (separation of concerns, fault tolerance, scalability)
- Implement best practices based on OpenClaw
---
## Patterns
### Single-Agent Patterns (5)
1. **ReAct** - Reasoning + Acting alternation
2. **Reflection** - Self-reflection and iterative improvement
3. **Self-Critique** - Self-criticism and error correction
4. **Plan-and-Solve** - Plan first, then execute
5. **Tree of Thoughts** - Multi-path exploration
### Multi-Agent Patterns (5)
1. **Manager-Worker** - 1 manager coordinates multiple workers
2. **Peer-to-Peer** - Equal agents collaborate
3. **Hierarchical** - Multi-level management structure
4. **Market-Based** - Task bidding and allocation
5. **Pipeline** - Sequential multi-stage processing
---
## Usage
### Option 1: Consult AI-Agent
Ask questions like:
- "Design a multi-agent code review system"
- "How to implement ReAct pattern?"
- "Which agent collaboration pattern should I use?"
### Option 2: Reference Documentation
Browse `patterns/` directory for detailed pattern docs.
### Option 3: Use Code Examples
Run example code from `examples/` directory.
---
## Examples
### ReAct Pattern Example
```javascript
const agent = new ReActAgent({
tools: [search, calculate],
maxSteps: 10
});
const answer = await agent.execute("What's the temperature in Beijing today?");
```
### Manager-Worker Pattern Example
```javascript
const workers = [
new WorkerAgent('worker-1', ['javascript'], { codeReview: true }),
new WorkerAgent('worker-2', ['python'], { dataAnalysis: true })
];
const manager = new ManagerAgent(workers);
const result = await manager.coordinate("Review this codebase");
```
---
## Installation
```bash
clawhub install agent-architecture-patterns
```
---
## Testing
```bash
npm test
# Runs 30 test cases for ReAct and Manager-Worker implementations
```
---
## License
MIT
---
## Author
AI-AgentRelated Skills
Agent Memory Architecture
Complete zero-dependency memory system for AI agents — file-based architecture, daily notes, long-term curation, context management, heartbeat integration, and memory hygiene. No APIs, no databases, no external tools. Works with any agent framework.
architecture-paradigm-event-driven
Apply event-driven async messaging to decouple producers and consumers. Use for real-time processing
architecture-paradigm-cqrs-es
Apply CQRS and Event Sourcing for read/write separation and audit trails
architecture-paradigm-client-server
Client-server architecture for web/mobile apps with centralized services and API design
shared-patterns
Reference reusable patterns for validation, error handling, and test scaffolding
CLI-Agent Architecture Skill
> A single `run(command="...")` tool with Unix CLI commands outperforms typed function calls.
langgraph-architecture
Guides architectural decisions for LangGraph applications. Use when deciding between LangGraph vs alternatives, choosing state management strategies, designing multi-agent systems, or selecting persistence and streaming approaches.
deepagents-architecture
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing subagent systems, or selecting middleware approaches.
agent-architecture-analysis
Perform 12-Factor Agents compliance analysis on any codebase. Use when evaluating agent architecture, reviewing LLM-powered systems, or auditing agentic applications against the 12-Factor methodology.
vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
terraform-patterns
Terraform infrastructure-as-code agent skill and plugin for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw. Covers module design patterns, state management strategies, provider configuration, security hardening, policy-as-code with Sentinel/OPA, and CI/CD plan/apply workflows. Use when: user wants to design Terraform modules, manage state backends, review Terraform security, implement multi-region deployments, or follow IaC best practices.
site-architecture
When the user wants to audit, redesign, or plan their website's structure, URL hierarchy, navigation design, or internal linking strategy. Use when the user mentions 'site architecture,' 'URL structure,' 'internal links,' 'site navigation,' 'breadcrumbs,' 'topic clusters,' 'hub pages,' 'orphan pages,' 'silo structure,' 'information architecture,' or 'website reorganization.' Also use when someone has SEO problems and the root cause is structural (not content or schema). NOT for content strategy decisions about what to write (use content-strategy) or for schema markup (use schema-markup).