---
title: Agent-to-Agent Secret Handoff - Passing Credentials Between AI Agents Safely
date: 2026-11-16
description: Multi-agent systems pass credentials through prompts, task queues, and logs. Here's a simple handoff pattern using single-use links that keeps secrets out of every intermediate step.
tags:
  [
    "multi-agent",
    "ai-agents",
    "agent-orchestration",
    "secrets-management",
    "mcp",
    "agent-security",
    "dropzone",
  ]
---

# Agent-to-Agent Secret Handoff

Multi-agent systems are now common. An orchestrator splits a task, sub-agents run in parallel, and results flow back up. Some of those agents run in different sandboxes, on different machines, or on different model providers.

At some point, one agent has a credential that another agent needs. How it gets there matters more than it seems.

---

## The problem: every hop is a copy

Say an orchestrator agent provisions a database and needs a worker agent to run migrations against it. The obvious approach is to include the connection string in the worker's task:

> Run migrations against postgres://admin:s3cret@db.internal:5432/app

That string is now in:

- the orchestrator's context and transcript
- the task queue or message bus
- the worker's prompt, context, and transcript
- any retry of the task
- any summary the orchestrator writes when it compacts its context
- any trace, eval, or observability tool watching the system

One credential has become six or more copies, each with its own retention policy, and most of them outside anyone's control.

---

## The pattern: pass a single-use link

Instead of passing the value, pass a link that can be opened exactly once.

1. **The sender creates a drop.** The orchestrator calls `create_drop` with the connection string and gets back a Dropzone link.
2. **The link travels instead of the secret.** The task says: *"Run migrations. The database URL is at this Dropzone link: ..."*
3. **The recipient opens it once.** The worker opens the link with the CLI straight into an environment variable or file (or calls `open_drop`, which returns the value into its context), uses it, and never repeats it in its replies.
4. **Every other copy is now inert.** The queue, the logs, the retries, and the summaries all hold a link that returns `not_found`. Only the sender and recipient ever handled the value itself.

Here's the same flow using the Dropzone CLI, which encrypts and decrypts on each agent's machine so the secret never reaches Dropzone in plaintext:

```sh
# sender
LINK=$(printf '%s' "$DATABASE_URL" | node dropzone.mjs send)

# recipient
DATABASE_URL=$(node dropzone.mjs open "$LINK")
```

The CLI is a single dependency-free file: `curl -fsSO https://dropzone.sh/dropzone.mjs`.

---

## You get tamper evidence for free

Single-use links have a useful side effect: they show you when something went wrong.

If the worker tries to open the link and gets `not_found`, someone opened it first. Maybe another agent, a retried task, or an overeager tool. That's a signal worth acting on: rotate the credential and look into it. A plaintext secret in a task description never tells you who else read it.

---

## Rules that keep the pattern sound

- **One link per recipient.** If three workers need a credential, create three drops. A shared link is consumed by whoever gets there first.
- **Recipients open, senders don't.** An agent should never open a link it created for someone else. Dropzone's MCP server says this explicitly in its instructions and tool descriptions.
- **Open late.** The recipient should open the link right before it needs the value, not when it first receives the task. That keeps the window short if the task gets cancelled.
- **Don't echo.** Once opened, the value should go into an environment variable or a file, not into the agent's reply.
- **Retries need fresh links.** A retried task can't reuse a consumed link. Have the orchestrator create a new drop on retry. That's also a natural point to ask whether the first attempt leaked anything.

---

## When to use something else

Single-use links are for handoffs. If a credential is long-lived and many services need it, it belongs in a secrets manager with proper access control and rotation. The link pattern complements a vault: it covers the moments when a secret has to cross from one context to another, which is exactly where vaults usually get bypassed.

---

## Try it

The Dropzone MCP server is at `https://dropzone.sh/api/mcp`, and machine-readable docs are at [/llms.txt](/llms.txt). It's free, needs no authentication, and works with any agent that can make an HTTP request. Setup instructions for popular clients are on the [agents page](/agents).
