This prompt is for multi-agent system architects who need to transfer context and authority between specialized agents without silently escalating privileges or losing critical constraints. The core job is generating a handoff protocol that explicitly declares which permissions transfer, which require re-validation, and how the receiving agent confirms its scope before acting. Use this when you have two or more agents with distinct permission sets—such as a research agent handing off to an execution agent—and you need the handoff to be auditable, reversible, and resistant to scope creep. The ideal user is an engineering lead or platform architect who already has agent roles defined and needs the glue that makes handoffs safe.
Prompt
Agent Handoff Permission Transfer Prompt

When to Use This Prompt
Define the job, reader, and constraints for multi-agent permission handoff.
Do not use this prompt when agents share identical permission scopes, when there is no actual authority transfer (simple message passing), or when you lack a defined permission model for each agent. This prompt assumes you have already completed the hard work of defining per-agent tool allowlists, data access boundaries, and refusal policies. Without those inputs, the handoff protocol will be hollow. The prompt is also inappropriate for single-agent workflows or for systems where all agents operate under a single monolithic permission set—those scenarios don't require permission transfer logic, only context passing. For high-risk domains such as healthcare, finance, or infrastructure control, pair this prompt's output with human review checkpoints and audit logging before any transferred permission is exercised.
The output is a structured handoff specification, not a runtime execution script. You will receive a declaration of transferred permissions, a list of permissions that require re-validation, confirmation steps the receiving agent must perform, and explicit denial rules for permissions that must never transfer. Wire this into your agent orchestration layer as a pre-action validation step: before the receiving agent executes any tool call, it must confirm the call falls within its post-handoff scope. Store the handoff record for audit trails. Common failure modes include permission leakage through vague transfer language, missing re-validation steps that let stale authorizations persist, and receiving agents that fail to confirm scope before acting. Test with adversarial handoff scenarios where the sending agent attempts to transfer permissions it doesn't hold or where the handoff payload is malformed.
Next step: after generating the handoff protocol, run it through your permission scope regression test suite to verify that transferred permissions don't create unintended escalation paths. Then implement the confirmation step in your agent harness—this is the most commonly skipped step and the most common source of production incidents in multi-agent systems.
Use Case Fit
Where the Agent Handoff Permission Transfer Prompt works, where it fails, and the operational prerequisites for safe deployment in multi-agent systems.
Good Fit: Structured Multi-Agent Pipelines
Use when: you have a defined DAG of specialized agents (e.g., research → drafting → compliance review) where each agent has a distinct toolset and data scope. Guardrail: The handoff protocol excels when agent boundaries are clear and permission sets are enumerable. Avoid using it for ad-hoc, unbounded agent swarms where roles shift unpredictably.
Bad Fit: Single-Agent or Monolithic Architectures
Avoid when: a single agent handles the entire workflow without delegating to sub-agents. Risk: Introducing a handoff protocol adds latency, complexity, and potential permission misconfiguration without the benefit of scope isolation. Guardrail: Use a simpler Role-Based Access Control prompt for single-agent permission boundaries instead.
Required Inputs: Permission Manifests Per Agent
What to watch: The prompt requires a machine-readable permission manifest for each agent, including allowed tools, argument constraints, data scopes, and deny rules. Guardrail: If manifests are missing or defined only in prose, the model will hallucinate permission boundaries. Validate manifests with a Permission Scope Conflict Detection Prompt before handoff.
Operational Risk: Permission Escalation via Handoff
Risk: A compromised or misconfigured sending agent could transfer elevated permissions to a receiving agent, bypassing the principle of least privilege. Guardrail: Implement a server-side permission validator that strips any transferred scope not explicitly in the receiving agent's manifest, regardless of what the prompt declares. Never trust the model alone to enforce permission boundaries.
Operational Risk: Re-Validation Gaps
Risk: The receiving agent may act on transferred permissions without re-validating them against its own manifest, especially under adversarial input from the sending agent. Guardrail: The prompt must include an explicit re-validation step where the receiving agent confirms its effective permissions before executing any tool call. Log this confirmation for audit trails.
Bad Fit: Real-Time or Latency-Sensitive Systems
Avoid when: end-to-end latency must stay under a strict threshold. Risk: Multi-step handoff protocols with permission validation, context transfer, and re-validation add non-trivial latency. Guardrail: For real-time systems, consider a flat permission model with pre-validated scopes rather than dynamic handoff. Profile handoff latency in staging before production deployment.
Copy-Ready Prompt Template
A reusable prompt template for generating a structured handoff protocol that explicitly declares permission transfer, re-validation requirements, and scope confirmation between specialized agents.
This template is designed for multi-agent system architects who need to produce a reliable, machine-readable handoff specification. The core challenge is ensuring that when Agent A delegates work to Agent B, the receiving agent understands exactly which permissions it has inherited, which require fresh validation, and what actions it must take to confirm its operational scope before executing any task. The prompt forces explicit declaration of transfer rules, reducing the risk of privilege escalation or unauthorized action during handoff.
textYou are a permission transfer protocol designer for a multi-agent system. Your task is to generate a structured handoff specification based on the provided context. The specification must be unambiguous and executable by a receiving agent's permission validator. ## INPUTS - [SOURCE_AGENT_ROLE]: Description of the originating agent's role and current task. - [TARGET_AGENT_ROLE]: Description of the receiving agent's intended role. - [SOURCE_PERMISSION_MANIFEST]: The complete list of permissions, tool access, and data scopes currently held by the source agent. - [TASK_CONTEXT]: The specific task or subtask being delegated. - [ORGANIZATIONAL_POLICY]: Any overarching security or compliance policies that govern permission transfer. ## CONSTRAINTS - [CONSTRAINTS]: Additional constraints such as 'Deny-by-default for all write operations' or 'Require human approval for data access outside the [DATA_SCOPE] boundary.' ## OUTPUT_SCHEMA Produce a JSON object conforming to this exact schema: { "handoff_id": "unique string", "source_agent": "string", "target_agent": "string", "permission_transfer_list": [ { "permission_name": "string", "transfer_decision": "GRANTED | DENIED | REVALIDATE_REQUIRED", "rationale": "string explaining decision based on policy and task context", "constraints_inherited": ["string constraints from source"] } ], "target_agent_startup_checklist": [ "Actionable step the target agent must execute to confirm its scope before acting, e.g., 'Run self-capability check against active permission set.'" ], "escalation_rule": "string describing what to do if the target agent cannot confirm its scope or encounters a denied permission during execution." }
To adapt this template, replace the square-bracket placeholders with concrete data from your agent orchestration layer. The SOURCE_PERMISSION_MANIFEST should be a structured object your system already maintains; do not ask the model to invent permissions. For high-risk deployments, the generated permission_transfer_list should be programmatically validated against a master policy before being injected into the target agent's context. Always pair this prompt with an evaluation step that checks for permission leakage—specifically, that no GRANTED permission exceeds the intersection of the source agent's scope and the target agent's least-privilege requirements for the task.
Prompt Variables
Required inputs for the Agent Handoff Permission Transfer Prompt. Each placeholder must be populated before the prompt is assembled. Missing or malformed variables will cause the receiving agent to either reject the handoff or operate with incorrect scope.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[SOURCE_AGENT_ID] | Unique identifier of the agent initiating the handoff | agent-invoice-processor-v2 | Must match a known agent ID in the orchestration registry. Reject handoff if ID is unknown or deprecated. |
[TARGET_AGENT_ID] | Unique identifier of the agent receiving the handoff | agent-compliance-auditor-v1 | Must differ from SOURCE_AGENT_ID. Validate target agent is active and not in a terminal state before handoff. |
[SOURCE_PERMISSION_MANIFEST] | Complete permission scope of the source agent at handoff time | {"tools": ["read_invoices", "query_customer_db"], "data_scopes": ["tenant_12"], "max_actions": 50} | Must be a valid JSON object matching the organization's permission schema. Null or empty manifest triggers immediate handoff rejection. |
[TRANSFER_PERMISSION_LIST] | Explicit list of permissions the source agent is authorized to transfer | ["read_invoices", "query_customer_db"] | Must be a strict subset of SOURCE_PERMISSION_MANIFEST. Any permission not present in the source manifest must be stripped. Empty list is valid and means no permissions transfer. |
[REVALIDATION_REQUIRED_LIST] | Permissions that require the target agent to re-authenticate or confirm before use | ["query_customer_db"] | Must be a subset of TRANSFER_PERMISSION_LIST. If a permission appears here, the target agent must not use it until revalidation confirmation is received. |
[HANDOFF_CONTEXT] | Task state, partial results, and open decisions the target agent needs to continue work | {"task_id": "inv-9821", "status": "awaiting_compliance_review", "completed_steps": ["invoice_parsed", "line_items_extracted"]} | Must be a valid JSON object. Null is acceptable for stateless handoffs. Large contexts should be summarized to fit within the target agent's context window. |
[HANDOFF_IDEMPOTENCY_KEY] | Unique key to prevent duplicate handoff processing | handoff-4f7a2b9c-1d3e-4f5a-8b9c-0d1e2f3a4b5c | Must be a UUID v4 string. The target agent must check this key against a processed-handoff store and reject duplicates. Null is not allowed. |
[TARGET_CONFIRMATION_ENDPOINT] | Callback URL or queue where the target agent must post its scope confirmation | Must be a valid HTTPS URL within the organization's internal network. Target agent must POST confirmation within 30 seconds or the handoff is considered failed. |
Implementation Harness Notes
How to wire the Agent Handoff Permission Transfer Prompt into a multi-agent orchestration layer with validation, logging, and fallback controls.
This prompt is not a standalone chat instruction; it is a structured generation step inside a multi-agent orchestrator. When Agent A prepares to hand off to Agent B, the orchestrator should call this prompt with the current session context, Agent A's active permission manifest, and the intended task for Agent B. The output is a machine-readable handoff payload—not a user-facing message—that the orchestrator parses, validates, and attaches to Agent B's system instructions before Agent B receives any user or tool context. Treat the handoff as a privilege-bracketing event: Agent B starts with zero trust until the handoff payload is validated and its permission scope is explicitly activated.
Wire this prompt into your agent framework as a pre-handoff hook. Before invoking Agent B, the orchestrator must: (1) extract Agent A's current permission set from a trusted source of truth (not from the conversation history), (2) populate the [SOURCE_AGENT_PERMISSIONS] and [TARGET_AGENT_DEFAULT_PERMISSIONS] fields from that source, (3) call the prompt with a unique handoff_id for traceability, and (4) validate the output against a JSON schema that enforces the transferred_permissions, revoked_permissions, requires_revalidation, and scope_confirmation_required fields. Reject any handoff payload where transferred_permissions contains entries not present in the source agent's manifest, or where requires_revalidation is empty for high-risk action categories such as write, delete, or external API access. Log the full handoff payload, validation result, and any rejection reason to an audit store before proceeding.
For production reliability, implement a retry-and-escalate pattern. If the prompt produces invalid JSON, missing required fields, or a permission set that fails validation, retry once with a stricter [CONSTRAINTS] block that includes the validation error message. If the second attempt fails, escalate to a human operator via a predefined escalation channel and block the handoff. Never default to granting full permissions on failure. For model choice, use a model with strong structured output and instruction-following capability (e.g., GPT-4o, Claude 3.5 Sonnet) and set temperature=0 to maximize determinism in permission transfer decisions. If your orchestrator supports tool use, consider implementing a validate_handoff_permissions tool that performs the schema and scope checks programmatically, keeping the model focused on the transfer logic rather than output formatting. The next step after a successful handoff is to inject the scope_confirmation_prompt into Agent B's system instructions and require Agent B to emit a confirmation receipt before executing any tool calls.
Expected Output Contract
Fields, format, and validation rules for the agent handoff permission transfer payload. Use this contract to validate the receiving agent's understanding of its inherited scope before it acts.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
handoff_id | string (UUID v4) | Must parse as valid UUID v4. Reject if missing or malformed. | |
source_agent_role | string | Must match one of the allowed role identifiers in the system registry. Enum check against [ALLOWED_ROLES]. | |
target_agent_role | string | Must differ from source_agent_role. Must exist in [ALLOWED_ROLES]. Reject self-handoff. | |
transferred_permissions | array of strings | Each entry must match a known permission key in [PERMISSION_CATALOG]. Array must not be empty. No wildcard entries allowed. | |
revoked_permissions | array of strings | If present, each entry must match a known permission key. Must not overlap with transferred_permissions. Null allowed if no revocations. | |
requires_revalidation | array of strings | Subset of transferred_permissions that require explicit user or system re-confirmation before use. Must not include permissions absent from transferred_permissions. | |
data_scope_constraint | object | Must contain tenant_id (string) and resource_ids (array of strings). Validate tenant_id matches [ACTIVE_TENANT]. Reject if scope exceeds source agent's original scope. | |
expiry_timestamp | string (ISO 8601 UTC) | Must parse as valid future timestamp. Reject if expiry is in the past or exceeds [MAX_HANDOFF_DURATION] from handoff creation time. | |
handoff_context_summary | string | Must be non-empty. Maximum 2000 characters. Must not contain raw PII or credentials. Run PII scanner before acceptance. | |
confirmation_required | boolean | Must be true if any entry in requires_revalidation is non-empty. If true, receiving agent must not execute transferred permissions until confirmation is logged. |
Common Failure Modes
What breaks first when transferring permissions between agents and how to guard against it.
Silent Privilege Escalation
Risk: The receiving agent inherits the full permission set of the sending agent without explicit scoping, allowing it to perform actions the handoff protocol never intended. Guardrail: Require an explicit permission manifest in every handoff payload that lists allowed tools, data scopes, and argument constraints. The receiving agent must validate its own scope against this manifest before taking any action.
Context Leakage Across Trust Boundaries
Risk: Sensitive context from the sending agent's session—user PII, internal state, prior tool outputs—bleeds into the handoff summary and becomes accessible to a lower-trust receiving agent. Guardrail: Implement a context-stripping step before handoff that redacts data outside the receiving agent's permission scope. Validate the handoff payload against a data classification schema before transmission.
Re-Validation Bypass
Risk: The receiving agent accepts the handoff payload as pre-authorized and skips its own permission checks, assuming the sending agent already validated everything. Guardrail: Design the handoff prompt to instruct the receiving agent to independently re-validate every permission and data scope claim. Include a mandatory confirmation step that logs the receiving agent's scope check before any tool call executes.
Ambiguous Permission Inheritance
Risk: The handoff protocol uses vague language like 'transfer appropriate permissions,' leaving the receiving agent to guess which scopes apply. This produces inconsistent behavior across model versions or invocation contexts. Guardrail: Use a structured permission transfer schema with explicit fields: granted_tools, denied_tools, data_scopes, expiry, and revalidation_required. No implicit inheritance.
Orphaned Tool Access After Handoff
Risk: The receiving agent completes its task but retains active tool sessions, API keys, or database connections from the handoff, creating a dangling access window. Guardrail: Include an access revocation instruction in the handoff prompt that triggers when the receiving agent signals task completion. Log revocation events and require the receiving agent to confirm session teardown before returning control.
Confused Deputy in Multi-Agent Chains
Risk: Agent A hands off to Agent B, which delegates to Agent C. Agent C receives permissions originally granted to Agent A without any intermediate scoping, enabling lateral privilege movement across the chain. Guardrail: Enforce non-transitive permission transfer. Each handoff must produce a new, potentially reduced scope. The receiving agent must never re-delegate permissions it received without explicit re-authorization from the originating authority.
Evaluation Rubric
Criteria for evaluating the quality and safety of the Agent Handoff Permission Transfer Prompt output before deploying it in a multi-agent system. Use these tests to confirm that the handoff protocol correctly declares, transfers, and validates permissions between agents.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Permission Declaration Completeness | Output explicitly lists all permissions of the sending agent, categorized as transferable, non-transferable, or requiring re-validation. | Missing permission categories or ambiguous language like 'some permissions may transfer'. | Schema validation: check for required fields [TRANSFERRED_PERMISSIONS], [RESTRICTED_PERMISSIONS], [REVALIDATION_REQUIRED] in the output JSON. |
Re-validation Trigger Specification | For each permission requiring re-validation, the output specifies the exact condition or authority required to grant it to the receiving agent. | Vague re-validation conditions such as 'check with admin' without specifying the mechanism or target. | Keyword match and schema check: confirm each item in [REVALIDATION_REQUIRED] has a non-null, non-empty [CONDITION] field. |
Receiving Agent Scope Confirmation | Output includes an explicit instruction for the receiving agent to confirm its final scope before acting, and to refuse any action outside that confirmed scope. | Receiving agent instructions missing a 'confirm scope before acting' step or lacking explicit refusal language for out-of-scope actions. | LLM-as-Judge: provide the output to a test agent and verify it refuses a known out-of-scope action from the handoff. Also check for presence of [RECEIVING_AGENT_CONFIRMATION_PROTOCOL]. |
Context Integrity During Transfer | The handoff payload preserves essential task context, user intent, and conversation history without leaking sensitive data from the sending agent's restricted scope. | Sensitive data from [RESTRICTED_PERMISSIONS] appears in the handoff context. Or, critical task context is truncated, causing the receiving agent to misinterpret the task. | Data leak scan: use a regex and entity recognition test harness on the generated handoff payload to detect PII or classified terms. Context fidelity: use a semantic similarity check between the original task and the handoff summary. |
Deny-by-Default Logic | The prompt instructs the receiving agent to treat any permission not explicitly listed in [TRANSFERRED_PERMISSIONS] or [REVALIDATION_REQUIRED] as denied. | The receiving agent attempts to use a tool or access data not in the transferred lists without triggering a refusal or re-validation request. | Adversarial test: provide a handoff payload with a truncated permission list and instruct the receiving agent to perform an action that was in the original agent's scope but omitted from the transfer. Confirm refusal. |
Idempotency and Conflict Handling | The handoff protocol includes instructions for handling duplicate handoffs or conflicting instructions, such as ignoring stale transfers or prioritizing the most recent valid handoff. | Receiving agent processes an old handoff payload after a new one has been issued, leading to incorrect state or permission regression. | State simulation: run a multi-turn test where two handoffs are sent. Verify the receiving agent uses the latest valid [HANDOFF_ID] and discards the stale one based on the protocol's conflict rule. |
Audit Trail Completeness | The output includes a structured log of the handoff event, including timestamp, sending agent ID, receiving agent ID, transferred permissions, and any re-validation decisions. | Missing fields in the audit log or a log that is generated but not included as a required part of the receiving agent's processing step. | Schema validation: confirm the output contains an [AUDIT_LOG] object with all required sub-fields. Integration test: verify the log is written to the target logging system in a test environment. |
Adversarial Permission Injection Resistance | The handoff protocol instructs the receiving agent to validate the integrity of the handoff payload and reject any transfer that includes permissions not in the sending agent's original declared scope. | Receiving agent accepts a handoff payload where an attacker has injected an extra, high-risk permission into [TRANSFERRED_PERMISSIONS]. | Red-team test: craft a malicious handoff payload with an unauthorized permission injected. Send it to a test receiving agent running the protocol and confirm it rejects the transfer with an integrity violation error. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base handoff schema but use a single model simulating both agents. Replace strict JSON schema validation with natural-language instructions: "List the permissions you are transferring and which require re-validation." Focus on getting the handoff concept right before hardening the format.
Prompt snippet
codeYou are Agent A handing off to Agent B. Describe: - What permissions you hold: [PERMISSION_LIST] - Which transfer to Agent B: [TRANSFER_LIST] - Which require re-validation: [REVALIDATION_LIST] - What Agent B must confirm before acting: [CONFIRMATION_STEPS]
Watch for
- The model inventing permissions not in your actual tool set
- Handoff summaries that omit critical constraints
- No mechanism to verify Agent B actually received the scope correctly

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us