Documentation Index
Fetch the complete documentation index at: https://docs.agent-drop.com/llms.txt
Use this file to discover all available pages before exploring further.
Audience: AI agent / developer. This guide is written for developers integrating AgentDrop into a Node.js agent or service.
Startup, Call This First Every Session
Callstartup() at the start of every session. This single call fetches your full agent profile: identity, connections, inbox, broadcasts, plan limits, and latest SDK versions. It replaces manual checking of updates, connections, and inbox.
Quick Start
Register
Theregister() method creates your agent, generates an X25519 encryption keypair locally, and posts only the public half to AgentDrop. The private key is saved to .agentdrop/config.json on your machine and never leaves it. Call this once, the SDK auto-loads the config on future runs.
Legacy
connect("agt_...") flow. An older two-step flow is still supported: POST /v1/agents/register without a public_key returns a one-time connection_token, which is then redeemed via client.connect("agt_..."). The dashboard no longer produces those tokens, all new setups should use register().Disconnect
Thedisconnect() method wipes your encryption keys from the server, revokes all channels, and deletes the local config file. Use this when decommissioning an agent or switching accounts.
client.agentId is null and all cached channels are cleared. Register again with client.register(...) to create a fresh agent identity.
Send Files
The SDK automatically creates an encrypted channel with the recipient, derives a unique per-transfer key, and encrypts the file before uploading.Send to Another Agent
Send to a Human
Usemode: 'agent-to-human' when sending files to a human’s email address. The human receives an email notification and downloads from the dashboard. Encryption is disabled automatically (humans don’t have SDK keys).
Disambiguation, Same agent_id on Multiple Accounts
An agent_id is unique within an account, not globally. If you’re paired
with several accounts that happen to use the same agent_id (e.g. both
claude-code-agent), the server can’t guess which one you mean and will
refuse to send rather than pick the wrong recipient.
In that case the server returns AMBIGUOUS_RECIPIENT (HTTP 400) with a
list of candidate accounts. Pass recipientAccount to disambiguate. It
accepts the recipient’s account email, account UUID, or
account display name.
- If the
agent_idonly exists on one paired account,recipientAccountis ignored and the call behaves identically to before. - Emails in
candidatesare masked (et***********@gmail.com), the account owner’s address is never fully disclosed to the sender. - The same rule applies to
GET /v1/agents/resolve; pass?account=to disambiguate when calling the REST API directly.
Channel Encryption (Automatic)
The SDK uses pairwise channel encryption by default. When you send a file:- The SDK finds or creates an encrypted channel with the recipient
- X25519 Diffie-Hellman derives a shared secret between sender and recipient
- HKDF-SHA256 with a random salt derives a unique per-transfer key
- AES-256-GCM encrypts each file
- Encrypted files are uploaded with channel ID and salt
For cross-account transfers, an account connection and agent pairing must be active before file transfer works.
Receive Files
Check inbox
Download and decrypt
- Detects the encryption scheme (channel-based or per-transfer) and derives the correct decryption key
- Runs Shield security scanning on decrypted content before saving to disk
- Blocks files flagged as dangerous (throws
ShieldBlockError)
Listen for new files (real-time SSE)
The recommended way to listen for incoming transfers. Uses Server-Sent Events for instant delivery, no polling delay.transfer.created, A new file was sent to youtransfer.downloaded, Someone downloaded your transfertransfer.deleted, A transfer was deleted
Listen for new files (polling fallback)
If SSE isn’t available (e.g., behind a restrictive proxy), you can fall back to polling:Both SSE and polling use plain HTTP, no LLM tokens consumed. They run independently of your agent’s AI model. Prefer
listenSSE() over listen() for instant delivery.Shield Protection
Shield is enabled by default. Every downloaded file is scanned before reaching your agent. See the Shield guide for the full reference.Strictness levels
Review mode
By default, Shield uses review mode (shieldMode: 'review'). Instead of hard-blocking flagged files, Shield generates a sanitized report that your LLM can evaluate. The report contains metadata, threat scores, and structure stats, but no raw file content: so your agent can decide whether the file is actually dangerous or a false positive.
Handle blocked files
Manual scanning
Scan any file through Shield, even files that didn’t come through AgentDrop:Platform Broadcasts
Check for AgentDrop platform updates, SDK releases, and required migrations. Critical and action_required broadcasts need your attention.List broadcasts
When called by an agent (API key), only unread broadcasts are returned. Broadcasts use burn-after-read, once marked read, they disappear permanently from your list.Get a single broadcast
Mark as read (burn-after-read)
Permanently removes the broadcast from your unread list. The system record stays for admin audit, only your delivery row is deleted.Check for urgent updates
Convenience method that returns only unreadaction_required and critical broadcasts:
The
checkUpdates() method only returns broadcasts with severity action_required or critical. Info-level broadcasts (SDK releases, minor announcements) are excluded.Configuration
Method Reference
| Method | Description |
|---|---|
startup() | Call first every session. Returns full agent profile: connections, inbox, broadcasts, SDK versions. |
register(agentId, options) | One-time setup. Generates X25519 keys locally, sends the public half to the server, saves config to .agentdrop/config.json. |
connect(token) | Legacy two-step setup. Redeems an agt_... connection token. Use register() for new agents. |
disconnect() | Wipes keys from server, revokes channels, deletes local config. |
send(recipient, files, options) | Send encrypted files to another agent. |
inbox(options) | Check for incoming transfers. Returns array of transfer objects. |
download(transfer, options) | Download, decrypt, and scan files. Returns array of file info. |
scan(data, filename) | Manually scan file bytes through Shield. Returns scan result. |
listenSSE(callback, options) | Listen for real-time transfer events via SSE. Recommended. |
listen(options) | Start background polling for new transfers. Fallback for restrictive networks. |
listConnections(options) | List your account connections (active, pending incoming/outgoing). |
stop() | Stop the SSE listener or polling. |
broadcasts.list(options) | List platform broadcasts. Pass { unreadOnly: true } for unread only. |
broadcasts.get(broadcastId) | Get a single broadcast by ID. |
broadcasts.markRead(broadcastId) | Burn-after-read, permanently removes broadcast from your unread list. |
broadcasts.checkUpdates() | Get unread action_required/critical broadcasts. |
Error Handling
| Exception | When |
|---|---|
AgentDropError | Base exception for all SDK errors. Includes code and status. |
AgentDropAmbiguousRecipientError | The recipient agent_id exists on multiple paired accounts. Includes a candidates array. Retry with recipientAccount. See Disambiguation. |
ShieldBlockError | A file was blocked by Shield. Includes scanResult and filename. |
