PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
Chat - (gpt-5.6)
Token size
4,188
Example input
[DESCRIBE THE SOURCE AGENT, TARGET AGENTS, THEIR ROLES, AND THEIR RESPONSIBILITIES]: Source Agent: Customer Support Agent πŸ”§ Target Agent: Refund Processing Agent πŸ‘€ Human: Customer Support Executive [DESCRIBE WHY THE AGENTS NEED TO COMMUNICATE AND WHAT BUSINESS/ENGINEERING WORKFLOW THEY MUST COMPLETE]: Customer requests a refund. πŸ€– Support Agent verifies the request and delegates refund processing. [LIST EACH AGENT'S TOOLS, APIS, DATA SOURCES, ACTIONS, AND CAPABILITIES]: Support Agent: customer/order lookup πŸ’³ Refund Agent: refund eligibility check and refund initiation πŸ—„οΈ Order database πŸ’° Payment gateway [DESCRIBE TIMEOUTS, AVAILABILITY, LATENCY, RETRY, FAILURE, SCALE, COST, AND OBSERVABILITY REQUIREMENTS]: 10-second connector timeout πŸ” Maximum 2 retries 🧾 Idempotent refund requests πŸ‘€ Full audit logging [DESCRIBE PROTOCOLS, FRAMEWORKS, PLATFORMS, API CONSTRAINTS, DEPLOYMENT MODEL, AND IMPLEMENTATION LIMITATIONS]: HTTPS API πŸ“¦ JSON messages πŸ”’ Versioned contract: v1 πŸ—οΈ Central connector/router
Example output
πŸ”Ž PHASE 1 β€” AGENT ECOSYSTEM RECONSTRUCTION 🧩 1.1 Participating Agents Agent Role Responsibility 🎧 Support Agent Requester Verify customer request and create refund task πŸ’³ Refund Agent Executor Validate eligibility and initiate authorized refund πŸ‘€ Human Approver Approve high-value refunds πŸ”Œ Connector Interoperability Boundary Authenticate, authorize, route, validate and observe πŸ—ΊοΈ 1.2 Interaction Map πŸ‘€ Customer ↓ 🎧 Support Agent ↓ πŸ”Œ Agent Connector ↓ πŸ’³ Refund Agent ↓ πŸ’° Payment Gateway ↓ πŸ’³ Refund Result ↓ πŸ”Œ Connector ↓ 🎧 Support Agent πŸ” Trust Boundaries 🎧 Support Agent β”‚ β”‚ authenticated request β–Ό πŸ”Œ Connector β”‚ β”‚ authorized task β–Ό πŸ’³ Refund Agent β”‚ β”‚ authorized tool call β–Ό πŸ’° Payment Gateway FACT: The Support Agent requests a refund. DEFINED CAPABILITY: The Refund Agent can process refunds. PROPOSED DESIGN: The Connector acts as the security and interoperability boundary. UNKNOWN: Exact authentication technology is not specified. --- πŸ”Ž PHASE 2 β€” AGENT IDENTITY & CAPABILITY MODEL 🎧 Support Agent πŸ†” Identity: support-agent 🎯 Role: Requester πŸ› οΈ Capability: Submit refund requests πŸ“Š Data access: Customer/order information 🚫 Cannot directly execute refunds πŸ” Delegation authority: Request only πŸ’³ Refund Agent πŸ†” Identity: refund-agent 🎯 Role: Executor πŸ› οΈ Capabilities: Check refund eligibility Initiate authorized refund πŸ’° Payment authority: Limited to authorized refund operation 🚫 Cannot grant itself additional permissions πŸ”Œ Connector πŸ†” Identity: agent-connector 🎯 Role: Communication boundary πŸ” Validates identity πŸ›‘οΈ Enforces authorization πŸ“¦ Validates messages πŸ‘€ Records interaction metadata ⚠️ Critical Separation IDENTITY β‰  CAPABILITY β‰  AUTHORITY For example: > Refund Agent having a refund capability does not mean every Support Agent request is automatically authorized. --- πŸ”Ž PHASE 3 β€” RESPONSIBILITY & INTERFACE BOUNDARIES 🎧 Support Agent Owns Customer interaction Refund request creation Customer/order context Communication with customer πŸ’³ Refund Agent Owns Refund eligibility Refund execution Payment gateway interaction Refund execution status πŸ”Œ Connector Owns Routing Authentication enforcement Authorization enforcement Contract validation Correlation Retry policy Observability 🚫 Boundary The Support Agent must not directly control the Payment Gateway. The Refund Agent must not take over customer communication. The Connector must not make business decisions about refund eligibility. --- πŸ”Ž PHASE 4 β€” CAPABILITY DISCOVERY & ROUTING πŸ“š Capability Registry The Connector can maintain a capability record such as: Capability Agent Input Output Authorization refund.check_eligibility Refund Agent Order ID Eligibility result Support request permission refund.execute Refund Agent Authorized refund task Refund result Refund execution permission 🧭 Routing Refund Request ↓ πŸ”Œ Connector ↓ Capability = refund.execute ↓ πŸ’³ Refund Agent The Connector should not expose unrelated Refund Agent capabilities to the Support Agent. UNKNOWN: Whether a registry already exists. PROPOSED DESIGN: Start with explicit static routing for a two-agent system. Introduce a registry only when the number of agents requires dynamic discovery. --- πŸ”Ž PHASE 5 β€” COMMUNICATION & MESSAGE CONTRACT πŸ“€ REQUEST { "protocol_version": "v1", "message_type": "REQUEST", "message_id": "msg-001", "correlation_id": "corr-001", "task_id": "task-001", "sender_id": "support-agent", "recipient_id": "refund-agent", "intent": "process_refund", "task": { "order_id": "ORDER-123", "reason": "customer_request" }, "constraints": { "deadline": "10s" }, "idempotency_key": "refund-ORDER-123" } πŸ“₯ RESPONSE { "protocol_version": "v1", "message_type": "RESPONSE", "message_id": "msg-002", "correlation_id": "corr-001", "task_id": "task-001", "sender_id": "refund-agent", "recipient_id": "support-agent", "status": "COMPLETED", "result": { "refund_id": "REF-001", "amount": 1000 } } πŸ“¨ Message Types πŸ“€ REQUEST βœ… ACCEPT ❌ REJECT ⏳ PROGRESS πŸ“₯ RESPONSE ⚠️ FAILURE πŸ›‘ CANCEL Natural language may exist inside the task payload, but the production connector contract should remain structured. --- πŸ”Ž PHASE 6 β€” TASK HANDOFF ARCHITECTURE πŸ”„ Lifecycle πŸ“€ REQUEST ↓ πŸ” AUTHENTICATE ↓ πŸ›‘οΈ AUTHORIZE ↓ βœ… ACCEPT ↓ βš™οΈ EXECUTE ↓ πŸ”Ž VALIDATE ↓ πŸ“¦ RESULT ↓ βœ… ACKNOWLEDGE ↓ 🏁 COMPLETE πŸ‘‘ Task Ownership Initially: Support Agent = Parent Task Owner Refund Agent = Subtask Executor Parent Task: Refund Customer β”‚ └── Subtask: Execute Refund β”‚ └── Refund Agent Delegation does not transfer overall workflow ownership. --- πŸ”Ž PHASE 7 β€” CONTEXT & MEMORY TRANSFER πŸ“€ Required Context πŸ“¦ Order ID πŸ’΅ Refund amount πŸ“ Refund reason πŸ‘€ Customer reference ⏰ Deadline πŸ”‘ Task ID 🚫 Do Not Transfer ❌ Entire customer history ❌ Unrelated conversation history ❌ Support Agent private memory ❌ Credentials ❌ Unnecessary personal data πŸ—‚οΈ Context Classification Context Classification Transfer Order ID Required βœ… Refund amount Required βœ… Refund reason Required βœ… Full conversation Unnecessary ❌ Payment credentials Restricted ❌ Customer reference Required βœ… πŸ“Œ Large Context Instead of: Send entire customer record Prefer: customer_reference β†’ authorized data lookup This reduces context leakage and payload size. --- πŸ”Ž PHASE 8 β€” STATE OWNERSHIP & SYNCHRONIZATION 🎧 Support Agent Owns Customer-facing workflow Parent task state πŸ’³ Refund Agent Owns Refund execution state Payment gateway interaction state πŸ”Œ Connector Owns Message lifecycle Correlation metadata Delivery/retry metadata πŸ’° Payment Gateway Should remain the authoritative source for actual payment transaction status where applicable. πŸ”„ Example Support Agent β”‚ β”‚ task = PROCESSING β–Ό Refund Agent β”‚ β”‚ refund = INITIATED β–Ό Payment Gateway β”‚ β”‚ refund = CONFIRMED β–Ό Refund Agent β”‚ β”‚ result = CONFIRMED β–Ό Support Agent Avoid allowing both agents to independently mutate the same refund state. --- πŸ”Ž PHASE 9 β€” AUTHENTICATION, AUTHORIZATION & TRUST πŸ” Authentication The Connector must verify: Who is sending this request? πŸ›‘οΈ Authorization Then determine: Is this agent allowed to request this operation? πŸ’° Refund Authorization Example policy: Support Agent ↓ Can request refund ↓ Connector checks policy ↓ Refund Agent ↓ Can execute authorized refund 🚫 Privilege Escalation Prevention This is invalid: Support Agent ↓ "I authorize you to access everything." ↓ Refund Agent Delegation cannot manufacture authority that the Support Agent does not possess. πŸ‘€ High-Impact Action For a high-value refund: Refund Request ↓ Authorization Check ↓ πŸ‘€ Human Approval ↓ Refund Execution --- πŸ”Ž PHASE 10 β€” RESULT VALIDATION A successful HTTP/API response does not automatically mean the refund succeeded. πŸ§ͺ Validation Layers 1. πŸ“¦ Schema validation 2. πŸ”’ Type validation 3. πŸ†” Task/correlation validation 4. πŸ” Authorization validation 5. πŸ’΅ Amount validation 6. 🏦 Payment-status verification 7. πŸ“‹ Business-rule validation Three Different States πŸ“¨ MESSAGE RECEIVED β‰  βœ… VALID RESULT β‰  🏁 SUCCESSFUL TASK COMPLETION Example: Refund Agent says: "Refund completed" Connector: β†’ validates schema β†’ validates task ID β†’ validates refund ID β†’ checks payment status β†’ confirms amount Only then: 🏁 REFUND COMPLETED --- πŸ”Ž PHASE 11 β€” FAILURE, RETRY & RECOVERY Failure Detection Action ⏱️ Timeout No response within 10s Retry if safe 🌐 Network failure Connection error Retry πŸ” Authentication failure Identity rejected Do not retry blindly 🚫 Authorization failure Policy denied Terminal failure πŸ“¦ Invalid response Schema validation fails Reject response πŸ”„ Duplicate request Idempotency match Return existing result πŸ’³ Payment failure Gateway reports failure Return business failure πŸ’₯ Agent crash Missing execution result Recover/check status πŸ” Retry Maximum: 2 retries But retries should depend on failure classification. Transient failure ↓ Retry ↓ Failure again ↓ Retry ↓ Failure ↓ Escalate Do not retry authorization failures automatically. --- πŸ”Ž PHASE 12 β€” IDEMPOTENCY & LOOP PREVENTION πŸ”‘ Idempotency Use: idempotency_key = refund-ORDER-123 If the same request arrives twice: Request #1 β†’ Refund initiated Request #2 β†’ Duplicate detected The connector should avoid triggering a second refund. πŸ”„ Delegation Loop Potential bad architecture: Support Agent ↓ Refund Agent ↓ Support Agent ↓ Refund Agent ↓ ∞ πŸ›‘ Controls πŸ†” Task lineage πŸ”— Parent task ID πŸ”’ Delegation depth πŸ”„ Duplicate detection ⏱️ Deadline πŸ›‘ Cancellation Example: max_delegation_depth = 2 The exact value is a proposed design, not an assumed infrastructure capability. --- πŸ”Ž PHASE 13 β€” OBSERVABILITY & TRACE Every interaction should have: πŸ†” Agent Run ID πŸ“¨ Message ID πŸ”— Correlation ID πŸ“‹ Task ID πŸ‘¨β€πŸ‘©β€πŸ‘§ Parent Task ID 🎧 Sender πŸ’³ Receiver ⏱️ Latency πŸ” Retry count πŸ› οΈ Tool calls πŸ‘€ Human approvals 🏁 Final status πŸ” Distributed Trace TRACE-001 🎧 Support Agent ↓ πŸ“¨ msg-001 ↓ πŸ”Œ Connector ↓ πŸ’³ Refund Agent ↓ πŸ› οΈ Payment Gateway ↓ πŸ’³ Refund Agent ↓ πŸ“¨ msg-002 ↓ πŸ”Œ Connector ↓ 🎧 Support Agent Engineers can reconstruct the complete interaction without relying on hidden model reasoning. --- πŸ”Ž PHASE 14 β€” PERFORMANCE, COST & SCALABILITY ⚑ Main Costs πŸ“¦ Message serialization 🌐 Network latency πŸ€– Agent inference πŸ› οΈ Tool calls πŸ” Retries πŸ“š Excessive context πŸš€ Optimization βœ‚οΈ Send minimum required context πŸ—‚οΈ Use references for large state πŸ”€ Parallelize independent validation where safe πŸ’Ύ Cache stable capability metadata ⏱️ Enforce deadlines πŸ” Prevent unnecessary retries ⚠️ Retry Amplification Bad: Agent A retries 3x Agent B retries 3x Payment API retries 3x One task can produce many downstream calls. Therefore retry budgets should be coordinated across the task lineage. --- πŸ”Ž PHASE 15 β€” TESTING & INTEROPERABILITY πŸ“‹ Contract Tests Test 1 β€” Valid Request Input: Valid refund request. Expected: βœ… Schema accepted βœ… Identity accepted βœ… Authorization accepted βœ… Request routed Failure: Any required field is missing or invalid. --- πŸ” Security Test Test 2 β€” Unauthorized Refund Input: Support Agent β†’ Refund Agent Request: Refund β‚Ή100,000 Permission: Not granted Expected: 🚫 Authorization Denied No refund execution should occur. --- πŸ” Reliability Test Test 3 β€” Duplicate Request Send the same idempotency_key twice. Expected: Request 1 β†’ Execute Request 2 β†’ Detect duplicate Failure: Two refunds are created. --- ⏱️ Timeout Test Test 4 β€” Refund Agent Unavailable Expected: REQUEST ↓ TIMEOUT ↓ RETRY ↓ TIMEOUT ↓ RETRY ↓ TERMINAL FAILURE / ESCALATION Failure: Unlimited retries. --- πŸ”„ Loop Test Test 5 β€” Circular Delegation Configure a test scenario where the Refund Agent attempts to delegate back to the Support Agent. Expected: πŸ” Loop detected ↓ πŸ›‘ Delegation blocked ↓ ⚠️ Task marked failed/escalated --- πŸ† PHASE 16 β€” FINAL AGENT-TO-AGENT CONNECTOR ARCHITECTURE PACK 1. πŸ“‹ Executive Summary A central connector is used between the Support Agent and Refund Agent. The connector provides: πŸ” Identity verification πŸ›‘οΈ Authorization enforcement πŸ“¦ Structured message validation πŸ”„ Task routing πŸ”‘ Idempotency ⏱️ Timeout handling πŸ” Bounded retries πŸ‘€ Distributed observability πŸ›‘ Delegation controls The Support Agent owns the customer workflow, while the Refund Agent owns refund execution. --- 2. πŸ—ΊοΈ Agent Ecosystem Map πŸ‘€ Customer ↓ 🎧 Support Agent ↓ πŸ”Œ Central Agent Connector ↓ πŸ’³ Refund Agent ↓ πŸ’° Payment Gateway --- 3. πŸ†” Agent Identity & Capability Model Agent Identity Capability Authority 🎧 Support support-agent Request refund Request only πŸ’³ Refund refund-agent Execute refund Authorized refund execution πŸ”Œ Connector agent-connector Route/validate Enforce policy --- 4. 🧱 Responsibility & Interface Boundaries Support Agent β†’ Customer workflow Refund Agent β†’ Refund workflow Connector β†’ Interoperability/security boundary No silent ownership transfer. --- 5. 🧭 Capability Discovery & Routing Capability Request ↓ Connector ↓ Authorization ↓ Refund Agent Static routing is sufficient for this two-agent example. --- 6. πŸ“‘ Communication Contract REQUEST ACCEPT PROGRESS RESPONSE FAILURE CANCEL Every message carries correlation and task identity. --- 7. πŸ”„ Task Handoff Protocol REQUEST β†’ AUTHENTICATE β†’ AUTHORIZE β†’ ACCEPT β†’ EXECUTE β†’ VALIDATE β†’ RESULT β†’ COMPLETE --- 8. 🧠 Context & Memory Policy Transfer: Order ID Refund reason Amount Required customer reference Do not transfer: Unrelated history Credentials Private memory Unnecessary sensitive information --- 9. πŸ—ƒοΈ State Ownership Support Agent β†’ Parent workflow Refund Agent β†’ Refund execution Payment Gateway β†’ Transaction truth Connector β†’ Communication metadata --- 10. πŸ” Authentication & Authorization IDENTITY ↓ AUTHENTICATION ↓ CAPABILITY CHECK ↓ AUTHORIZATION ↓ EXECUTION Delegation does not automatically transfer authority. --- 11. πŸ”Ž Result Validation Received ↓ Schema Valid ↓ Authorized ↓ Business Valid ↓ External Status Confirmed ↓ Completed --- 12. πŸ› οΈ Failure & Recovery Failure ↓ Classify ↓ Retry if transient ↓ Revalidate ↓ Recover ↓ Escalate if terminal --- 13. πŸ”‘ Idempotency & Loop Prevention Controls: Idempotency key Task lineage Parent task Delegation depth Duplicate detection Deadline Cancellation --- 14. πŸ‘€ Distributed Observability Required trace: Support β†’ Connector β†’ Refund β†’ Payment Gateway β†’ Refund β†’ Connector β†’ Support All stages share correlation metadata. --- 15. ⚑ Performance & Scalability Primary optimization priorities: 1. βœ‚οΈ Minimize context 2. πŸ” Control retries 3. πŸ“¦ Keep messages compact 4. πŸ’Ύ Cache stable metadata 5. πŸ“Š Monitor latency 6. 🚦 Bound concurrency --- 16. πŸ§ͺ Interoperability Test Strategy Minimum test groups: πŸ“¦ Contract validation βš™οΈ Functional delegation ⏱️ Timeout 🌐 Network failure πŸ” Authorization πŸ” Duplicate requests πŸ”„ Delegation loops 🧩 Version compatibility πŸ‘€ Human approval πŸ’₯ Partial execution --- 17. πŸ“Š Agent Connector Contract Matrix Agent Capability Input Output Authorization Timeout Failure Handling 🎧 Support Submit refund Order + reason Task ID Request permission 10s Retry/escalate πŸ’³ Refund Check eligibility Order ID Eligibility Read permission 10s Return failure πŸ’³ Refund Execute refund Authorized task Refund ID/status Refund permission 10s Idempotent retry πŸ”Œ Connector Route request Structured message Response Connector policy 10s Reject/retry --- 18. πŸ”„ Message Lifecycle Stage Owner Input Action Validation Next State πŸ“€ Request Support Refund request Create task Schema AUTHENTICATING πŸ” Authenticate Connector Agent identity Verify identity Identity AUTHORIZING πŸ›‘οΈ Authorize Connector Capability request Check policy Permission ACCEPTED βœ… Accept Refund Task Accept task Contract EXECUTING βš™οΈ Execute Refund Authorized task Process refund Business rules VALIDATING πŸ”Ž Validate Connector/Refund Result Validate result Schema + business COMPLETED 🏁 Complete Support Valid result Update workflow Final state CLOSED --- 19. πŸ—οΈ Implementation Sequence Step Component Dependency Deliverable Validation Definition of Done 1️⃣ Agent identities None Identity model Identity tests Agents uniquely identified 2️⃣ Capability model Identity Capability registry/config Capability tests Capabilities explicit 3️⃣ Message schema Identity v1 schemas Contract tests Valid messages accepted 4️⃣ Connector Schema Routing boundary Integration tests Requests routed 5️⃣ Authorization Identity + capability Policy layer Security tests Unauthorized calls blocked 6️⃣ Task lifecycle Connector Task state machine Functional tests Ownership explicit 7️⃣ Idempotency Task lifecycle Duplicate protection Replay tests Duplicate side effects prevented 8️⃣ Recovery Connector Retry/timeout logic Failure tests Terminal failures handled 9️⃣ Observability Connector Distributed trace Trace tests Full interaction reconstructable πŸ”Ÿ Production validation All End-to-end system E2E tests Connector operational --- 20. 🏁 FINAL AGENT-TO-AGENT CONNECTOR BLUEPRINT πŸ‘€ CUSTOMER β”‚ β–Ό 🎧 SUPPORT AGENT β”‚ β”‚ Structured Request β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ πŸ”Œ AGENT CONNECTOR β”‚ β”‚ β”‚ β”‚ πŸ” Authentication β”‚ β”‚ πŸ›‘οΈ Authorization β”‚ β”‚ πŸ“¦ Schema Validationβ”‚ β”‚ 🧭 Routing β”‚ β”‚ πŸ”‘ Idempotency β”‚ β”‚ ⏱️ Timeout β”‚ β”‚ πŸ” Retry Control β”‚ β”‚ πŸ‘€ Observability β”‚ β”‚ πŸ›‘ Loop Prevention β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ Authorized Task β–Ό πŸ’³ REFUND AGENT β”‚ β”‚ Authorized Tool Call β–Ό πŸ’° PAYMENT GATEWAY β”‚ β–Ό πŸ’³ REFUND RESULT β”‚ β–Ό πŸ”Œ CONNECTOR VALIDATION β”‚ β–Ό 🎧 SUPPORT AGENT β”‚ β–Ό 🏁 COMPLETE πŸ” Core Design Principle The connector is not merely a message transport layer. It is the controlled boundary that enforces: IDENTITY β†’ CAPABILITY β†’ AUTHORITY β†’ TASK β†’ CONTEXT β†’ EXECUTION β†’ VALIDATION β†’ RECOVERY β†’ OBSERVABILITY while ensuring: DELEGATION β‰  AUTHORITY TRANSFER and: MESSAGE DELIVERY β‰  TASK SUCCESS.
GPT

Agent To Agent Connector

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
GPT-5.6
Tested icon
Guide icon
4 examples icon
Free credits icon
Agent-to-Agent Connector transforms an agent collaboration requirement into a structured interoperability architectureβ€”defining how agents discover each other, communicate, delegate work, exchange context, validate results, handle failures, and safely complete multi-agent workflows. 🀝 Design agent-to-agent communication 🧩 Map agent capabilities and responsibilities πŸ‘‰ Turn disconnected AI agents into a controlled, observable, and reliable agent-to-agent collaboration system.
...more
Updated 2 weeks ago
Report
Browse Marketplace