Python: [Python][Agents] AgentMesh: Trust and Governance Layer#13517
Python: [Python][Agents] AgentMesh: Trust and Governance Layer#13517imran-siddique wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Adds agentmesh module to semantic_kernel.agents providing: - CMVKIdentity: Cryptographic identity with Ed25519 keys - TrustedAgentCard: Agent discovery and verification - TrustHandshake: Peer verification protocol - GovernancePolicy: Rate limiting, capability control, auditing - GovernedAgent: Agent wrapper with governance enforcement - GovernanceKernel: Kernel wrapper with policy enforcement Features: - Rate limiting (per-minute and per-hour) - Function allow/deny lists - Resource limits (concurrent tasks, memory) - Full audit logging - Trust score thresholds - Policy violation tracking
Ready for Final Review 🙏This PR has been open for a while. The AgentMesh trust layer integration is complete and tested. Could a maintainer please provide a final review? Happy to address any remaining concerns. Thank you! |
|
What's the requirement/need driving this? |
|
Great question! The need comes from several production multi-agent scenarios: Key Requirements
Real ExampleIn a multi-agent system where:
This module makes that possible with minimal code changes: \\python Now all invocations are identity-verified, policy-checked, and audit-logged\\ Similar integrations have been merged/submitted to AutoGen, CrewAI, A2A, and others. Happy to discuss specific use cases! |
|
Great question @moonbox3! The driving need is runtime governance for AI agents — specifically:
The integration is lightweight (~200 lines) and opt-in — it wraps existing SK kernel functions without changing their behavior unless a policy violation is detected. Happy to discuss further or adjust the approach! |
|
Thanks for the contribution, @imran-siddique. These types of features usually have a longer tail in design/implementation: we need to review the requirement with the team, capture design in an ADR (while looking at different ways to design it), and make sure things also align with .NET. Our focus is currently on the Microsoft Agent Framework. We aren't bringing new features like this in to Semantic Kernel. |
|
Thanks @moonbox3 for reviewing! I understand this may not align with the project's current priorities. I'll keep improving the governance layer independently and would love to revisit this when there's a clearer need from the SK ecosystem. Appreciate your time! |
Summary
Adds agentmesh module to \semantic_kernel.agents\ providing cryptographic identity verification and governance controls for Semantic Kernel agents.
Features
Trust Layer
Governance Layer
Governance Capabilities
Example
\\python
from semantic_kernel.agents.agentmesh import (
CMVKIdentity,
GovernedAgent,
GovernancePolicy,
)
identity = CMVKIdentity.generate('assistant', capabilities=['chat'])
policy = GovernancePolicy(
max_requests_per_minute=30,
allowed_functions=['chat'],
audit_all_invocations=True,
)
governed = GovernedAgent(agent=base_agent, identity=identity, policy=policy)
\\
Related