This diagram shows a stateless agent protocol. An orchestrator manages iterative task execution, feedback loops, confidence-based gating, and a validation
sequenceDiagram
participant O as Orchestrator
participant R as Redis
participant A3 as Loop 3 Agent
participant A2 as Loop 2 Agent
Note over O: Iteration 1
O->>R: Store epic context, phase context
O->>A3: Spawn Loop 3 Agent
A3->>R: Get context (epic, phase, criteria)
A3->>A3: Execute task
A3->>R: Store output + confidence (0.75)
A3->>A3: Exit (stateless)
O->>R: Collect confidence scores
O->>R: Check gate (0.75 < 0.85 = FAIL)
Note over O: Iteration 2
O->>R: Store feedback from iteration 1
O->>A3: Spawn fresh Loop 3 Agent
A3->>R: Get context + feedback
A3->>A3: Execute with improvements
A3->>R: Store output + confidence (0.93)
A3->>A3: Exit (stateless)
O->>R: Collect confidence scores
O->>R: Check gate (0.93 ≥ 0.85 = PASS)
Note over O: Validation Phase
O->>A2: Spawn Loop 2 Validators
A2->>R: Get context + Loop 3 output
A2->>A2: Review + validate
A2->>R: Store consensus score
A2->>A2: Exit (stateless)
O->>R: Check consensus (≥ 0.90 = PASS)
O->>R: Store final approved output
The diagram details an orchestrator's role in managing stateless agents. It shows how the orchestrator spawns agents, which retrieve context and success criteria from Redis, execute tasks, and store their output and confidence scores back in Redis. The orchestrator then collects these scores, checks against a gate, and provides feedback for subsequent iterations if the confidence is too low. Once a task passes the confidence gate, a validation phase is initiated where different agents review and validate the output, storing a consensus score.
Use this protocol for systems requiring iterative task execution, self-correction through feedback loops, confidence-based decision making, and a clear validation phase. It's suitable for AI/ML agent orchestration, complex data processing workflows, or any system where tasks might need multiple attempts to meet a quality threshold.
This protocol can be adapted by changing the number of iteration loops, modifying the confidence thresholds and gating logic, integrating different types of agents for various tasks and validation steps, or replacing Redis with another distributed cache or database. The feedback mechanism can be made more sophisticated, and the validation phase can include human-in-the-loop steps.