Skip to main content

🍄 Mycelium Agents

The Semantic Edge Routing Protocol for Agentic Workflows

CI State PyPI Version NPM Version Python Version License

Scale Tests Security Protocol

▶ Live Dashboard • Technical Report • Benchmarks

Mycelium Semantic Edge Routing Demo

Bypass the 2000ms Cloud LLM Routing Tax. Scale your agentic architecture from 5 to 100,000 specialized tools with sub-10ms intent discovery and zero prompt drift.


⚡ Why Mycelium? (The LLM Routing Bottleneck)

Modern agentic systems suffer from a severe architectural bottleneck: Tool Discovery & Routing.

As swarms grow, relying on Cloud LLMs (e.g. GPT-4) to pick tools or route intents introduces:

  • Massive Latency: ~2,000ms latency tax per routing hop.
  • Exorbitant API Costs: Paying LLM token rates just to decide which function to execute.
  • Prompt Drift Failures: Hardcoded if/else logic or lexical keyword matching breaks when user intent varies.

The Solution: Semantic Edge Routing

Mycelium is a decentralized, high-performance Semantic Edge Routing Protocol. Powered by a local ChromaDB Vector-Mesh and all-MiniLM-L6-v2 embeddings via FastAPI, Mycelium resolves natural language intents to specialized agent endpoints in <10ms locally—with $0 Cloud LLM cost and zero prompt drift.

User Intent ───▶ [ MYCELIUM SEMANTIC EDGE ROUTER ] ───▶ Specialized Agent Node
                         ⚡ <10ms Cold Discovery
                         💰 $0.00 Routing Cost
                         🎯 70.7% Intent Accuracy (100k Scale)

📊 Audited Performance Benchmarks (v0.3.0)

Evaluated across a massive, highly noisy synthetic corpus of 100,000 indexed agent nodes:

Metric Lexical (BM25) Mycelium (Semantic Edge) Impact
Top-1 Intent Accuracy 40.4% 70.7% +30.3% Absolute Accuracy Gain 🎯
Avg Cold Discovery Latency 194.0 ms <9.6 ms 20x Faster Discovery ⚡
P95 Latency 247.2 ms 11.4 ms Sub-15ms Deterministic Bound 🔒
3-Hop Autonomous Chain ~6,000 ms (Cloud LLM) 36.25 ms (Mycelium Native) 165x Latency Reduction 🚀
Single-Node Throughput N/A 130+ req/sec Rock Solid Stability (0.0% Errors) 🟢

Detailed methodology and reproduction scripts available in our Benchmarks Ledger.


🛠️ Multi-Ecosystem SDKs & Quick Start

Mycelium provides native, drop-in SDKs for both Python and JavaScript ecosystems.

1. Installation

Python (Backend & Frameworks):

pip install mycelium-agents

JavaScript / TypeScript (Node.js & Edge Runtimes):

npm install mycelium-js

2. Boot the Neural Registry Server

python -m server.app

3. Discover & Route Semantically

Python (mycelium-agents + LangChain Adapter):

from mycelium.integrations.langchain import MyceliumLangChainAdapter
from mycelium import NetworkClient

# Initialize authenticated client
client = NetworkClient(
    registry_url="http://localhost:8000",
    api_key="mycelium_secret_key_2026"
)

# Sub-10ms Semantic Vector Discovery
agents = client.discover("Convert 100 USD to Euros", semantic=True)
print(f"Routed to: {agents[0].name} (Latency: {agents[0]._latency_ms}ms)")

JavaScript / TypeScript (mycelium-js):

import { MyceliumClient } from 'mycelium-js';

const client = new MyceliumClient({
  registryUrl: 'http://localhost:8000',
  apiKey: 'mycelium_secret_key_2026'
});

// Semantic Discovery with 0 keyword overlap
const node = await client.discover("What is the current market price of Bitcoin?");
console.log(`Routed Node: ${node.name} | Confidence: ${node._similarity_score * 100}%`);

🛡️ Enterprise Security Layer (OWASP ASI06 Defense)

Autonomous agentic routing requires strict zero-trust boundaries. Mycelium enforces defense-in-depth at the network layer:

  • Enterprise Access Moat (X-Mycelium-API-Key): Enforces authorized header validation on all discovery, registration, and management endpoints.
  • HMAC-SHA256 Payload Signing: Prevents agent spoofing and tampering during inter-agent message relaying.
  • Least-Privilege Routing (LPR): Agents expose granular atomic capabilities (get_weather, swap_currency) rather than blanket execution scopes.
  • Rate-Limitation Guard: DDoS protection stopping recursive agent call cascades ("Agent Storms").

🔌 Anthropic MCP & HOL Guard (Human-On-The-Loop)

Mycelium natively bridges with Anthropic's Model Context Protocol (MCP), resolving tool bloat and preventing rogue autonomous agent behavior:

  • Sub-15ms MCP Routing: Bypasses LLM prompt bloat by discovering tools locally via semantic vector search before touching an LLM.
  • Automated HOL Quarantine: Dynamically inspects tool intents:
    • READ_ONLY intents (e.g. checks, summaries) auto-execute in <15ms.
    • MUTATING intents (e.g. transfers, deletions, write ops) are immediately quarantined and require human cryptographic authorization before execution.
from examples.integrations.anthropic_mcp_bridge import MyceliumMCPBridge

bridge = MyceliumMCPBridge()

# 1. Read-only intent -> Auto-executed in 13ms
res = bridge.dispatch_mcp_call("What is the temperature and humidity right now?", mcp_tools)

# 2. Mutating action -> Intercepted and quarantined by HOL Guard
res = bridge.dispatch_mcp_call("Please transfer 250 dollars to contractor wallet", mcp_tools)
# Result: ⚠️ HOL GUARD TRIGGERED -> Human authorization required before execution

## 🏗️ Protocol Architecture & Topology

```text
┌────────────────────────────────────────────────────────────────────────┐
│                   MYCELIUM SEMANTIC EDGE ROUTER                       │
│                                                                        │
│  ┌──────────────┐     ⚡ Sub-10ms Discovery     ┌──────────────┐      │
│  │ Agent Node A │ ───▶ [ ChromaDB Vector-Mesh ] ◀─── │ Agent Node B │      │
│  │ (FinTech)    │      [  all-MiniLM-L6-v2   ]      │ (Translator) │      │
│  └──────┬───────┘                                   └──────┬───────┘      │
│         │                                                  │              │
│         │ 🔒 Authenticated Direct Comms (HMAC-SHA256)       │              │
│         └──────────────────────────────────────────────────┘              │
│                                                                        │
│                  📡 WebSocket Nervous System Stream                   │
└────────────────────────────────────────────────────────────────────────┘

🌍 Pre-Built Real-World Agents

Mycelium includes 5 production-ready agent nodes interacting with live APIs out of the box:

Node Domain Capability Live API
🌤️ RealWeather Weather Live temperature & forecast OpenWeatherMap
💰 CryptoTracker Finance Live crypto asset pricing CoinGecko
🌐 RealTranslator Translation Natural language translation MyMemory
📖 WikiBrain Knowledge Wikipedia semantic query Wikipedia
💱 CurrencyMaster Forex Live currency exchange rates ExchangeRate API

Run Automated Multi-Agent Chain Demo:

python scripts/real_world_demo.py

🎬 Watch the Demo

https://github.com/user-attachments/assets/2a228337-80f5-479d-8b03-02597ccdc5ef


🗺️ Roadmap & Protocol Evolution

  • v0.1.0 — Core Networking Protocol & Direct Messaging Relay.
  • v0.2.0 — Local Vector-Mesh Semantic Discovery (ChromaDB + embeddings).
  • v0.3.0 (Current) — Enterprise Security Layer (API Keys + HMAC Signing), JavaScript SDK (mycelium-js), LangChain Integration, Live WebSocket Nervous System.
  • v0.4.0 — Multi-Region Registry Federation & Distributed Edge Consensus.
  • v1.0.0 — On-Chain Agent Identity Verification & Automated Trust Settlements.

📜 License & Community

Released under the MIT License. Built with ❤️ for open agentic infrastructure.

Release files for mycelium-agents 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mycelium-agents 0.3.2
File Size Uploaded
mycelium_agents-0.3.2.tar.gz 29.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mycelium-agents 0.3.2
File Interpreter ABI Platform
mycelium_agents-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 56.1 kB

Release files / mycelium_agents-0.3.2.tar.gz

Download URL mycelium_agents-0.3.2.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a6a7d7f9b12c89b04c1c4ad0d1755a0f91ede67c801074fe8ada11265649553c
BLAKE2b-256 checksum
How to use checksums
19c4f302c584d0f6398fb44c75abdc50eb5d3ee018d2f9aa163ce0192835053d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / mycelium_agents-0.3.2-py3-none-any.whl

Download URL mycelium_agents-0.3.2-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1168acf09cf2a26ea3f2afc73120f6f2c68dde73f83fc948be91b02ffc471777
BLAKE2b-256 checksum
How to use checksums
69937e4a90399e4905fe2377e8a0f850b81a949f061e10d1ebccb5ad0ab1ca37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page