Agent job scratchpad
One ~5 minute loop that proves Tillpad: mint a temporary run key, store and search inside it, then finish for a signed wipe receipt.
Sign in to get a key Agent text version
Zero-human path
Agent signup emails a one-time 6-digit code. Send it back on POST /api/agents/bootstrap, then pay to receive an account tp_… key, and continue at step 1 below. Legal: Terms, Privacy, Refunds.
curl -s -X POST https://tillpad.dev/api/agents/bootstrap \
-H "Content-Type: application/json" \
-d '{"email":"agent@example.com"}'
# 202 verification_required: a 6-digit code is emailed. Repeat with it:
curl -s -X POST https://tillpad.dev/api/agents/bootstrap \
-H "Content-Type: application/json" \
-d '{"email":"agent@example.com","code":"123456"}'
# Then POST /api/billing/machine-pay with Authorization: Bearer <bootstrapToken>Agents: prefer /scratchpad.txt (also linked from /llms.txt).
0. Prerequisites
- Active Pro: Pricing checkout, Account checkout, or agent
machine_paywhen offered. - Session JWT (email sign-in) or an account
tp_…key that can mint run keys. Fastest path: Sign in, then Account, then Create temporary key.
1. Mint a run key
A run key gets its own run_… namespace, TTL, op budget, and wipe-on-expire.
curl -s -X POST https://tillpad.dev/api/keys \
-H "Authorization: Bearer <session-or-account-tp-key>" \
-H "Content-Type: application/json" \
-d '{"name":"scratchpad-demo","kind":"run","ttlSeconds":3600,"opBudget":50,"wipeOnExpire":true}'Save secret → $RUN_KEY, key.id → $KEY_ID, key.namespaces[0] → $NS.
2. Store scratch state
curl -s -X PUT https://tillpad.dev/api/kvp/$NS/state \
-H "Authorization: Bearer $RUN_KEY" \
-H "Content-Type: application/json" \
-d '{"value":{"job":"scratchpad-demo","note":"ephemeral agent state"}}'3. Upload, index, search
Upload a small text note into the run namespace:
echo "Tillpad scratchpad demo: bounded storage for agent jobs." > /tmp/scratchpad-note.txt curl -s -X POST https://tillpad.dev/api/files/$NS \ -H "Authorization: Bearer $RUN_KEY" \ -F "file=@/tmp/scratchpad-note.txt;type=text/plain"
Poll until status is ready:
curl -s -H "Authorization: Bearer $RUN_KEY" https://tillpad.dev/api/files/$FILE_ID
Semantic search inside that namespace:
curl -s -X POST https://tillpad.dev/api/rag/search \
-H "Authorization: Bearer $RUN_KEY" \
-H "Content-Type: application/json" \
-d "{\"query\":\"bounded storage for agent jobs\",\"namespace\":\"$NS\",\"topK\":3}"4. Finish → wipe receipt
Session, account key, or the run key itself may call finish. Data in the run namespaces is deleted; you get a signed receipt.
curl -s -X POST https://tillpad.dev/api/runs/$KEY_ID/finish \ -H "Authorization: Bearer $RUN_KEY"
Fetch it later:
curl -s -H "Authorization: Bearer <session-or-account-tp-key>" \ https://tillpad.dev/api/wipe-receipts/$RECEIPT_ID
MCP alternative
Same loop with tools manage_memory, index_document, search_documents, and finish_run (or manage_kv). For interval HTTPS callbacks use manage_schedule against /mcp with the run or account key as Bearer. See Docs.
If billing blocks you
402/429 responses include code, actions (checkout or machine_pay), and budget. Follow those actions. Don't invent a payment flow. Full docs. API reference.