[Contrib] Agent-Mesh trust layer for verified handoffs#65
[Contrib] Agent-Mesh trust layer for verified handoffs#65imran-siddique wants to merge 3 commits intoopenai:mainfrom
Conversation
Adds CMVK-based trust verification for Swarm agent handoffs. Key features: - TrustedSwarm: Wrapper with trust-verified handoffs - TrustPolicy: Configurable trust requirements - HandoffVerifier: Validates trust before handoffs - AgentIdentity: DID-based agent identification - Audit trail: Full handoff logging Trust verification prevents: - Handoffs to unregistered agents - Handoffs to blocked agents - Handoffs to agents below trust threshold - Sensitive context to low-trust agents Includes comprehensive tests and documentation. Agent-Mesh: https://github.com/imran-siddique/agent-mesh
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! |
|
Friendly nudge -- AgentMesh trust layer was just merged into microsoft/agent-lightning (14k stars): microsoft/agent-lightning#478 -- Happy to address any feedback on this Swarm integration! |
|
Update: Our AgentMesh trust layer was just merged into LlamaIndex (47k stars): run-llama/llama_index#20644. This is our second major integration merge this week after Microsoft's agent-lightning (14k stars). Would love to get this PR reviewed as well! |
|
Friendly follow-up! Since opening this PR, our trust layer has been merged into three major frameworks:
Trust-verified handoffs are especially relevant for Swarm's agent-to-agent pattern. Happy to iterate on this if there's any feedback. |
New proposal documents for all external submissions: - AUTOGEN-INTEGRATION-PROPOSAL.md (microsoft/autogen#7212) - CREWAI-INTEGRATION-PROPOSAL.md (crewAI#4384 + examples#300) - OPENAI-SWARM-PROPOSAL.md (openai/swarm#65) - METAGPT-INTEGRATION-PROPOSAL.md (MetaGPT#1936) - ANTHROPIC-INTEGRATION-PROPOSAL.md (skills#424, plugins#415, cookbooks#384) - MCP-ECOSYSTEM-PROPOSAL.md (servers#3352, registry#978) - DIFY-INTEGRATION-PROPOSAL.md (dify-plugins#2060, merged) - GITHUB-COPILOT-PROPOSAL.md (awesome-copilot#755-757, all merged) - PROPOSALS-INDEX.md — master index of all 45 submissions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Migration update: This project has officially moved to microsoft/agent-governance-toolkit under the Microsoft org. The code in this PR has been updated to reference the new location. Install via: All old personal repos ( |
|
Closing — this project has moved to microsoft/agent-governance-toolkit. Will re-submit fresh proposals from the Microsoft repo. Thank you! |
Summary
Adds trust-verified handoffs to OpenAI Swarm using the Agent-Mesh CMVK identity layer.
The Problem
Swarm enables multi-agent orchestration through handoffs, but has no built-in way to:
The Solution
This contrib module provides:
Example
\\python
from swarm import Agent
from swarm.contrib.agentmesh import TrustedSwarm, TrustPolicy
Create agents
triage = Agent(name='Triage', functions=[transfer_to_sales])
sales = Agent(name='Sales')
Create trusted swarm
policy = TrustPolicy(min_trust_score=0.5, audit_logging=True)
swarm = TrustedSwarm(policy=policy)
Register with trust scores
swarm.register_agent(triage, trust_score=0.8)
swarm.register_agent(sales, trust_score=0.7)
Handoffs are now verified
response = swarm.run(triage, messages)
\\
Key Features
Trust Verification
Handoffs are blocked when:
Files Added
Testing
\\�ash
pytest swarm/contrib/agentmesh/test_trusted_handoff.py -v
\\
Why This Matters
In multi-agent systems, handoffs create attack vectors. Trust verification ensures only vetted agents participate in your swarm, preventing:
References