-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Devrajsinh Gohil edited this page Aug 30, 2026
·
2 revisions
AgentMesh is an industrial-grade execution engine for AI agent workflows. Built in C++20 with zero-copy Python interoperability, AgentMesh provides a drop-in replacement for LangGraph runtime execution while delivering up to 1,900x faster node transitions, 95% lower memory footprint, O(1) barrier synchronization, and transaction-safe PostgreSQL crash recovery.
import operator
from typing import TypedDict, Annotated, List
from langgraph.graph import StateGraph
import agentmesh_adapter
# 1. Define your standard LangGraph state and workflow
class AgentState(TypedDict):
messages: Annotated[List[str], operator.add]
summary: str
builder = StateGraph(AgentState)
builder.add_node("researcher", lambda s: {"messages": ["Found market trend A"]})
builder.add_node("analyst", lambda s: {"messages": ["Synthesized trend A"], "summary": "Bullish"})
builder.add_edge("__start__", "researcher")
builder.add_edge("researcher", "analyst")
builder.add_edge("analyst", "__end__")
# 2. Compile directly onto bare-metal C++20 Engine
app = agentmesh_adapter.compile(builder)
# 3. Execute with standard invoke / ainvoke / stream API
result = app.invoke({"messages": [], "summary": ""})
print(result)| Metric | LangGraph Native | AgentMesh Engine | Advantage |
|---|---|---|---|
| In-Memory Hop Latency | 3.80 ms / hop | 0.002 ms / hop | 1,900x faster |
| Diamond Barrier Join | 15.60 ms | 0.012 ms | 1,300x faster |
| Memory Footprint (100 graphs) | 240.0 MB | 12.0 MB | 95% memory reduction |
| Crash Recovery Time | Process loss / Unrecoverable | 4.8 ms | Zero in-flight state loss |
| Parallel Fan-Out (N=50) | 197.88 ms | 187.97 ms | t = 9.78, p < 0.001 (90% Win Rate) |
| P95 Tail Latency (Cloud Groq) | 8,518.31 ms | 7,628.35 ms | +889.96 ms (+10.4% lower jitter) |
-
Full LangGraph API Parity: Drop-in support for
TypedDictAnnotated reducers,Send()dynamic map-reduce,Command(goto=..., update=...), multi-target conditional fan-out, subgraphs, and async streaming. - O(1) Atomic Barrier Synchronization: Eliminates polling loops and locks when joining parallel execution branches.
- Socket-Level Concurrency: Dispatches parallel LLM API calls with zero GIL contention across worker threads.
- Dynamic Unrolling: Handles cyclic reflection loops and dynamic runtime spawns without pre-compiling execution traces.
- ACID Crash Recovery: PostgreSQL WAL snapshots restore interrupted workflows in under 5ms with deterministic state resumption.
- Getting Started: Installation | Quickstart | Core Concepts
- How-To Guides: Compile a Graph | Annotated Reducers | Parallel Fanout | Send() Map-Reduce | Command() Routing | Nested Subgraphs | Async & Streaming | Checkpointing & State | Financial Swarm Example
- Architecture: System Overview | C++ Engine Internals | O(1) Scheduler | Dual-Tier Graph | Persistence & WAL | Zero-Copy Pybind Bridge | SOLID Design Principles
- API Reference: agentmesh_adapter | agentmesh_core | LangGraph Parity Matrix
- Benchmarks: Methodology | Results Matrix | Reproducing Results
- Contributing: Development Setup | Adding Tests\n
Getting Started
How-To Guides
- Compile a Graph
- Annotated Reducers
- Parallel Fanout
- Send() Map-Reduce
- Command() Routing
- Nested Subgraphs
- Async & Streaming
- Checkpointing & State
- Financial Swarm Example
Architecture
- System Overview
- C++ Engine Internals
- O(1) Scheduler
- Dual-Tier Graph
- Persistence & WAL
- Zero-Copy Pybind Bridge
- SOLID Design Principles
API Reference
Benchmarks
Contributing