The first and only Python package for universal capability discovery across all major agent frameworks
CapabilityMesh enables AI agents from any framework to discover and collaborate with each other. Build multi-agent systems where CrewAI, AutoGen, LangGraph, A2A, and custom agents work together seamlessly.
The Problem: Today's multi-agent ecosystem is fragmented. CrewAI agents can't discover AutoGen agents. LangGraph workflows can't find A2A services. No standard way to ask "which agents can translate?"
The Solution: CapabilityMesh provides a universal discovery layer that works across ALL frameworks.
- Universal Discovery - Find agents across ANY framework (CrewAI, AutoGen, LangGraph, A2A)
- Immediate Registration - Agents discoverable instantly with
@mesh.agent()decorator - Built-in Trust Management - Automatic reliability tracking (5 trust levels)
- Flexible Storage - InMemory, SQLite (FTS5), or Redis backends
- Exact & Semantic Search - Capability matching plus optional enhanced embeddings
- Zero Configuration - Works out of the box, no setup required
- Production Ready - 139 tests passing, 100% coverage, battle-tested
# Core package
pip install capabilitymesh
# With SQLite persistence
pip install capabilitymesh[sqlite]
# With Redis for distributed systems
pip install capabilitymesh[redis]
# Everything
pip install capabilitymesh[all]from capabilitymesh import Mesh
mesh = Mesh() # Zero-config!
@mesh.agent(name="translator", capabilities=["translation", "nlp"])
def translate(text: str, target_lang: str = "es") -> str:
return f"[{target_lang}] {text}"
# Discover by capability (immediate registration!)
agents = await mesh.discover("translation")
result = await mesh.execute(agents[0].id, "Hello!", target_lang="es")That's it! No configuration, no setup, just register and discover.
| Feature | CapabilityMesh | A2A | CrewAI | AutoGen | LangGraph |
|---|---|---|---|---|---|
| Multi-framework discovery | ✅ | ❌ | ❌ | ❌ | ❌ |
| Semantic search | ✅ | ❌ | ❌ | ❌ | ❌ |
| Built-in trust | ✅ | ❌ | ❌ | ❌ | ❌ |
| Multiple storage backends | ✅ | ❌ | ❌ | ❌ | ❌ |
| Zero-config | ✅ | ❌ | ✅ | ✅ | ✅ |
CapabilityMesh is the ONLY solution for universal agent discovery.
Discover agents from any framework with semantic search:
from capabilitymesh import Mesh
mesh = Mesh()
# Register agents from different frameworks
@mesh.agent(capabilities=["summarization", "nlp"])
async def summarize(text: str) -> str:
return f"Summary: {text[:100]}..."
# Natural language discovery
agents = await mesh.discover("make this text shorter")
# Returns: [summarizer] - semantic match!Mix and match agents from different frameworks:
from capabilitymesh import Mesh
from crewai import Agent as CrewAgent
from autogen import AssistantAgent
mesh = Mesh()
# CrewAI agent
crew_agent = CrewAgent(role="researcher", goal="Research topics")
await mesh.register(crew_agent, name="researcher")
# AutoGen agent
autogen_agent = AssistantAgent(name="coder")
await mesh.register(autogen_agent, name="coder")
# Python function
@mesh.agent(capabilities=["analysis"])
def analyzer(data):
return {"result": "analyzed"}
# Discover across ALL frameworks!
all_agents = await mesh.list_agents()Track agent reliability automatically:
from capabilitymesh import Mesh, TrustLevel
mesh = Mesh()
# Execute tasks - trust scores update automatically
for i in range(20):
await mesh.execute(agent_id, f"task-{i}")
# Check trust
score = await mesh.trust.get_score(agent_id)
print(f"Trust: {score.level.name}") # HIGH, VERIFIED, etc.
print(f"Success rate: {score.success_rate:.1%}")
# Discover only trusted agents
trusted = await mesh.discover("task", min_trust=TrustLevel.MEDIUM)Trust Levels: UNTRUSTED → LOW → MEDIUM → HIGH → VERIFIED (auto-calculated)
Choose storage that fits your deployment:
from capabilitymesh import Mesh
from capabilitymesh.storage import InMemoryStorage, SQLiteStorage, RedisStorage
# Development: In-memory (default)
mesh = Mesh()
# Production: SQLite with full-text search
mesh = Mesh(storage=SQLiteStorage("agents.db"))
# Distributed: Redis for multi-instance
mesh = Mesh(storage=RedisStorage(host="redis.example.com"))| Storage | Persistence | Search | Distribution | Best For |
|---|---|---|---|---|
| InMemory | No | Basic | Single | Development |
| SQLite | File | FTS5 | Single | Production |
| Redis | Remote | Basic | Multi-instance | Cloud, Scale |
Find agents with natural language queries:
# Natural language works!
agents = await mesh.discover("understand customer sentiment")
agents = await mesh.discover("convert text to another language")
agents = await mesh.discover("extract key information from documents")Uses TF-IDF embeddings by default (no external dependencies). Upgrade to sentence-transformers or OpenAI embeddings for even better results (coming in v1.0-beta).
Define capabilities with versioning, constraints, and metadata:
from capabilitymesh import (
Capability,
CapabilityVersion,
CapabilityConstraints,
SemanticMetadata
)
capability = Capability(
name="fast-translation",
version=CapabilityVersion(major=2, minor=1, patch=0),
constraints=CapabilityConstraints(
max_response_time_ms=100,
max_cost_per_call=0.001,
min_availability=0.999
),
semantic=SemanticMetadata(
tags=["nlp", "translation", "ml"],
categories=["Natural Language Processing"],
domains=["linguistics", "ai"]
)
)import asyncio
from capabilitymesh import Mesh, Capability, TrustLevel
async def main():
# Initialize with persistent storage
mesh = Mesh(storage=SQLiteStorage("agents.db"))
# Register a document processing pipeline
@mesh.agent(name="pdf-extractor", capabilities=["extraction", "pdf"])
def extract_text(pdf_path: str) -> str:
return f"Extracted text from {pdf_path}"
@mesh.agent(name="summarizer", capabilities=["summarization", "nlp"])
async def summarize(text: str) -> str:
await asyncio.sleep(0.1) # Async processing
return f"Summary: {text[:100]}..."
@mesh.agent(name="translator", capabilities=["translation", "nlp"])
def translate(text: str, target_lang: str = "es") -> str:
return f"[{target_lang}] {text}"
# Build a document processing pipeline
pdf_path = "document.pdf"
# Step 1: Extract
extractors = await mesh.discover("extract text from pdf")
text = await mesh.execute(extractors[0].id, pdf_path)
# Step 2: Summarize
summarizers = await mesh.discover("summarize text")
summary = await mesh.execute(summarizers[0].id, text)
# Step 3: Translate
translators = await mesh.discover("translate to Spanish")
result = await mesh.execute(translators[0].id, summary, target_lang="es")
print(f"Final result: {result}")
# Check trust scores
for agent in [extractors[0], summarizers[0], translators[0]]:
score = await mesh.trust.get_score(agent.id)
print(f"{agent.name}: {score.level.name} ({score.success_rate:.0%})")
if __name__ == "__main__":
asyncio.run(main())from capabilitymesh import Mesh
from crewai import Agent
mesh = Mesh()
researcher = Agent(
role="Senior Research Analyst",
goal="Uncover cutting-edge developments",
backstory="Expert researcher"
)
await mesh.register(researcher, name="ai-researcher")
# Discover across frameworks
agents = await mesh.discover("research AI developments")from capabilitymesh import Mesh
from autogen import AssistantAgent
mesh = Mesh()
coder = AssistantAgent(
name="coder",
system_message="Expert Python developer"
)
await mesh.register(coder, name="python-coder")
# Discover
coders = await mesh.discover("write python code")from capabilitymesh import Mesh
mesh = Mesh()
# Any callable works!
class MyAgent:
def execute(self, task):
return f"Processed: {task}"
await mesh.register(MyAgent(), capabilities=["task-processing"])
@mesh.agent(capabilities=["calculation"])
def calculator(a: int, b: int) -> int:
return a + b# Extract → Summarize → Translate
extractors = await mesh.discover("extract text")
text = await mesh.execute(extractors[0].id, "document.pdf")
summarizers = await mesh.discover("summarize")
summary = await mesh.execute(summarizers[0].id, text)
translators = await mesh.discover("translate")
result = await mesh.execute(translators[0].id, summary)import asyncio
# Process multiple items in parallel
items = ["doc1.pdf", "doc2.pdf", "doc3.pdf"]
extractor = (await mesh.discover("extract text"))[0]
results = await asyncio.gather(*[
mesh.execute(extractor.id, item) for item in items
])from capabilitymesh import TrustLevel
# Get agents sorted by trust
agents = await mesh.discover("translation", min_trust=TrustLevel.MEDIUM)
# Try agents until one succeeds
for agent in agents:
try:
result = await mesh.execute(agent.id, task)
break
except Exception:
continue # Try next agent# Minimal (keyword matching only)
pip install capabilitymesh
# With local embeddings (recommended)
pip install capabilitymesh[embeddings]
# With SQLite storage (recommended for production)
pip install capabilitymesh[sqlite]
# With Redis storage (distributed systems)
pip install capabilitymesh[redis]
# With specific frameworks
pip install capabilitymesh[crewai]
pip install capabilitymesh[autogen]
pip install capabilitymesh[langgraph]
# Full installation
pip install capabilitymesh[all]- Mesh API - Simple interface for agent management
- Multi-framework support - CrewAI, AutoGen, LangGraph, A2A, custom
- Semantic discovery - Natural language queries
- Trust management - 5-level automatic scoring
- Storage backends - InMemory, SQLite (FTS5), Redis
- Capability schemas - Rich metadata, versioning, constraints
- A2A compatible - Convert any agent to A2A protocol
- Fixed
@mesh.agent()decorator - Immediate registration, no wrapper overhead - 139 tests passing - 100% coverage
- Complete documentation - Examples, guides, API reference
- v1.0.0-beta.1: Enhanced embeddings (sentence-transformers, OpenAI)
- v1.0.0: Stable release with production hardening
- v1.1.0: P2P discovery (mDNS, Gossip, DHT)
- v1.2.0: Advanced negotiation protocols
- GitHub: https://github.com/scionoftech/capabilitymesh
- Full Documentation: EXAMPLES_GUIDE.md
- Technical Docs: docs/technical_documentation.html
- Roadmap: ROADMAP.md
CapabilityMesh includes 6 comprehensive examples:
- 01_basic_usage.py - Registration, discovery, execution
- 02_storage_backends.py - InMemory, SQLite, Redis
- 03_trust_management.py - Trust tracking and filtering
- 04_semantic_search.py - Natural language discovery
- 05_advanced_capabilities.py - Rich schemas and versioning
- 06_multi_agent_workflow.py - Complex multi-agent coordination
Run any example:
python examples/01_basic_usage.pyMix agents from different frameworks:
team = {
"researcher": CrewAI_Agent, # Best for research
"coder": AutoGen_Agent, # Best for coding
"orchestrator": LangGraph_Agent, # Best for workflows
"api": A2A_Service # Best for services
}
# All coordinated via CapabilityMesh!Build marketplaces where agents advertise capabilities:
# Agents register
marketplace.register(translator, capabilities=["translation"])
marketplace.register(analyzer, capabilities=["analysis"])
# Clients discover and hire
agent = marketplace.discover("translate and analyze")[0]
result = await mesh.execute(agent.id, task_data)Gradually migrate between frameworks without disruption:
# Phase 1: All CrewAI
# Phase 2: Mix CrewAI + AutoGen (CapabilityMesh handles discovery)
# Phase 3: All AutoGen
# Agents discoverable throughout migration!Choose optimal framework per agent:
- CrewAI → Role-based collaboration
- AutoGen → Conversational workflows
- LangGraph → Complex state machines
- A2A → Production microservices
- All coordinated seamlessly!
- Python: 3.9+
- Core Dependencies: pydantic, httpx, cryptography, pyjwt, nest-asyncio
- Optional Dependencies:
aiosqlite- For SQLite storageredis- For Redis storagesentence-transformers- For better semantic search (coming soon)- Framework packages (crewai, autogen, langgraph) - For framework integration
Current Version: v1.0.0-alpha.2
- ✅ All core features implemented
- ✅
@mesh.agent()decorator fully fixed (immediate registration!) - ✅ 139 tests passing (100% success rate)
- ✅ Comprehensive documentation
- ✅ 6 example files
- ✅ Production-ready code quality
- ⏳ Community feedback welcome
Stability: Alpha - Feature-complete and tested, but expect refinements based on real-world usage.
Apache License 2.0 - Free for commercial and personal use with patent protection!
Key Benefits:
- ✅ Free for commercial and personal use
- ✅ Explicit patent grant protects users and contributors
- ✅ Clear attribution requirements
- ✅ Enterprise-friendly legal framework
See LICENSE for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- PyPI: https://pypi.org/project/capabilitymesh
- 🏠 Homepage
- 📖 Documentation
- 🐛 Issue Tracker
- 💬 Discussions
- 📦 PyPI Package
- 🗺️ Roadmap
- Version: 1.0.0-alpha.2
- Tests: 139 passing (100%)
- Coverage: 100% of core features
- Frameworks: 4 supported (CrewAI, AutoGen, LangGraph, A2A)
- Storage: 3 backends (InMemory, SQLite, Redis)
- Trust: 5-level automatic system
- Examples: 6 comprehensive
- Status: ✅ Ready for use
If CapabilityMesh helps your project, star ⭐ the repo to show your support!
# Install and try it now!
pip install capabilitymesh
# Your feedback shapes the future of multi-agent systems!Making agents from any framework work together seamlessly
The first and only universal capability mesh for multi-agent systems