{"uid":"cap_CzekBpxqwewQ-F4JxPMqT","slug":"agent-data-tools-revmesh2074-workers-dev-agent-memory-save-key-value-44ca1871","name":"Agent Memory Save: Key-Value Store for Agents","description":"Save a value (up to 8,000 characters of text or JSON) under a key in your own namespace, so an agent can remember facts, preferences or task state between runs. Overwrites an existing key; expires after 1 to 30 days (default 30). Values are kept until they expire (at most 30 days) or are deleted; reads anywhere may lag a write made elsewhere by up to a minute. Use to persist what an agent learned for a later call to memory_get.","url":"https://agent-data-tools.revmesh2074.workers.dev/memory/set?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["namespace","key","value"],"properties":{"key":{"type":"string","description":"The key, up to 200 characters"},"days":{"type":"string","description":"Days to keep it, 1 to 30 (default 30)"},"value":{"type":"string","description":"The text or JSON to save, up to 8,000 characters"},"namespace":{"type":"string","description":"Your namespace: a secret of 16 to 128 letters, digits, - or _ that you choose and reuse. Anyone who knows it can read and write it, so treat it like a password; send it in a POST body to keep it out of URLs."}}},"responseSchema":{"type":"object","properties":{"key":{"type":"string"},"size":{"type":"number"},"saved":{"type":"boolean"},"expiresAt":{"type":"string"},"updatedAt":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USD","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_k-G1rpxTbrX4rzKRqdUr2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Persists a text or JSON value under a named key in a private namespace so an AI agent can retrieve it later across sessions.","exampleAgentPrompt":"Remember that the user prefers dark mode and their preferred currency is EUR — store that under the key 'user_preferences' in my namespace 'agentsecret-namespace-7742' for the next 30 days.","exampleUseCases":[{"title":"Persist user preferences across sessions","prompt":"Save the user's preferences — they like concise responses, use metric units, and are in the Europe/Paris timezone — under the key 'user_prefs' in my namespace 'myagent-secret-ns-0042'. Keep it for 30 days."},{"title":"Store intermediate task state mid-workflow","prompt":"I'm halfway through a multi-step research task. Save this JSON summary of what I've gathered so far under the key 'research_checkpoint_2024' in namespace 'researchbot-ns-9981' for 7 days so I can pick it up in the next run."},{"title":"Cache API response for reuse","prompt":"Store the company profile JSON I just fetched for Acme Corp under the key 'acme_corp_profile' in namespace 'bizagent-cache-ns-5521' and keep it for 3 days so I don't have to look it up again."}],"resultDescription":"Returns a JSON object confirming whether the value was saved (saved: true), the key name, the size of the stored value in bytes, the ISO timestamp when it was last updated, and the ISO timestamp when it will expire.","failureModes":["Namespace not provided or shorter than 16 characters — request rejected","Key exceeds 200 characters — validation error","Value exceeds 8,000 characters — request rejected","Days parameter out of 1–30 range — validation error or default used","Eventual consistency lag — a read on another node may not reflect this write for up to 60 seconds","Payment failure via x402 — call not charged, not executed"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to persist small pieces of text or JSON (facts, preferences, state, results) between separate runs or tool calls without setting up a database. It is ideal for lightweight, short-lived state (up to 30 days) where eventual consistency (up to 1-minute read lag) is acceptable. Prefer this over in-context memory when data must survive across sessions or agent restarts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:51:36.016Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-agent-memory-save-key-value-44ca1871"}