⚙️ protocol.json

{
  "initialState": "Analyze",
  "states": [
    {
      "name": "Analyze",
      "instructions": "Identify the bug in the logs",
      "validationCriteria": "If bug found -> 'Fix', else -> 'Search'"
    },
    {
      "name": "Fix",
      "instructions": "Apply the patch",
      "validationCriteria": "If tests pass -> null, else -> 'Fix'"
    }
  ]
}
            
🧠 Execution Transcript
State: Analyze
Executing: ReadLogTask...
Referee: Passed
"Bug identified in line 42. Transitioning to 'Fix'."
State: Fix
Executing: FileModificationTask...

The State Machine Loop

ProtocolMode operates on a deterministic loop designed for high-stakes automation where every step must be verified by a "Referee" agent before proceeding.

  • Protocol Definition: Can be pre-defined in JSON or dynamically generated by the agent.
  • State Execution: The agent selects the best tool to satisfy the current state's instructions.
  • Referee Validation: A separate LLM call evaluates the output against strict criteria to decide the next state.
  • Variable Substitution: Supports {{mustache}} style variables for reusable templates.