{"uid":"cap_FZ7P5vKYkPb0sNfLsZ2_f","slug":"p0-agent-economy-index-kv-store-write-e2779b3a","name":"P0 Agent Economy Index – KV Store (Write)","description":"An open index of the machine-to-machine (agent) economy. x402 routes: ranked discovery over a verified x402 seller set (sellers whose 402 P0 read itself plus registry-verified entries), scored by relevance and evidence of a live 402 challenge, with a receipt naming the snapshot hash and scoring revision; demand figures are P0's own on-chain counts of transfers to the sellers' wallets. /economy routes, for Tempo MPP, Virtuals ACP, Olas, Masumi, ERC-8004 agent registries, Solana agent registries, Base agent contracts and MCP servers (Official MCP Registry): each protocol's published figures (agent or server counts, transactions or payment events; payers and USD volume only where the source publishes them: payers for x402 and Tempo MPP, USD volume for x402 and Virtuals ACP), each with its unit, window and source; units differ, so totals are not summed. L402 listings are not covered.","url":"https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/kv/put?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9._:/-]{1,128}$","description":"Key, 1-128 characters from A-Z a-z 0-9 . _ : / -"},"ttl":{"type":"integer","default":2592000,"maximum":7776000,"minimum":60,"description":"Seconds to keep the key"},"value":{"type":["string","object","array","number","boolean"],"description":"Text, or JSON stored as text (max 8 KB)"}}},"responseSchema":{"type":"json","example":{"key":"session/last-run","note":"Namespace = the wallet that paid for this call: only calls paid by the same wallet can read these keys. Stored in Cloudflare KV (eventually consistent, visible everywhere within about 60 s), plain text, not encrypted at the application level: do not store secrets. Expired keys disappear.","as_of":"2026-10-19T12:00:00.000Z","bytes":26,"stored":true,"namespace":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","stored_as":"json","expires_at":"2026-10-20T12:00:00.000Z","ttl_seconds":86400}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8uNADMnfEVTLNAEPuzSie","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Stores a key-value pair in a wallet-namespaced Cloudflare KV store, accessible only to calls paid by the same wallet","exampleAgentPrompt":"Store the key 'session/last-run' with the value '2026-10-19T12:00:00Z' and keep it for 24 hours (86400 seconds) in my wallet-namespaced KV store.","exampleUseCases":[{"title":"Persist agent session state between runs","prompt":"Save the key 'agent/state' with the JSON value '{\"step\":3,\"status\":\"in-progress\"}' and keep it for 1 hour (3600 seconds) so my agent can resume where it left off."},{"title":"Cache a computed result with expiry","prompt":"Write the key 'cache/price-feed' with the value '42500.00' and set it to expire in 5 minutes (300 seconds), so future agent calls can read it without recomputing."},{"title":"Store a workflow checkpoint flag","prompt":"Set the key 'workflow/step2-done' to true with a TTL of 2 days (172800 seconds) so I can check later whether my agent completed step 2."}],"resultDescription":"Returns a JSON object confirming the write with fields: stored (boolean), key, namespace (the paying wallet address), bytes written, stored_as type (json or string), ttl_seconds, expires_at timestamp, and as_of timestamp of the operation.","failureModes":["Key exceeds 128 characters or contains invalid characters — rejected with validation error","Value exceeds 8 KB — rejected with size error","TTL below 60 or above 7,776,000 seconds — rejected with range error","Payment not received or insufficient — x402 payment required error returned","Cloudflare KV eventual consistency delay — key may not be visible globally for up to ~60 seconds after write","Reading key from a different wallet namespace — access denied, key not found"],"whenToPreferThis":"Use this endpoint when an AI agent needs lightweight, wallet-scoped persistent storage to carry state between runs, cache intermediate results, or checkpoint a workflow — especially within the x402 micropayment ecosystem where the paying wallet acts as the natural namespace. Prefer it over general-purpose databases when you need zero-config, globally distributed key-value storage with automatic TTL expiry and the data is non-sensitive (not encrypted at rest). Not suitable for secrets, large blobs (>8 KB), or cross-wallet data sharing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-16T12:45:50.913Z","isFirstParty":false,"canonicalSlug":"p0-agent-economy-index-kv-store-write-e2779b3a"}