# Flashpaper — Self-Destructing Notes & Files (Full Technical Specification & AI Agent Protocol) > Flashpaper is a security-first, ephemeral secret sharing application and agent infrastructure designed for developers, DevOps teams, agency owners, and AI Agents. Client-side browser flows offer true zero-knowledge end-to-end encryption. Agent API flows offer server-side ephemeral encryption with RAM-only storage and zero disk persistence. ## Encryption Architectures ### 1. Client-Side Browser Flow (POST /api/vault) — True Zero-Knowledge - Cryptography: Web Crypto API (AES-256-GCM / PBKDF2) - Key Location: Decryption key is generated strictly in browser memory and appended to the URL hash fragment (#key). The server never receives the hash fragment or cleartext. - Server Perception: The server receives only encrypted ciphertext Base64 strings and initialization vectors (IV). ### 2. Agent API Flow (POST /api/agent/vault & MCP Server) — Server-Side Ephemeral Encryption - Cryptography: Server-side Node.js crypto (AES-256-GCM) - Processing Flow: Cleartext is transmitted over HTTPS/TLS, encrypted in server volatile RAM memory, the raw key buffer is immediately zero-filled, and ciphertext is stored in an in-memory Map. - Protection: Zero disk persistence. Secrets exist only in volatile RAM until read or expired. ## AI Agent Integration Protocols ### 1. Direct Agent Endpoint: POST /api/agent/vault AI Agents can issue a single HTTP call to create self-destruct links with agent attribution: Request: POST /api/agent/vault Headers: X-Api-Key: Content-Type: application/json { "secretText": "MY_CONFIDENTIAL_TOKEN_123", "burnTrigger": "1_view", "antiScreenshot": false, "agentName": "Cursor AI Assistant", "agentPurpose": "Database Credential Provisioning" } Response: { "success": true, "vaultId": "d3b07384-d113-40a6-a730-b3b44e05e550", "secretUrl": "https://flashpaper.app/secret/d3b07384-d113-40a6-a730-b3b44e05e550#x7y8z9...", "destroyUrl": "https://flashpaper.app/api/vault/d3b07384-d113-40a6-a730-b3b44e05e550?token=...", "destroyToken": "a1b2c3...", "expiresAt": "2026-07-27T10:00:00Z", "maxViews": 1, "encryptionMode": "server-side-ephemeral" } ### 2. Agent System Health & RAM Monitoring: GET /api/agent/health Request: GET /api/agent/health Response: { "status": "healthy", "system": "Flashpaper Ephemeral Agent Infrastructure", "activeSecretsInRAM": 42, "memory": { "heapUsedMB": 68, "heapTotalMB": 128, "circuitBreakerActive": false }, "protocols": { "agentApi": true, "mcpServer": true, "openApiSpec": true, "llmsTxt": true }, "encryptionMode": "server-side-ephemeral", "storageType": "RAM-Only Memory Map (Zero Disk Persistence)" } ### 3. Agent-to-Agent Dead-Drop Claim Endpoint: POST /api/agent/vault/:id/claim CRITICAL: Automated agents MUST use POST /api/agent/vault/:id/claim to claim secrets — never fetch the /secret/ HTML page directly, as web crawler shields block headless browsers. Request: POST /api/agent/vault/d3b07384-d113-40a6-a730-b3b44e05e550/claim Content-Type: application/json { "key": "x7y8z9a1b2c3..." } Response (200 OK): { "secretText": "MY_CONFIDENTIAL_TOKEN_123", "agentName": "Provisioner Agent A", "agentPurpose": "Database Provisioning", "remainingViews": 0, "burned": true, "encryptionMode": "server-side-ephemeral" } Interception/Double-Claim Signal (404 Not Found): { "error": "Secret not found, expired, or already burned.", "burned": true } ### 4. Model Context Protocol (MCP) Support: POST /api/mcp Cursor, Claude Desktop, and desktop agents connect directly using standard MCP JSON-RPC 2.0: - Method "tools/list": Returns available tools (create_secret_burn_link, claim_secret, check_secret_status, burn_secret_immediately). Supports agentName, agentPurpose, and webhookUrl arguments. - Method "tools/call": Invokes tools like "create_secret_burn_link" or "claim_secret". ### 5. OpenAPI 3.0 Specification: GET /openapi.json Auto-discoverable by OpenAI Custom GPT Actions, Zapier, n8n, and LangChain. ## Verified Agent Issuer Badges When secrets are created via the Agent API or MCP server with agentName metadata, Flashpaper renders a prominent "Verified Agent Issuer" badge upon decryption to assure recipients of the origin and purpose. ## Technical Architecture & Security Protocols 1. Key Splitting & Cryptography: - Browser UI: Web Crypto API client-side AES-GCM. Key stays in URL fragment (#key). - Agent API: Node.js crypto AES-256-GCM in RAM. Key returned in URL fragment (#key). - RFC 3986 guarantees fragment identifiers are never transmitted to HTTP servers. 2. Volatile RAM Destruction: - Best-effort buffer zeroing before deleting map references. - 100% database-free (in-memory RAM storage only). 3. Anti-Screenshot & Anti-OCR Shielding: - Interactive spotlight mask isolates read focus while obscuring surrounding text.