用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Aradotso/ai-agent-skills --skill awesome-agentic-patterns-catalog命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Build AI agents using NVIDIA Object-Oriented Agents framework with Python classes, typed methods, and LLM-driven generation
Local-first personal AI agent with harness, loop, memory, and eval pillars
Real-time voice runtime for AI agents with full-duplex conversation, background task execution, and continuous presence
基于 SOC 职业分类
正在显示 SKILL.md
| name | awesome-agentic-patterns-catalog |
| description | Expert knowledge of agentic AI design patterns for autonomous agent development |
| triggers | ["show me agentic patterns for memory management","what patterns exist for agent orchestration","help me design an autonomous agent workflow","which pattern should I use for tool routing","compare reflection loop and tree of thought patterns","what are best practices for agent feedback loops","show examples of multi-agent coordination patterns","how do I implement context window management"] |
Skill by ara.so — AI Agent Skills collection.
This skill provides comprehensive knowledge of agentic AI patterns — production-ready architectural patterns, workflows, and techniques for building autonomous and semi-autonomous AI agents. The Awesome Agentic Patterns catalog curates real-world patterns with traceability to implementations, papers, and production use cases.
A curated catalogue of repeatable patterns that help AI agents sense, reason, and act effectively in production environments. Each pattern is:
Website: https://agentic-patterns.com
Repository: https://github.com/nibzard/awesome-agentic-patterns
The catalog organizes patterns into 8 core categories:
The primary way to explore patterns is via the website:
# Visit the interactive pattern explorer
open https://agentic-patterns.com
Features available on the website:
git clone https://github.com/nibzard/awesome-agentic-patterns.git
cd awesome-agentic-patterns
awesome-agentic-patterns/
├── patterns/ # Individual pattern markdown files
│ ├── context-window-auto-compaction.md
│ ├── reflection.md
│ ├── plan-then-execute-pattern.md
│ └── ...
├── apps/
│ └── web/ # Astro-based website source
├── README.md # Main catalog listing
└── LICENSE
Curated Code Context Window
Prompt Caching via Exact Prefix Preservation
Episodic Memory Retrieval & Injection
Working Memory via TodoWrite
Reflection Loop
1. Generate initial solution
2. Critique: "Does this handle edge case X?"
3. Revise based on critique
4. Validate against requirements
Coding Agent CI Feedback Loop
while not tests_pass:
run_tests()
if failures:
agent.analyze_failures(test_output)
agent.generate_fix()
commit_and_retry()
Self-Critique Evaluator Loop
Plan-Then-Execute Pattern
# Conceptual implementation
def plan_then_execute(task):
plan = planner_llm.generate_plan(task)
results = []
for step in plan.steps:
result = executor.execute(step)
if result.needs_replanning:
plan = planner_llm.replan(task, results, step)
results.append(result)
return synthesize(results)
Sub-Agent Spawning
Dual LLM Pattern
Tool Selection Guide
Tool Selection Guide:
- search_code(query): When user asks "where is X defined"
- run_tests(path): After code changes, before commit
- read_file(path): When context about specific file needed
- edit_file(path, instructions): To modify existing code
Conditional Parallel Tool Execution
Agent Circuit Breaker
class AgentCircuitBreaker:
def __init__(self, failure_threshold=5):
self.failures = 0
self.threshold = failure_threshold
self.state = "closed" # closed, open, half-open
def call(self, agent_fn, *args):
if self.state == "open":
raise CircuitOpenError("Too many failures")
try:
result = agent_fn(*args)
self.on_success()
return result
except Exception as e:
self.on_failure()
raise
def on_failure(self):
self.failures += 1
if self.failures >= self.threshold:
self.state = "open"
LLM Observability
Identify your agent's core challenge
Review pattern prerequisites
Start simple, iterate
# Combining multiple patterns
from typing import List, Dict
class CodeReviewAgent:
"""
Combines:
- Curated Code Context Window (Context & Memory)
- Reflection Loop (Feedback)
- Tool Selection Guide (Tool Use)
"""
def __init__(self, llm, code_retriever):
self.llm = llm
self.retriever = code_retriever
self.tool_guide = self._load_tool_guide()
def review_pr(self, pr_diff: str) -> Dict:
# 1. Curated Context: Fetch relevant files
context_files = self.retriever.get_relevant_context(
pr_diff,
max_files=10
)
# 2. Initial review with tool guide
initial_review = self.llm.generate(
prompt=f"""
{self.tool_guide}
Review this PR diff:
{pr_diff}
Context files:
{context_files}
Use available tools to verify claims.
""",
tools=["run_tests", "search_similar_code", "check_style"]
)
# 3. Reflection loop: Self-critique
critique = self.llm.generate(
prompt=f"""
Review this code review for:
- Are all concerns valid?
- Any false positives?
- Missing critical issues?
Review: {initial_review}
"""
)
final_review = .llm.generate(
prompt=
)
{
: final_review,
: context_files,
: critique
}
() -> :
# Implementing Planner-Worker Separation + Sub-Agent Spawning
class ResearchOrchestrator:
"""
Patterns:
- Planner-Worker Separation
- Sub-Agent Spawning
- Plan-Then-Execute
"""
def __init__(self, planner_llm, worker_llm):
self.planner = planner_llm
self.worker = worker_llm
async def research(self, query: str) -> Dict:
# 1. Planner creates research plan
plan = self.planner.generate(
prompt=f"""
Create research plan for: {query}
Output as JSON with steps:
[
{{"type": "search", "query": "...", "sources": [...]}},
{{"type": "analyze", "focus": "..."}},
{{"type": "synthesize", "format": "..."}}
]
"""
)
# 2. Spawn sub-agents for parallel search
search_tasks = [
step for step in plan if step["type"] == "search"
]
search_results = await asyncio.gather(*[
self._spawn_search_agent(task)
for task in search_tasks
])
# 3. Worker agent analyzes results
analysis = self.worker.generate(
prompt=f"""
Analyze these search results for: {query}
Results: {search_results}
Focus: {[s['focus'] s plan s[] == ]}
"""
)
report = .worker.generate(
prompt=
)
{
: report,
: search_results,
: plan
}
():
agent = SearchAgent(.worker, sources=task[])
agent.search(task[])
1. Curated Code Context Window (manage context size)
2. Plan-Then-Execute (break down complex changes)
3. Coding Agent CI Feedback Loop (validate changes)
4. Reflection Loop (self-review before commit)
5. Agent Circuit Breaker (prevent infinite loops)
1. Filesystem-Based Agent State (persist state)
2. Working Memory via TodoWrite (track progress)
3. Planner-Worker Separation (long-term planning)
4. Signal-Driven Agent Activation (efficient wake-up)
5. LLM Observability (monitor over time)
1. Declarative Multi-Agent Topology (define structure)
2. Economic Value Signaling (coordinate via incentives)
3. Sub-Agent Spawning (dynamic creation)
4. Opponent Processor (debate for quality)
5. Cross-Cycle Consensus Relay (agreement protocol)
Problem: Agent loses track of earlier conversation
Solutions:
Problem: Agent produces inconsistent results
Solutions:
Problem: Agent uses wrong tools or hallucinates tool calls
Solutions:
Problem: Agent creates poor plans or gets stuck
Solutions:
To add a new pattern to the catalog:
patterns/your-pattern-name.md# Pattern Name
## Problem
What challenge does this solve?
## Solution
How does the pattern work?
## Implementation
Code examples, architecture diagrams
## References
- [Source 1](url)
- [Source 2](url)
| Your Challenge | Primary Pattern | Supporting Patterns |
|---|---|---|
| Exceeding context limits | Curated Code Context Window | Prompt Caching, Progressive Disclosure |
| Low quality outputs | Reflection Loop | Self-Critique Evaluator, CriticGPT |
| Complex multi-step tasks | Plan-Then-Execute | Sub-Agent Spawning, Tree-of-Thought |
| Unreliable behavior | Agent Circuit Breaker | LLM Observability, Failover Fallback |
| Tool confusion | Tool Selection Guide | Tool Compartmentalization |
| Multi-agent coordination | Declarative Topology | Economic Value Signaling |
Don't:
Do:
This skill provides comprehensive knowledge of production-ready agentic patterns. Use the website's interactive tools for pattern discovery and the repository examples for implementation guidance.