-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture Overview
Devrajsinh Gohil edited this page Aug 30, 2026
·
1 revision
AgentMesh is engineered as a decoupled, multi-layered agent execution system following strict SOLID architecture guidelines.
+------------------------------------------------------------------------+
| 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 | |
| +------------------------------------------------------------------+ |
+------------------------------------------------------------------------+
- Single Responsibility (SRP): Each subsystem (Graph, Scheduler, ReadyQueue, Persistence, Dispatcher) has a single clear purpose.
- Open/Closed (OCP): New state backends or load balancing strategies can be added by implementing interfaces without modifying the engine.
-
Liskov Substitution (LSP):
PostgresStateRepositoryandInMemoryStateRepositoryare 100% interchangeable viaIStateRepository. -
Interface Segregation (ISP): Interfaces are strictly partitioned (
IReadyQueue,ITaskDispatcher,IStateRepository). -
Dependency Inversion (DIP): The
Schedulerdepends solely on abstract interfaces, never on concrete network or database implementations.\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