Skip to content

Commit bd2e209

Browse files
feat: migrate agentmesh-integrations into monorepo (#138)
Move all 19 platform integrations from imran-siddique/agentmesh-integrations into packages/agentmesh-integrations/: a2a-protocol, agent-lightning, crewai-agentmesh, dify, dify-plugin, flowise-agentmesh, haystack-agentmesh, langchain-agentmesh, langflow-agentmesh, langgraph-trust, llamaindex-agentmesh, mastra-agentmesh, mcp-trust-proxy, moltbook, nostr-wot, openai-agents-agentmesh, openai-agents-trust, openclaw-skill, pydantic-ai-governance README links updated to point to microsoft/agent-governance-toolkit. The source repo will be archived after merge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9ac926d commit bd2e209

File tree

173 files changed

+17919
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+17919
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__pycache__/
2+
*.pyc
3+
*.egg-info/
4+
dist/
5+
build/
6+
.venv/
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<div align="center">
2+
3+
# AgentMesh Integrations
4+
5+
> **📦 Migrated:** This package was moved from [imran-siddique/agentmesh-integrations](https://github.com/imran-siddique/agentmesh-integrations) into the monorepo at `packages/agentmesh-integrations/`.
6+
7+
8+
**Platform Plugins & Trust Providers for AgentMesh**
9+
10+
*Dify · LangChain · LangGraph · LlamaIndex · Agent Lightning · OpenAI Agents · OpenClaw · Nostr WoT · Moltbook*
11+
12+
[![GitHub Stars](https://img.shields.io/github/stars/microsoft/agent-governance-toolkit/tree/main/packages/agentmesh-integrations?style=social)](https://github.com/microsoft/agent-governance-toolkit/tree/main/packages/agentmesh-integrations/stargazers)
13+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
14+
[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://python.org)
15+
[![AgentMesh](https://img.shields.io/badge/agentmesh-compatible-green.svg)](https://github.com/microsoft/agent-governance-toolkit)
16+
17+
> **If this project helps you, please star it!** It helps others discover AgentMesh integrations.
18+
19+
> 🔗 **Part of the Agent Ecosystem**[AgentMesh](https://github.com/microsoft/agent-governance-toolkit) (identity & trust) · [Agent OS](https://github.com/microsoft/agent-governance-toolkit) (governance) · [Agent SRE](https://github.com/microsoft/agent-governance-toolkit) (reliability)
20+
21+
[Integrations](#available-integrations)[Quick Start](#quick-start)[Contributing](#contributing-a-new-integration)[AgentMesh Core](https://github.com/microsoft/agent-governance-toolkit)
22+
23+
</div>
24+
25+
---
26+
27+
## Why a Separate Repo?
28+
29+
AgentMesh core is a lean, zero-external-dependency library. Platform integrations live here because they:
30+
31+
- **Have their own dependencies** — Dify, LangChain, Nostr libraries shouldn't bloat the core
32+
- **Release independently** — A Dify plugin update shouldn't require a core release
33+
- **Accept community contributions** — Lower barrier than modifying core
34+
35+
> **Note:** Framework adapters that wrap agent frameworks with governance (LangChain, CrewAI, LlamaIndex) live inside [Agent OS](https://github.com/microsoft/agent-governance-toolkit/tree/main/src/agent_os/integrations) because they are tightly coupled to the kernel. This repo contains platform-specific *plugins* and external *trust providers*.
36+
37+
## Available Integrations
38+
39+
| Integration | Package | Status | Description |
40+
|---|---|---|---|
41+
| [LangChain](langchain-agentmesh/) | `langchain-agentmesh` | ✅ Stable | Ed25519 identity, trust-gated tools, scope chains, callbacks |
42+
| [LangGraph](langgraph-trust/) | [`langgraph-trust`](https://pypi.org/project/langgraph-trust/) | ✅ Published (PyPI) | Trust-gated checkpoint nodes, governance policy enforcement, trust-aware routing |
43+
| [LlamaIndex](llamaindex-agentmesh/) | `llama-index-agent-agentmesh` | ✅ Merged Upstream | Trust-verified workers, identity-aware query engines, scope chains |
44+
| [Agent Lightning](agent-lightning/) || ✅ Merged Upstream | Agent-OS governance adapters, reward shaping, governed RL training |
45+
| [Dify Plugin](dify-plugin/) | `agentmesh-trust-layer` | ✅ Stable | Packaged `.difypkg` with peer verification, step auth, trust scoring |
46+
| [Dify Middleware](dify/) || 📦 Archived | Flask middleware (archived — use the plugin instead) |
47+
| [Moltbook](moltbook/) || ✅ Stable | AgentMesh governance skill for [Moltbook](https://moltbook.com) agent registry |
48+
| [Nostr Web of Trust](nostr-wot/) | `agentmesh-nostr-wot` | 🚧 Scaffold | Trust scoring via [MaximumSats](https://github.com/joelklabo/maximumsats-mcp) NIP-85 WoT |
49+
| [OpenAI Agents](openai-agents-trust/) | [`openai-agents-trust`](https://pypi.org/project/openai-agents-trust/) | ✅ Published (PyPI) | Trust guardrails, policy enforcement, governance hooks, trust-gated handoffs for OpenAI Agents SDK |
50+
| [OpenClaw Skill](openclaw-skill/) | [`agentmesh-governance`](https://clawhub.ai/imran-siddique/agentmesh-governance) | ✅ Published (ClawHub) | Governance skill for [OpenClaw](https://openclaw.im) agents — policy enforcement, trust scoring, Ed25519 DIDs, hash-chain audit |
51+
52+
## Quick Start
53+
54+
### LangChain — Trust-Gated Tool Execution
55+
56+
```bash
57+
pip install langchain-agentmesh
58+
```
59+
60+
```python
61+
from langchain_agentmesh import VerificationIdentity, TrustGatedTool, TrustedToolExecutor
62+
63+
# Generate cryptographic identity (Ed25519)
64+
identity = VerificationIdentity.generate("research-agent", capabilities=["search", "summarize"])
65+
66+
# Wrap any tool with trust requirements
67+
gated_tool = TrustGatedTool(
68+
tool=search_tool,
69+
required_capabilities=["search"],
70+
min_trust_score=0.8,
71+
)
72+
73+
# Execute with automatic identity verification
74+
executor = TrustedToolExecutor(identity=identity)
75+
result = executor.invoke(gated_tool, "query")
76+
```
77+
78+
### Dify Plugin — Trust Verification in Workflows
79+
80+
1. Download `agentmesh-trust-layer.difypkg` from [`dify-plugin/`](dify-plugin/)
81+
2. Upload via **Settings → Plugins → Install from Package** in Dify
82+
3. Use the trust tools in your workflows:
83+
- **Verify Peer Agent** — Check identity before trusting data
84+
- **Verify Workflow Step** — Authorize each step by capability
85+
- **Record Interaction** — Update trust scores after collaboration
86+
- **Get Agent Identity** — Share your DID with other agents
87+
88+
### Nostr Web of Trust — Decentralized Trust Scoring
89+
90+
```bash
91+
pip install agentmesh-nostr-wot
92+
```
93+
94+
```python
95+
from agentmesh.trust import TrustEngine
96+
from agentmesh_nostr_wot import NostrWoTProvider
97+
98+
# Bridge Nostr WoT scores into AgentMesh trust engine
99+
provider = NostrWoTProvider(wot_api="https://wot.klabo.world")
100+
engine = TrustEngine(external_providers=[provider])
101+
102+
# Composite score: AgentMesh verification + Nostr WoT
103+
score = await engine.get_trust_score("agent-123")
104+
```
105+
106+
---
107+
108+
## Architecture
109+
110+
```
111+
agentmesh (core library) agentmesh-integrations (this repo)
112+
┌──────────────────────┐ ┌─────────────────────────────────┐
113+
│ TrustProvider │◄─implements─│ NostrWoTProvider │
114+
│ VerificationIdentity │◄─uses───────│ LangChain identity.py │
115+
│ TrustEngine │◄─extends────│ Dify trust_manager.py │
116+
│ TransportLayer │◄─implements─│ (future: NATS, gRPC, etc.) │
117+
│ StorageProvider │◄─implements─│ (future: Redis, Postgres, etc.)│
118+
└──────────────────────┘ └─────────────────────────────────┘
119+
120+
Depends on agentmesh core.
121+
Core NEVER imports from here.
122+
```
123+
124+
### Where Do Integrations Live?
125+
126+
| Type | Location | Example |
127+
|---|---|---|
128+
| **Framework adapters** (wrap agent frameworks with governance) | [Agent OS `integrations/`](https://github.com/microsoft/agent-governance-toolkit/tree/main/src/agent_os/integrations) | LangChainKernel, CrewAIKernel |
129+
| **Ecosystem bridges** (connect sibling projects) | [Agent SRE `integrations/`](https://github.com/microsoft/agent-governance-toolkit/tree/main/src/agent_sre/integrations) | Agent OS bridge, AgentMesh bridge |
130+
| **Platform plugins & trust providers** | **This repo** | Dify plugin, Nostr WoT, Moltbook |
131+
132+
---
133+
134+
## Contributing a New Integration
135+
136+
1. Create a directory: `your-integration/`
137+
2. Implement the relevant AgentMesh interface (e.g., `TrustProvider`)
138+
3. Include: `pyproject.toml`, `README.md`, `tests/`, and a working example
139+
4. Open a PR — maintainers will review and help you get it published
140+
141+
### Directory Structure
142+
143+
```
144+
your-integration/
145+
├── agentmesh_your_integration/
146+
│ ├── __init__.py
147+
│ └── provider.py # Implements AgentMesh interface
148+
├── tests/
149+
│ └── test_provider.py
150+
├── pyproject.toml # pip install agentmesh-your-integration
151+
├── README.md
152+
└── examples/
153+
└── basic_usage.py
154+
```
155+
156+
### Interface Contract
157+
158+
All trust providers must implement:
159+
160+
```python
161+
from agentmesh.trust import TrustProvider
162+
163+
class YourProvider(TrustProvider):
164+
async def get_trust_score(self, agent_id: str) -> float:
165+
"""Return trust score between 0.0 and 1.0"""
166+
...
167+
168+
async def verify_identity(self, agent_id: str, credentials: dict) -> bool:
169+
"""Verify agent identity via your system"""
170+
...
171+
```
172+
173+
### Integration Ideas We'd Love to See
174+
175+
- **Redis/PostgreSQL storage** — Persistent trust scores and audit logs
176+
- **NATS/gRPC transport** — High-performance agent-to-agent messaging
177+
- **OpenAI Agents SDK** — Trust-gated function calling for OpenAI agents
178+
- **Autogen** — Trust verification in multi-agent conversations
179+
- **A2A Protocol** — Google's Agent-to-Agent protocol bridge
180+
181+
---
182+
183+
## License
184+
185+
MIT — same as AgentMesh core.
186+
187+
---
188+
189+
<div align="center">
190+
191+
**Trust is the foundation. These integrations bring it to your platform.**
192+
193+
[AgentMesh](https://github.com/microsoft/agent-governance-toolkit) · [Agent OS](https://github.com/microsoft/agent-governance-toolkit) · [Agent SRE](https://github.com/microsoft/agent-governance-toolkit)
194+
195+
</div>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# A2A AgentMesh
2+
3+
A2A protocol bridge for AgentMesh — trust-verified agent-to-agent communication via the [A2A standard](https://a2a-protocol.org/).
4+
5+
## Features
6+
7+
- **AgentCard**: Convert AgentMesh identities to A2A-compliant discovery cards
8+
- **TaskEnvelope**: Trust-verified task lifecycle (submitted → working → complete/failed)
9+
- **TrustGate**: Policy enforcement for A2A task negotiations (trust scores, rate limits, DID allow/deny)
10+
11+
## Quick Start
12+
13+
```python
14+
from a2a_agentmesh import AgentCard, TaskEnvelope, TrustGate, TrustPolicy
15+
16+
# Publish your agent as an A2A card
17+
card = AgentCard.from_identity(
18+
did="did:mesh:my-agent",
19+
name="TranslationAgent",
20+
capabilities=["translate", "summarize"],
21+
trust_score=800,
22+
)
23+
24+
# Create a trust-verified task
25+
task = TaskEnvelope.create(
26+
skill_id="translate",
27+
source_did="did:mesh:requester",
28+
target_did=card.agent_did,
29+
source_trust_score=600,
30+
input_text="Translate 'hello' to Spanish",
31+
)
32+
33+
# Gate the request
34+
gate = TrustGate(TrustPolicy(min_trust_score=500))
35+
result = gate.evaluate(task)
36+
assert result.allowed
37+
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
a2a-agentmesh: A2A Protocol Bridge for AgentMesh
3+
=================================================
4+
5+
Maps AgentMesh identities and trust verification to the
6+
Google A2A (Agent-to-Agent) protocol standard.
7+
8+
Components:
9+
- AgentCard: A2A-compliant agent discovery cards
10+
- TaskEnvelope: Trust-verified task request/response wrappers
11+
- TrustGate: Policy enforcement for A2A task negotiations
12+
"""
13+
14+
from a2a_agentmesh.agent_card import AgentCard, AgentSkill
15+
from a2a_agentmesh.task import (
16+
TaskEnvelope,
17+
TaskState,
18+
TaskMessage,
19+
)
20+
from a2a_agentmesh.trust_gate import TrustGate, TrustPolicy, TrustResult
21+
22+
__all__ = [
23+
"AgentCard",
24+
"AgentSkill",
25+
"TaskEnvelope",
26+
"TaskState",
27+
"TaskMessage",
28+
"TrustGate",
29+
"TrustPolicy",
30+
"TrustResult",
31+
]

0 commit comments

Comments
 (0)