Govern any task that uses or considers multiple agents, subagents, delegation, parallel work, or speed-first execution. Use whenever the user says "多派 Agent"...
Coding
Multi-Agent Governance
Try itA comprehensive governance system for managing agent roles, responsibilities, handoff policies, and conflict resolution in multi-agent environments
What it does
A comprehensive governance system for managing agent roles, responsibilities, handoff policies, and conflict resolution in multi-agent environments
The skill document
Multi-Agent Governance
A comprehensive governance system for managing agent roles, responsibilities, handoff policies, and conflict resolution in multi-agent environments.
Features
- Agent Role Registry — Define and manage agent roles with clear responsibilities and boundaries
- Handoff Policy Manager — Validate and enforce handoffs between agents with required fields
- Conflict Resolver — Resolve agent disagreements with multiple strategies (orchestrator-first, user-first, voting)
- Governance Validator — Validate agent actions against defined role boundaries
- Predefined Templates — Standard (9 agents), Simplified (5 agents), Minimal (3 agents)
- Configuration Persistence — Save and load governance configurations to YAML or JSON files
- Multi-Framework Support — Compatible with OpenClaw, LangChain, AutoGen, CrewAI
Use Cases
- Multi-agent coordination — Define clear responsibilities for each agent in a collaborative workflow
- Quality assurance — Enforce handoff policies to prevent information loss between stages
- Conflict resolution — Resolve disagreements between agents automatically or with user input
- Workflow governance — Ensure agents follow defined boundaries and don't bypass gates
- Configuration management — Save governance rules for reuse across projects
Installation
openclaw skills install multi-agent-governance
Quick Start
from multi_agent_governance import MultiAgentGovernance
# Initialize with standard 9-agent template
governance = MultiAgentGovernance(template="standard")
# List all registered roles
roles = governance.list_roles()
# Output: ['orchestrator_agent', 'requirement_agent', 'design_agent', ...]
# Validate a handoff between agents
handoff_data = {
"from": "requirement_agent",
"to": "design_agent",
"change_id": "change-123",
"inputs": {"proposal.md": "..."},
"required_outputs": ["design.md"]
}
result = governance.validate_handoff(
from_agent="requirement_agent",
to_agent="design_agent",
handoff_data=handoff_data
)
# Resolve a conflict between agents
resolution = governance.resolve_conflict(
agents=["design_agent", "implementation_agent"],
disagreement_type="workflow_selection_disputed",
context={"proposal": "..."}
)
Parameters
Template Selection
template="standard"— 9-agent template (orchestrator, requirement, design, implementation, code_review, test_planner, verification, reflection, documentation)template="simplified"— 5-agent template (orchestrator, requirement, implementation, code_review, verification)template="minimal"— 3-agent template (orchestrator, implementation, verification)template={}— Custom role configuration dictionary
Conflict Resolution Strategies
ResolutionStrategy.ORCHESTRATOR_FIRST— Orchestrator makes decisions automaticallyResolutionStrategy.USER_FIRST— Always escalate to user for decisionResolutionStrategy.VOTING— Agents vote, highest priority winsResolutionStrategy.PRIORITY_BASED— Priority-based resolution
Handoff Policy
Customize required fields and actions for handoffs:
governance = MultiAgentGovernance(
template="standard",
handoff_policy={
"required_fields": ["from", "to", "inputs", "outputs"],
"missing_input_action": "block_transition" # or "warn_and_continue"
}
)
Advanced Usage
Register Custom Roles
governance.register_role(
name="security_review_agent",
role="Security Review Agent",
responsibilities=[
"Review code for security vulnerabilities",
"Check for SQL injection, XSS"
],
must_not=[
"Approve own implementation",
"Skip mandatory checks"
],
outputs=[
"security_review_findings",
"approval_decision"
],
priority=8
)
Save and Load Configuration
# Save governance configuration
governance.save_configuration("governance_config.yaml")
# Load configuration
governance.load_configuration("governance_config.yaml")
Generate Reports
report = governance.generate_governance_report()
# Returns: registered_roles, roles, handoff_policy, conflict_strategy, recent_handoffs, recent_conflicts
Documentation
- Usage Guide — Complete usage instructions and examples
- API Reference — Detailed API documentation
- Examples — Practical examples for different scenarios
License
MIT License — Free for personal and commercial use
Author
Terr123123
Links
- ClawHub: https://clawhub.ai/skills/multi-agent-governance
- GitHub: https://github.com/Terr123123/openclaw-skills
- OpenClaw: https://openclaw.ai
Related skills
Design a multi-agent team that actually routes work. Pick roles by what they refuse, wire reporting lines, bound hand-offs, and place human gates, before writing any orchestration code.
Coordinate deep, source-verifiable research projects in OpenClaw using AgentSkills-compatible folders, local artifact tracking, and explicit evidence ledgers...
Design and operate a bounded OpenClaw multi-agent team. Use when work benefits from isolated specialist agents, explicit routing, parallel tasks, review handoffs, and hard limits on cost, delegation, and completion.
Use when evaluating, testing, and optimizing an agent architecture or multi-agent system. Best for reviewing planning, routing, memory, tool use, reliability...
Govern and actively monitor collaborative agent work