Prompt Details
Model
(claude-5-opus)
Token size
2,595
Example input
[List all agents and their roles]: Agent A1 — Customer Support Agent Handles customer refund requests Collects order ID and complaint Checks basic order status Sends customer-facing responses Agent A2 — Order Verification Agent Verifies order ID Checks delivery status Checks payment and order records Determines whether order information is valid Agent A3 — Refund Policy Agent Checks refund policy Determines whether the request meets policy requirements Provides refund eligibility recommendation Agent A4 — Fraud & Risk Agent Checks suspicious refund behavior Reviews previous refund history Flags potentially fraudulent requests Agent A5 — Refund Processing Agent Processes approved refunds Updates refund status Sends transaction result to the workflow
[What the multi-agent system must accomplish]: Process refund requests accurately while minimizing: Duplicate verification Unnecessary agent calls Communication delays Conflicting decisions Context loss Incorrect refunds Required outcome: Customer Request → Verification → Policy Check → Risk Check → Approval → Refund Processing
[List current tasks assigned to agents]: A1 collects customer request and order ID A1 checks basic order status A2 verifies order ID and delivery information A2 checks payment information A3 evaluates refund eligibility A3 independently checks order status A4 checks refund history and suspicious activity A4 sometimes re-checks payment information A5 processes approved refunds A1 communicates final result to customer
[Recent outputs / decisions / results]: A1 Output Order ID: 78452 Customer claims product was damaged Order marked as delivered Customer requested full refund A2 Output Order ID valid Delivered 3 days ago Payment successfully completed Product eligible for return verification A3 Output Damage-related refund appears eligible Customer should provide damage evidence Refund can proceed after required evidence is confirmed A4 Output Customer has requested 3 refunds in the last 30 days No confirmed fraud Risk level: Review Required A5 Output Refund not processed Waiting for final approval
[Latency / cost / reliability / autonomy / desired report format]: High reliability required Refund decisions must be explainable Fraud-related cases require additional review Avoid duplicate database/API calls Customer should receive a clear final response Do not automatically approve suspicious cases Human approval is required for high-risk refunds Desired output: detailed coordination audit and optimized workflow
Example output
🔎 DETAILED TEST EXECUTION
PHASE 1 — AGENT INVENTORY
Agent Primary Role Main Responsibility Problem
A1 Customer Support Intake + customer communication Also performing verification
A2 Verification Validate order/payment Clear ownership
A3 Policy Determine policy eligibility Repeats order checks
A4 Risk Fraud/risk assessment Repeats payment checks
A5 Processing Execute refund Depends on incomplete approval
Finding
A2 has the clearest ownership of factual order/payment verification.
A1 should not independently perform detailed verification.
A3 should consume verified facts rather than re-querying the order system.
A4 should consume verified payment/order facts and focus on risk signals.
---
🎯 PHASE 2 — ROLE & RESPONSIBILITY ANALYSIS
Responsibility Owner Contributors Status
Customer intake A1 None CLEAR
Order verification A2 A1 provides order ID CLEAR
Payment verification A2 A4 may use result CLEAR
Policy evaluation A3 A2 provides facts CLEAR
Risk evaluation A4 A2 provides verified facts CLEAR
Final high-risk approval Human A4 + A3 MISSING in current agent structure
Refund execution A5 A3/A4 provide decision CLEAR
Customer notification A1 A5 provides result CLEAR
Major issue
There is a missing explicit approval gate between A4 and A5 for high-risk cases.
---
🔄 PHASE 3 — TASK OVERLAP DETECTION
Overlap 1
Agent A1 + Agent A2
Overlapping task: Order status verification
Why: A1 performs basic order checking before handing off
Impact: Duplicate database access
Recommended owner: A2
Overlap 2
Agent A2 + Agent A3
Overlapping task: Order information verification
Why: A3 independently checks order status
Impact: Repeated queries and possible inconsistent data
Recommended owner: A2
Overlap 3
Agent A2 + Agent A4
Overlapping task: Payment verification
Why: A4 independently checks payment information
Impact: Duplicate API/database calls
Recommended owner: A2
Important distinction
A4 checking risk signals is legitimate collaboration.
A4 independently verifying the same payment fact is unnecessary duplication.
---
📡 PHASE 4 — COMMUNICATION GAP ANALYSIS
Expected A4 → Next Agent
A4 should communicate:
Risk level
Risk evidence
Refund history
Reason for escalation
Required approval
Conditions for proceeding
Actually communicated
"Risk requires review."
Missing
Why review is required
Evidence
Number of previous refunds
Whether fraud was confirmed
Whether human approval is mandatory
What A5 should do
Impact
A1 cannot explain the situation properly.
A5 cannot safely determine whether it is allowed to process the refund.
---
🔗 PHASE 5 — DEPENDENCY MAP
Current:
A1 → A2 → A3 → A4 → A1 → A5
Problematic dependency:
A3 → A2
A3 should not need to repeatedly request verification information.
Optimized dependency
A1 → Customer request
A2 → Verified Order Context
A3 + A4 → Work in parallel
A3 → Policy Decision
A4 → Risk Decision
Decision Gate → Determine approval path
A5 → Process refund
A1 → Communicate result
---
⚔️ PHASE 6 — CONFLICT DETECTION
Potential Conflict C1
A3 says:
"Refund eligible."
A4 says:
"Review Required."
These are not necessarily contradictory.
A3 answers:
"Does the request satisfy refund policy?"
A4 answers:
"Is it safe to process automatically?"
Root Cause
Different decision dimensions.
Correct resolution
Combine both decisions:
Policy Eligible + Risk Review Required = Human Approval Required
Do not simply choose whichever output arrived last.
---
🧠 PHASE 7 — SHARED CONTEXT ANALYSIS
Should be shared
Order ID
Verified order status
Delivery date
Payment confirmation
Product information
Customer refund history
Customer request
Evidence status
Policy version
Risk decision
Workflow status
Should remain local
A4's internal fraud-detection reasoning should remain localized unless specific evidence is required for escalation.
A3's internal policy reasoning does not need to be copied to every agent.
Major improvement
Create one structured:
Verified Order Context
A2 owns and publishes it once.
Other agents consume it instead of repeating database queries.
---
🚨 PHASE 8 — COORDINATION RISK ANALYSIS
Risk Likelihood Impact Evidence Mitigation
Duplicate Work High Medium A1/A2/A3 repeat checks Centralize verification
Context Loss High High A4 sends incomplete message Structured handoff
Decision Conflict Medium High Policy vs risk decisions Separate decision dimensions
Task Blocking Medium High A5 waits for unclear approval Explicit approval gate
Communication Bottleneck Medium Medium A4 → A1 → A5 Direct structured workflow state
Context Drift Medium High Multiple agents query databases Versioned shared context
Unnecessary Agent Calls High Medium Repeated verification Reuse verified facts
---
⚡ PHASE 9 — WORKFLOW OPTIMIZATION
CURRENT WORKFLOW
Customer
↓
A1
↓
A2
↓
A3
↓
A4
↓
A1
↓
A5
Problems
Mostly sequential
Repeated verification
A1 acts as unnecessary communication middleman
A3 repeats A2's work
A4 repeats payment verification
High-risk approval is unclear
---
🚀 OPTIMIZED WORKFLOW
Customer Request
↓
A1 — Intake
↓
A2 — Fact Verification
↓
Verified Context
↙ ↘
A3 — Policy A4 — Risk
Decision: Decision:
Eligible Low/High Risk
↘ ↙
Decision Gate
↓
If Low Risk + Eligible
→ A5 Refund Processing
↓
A1 Customer Notification
---
If High Risk
A4 → Human Approval
↓
Approved → A5
Rejected → A1
This removes unnecessary agent-to-agent messaging.
---
🧪 PHASE 10 — COORDINATION VALIDATION
Normal Task
A1 collects request
A2 verifies facts
A3/A4 work in parallel
Decision gate combines results
A5 processes
A1 communicates
Result: PASS
Parallel Tasks
A3 and A4 can safely work simultaneously because both consume A2's verified context.
Result: PASS
Conflicting Outputs
Policy eligible + high risk does not create a conflict.
Decision gate requires human approval.
Result: PASS
Agent Unavailability
If A4 is unavailable:
Do not automatically process a high-risk-sensitive refund
Keep request pending
Escalate according to defined fallback rules
Result: PASS
Tool Failure
If order database verification fails:
A2 marks verification as incomplete
A3/A4 should not make final decisions from incomplete facts
Workflow waits or escalates
Result: PASS
Missing Context
If A3 receives no verified delivery date:
A3 should return "Required Context Missing"
It should not independently redo the entire workflow unless explicitly permitted
Result: PASS
---
📊 PHASE 11 — AGENT PERFORMANCE ASSESSMENT
Agent Task Completion Communication Handoff Efficiency
A1 GOOD NEEDS IMPROVEMENT NEEDS IMPROVEMENT NEEDS IMPROVEMENT
A2 EXCELLENT GOOD GOOD GOOD
A3 GOOD GOOD GOOD NEEDS IMPROVEMENT
A4 GOOD NEEDS IMPROVEMENT POOR NEEDS IMPROVEMENT
A5 GOOD NEEDS IMPROVEMENT NEEDS IMPROVEMENT GOOD
These ratings are based only on the behavior provided in the test scenario, not fabricated performance metrics.
---
🎯 PHASE 12 — PRIORITY ISSUES
P0 — Critical
Missing high-risk approval gate
Reason:
A suspicious refund could reach A5 without explicit approval.
P1 — High
Incomplete A4 handoff
Reason:
Risk information is lost between agents.
P1 — High
Repeated verification
Reason:
A1, A3 and A4 perform overlapping verification.
P2 — Medium
Excessive sequential communication
Reason:
A3 and A4 can work in parallel.
P2 — Medium
Shared context inconsistency
Reason:
Multiple agents independently query source systems.
---
🛠️ PHASE 13 — COORDINATION IMPROVEMENT PLAN
Problem Root Cause Change Owner Priority
Duplicate verification Unclear ownership A2 owns factual verification A2 P1
Incomplete risk handoff Unstructured message Structured risk output A4 P1
Missing approval gate Undefined authority Add explicit decision gate Workflow P0
Sequential policy/risk checks Artificial dependency Run A3/A4 in parallel Orchestrator P2
Context drift Repeated queries Versioned verified context A2 P1
---
📋 PHASE 14 — COMMUNICATION PROTOCOL
Every important handoff should use:
WHO
A2
DOES WHAT
Provide verified order facts
WHY
A3 and A4 require reliable factual context
CONTEXT
Order ID, delivery status, payment status, product information
CONDITION
After verification succeeds
OWNER
A2
---
Example A2 → A3
Task: Evaluate refund policy
Order ID: 78452
Delivery: Delivered 3 days ago
Payment: Confirmed
Damage claim: Yes
Evidence: Required
Policy version: Current workflow version
Next action: Return eligibility decision
---
Example A4 → Decision Gate
Task: Provide risk decision
Risk: Review Required
Evidence: 3 refunds in 30 days
Fraud confirmed: No
Required action: Human review
Processing allowed: No until approval
This is much safer than:
"Risk requires review."
---
🔄 PHASE 15 — OPTIMIZED COORDINATION BLUEPRINT
Agent Structure
A1 — Intake & Customer Communication
Owns customer interaction only.
↓
A2 — Verification Authority
Owns factual order/payment verification.
↓
A3 — Policy Analyzer
Owns policy decision.
A4 — Risk Analyzer
Owns risk decision.
These two work:
IN PARALLEL
↓
Decision Gate
Combines:
Policy decision
Risk decision
Required evidence
Approval requirements
↓
Low Risk + Eligible
A5 → Process Refund
High Risk
Human Approval → A5
Ineligible
A1 → Inform Customer
---
🧾 PHASE 16 — FINAL COORDINATION REPORT
1. Executive Summary
The main coordination problems are duplicate verification, incomplete handoffs, unnecessary sequential execution, and a missing explicit high-risk approval gate.
No new agent is required.
The best architecture is to make A2 the single owner of factual verification, execute A3 and A4 in parallel, introduce an explicit decision gate, and use structured handoff messages.
---
2. Agent Inventory
A1 = Customer interaction
A2 = Verification authority
A3 = Policy authority
A4 = Risk authority
A5 = Refund execution
---
3. Role Matrix
Primary ownership is clear after removing verification responsibilities from A1, A3 and A4.
---
4. Task Overlap
Confirmed overlaps:
A1/A2 — order verification
A2/A3 — order verification
A2/A4 — payment verification
---
5. Communication Gaps
Largest gap:
A4 → A1
The risk decision lacks evidence, reason, and required next action.
---
6. Dependency Map
Optimized:
A1 → A2 → A3 + A4 → Decision Gate → A5 → A1
---
7. Conflict Register
Policy eligibility and risk review are not inherently contradictory.
They represent different decision dimensions.
---
8. Shared Context
Use one verified, versioned context owned by A2.
Do not share unnecessary internal reasoning.
---
9. Coordination Risks
Highest risks:
Missing approval gate
Context loss
Duplicate verification
Decision ambiguity
---
10. Current vs Optimized Workflow
Current:
A1 → A2 → A3 → A4 → A1 → A5
Optimized:
A1 → A2 → A3 + A4 → Decision Gate → A5 → A1
---
11. Agent Performance
A2 performs strongest against its defined responsibility.
A4 has the largest communication/handoff weakness.
A1 has unnecessary verification responsibility.
---
12. Priority Issues
P0: High-risk approval gate
P1: Structured handoffs
P1: Remove duplicate verification
P2: Parallelize policy and risk analysis
P2: Centralize verified context
---
13. Improvement Plan
The architecture should be simplified rather than expanded.
The biggest improvement comes from clear ownership + reusable verified context + explicit decision gates.
---
14. Communication Protocol
Every handoff must contain:
Task + Context + Evidence + Decision + Owner + Next Action + Condition
---
15. Optimized Coordination Blueprint
A1 → Intake
A2 → Verify
A3 + A4 → Analyze in parallel
Decision Gate → Combine decisions
Human → Only when required
A5 → Execute
A1 → Communicate
---
🏆 FINAL RESULT
Before:
5 agents + repeated verification + unclear handoffs + sequential bottleneck
After:
5 agents + clear ownership + parallel analysis + structured context + explicit approval gate
Core optimization
Do not add another agent.
Instead:
Centralize facts → Parallelize independent analysis → Separate policy from risk → Add explicit approval gate → Standardize handoffs.
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-OPUS
Multi-agent systems can become inefficient when agents duplicate work, misunderstand responsibilities, lose context, or produce conflicting outputs.
This prompt helps analyze agent workflows, detect communication gaps, overlapping tasks, dependency problems, and agent conflicts, then recommends a cleaner coordination strategy.
🔍 Detect duplicated & overlapping agent work
⚔️ Identify conflicting outputs and decisions
📡 Find communication & context gaps
🔗 Analyze dependencies and handoffs
...more
Added over 1 month ago
