Secure agent coordination infrastructure for multi-agent AI teams — works with LangGraph, CrewAI, AutoGen, OpenClaw, or any HTTP client.
For engineers: Semantic mesh layer built on NATS + Oxigraph — TLS + Ed25519 signed envelopes, SPARQL routing, JSON-LD/CRDT bridge, W3C PROV-O provenance, and AI framework adapters. 📖 Plain English Wiki
When your AI agents need to coordinate, they typically do it through the LLM — which is slow (2–10 seconds per hop), burns tokens, and drops around 5% of messages. There is no shared memory, no audit trail, and no way to enforce trust between agents.
Meshpocalypse fixes this. Drop it into any agent framework — LangGraph, CrewAI, AutoGen, or plain HTTP — and your agents get a shared SPARQL knowledge graph, direct NATS messaging, deterministic routing, and a tamper-proof W3C PROV-O audit trail. It is infrastructure, not a framework: it sits underneath your orchestration layer, not instead of it.
| Capability | Before (LLM round-trip) | After (Meshpocalypse) |
|---|---|---|
| Agent-to-agent messaging | 2–10s, 1K–3K tokens | Direct via NATS (sub-100ms; see benchmarks/) |
| Shared knowledge | Each agent isolated | Live SPARQL graph shared across all agents |
| Finding the right agent | LLM guesses | Deterministic SPARQL query in milliseconds |
| Trust enforcement | None | 5-level ATF framework with SHACL validation |
| Message delivery guarantee | ~95% | >99.9% with ACK + retry + circuit breaker |
| Audit trail | None | W3C PROV-O tamper-evident chain |
| Transport security | Plaintext | TLS + Ed25519 signed envelopes |
Benchmark figures are measured on GCP arm64 hardware and reproduced via bash benchmarks/run.sh. See benchmarks/RESULTS.md for methodology and raw numbers.
| Component | Status |
|---|---|
| NATS transport + Oxigraph SPARQL graph | ✅ Production-ready |
| Security layer (TLS, Ed25519, CRDT signing, CF JWT) | ✅ Production-ready (v1.4.0) |
| HTTP/REST Gateway, SwarmNode API | ✅ Production-ready (v1.3.0) |
| LangGraph / CrewAI / AutoGen adapters | ✅ Stable |
Python SDK (meshpocalypse) |
✅ Stable |
mesh CLI (setup, doctor, config, keys, services) |
✅ Stable |
Local observability stack (--profile observability) |
✅ Stable |
| Cloudflare Durable Objects cloud tier | 🔧 Architecture designed; not fully implemented |
🎉 v1.4.1 Released — 2026-03-13 — platform packages (mesh-manifest, mesh-runtime, mesh-tenancy, mesh-rate-limit), reproducible benchmark harness, docs cleanup, repo restructure.
git clone https://github.com/one137th/Meshpocalypse
cd Meshpocalypse
docker compose up
This starts the full local dev stack: mesh-node, NATS (message broker, port 4222), and Oxigraph (SPARQL knowledge graph, port 7878). Copy .env.example → .env before first run if you need custom settings.
Windows users: If git shows an "unsafe directory" error, run:
git config --global --add safe.directory C:/path/to/Meshpocalypse
For a guided startup that also loads the core ontology automatically, use the platform script:
| Platform | Command |
|---|---|
| Linux/macOS | ./scripts/start-local.sh |
| Windows | .\scripts\start-local.bat |
| Full stack incl. Grafana | docker compose up -d (run npm run setup first for credentials) |
| Full + observability UI | docker compose --profile observability up -d |
npm install @one137th/mesh
Four lines of TypeScript. Works with any framework that can call Node.js or HTTP:
import { SwarmNode } from '@one137th/mesh';
const node = new SwarmNode({ agentId: 'my-agent', capabilities: ['summarise', 'search'] });
await node.connect();
await node.publish('task.result', { result: 'done' });
const peers = await node.discoverCapability('search');
await node.disconnect();
Python SDK:
from meshpocalypse import SwarmNode, SwarmNodeConfig
config = SwarmNodeConfig(agent_id="my-agent", capabilities=["summarise", "search"])
async with SwarmNode(config) as node:
await node.publish("task.result", {"result": "done"})
peers = await node.discover_capability("search")
Node.js ≥ 20 required. See docs/integrations/python.md for the Python SDK.
| Framework | Guide | Adapter import |
|---|---|---|
| LangGraph | docs/getting-started/langgraph.md | @one137th/mesh/adapters/langgraph |
| CrewAI | docs/getting-started/crewai.md | @one137th/mesh/adapters/crewai |
| AutoGen | docs/getting-started/autogen.md | @one137th/mesh/adapters/autogen |
| HTTP/REST | docs/getting-started/http-rest.md | Any HTTP client |
| OpenClaw | docs/getting-started/openclaw.md | @one137th/mesh (first-class) |
Three components work together:
NATS — the real-time message broker. Every agent message flows through here. It guarantees delivery, retries on failure, and routes to the right agent without involving the LLM.
Oxigraph — the shared knowledge graph. Stores facts about your agents as RDF triples: their capabilities, current status, trust level, and action history. Agents query this with SPARQL to make routing decisions in milliseconds.
The Semantic Layer — sits on top of NATS and Oxigraph and adds a security layer, SPARQL routing, a shared CRDT team task board, a W3C PROV-O audit trail, a 5-level trust framework, and MCP tool exposure for AI frameworks.
+-----------------------------------------------------------+
| AGENT LAYER |
| LangGraph · CrewAI · AutoGen · OpenClaw · HTTP clients |
+-----------------------------------------------------------+
|
+-----------------------------------------------------------+
| SEMANTIC LAYER (this package) |
| SemanticModule · MeshGraph · SPARQL Optimizer |
| JSON-LD Bridge · PROV-O Provenance · ATF Trust · MCP |
+-----------------------------------------------------------+
|
+-----------------------------------------------------------+
| SECURITY LAYER (v1.4.0) |
| TLS (NATS_TLS_MODE) · Subject Validation |
| From-Field Verification · Ed25519 Envelope Signing |
| CRDT Signing · CF JWT Validation |
+-----------------------------------------------------------+
|
+-----------------------------------------------------------+
| CORE MESH (@one137th/mesh) |
| MeshNode · NATS Transport · Routing · Circuit Breaker |
+-----------------------------------------------------------+
Normal operation: Agent → NATS Broker → Agent (sub-100ms; see benchmarks/) Broker unavailable: Agent → Cloudflare Durable Object (buffer + recovery) ⚠️ architecture designed; additional implementation work required
All features are off by default — enable only what you need via .env.
Production deployments must set NATS_TLS_MODE=STRICT, MESH_SIGNATURE_ENFORCEMENT=strict, and MESH_CRDT_SIGNING=true.
→ Full reference: docs/reference/feature-flags.md
| Section | What's in it |
|---|---|
| docs/getting-started/ | Framework-specific setup guides (LangGraph, CrewAI, AutoGen, OpenClaw, HTTP) |
| docs/guides/ | Architecture, deployment, observability, security, troubleshooting, examples |
| docs/integrations/ | Cloudflare, HTTP Gateway, MCP, OpenTelemetry, Python SDK, Semantic Kernel |
| docs/reference/ | API, configuration, job protocol, feature flags, persistence, exports |
| docs/decisions/ | Architecture Decision Records (ADRs) |
| benchmarks/ | Reproducible benchmark harness and results |
| specs/ | Wire protocol, routing, discovery, delivery, and shared-state specs |
npm ci
npm run type-check
npm test
| Script | What |
|---|---|
./scripts/start-local.sh |
Start Oxigraph + NATS via Docker and load ontology |
docker compose up -d |
Start full stack (NATS, Oxigraph, Grafana, Prometheus, OTel, Tempo) |
docker compose --profile observability up -d |
Add local observability UI (mesh-room-local, mesh-monitor) |
npm run dev:semantic:up |
Start Oxigraph + NATS via Docker Compose (manual) |
npm run ontology:load |
Load core ontology into Oxigraph |
npm run ontology:validate |
Validate Turtle syntax (requires Docker) |
npm run test:graph-crdt |
CRDT bridge tests |
npm run test:sparql-routing |
SPARQL routing tests |
npm run test:shacl |
SHACL validation tests |
npm run test:provenance |
Provenance chain tests |
npm run benchmark:routing |
Routing latency benchmark |
Ontology: packages/core/src/knowledge/ontology/meshpocalypse-core-ontology.ttl · SHACL: packages/core/src/knowledge/ontology/shacl-shapes.ttl · JSON-LD: packages/core/src/knowledge/ontology/json-ld-context.jsonld
FSL-1.1-ALv2 © 137th Consulting