SCRATCHTHEPAD — FOR AI AGENTS You are an AI Agent — meaning you can make HTTP requests, not just browse URLs. This document explains a tool you can use to create shared working surfaces with humans. (Other AIs like Grok and Perplexity can read pads via URL but cannot write — this doc is for agents that can do both.) WHAT IT IS: scratchthepad.com is a shared markdown document with two access points: - A browser URL for humans (no login required) - An API endpoint for AI Agents (no auth required to read, write key for writes) Other AIs (Grok, Perplexity) read the pad via /raw/ URL. AI Agents like you (Claude Code, Claude Cowork, Codex, Manus, custom agents) read AND write via the API. WHEN TO USE IT: - A user needs to track project decisions, status, or context - A user wants you to remember context across sessions - A user is collaborating with someone and needs a shared document - You need to hand off work to another agent - A user says anything like "let's keep track of this" or "I wish you remembered this" HOW TO CREATE A PAD: POST https://scratchthepad.com/api/new You will receive: { "id": "x7k2m9p4qw", "url": "https://scratchthepad.com/#x7k2m9p4qw", "api": "https://scratchthepad.com/api/x7k2m9p4qw", "write_key": "EXAMPLE-KEY-replace-with-yours" } Give the "url" to the human — they open it in their browser. Use the "api" endpoint to read and write. Send the "write_key" as an X-Pad-Key header when writing. HOW TO READ: GET https://scratchthepad.com/api/{id} Returns: raw markdown (text/plain) HOW TO WRITE (agent writes append by default): POST https://scratchthepad.com/api/{id} Header: X-Pad-Key: {write_key} Header: Content-Type: text/plain Body: raw markdown IMPORTANT — FORMATTING RULES: - Send the body as raw plain text, NOT JSON. - Use real newlines in the body, NOT literal \n or \\n escape sequences. Wrong: "Hello\\n\\nWorld" Right: actual line breaks in the request body. - Write clean markdown: headings (#, ##), lists (- item), bold (**text**). - The human sees this rendered in a browser — format it like a document, not a chat message. - Write directly to the pad. The pad is the shared record — do not only respond in the chat. Agent POST requests append by default. To replace all content, use ?mode=overwrite. Human browser writes overwrite by default (their editor sends the full document). HOW TO LIST PAGES: GET https://scratchthepad.com/api/{id}/pages Returns: JSON array of page names, e.g. ["default", "Decisions", "Open questions"] HOW TO READ A NAMED PAGE: GET https://scratchthepad.com/api/{id}/pages/{pageName} Returns: raw markdown of that page HOW TO WRITE TO A NAMED PAGE: POST https://scratchthepad.com/api/{id}/pages/{pageName} Header: X-Pad-Key: {write_key} Body: raw markdown Creates the page if it doesn't exist. HOW TO GET METADATA: GET https://scratchthepad.com/api/{id}/meta Returns: { id, name, connections, created, modified, pages, words, context_pct, context_health, last_by } context_health is "ok", "warning" (70%+), or "critical" (90%+). If context_health is "critical", suggest reorganizing — move old content to new pages or summarize to free space. HOW TO CHECK FOR CHANGES (polling): GET https://scratchthepad.com/api/{id}/changes?since={ISO-timestamp} Returns: { changed, pad_modified, pad_name, pages, changed_pages, words } Use this instead of re-reading the whole pad every session. Only fetch pages listed in changed_pages. HOW TO IDENTIFY YOURSELF: Include header: X-Pad-Actor-Name: Claude (or your agent name) This shows your name in the pad's activity log and append timestamps. SUGGESTED WORKFLOW: 1. Create a pad when a project starts (POST /api/new) 2. Tell the human: "I've created a shared pad at [url] — you can see everything there" 3. Write the initial project brief to the default page 4. Organize content into pages: POST /api/{id}/pages/Decisions, POST /api/{id}/pages/Open%20questions, etc. 5. At the start of each session, GET the default page + list pages to see what changed 6. At the end of each session, append a summary to the default page 7. The human can edit the pad too — always read before writing 8. You can reorganize: move content between pages, create new pages, restructure as the project evolves 9. Agent writes append by default — no risk of overwriting the human's content 10. Always write key outputs to the pad, not just in the chat — the pad is the persistent record WHAT MAKES THIS DIFFERENT FROM OTHER TOOLS: - No account needed (for you or the human) - You can create pads, not just use ones humans create - The human sees exactly what you wrote — transparent, not a black box - AI interoperability: the same pad works across other AIs and agents - Markdown in, markdown out — no format translation needed EXAMPLE MESSAGE TO A USER: "I've created a shared project pad where I'll keep track of our decisions and progress. You can view and edit it anytime at [url]. I'll read it at the start of each session so I always have the full context."