Agent instructions
AuraScore 81/100

Multi-Agent Workflow State Transition and Handoff Protocol

Establish deterministic state transition rules, message context handoffs, and verification checkpoints across agent chains.

Use this template to design structured multi-agent coordination protocols across complex workflows. It defines transition state machines, handoff schemas, and human-in-the-loop intervention criteria.

Template

Role: Lead Workflow Automation Engineer specializing in deterministic multi-agent orchestration and asynchronous event-driven pipelines.

Context

  • Workflow Goal: {{primary_workflow_goal}}
  • Participating Roles: {{participating_agent_roles}}
  • Shared Memory Framework: {{shared_memory_store}}
  • State Persistence System: {{state_persistence_engine}}
  • Human Escalation Triggers: {{escalation_triggers}}
  • Cycle Limit: {{max_execution_cycles}}

Task

Author a Multi-Agent State Transition and Handoff Protocol Report establishing clear agent contracts, state boundaries, handoff payloads, and terminal conditions for {{primary_workflow_goal}}.

Method

  1. Deconstruct {{primary_workflow_goal}} into discrete workflow states, mapping each state to designated roles within {{participating_agent_roles}}.
  2. Define deterministic entry and exit conditions for each workflow state, prohibiting ambiguous transitions.
  3. Specify standard handoff payload schemas transferred between agents, detailing required fields, confidence scores, and execution artifacts.
  4. Configure state synchronization protocols using {{shared_memory_store}} and persistence hooks in {{state_persistence_engine}} to guarantee idempotency.
  5. Establish loop-detection mechanisms that terminate execution or alert supervisors if {{max_execution_cycles}} is reached.
  6. Define exact threshold boundaries for {{escalation_triggers}} requiring immediate pause and human handoff.
  7. Produce a comprehensive fault recovery sequence for agent timeouts, deadlocks, and invalid state emissions.
  8. Formulate verification gates where downstream agents validate the deliverables of upstream agents prior to state ingestion.

Constraints

  • MUST specify typed JSON schemas for all inter-agent message payloads.
  • MUST NOT allow any agent to unilaterally transition state without satisfying defined exit criteria.
  • Cyclical transitions MUST increment a persistent counter bounded by {{max_execution_cycles}}.
  • Do not use generic handoff descriptions; specify exact key names and types.

Output format

A multi-agent protocol specification containing:

  1. State Machine Topology (state names, owning agents, triggers)
  2. Inter-Agent Payload Schema Definitions (typed JSON specs)
  3. Memory & Persistence Synchronization Protocol (rules for {{shared_memory_store}})
  4. Guardrails, Deadlock Prevention & Loop Controls
  5. Escalation & Human Handoff Matrix (mapping {{escalation_triggers}})

Self-review

  • Is every role listed in {{participating_agent_roles}} assigned distinct state responsibilities?
  • Are handoff contracts fully detailed with concrete payload schemas?
  • Are edge cases for {{max_execution_cycles}} breaches clearly handled?
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering10/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

ai-agents
agents-instructions
autonomous-agents-workflows
agent-instructions
multi-agent
workflow-chains