← 返回 Skills 市场
banxian87

Agent Architecture Patterns

作者 banxian87 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
115
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install agent-architecture-patterns
功能描述
AI Agent architecture patterns library with 10 patterns for single and multi-agent systems
使用说明 (SKILL.md)

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

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

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

clawhub install agent-architecture-patterns

Testing

npm test
# Runs 30 test cases for ReAct and Manager-Worker implementations

License

MIT


Author

AI-Agent

安全使用建议
This package appears to be a coherent patterns + examples library. Before running anything: 1) review example code for risky constructs — e.g., examples/react-example.js uses eval(expression) which can execute arbitrary code, and examples/manager-worker-full-example.js logs a user object (including password) — do not run examples on real data. 2) Run examples/tests in a sandbox or disposable environment. 3) If you plan to reuse code, replace eval with a safe expression parser and remove any sample logging of secrets. 4) The package.json repository URL is a placeholder; if provenance matters, verify the source/maintainer before trusting this code in production.
功能分析
Type: OpenClaw Skill Name: agent-architecture-patterns Version: 1.1.0 The skill bundle provides a comprehensive library of AI Agent architecture patterns. However, a critical security vulnerability exists in 'examples/react-example.js', where the 'calculate' tool uses the 'eval()' function to process mathematical expressions. This pattern allows for potential Remote Code Execution (RCE) if an LLM or user provides a malicious string. Although the code includes a comment acknowledging the risk and suggesting a safer parser, the inclusion of such dangerous logic in a functional example is highly risky. No evidence of intentional malice, data exfiltration, or hidden backdoors was found.
能力评估
Purpose & Capability
The name/description (agent architecture patterns) align with the included files: pattern docs, example apps, agent implementations and tests. The files present are expected for a patterns + examples library.
Instruction Scope
SKILL.md only instructs reading the patterns, asking the agent questions, and running bundled examples/tests. It does not request secrets or external endpoints. Note: several example files intentionally demonstrate insecure code (e.g., printing a user object containing a password and using eval for expression evaluation); the runtime instructions encourage running examples, so users should not run examples on sensitive data or without review.
Install Mechanism
No install spec is provided (instruction-only). The package contains code but there is no download/install step that fetches remote artifacts — lowest install risk.
Credentials
The skill declares no required environment variables, no primary credential, and no config paths. Nothing requests disproportionate credentials or access.
Persistence & Privilege
always is false and model invocation is allowed (platform default). The skill does not request persistent system-wide privileges or try to modify other skills' configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-architecture-patterns
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-architecture-patterns 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
添加 5 个完整示例代码和 4 个 Agent 实现:Reflection, Self-Critique, Plan-and-Solve, Tree of Thoughts, Manager-Worker 完整示例
v1.0.0
Initial release of agent-architecture-patterns. - Provides a library of 10 AI agent architecture patterns for single-agent and multi-agent systems. - Includes pattern documentation, code examples, and usage guidance. - Supports best practices such as separation of concerns, fault tolerance, and scalability. - Ready-to-use with installation and testing instructions.
元数据
Slug agent-architecture-patterns
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Agent Architecture Patterns 是什么?

AI Agent architecture patterns library with 10 patterns for single and multi-agent systems. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 115 次。

如何安装 Agent Architecture Patterns?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-architecture-patterns」即可一键安装,无需额外配置。

Agent Architecture Patterns 是免费的吗?

是的,Agent Architecture Patterns 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Architecture Patterns 支持哪些平台?

Agent Architecture Patterns 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Architecture Patterns?

由 banxian87(@banxian87)开发并维护,当前版本 v1.1.0。

💬 留言讨论