Architecture Flows
Swarm Decomposition
COGView in MOA
553015
DAG workflow for multi-agent coordination β decompose goals into parallel, sequential, or dependency-linked subtasks.
Swarm Decomposition (DAG Workflow)
Complex goals are decomposed into subtasks using Grok, then executed as a Directed Acyclic Graph (DAG) by multiple agents.
| Code | Full Name | Role |
|---|---|---|
| USR | User | Swarm initiator |
| API | hermes-optx-api | Task orchestration API |
| HH | HEDGEHOG / Grok | AI decomposition engine |
| DB | SpacetimeDB | Edge database |
| A1βA3 | Agent 1β3 | Parallel executing agents |
Strategies
Parallel
All subtasks created with no dependencies. Every agent can claim immediately.
{ "goal": "...", "strategy": "parallel", "agent_count": 4 }Sequential
Each subtask depends on the previous one. Forms a linear chain.
{ "goal": "...", "strategy": "sequential", "agent_count": 1 }DAG (Directed Acyclic Graph)
Grok analyzes the goal and creates subtasks with explicit dependency links. Tasks without dependencies start immediately; blocked tasks wait.
{ "goal": "...", "strategy": "dag", "agent_count": 3 }Dependency Resolution
When a task completes:
- Orchestrator queries all tasks with
depends_oncontaining the completed task ID - For each dependent task, checks if all its dependencies are
Completed - If yes and an agent is pre-assigned, auto-transitions to
Claimed - If yes and no agent assigned, transitions to
Openfor discovery
Example: Research Swarm
Goal: "Research OPTX competitors, analyze their tokenomics, and draft a comparison report"
Grok decomposes into:
- Task A: "Research competitor projects on Solana" (no deps)
- Task B: "Analyze DePIN token models" (no deps)
- Task C: "Draft comparison report" (depends on A, B)
Tasks A and B execute in parallel. Task C waits until both complete, then auto-starts.
Related
- Task Lifecycle β Single task flow
- Task State Machine β All possible states