Show & Tell: Designing the AgentMesh Coordinator — Service Registry, Task Dispatch, and Role-Based Routing #151
web3guru888
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
TL;DR
Phase 4.2 is underway. Issue #147 introduced the
AgentMeshcoordinator for multi-agent task distribution. This post walks through the full architecture: how agents register themselves, how the coordinator dispatches tasks, and how the Cognitive Blackboard ties everything together.The Problem: Scaling Beyond a Single Agent
The CognitiveCycle (Phase 4.1) gave us a real-time perception-action loop over 29 modules — but it runs single-agent. Phase 4.2 asks: what happens when you need specialized agents running in parallel?
Examples:
Each of these is a separate process with a dedicated
AgentRole. They share state through the Cognitive Blackboard — the same shared memory that the CognitiveCycle uses for module communication.The Architecture
Data Model
Task Dispatch Flow
Result Collection
Agents write results back to the Blackboard using a well-known key:
The coordinator subscribes to
mesh.task.result.*and reconciles completed tasks.Service Registry (Issue #150)
AgentDiscoveryhandles registration, heartbeats, and health transitions:The coordinator never dispatches to DEGRADED or UNREACHABLE agents. If all agents for a required role are unreachable,
dispatch()raisesNoAgentAvailableError.Blackboard Topic Map
mesh.agent.registeredmesh.agent.heartbeatmesh.agent.status_changedmesh.task.assigned.<agent_ns>mesh.task.result.<task_id>mesh.task.failed.<task_id>Open Questions
Persistent task queue or pure Blackboard TTL? If the coordinator crashes mid-dispatch, tasks in the Blackboard will expire. Should we add a SQLite-backed task log for durability?
Priority lanes? Should priority-1 tasks bypass the round-robin queue and preempt lower-priority assigned tasks?
Agent affinity for stateful tasks? A memory-consolidation task that operates on specific KG namespaces probably needs to go to the same agent every time. How do we express that?
Next Issues in Phase 4.2
Follow the Phase 4 roadmap in #109 for the full picture.
All reactions