Skip to main content

Public Preview — MCP governance primitives for the Agent Governance Toolkit.

Project description

agent-mcp-governance

Public Preview — Standalone Python package that exposes the Agent Governance Toolkit's MCP (Model Context Protocol) governance primitives for use outside the full AGT monorepo.

Overview

agent_mcp_governance provides a thin, typed re-export surface over the governance, audit, and trust modules in agent-os-kernel. It is not zero-dependency — it requires agent-os-kernel >=3.0.0,<4.0.0.

Installation

pip install agent-mcp-governance

This will pull in agent-os-kernel automatically.

Quick Start

from agent_mcp_governance import (
    GovernanceMiddleware,
    AuditMiddleware,
    TrustGate,
    BehaviorMonitor,
)

# 1. Governance — block prompt-injection patterns
gov = GovernanceMiddleware(
    blocked_patterns=[r"(?i)ignore previous instructions"],
    allowed_tools=["web-search", "read-file"],
    rate_limit_per_minute=60,
)

# 2. Audit — tamper-evident hash-chain logging
audit = AuditMiddleware(capture_data=True)

# 3. Trust — DID-based agent identity verification
gate = TrustGate(min_trust_score=500)

# 4. Monitoring — detect rogue agents
monitor = BehaviorMonitor(
    burst_threshold=100,
    consecutive_failure_threshold=20,
)

API Reference

Export Source module Description
GovernanceMiddleware agent_os.governance.middleware Policy enforcement (rate limits, allow-lists, content filters)
AuditMiddleware agent_os.audit.middleware Tamper-evident audit logging with hash chain
TrustGate agent_os.trust.gate DID-based trust verification for agent handoffs
BehaviorMonitor agent_os.services.behavior_monitor Per-agent anomaly detection and quarantine

Compatibility

Python agent-os-kernel
≥ 3.10 ≥ 3.0.0, < 4.0.0

License

MIT — Copyright (c) Microsoft Corporation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_mcp_governance-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_mcp_governance-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file agent_mcp_governance-0.1.0.tar.gz.

File metadata

  • Download URL: agent_mcp_governance-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for agent_mcp_governance-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a1644526551c372e70bcb82fcca88ed5cdb5b0def91e68d86a7dbbeb8098693
MD5 0c0cfc85b83f3c4ba1f4d6a0457080cf
BLAKE2b-256 32ac8d766b861d57933463e45212dba38f77cf5232b69cc3f38e2c23dbb66091

See more details on using hashes here.

File details

Details for the file agent_mcp_governance-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_mcp_governance-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 160dbe540305577a7b2ada6a620e0ec2c8b274b9d91554d8e3a4e383e60ad00b
MD5 0f6f66d577a93275799dd8bc81fd0bfa
BLAKE2b-256 dd4fce9f83301114803c5f8c398217beddb1a0e78ef20e8503a60ce9ebb67722

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page