多智能体架构
Agent Designer - Multi-Agent System Architecture
by alirezarezvani
聚焦多智能体系统架构设计,梳理 Supervisor、Swarm、分层和 Pipeline 等模式,覆盖角色定义、通信协作与性能评估,适合规划稳健可扩展的 AI agent 编排方案。
帮你系统解决多智能体应用的架构设计与协同编排难题,适合构建复杂 AI 工作流,成熟度高、社区认可也很亮眼。
安装
claude skill add --url github.com/alirezarezvani/claude-skills/tree/main/engineering/agent-designer文档
Tier: POWERFUL
Category: Engineering
Tags: AI agents, architecture, system design, orchestration, multi-agent systems
Overview
Agent Designer is a comprehensive toolkit for designing, architecting, and evaluating multi-agent systems. It provides structured approaches to agent architecture patterns, tool design principles, communication strategies, and performance evaluation frameworks for building robust, scalable AI agent systems.
Core Capabilities
1. Agent Architecture Patterns
Single Agent Pattern
- Use Case: Simple, focused tasks with clear boundaries
- Pros: Minimal complexity, easy debugging, predictable behavior
- Cons: Limited scalability, single point of failure
- Implementation: Direct user-agent interaction with comprehensive tool access
Supervisor Pattern
- Use Case: Hierarchical task decomposition with centralized control
- Architecture: One supervisor agent coordinating multiple specialist agents
- Pros: Clear command structure, centralized decision making
- Cons: Supervisor bottleneck, complex coordination logic
- Implementation: Supervisor receives tasks, delegates to specialists, aggregates results
Swarm Pattern
- Use Case: Distributed problem solving with peer-to-peer collaboration
- Architecture: Multiple autonomous agents with shared objectives
- Pros: High parallelism, fault tolerance, emergent intelligence
- Cons: Complex coordination, potential conflicts, harder to predict
- Implementation: Agent discovery, consensus mechanisms, distributed task allocation
Hierarchical Pattern
- Use Case: Complex systems with multiple organizational layers
- Architecture: Tree structure with managers and workers at different levels
- Pros: Natural organizational mapping, clear responsibilities
- Cons: Communication overhead, potential bottlenecks at each level
- Implementation: Multi-level delegation with feedback loops
Pipeline Pattern
- Use Case: Sequential processing with specialized stages
- Architecture: Agents arranged in processing pipeline
- Pros: Clear data flow, specialized optimization per stage
- Cons: Sequential bottlenecks, rigid processing order
- Implementation: Message queues between stages, state handoffs
2. Agent Role Definition
Role Specification Framework
- Identity: Name, purpose statement, core competencies
- Responsibilities: Primary tasks, decision boundaries, success criteria
- Capabilities: Required tools, knowledge domains, processing limits
- Interfaces: Input/output formats, communication protocols
- Constraints: Security boundaries, resource limits, operational guidelines
Common Agent Archetypes
Coordinator Agent
- Orchestrates multi-agent workflows
- Makes high-level decisions and resource allocation
- Monitors system health and performance
- Handles escalations and conflict resolution
Specialist Agent
- Deep expertise in specific domain (code, data, research)
- Optimized tools and knowledge for specialized tasks
- High-quality output within narrow scope
- Clear handoff protocols for out-of-scope requests
Interface Agent
- Handles external interactions (users, APIs, systems)
- Protocol translation and format conversion
- Authentication and authorization management
- User experience optimization
Monitor Agent
- System health monitoring and alerting
- Performance metrics collection and analysis
- Anomaly detection and reporting
- Compliance and audit trail maintenance
3. Tool Design Principles
Schema Design
- Input Validation: Strong typing, required vs optional parameters
- Output Consistency: Standardized response formats, error handling
- Documentation: Clear descriptions, usage examples, edge cases
- Versioning: Backward compatibility, migration paths
Error Handling Patterns
- Graceful Degradation: Partial functionality when dependencies fail
- Retry Logic: Exponential backoff, circuit breakers, max attempts
- Error Propagation: Structured error responses, error classification
- Recovery Strategies: Fallback methods, alternative approaches
Idempotency Requirements
- Safe Operations: Read operations with no side effects
- Idempotent Writes: Same operation can be safely repeated
- State Management: Version tracking, conflict resolution
- Atomicity: All-or-nothing operation completion
4. Communication Patterns
Message Passing
- Asynchronous Messaging: Decoupled agents, message queues
- Message Format: Structured payloads with metadata
- Delivery Guarantees: At-least-once, exactly-once semantics
- Routing: Direct messaging, publish-subscribe, broadcast
Shared State
- State Stores: Centralized data repositories
- Consistency Models: Strong, eventual, weak consistency
- Access Patterns: Read-heavy, write-heavy, mixed workloads
- Conflict Resolution: Last-writer-wins, merge strategies
Event-Driven Architecture
- Event Sourcing: Immutable event logs, state reconstruction
- Event Types: Domain events, system events, integration events
- Event Processing: Real-time, batch, stream processing
- Event Schema: Versioned event formats, backward compatibility
5. Guardrails and Safety
Input Validation
- Schema Enforcement: Required fields, type checking, format validation
- Content Filtering: Harmful content detection, PII scrubbing
- Rate Limiting: Request throttling, resource quotas
- Authentication: Identity verification, authorization checks
Output Filtering
- Content Moderation: Harmful content removal, quality checks
- Consistency Validation: Logic checks, constraint verification
- Formatting: Standardized output formats, clean presentation
- Audit Logging: Decision trails, compliance records
Human-in-the-Loop
- Approval Workflows: Critical decision checkpoints
- Escalation Triggers: Confidence thresholds, risk assessment
- Override Mechanisms: Human judgment precedence
- Feedback Loops: Human corrections improve system behavior
6. Evaluation Frameworks
Task Completion Metrics
- Success Rate: Percentage of tasks completed successfully
- Partial Completion: Progress measurement for complex tasks
- Task Classification: Success criteria by task type
- Failure Analysis: Root cause identification and categorization
Quality Assessment
- Output Quality: Accuracy, relevance, completeness measures
- Consistency: Response variability across similar inputs
- Coherence: Logical flow and internal consistency
- User Satisfaction: Feedback scores, usage patterns
Cost Analysis
- Token Usage: Input/output token consumption per task
- API Costs: External service usage and charges
- Compute Resources: CPU, memory, storage utilization
- Time-to-Value: Cost per successful task completion
Latency Distribution
- Response Time: End-to-end task completion time
- Processing Stages: Bottleneck identification per stage
- Queue Times: Wait times in processing pipelines
- Resource Contention: Impact of concurrent operations
7. Orchestration Strategies
Centralized Orchestration
- Workflow Engine: Central coordinator manages all agents
- State Management: Centralized workflow state tracking
- Decision Logic: Complex routing and branching rules
- Monitoring: Comprehensive visibility into all operations
Decentralized Orchestration
- Peer-to-Peer: Agents coordinate directly with each other
- Service Discovery: Dynamic agent registration and lookup
- Consensus Protocols: Distributed decision making
- Fault Tolerance: No single point of failure
Hybrid Approaches
- Domain Boundaries: Centralized within domains, federated across
- Hierarchical Coordination: Multiple orchestration levels
- Context-Dependent: Strategy selection based on task type
- Load Balancing: Distribute coordination responsibility
8. Memory Patterns
Short-Term Memory
- Context Windows: Working memory for current tasks
- Session State: Temporary data for ongoing interactions
- Cache Management: Performance optimization strategies
- Memory Pressure: Handling capacity constraints
Long-Term Memory
- Persistent Storage: Durable data across sessions
- Knowledge Base: Accumulated domain knowledge
- Experience Replay: Learning from past interactions
- Memory Consolidation: Transferring from short to long-term
Shared Memory
- Collaborative Knowledge: Shared learning across agents
- Synchronization: Consistency maintenance strategies
- Access Control: Permission-based memory access
- Memory Partitioning: Isolation between agent groups
9. Scaling Considerations
Horizontal Scaling
- Agent Replication: Multiple instances of same agent type
- Load Distribution: Request routing across agent instances
- Resource Pooling: Shared compute and storage resources
- Geographic Distribution: Multi-region deployments
Vertical Scaling
- Capability Enhancement: More powerful individual agents
- Tool Expansion: Broader tool access per agent
- Context Expansion: Larger working memory capacity
- Processing Power: Higher throughput per agent
Performance Optimization
- Caching Strategies: Response caching, tool result caching
- Parallel Processing: Concurrent task execution
- Resource Optimization: Efficient resource utilization
- Bottleneck Elimination: Systematic performance tuning
10. Failure Handling
Retry Mechanisms
- Exponential Backoff: Increasing delays between retries
- Jitter: Random delay variation to prevent thundering herd
- Maximum Attempts: Bounded retry behavior
- Retry Conditions: Transient vs permanent failure classification
Fallback Strategies
- Graceful Degradation: Reduced functionality when systems fail
- Alternative Approaches: Different methods for same goals
- Default Responses: Safe fallback behaviors
- User Communication: Clear failure messaging
Circuit Breakers
- Failure Detection: Monitoring failure rates and response times
- State Management: Open, closed, half-open circuit states
- Recovery Testing: Gradual return to normal operation
- Cascading Failure Prevention: Protecting upstream systems
Implementation Guidelines
Architecture Decision Process
- Requirements Analysis: Understand system goals, constraints, scale
- Pattern Selection: Choose appropriate architecture pattern
- Agent Design: Define roles, responsibilities, interfaces
- Tool Architecture: Design tool schemas and error handling
- Communication Design: Select message patterns and protocols
- Safety Implementation: Build guardrails and validation
- Evaluation Planning: Define success metrics and monitoring
- Deployment Strategy: Plan scaling and failure handling
Quality Assurance
- Testing Strategy: Unit, integration, and system testing approaches
- Monitoring: Real-time system health and performance tracking
- Documentation: Architecture documentation and runbooks
- Security Review: Threat modeling and security assessments
Continuous Improvement
- Performance Monitoring: Ongoing system performance analysis
- User Feedback: Incorporating user experience improvements
- A/B Testing: Controlled experiments for system improvements
- Knowledge Base Updates: Continuous learning and adaptation
This skill provides the foundation for designing robust, scalable multi-agent systems that can handle complex tasks while maintaining safety, reliability, and performance at scale.
相关 Skills
Claude接口
by anthropics
面向接入 Claude API、Anthropic SDK 或 Agent SDK 的开发场景,自动识别项目语言并给出对应示例与默认配置,快速搭建 LLM 应用。
✎ 想把Claude能力接进应用或智能体,用claude-api上手快、兼容Anthropic与Agent SDK,集成路径清晰又省心
智能体流程设计
by alirezarezvani
面向生产级多 Agent 编排,梳理顺序、并行、分层、事件驱动、共识五种工作流设计,覆盖 handoff、状态管理、容错重试、上下文预算与成本优化,适合搭建复杂 AI 协作系统。
✎ 帮你把多智能体流程设计、编排和自动化统一起来,复杂工作流也能更稳地落地,适合追求强控制力的团队。
提示工程专家
by alirezarezvani
覆盖Prompt优化、Few-shot设计、结构化输出、RAG评测与Agent工作流编排,适合分析token成本、评估LLM输出质量,并搭建可落地的AI智能体系统。
✎ 把提示优化、LLM评测到RAG与智能体设计串成一套方法,适合想系统提升AI开发效率的人。
相关 MCP 服务
知识图谱记忆
编辑精选by Anthropic
Memory 是一个基于本地知识图谱的持久化记忆系统,让 AI 记住长期上下文。
✎ 帮 AI 和智能体补上“记不住”的短板,用本地知识图谱沉淀长期上下文,连续对话更聪明,数据也更可控。
顺序思维
编辑精选by Anthropic
Sequential Thinking 是让 AI 通过动态思维链解决复杂问题的参考服务器。
✎ 这个服务器展示了如何让 Claude 像人类一样逐步推理,适合开发者学习 MCP 的思维链实现。但注意它只是个参考示例,别指望直接用在生产环境里。
PraisonAI
编辑精选by mervinpraison
PraisonAI 是一个支持自反思和多 LLM 的低代码 AI 智能体框架。
✎ 如果你需要快速搭建一个能 24/7 运行的 AI 智能体团队来处理复杂任务(比如自动研究或代码生成),PraisonAI 的低代码设计和多平台集成(如 Telegram)让它上手极快。但作为非官方项目,它的生态成熟度可能不如 LangChain 等主流框架,适合愿意尝鲜的开发者。