# Multi Agent Governance

> Use this skill when building, managing, or auditing multi-agent AI systems. Provides governance patterns for behavioral enforcement, drift detection, audit trails, role management, and accountability across autonomous AI agents. Compatible with any orchestration framework.

- **Type:** Skill
- **Install:** `agentstack add skill-levelsofself-mcp-nervous-system-multi-agent-governance`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [levelsofself](https://agentstack.voostack.com/s/levelsofself)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [levelsofself](https://github.com/levelsofself)
- **Source:** https://github.com/levelsofself/mcp-nervous-system/tree/main/skills/multi-agent-governance
- **Website:** https://api.100levelup.com/mcp-pricing

## Install

```sh
agentstack add skill-levelsofself-mcp-nervous-system-multi-agent-governance
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Multi-Agent Governance

Governance patterns for multi-agent AI systems. When you have multiple autonomous AI agents operating together, you need accountability, behavioral enforcement, and drift detection - just like human organizations.

## Core Principles

1. **Single source of truth** - One config file defines all agent roles. Every agent reads from it. No parallel systems.
2. **Behavioral enforcement** - Rules are not suggestions. Guardrails are enforced through preflight checks, violation logging, and automated audits.
3. **Drift detection** - Systems drift from their intended state over time. Automated drift audits catch configuration mismatches, version inconsistencies, and role conflicts before they cause failures.
4. **Tamper-proof audit trails** - Every action, every change, every decision is logged in append-only logs that can be verified for integrity.
5. **File-based memory** - Agent memory lives in files on disk, not in cloud databases. This enables air-gapped deployment, full auditability, and zero vendor dependency.

## Governance Patterns

### Role Management
Define roles in a single JSON file that all agents reference:
```json
{
  "agent-name": {
    "role": "Operations Manager",
    "scope": ["dispatch", "monitoring", "reporting"],
    "access": "admin",
    "model": "claude-opus-4-6"
  }
}
```
Every agent reads from this file at startup. Changes propagate automatically.

### Preflight Checks
Before any agent modifies a file:
1. Check if the file is on the protected list
2. If protected: log the attempt, report to admin, and STOP
3. If allowed: create backup, make change, syntax check, restart affected process

### Drift Audit Scopes
Run periodic audits across these dimensions:
- **roles** - Do running agents match their role definitions?
- **versions** - Are all agents on the correct model version?
- **files** - Have any protected files been modified?
- **processes** - Are all expected processes running?
- **config** - Do config files match expected state?

### Session Management
Every agent session should:
1. Read the current system state before acting
2. Write progress as it goes (no silent failures)
3. Update handoff documentation before ending
4. Run a drift audit on affected areas

### Permission Protocol
Two categories of changes:
- **DATA** (values, content, configuration): Agent can act with general authorization
- **LOGIC** (how something decides, classifies, responds): Agent PROPOSES and WAITS for human approval

When in doubt, it is LOGIC. Ask the human.

## Implementation

### Using the Nervous System MCP
The Nervous System is a Model Context Protocol server that implements these governance patterns with 19+ tools:

```bash
npm install -g @anthropic-ai/mcp-nervous-system
```

Tools include: drift_audit, security_audit, auto_propagate, session_close, preflight_check, violation_logging, and more.

### DIY Implementation
If building your own governance layer:
1. Create a roles config file (JSON) as single source of truth
2. Create a protected files list that agents check before editing
3. Implement append-only logging for all agent actions
4. Schedule periodic drift audits (compare expected vs actual state)
5. Build a violation log that captures unauthorized changes

## Anti-Patterns
- Letting agents self-modify their own rules
- Multiple sources of truth for the same data
- Silent failures (agent encounters error but does not report it)
- Manual fixes without adding automated detection
- Hardcoding values that should come from config

## Resources
- [Nervous System MCP on npm](https://www.npmjs.com/package/@anthropic-ai/mcp-nervous-system)
- [Agent Skills Specification](https://agentskills.io/specification)
- [Model Context Protocol](https://modelcontextprotocol.io)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [levelsofself](https://github.com/levelsofself)
- **Source:** [levelsofself/mcp-nervous-system](https://github.com/levelsofself/mcp-nervous-system)
- **License:** MIT
- **Homepage:** https://api.100levelup.com/mcp-pricing

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-levelsofself-mcp-nervous-system-multi-agent-governance
- Seller: https://agentstack.voostack.com/s/levelsofself
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
