-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started Core Concepts
AgentMesh separates workflow execution into two planes: the Python Data Plane (where LLM calls and domain logic reside) and the C++ Control Plane (where graph topology, wave scheduling, barrier synchronization, and state snapshots are processed).
+------------------------------------------------------------------------+
| PYTHON DATA PLANE |
| LangGraph StateGraph / Agent Functions / LLM Calls (Groq, Gemini) |
+-----------------------------------+------------------------------------+
| (Zero-Copy Pybind11 FFI)
+-----------------------------------v------------------------------------+
| AGENTMESH C++ CONTROL PLANE |
| |
| +------------------------+ +-------------------------------+ |
| | WorkflowGraph | | PriorityReadyQueue | |
| | - Spec Graph (DAG) |<------->| - Priority DESC / FIFO Tie | |
| | - Dynamic Trace Nodes | | - Lock-Free Synchronized | |
| +-----------+------------+ +---------------+---------------+ |
| | | |
| v v |
| +------------------------+ +-------------------------------+ |
| | Scheduler (O(1) Engine|<------->| AsyncEventDispatcher | |
| | - Atomic In-Degrees | | - LocalWorkerPool | |
| | - Dynamic Unrolling | | - Non-Blocking Timers | |
| +-----------+------------+ +-------------------------------+ |
| | |
| v |
| +------------------------------------------------------------------+ |
| | State Repository (PostgresStateRepository / RAM) | |
| | - Transactional Snapshots & Crash Recovery in <5ms | |
| +------------------------------------------------------------------+ |
+------------------------------------------------------------------------+
Instead of sequentially walking edges in Python, AgentMesh calculates independent topological frontiers called Waves:
-
Wave 0: Entry nodes (
__start__). - Wave 1: Parallel branch nodes (e.g. 8 specialist agents).
- Wave 2: Barrier join aggregator.
When a wave contains multiple nodes, AgentMesh releases the CPython Global Interpreter Lock (GIL) and dispatches them across a C++ thread pool.
In typical DAG schedulers, joining
When node PriorityReadyQueue in
Channels in AgentMesh represent managed state keys. When multiple nodes in a wave emit updates to the same channel, AgentMesh merges them deterministically using registered binary operator reducers:
Supported reducers include:
-
operator.addfor lists and integers. - Custom binary lambdas
lambda old, new: .... - Default dictionary overwrite semantics for non-reduced fields.
AgentMesh maintains a dual-tier graph model:
- Static Spec Graph: The immutable definition containing node callables, static edges, and branch predicates.
-
Dynamic Trace Graph: An append-only execution history unrolled at runtime, supporting cycles, reflection loops, and dynamically spawned tasks (
Send()) without mutating the base template.\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