{"uid":"cap_ob4Z4DMxQaVW7eiZWTkKF","slug":"agent-memory-api-store-memory-177839b9","name":"Agent Memory API – Store Memory","description":"Store a memory in persistent agent storage","url":"https://agent-memory-api.johntaylor1online.workers.dev/memory/add","method":"POST","headers":{},"bodySchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"body":{},"enum":["POST"],"type":"string","bodyType":"json"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"memories":[{"score":0.95,"content":"Memory recall works"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_e-xiVTqTj415OJYdW_2yl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Persistently stores a memory entry in an agent's long-term storage backend via a paid POST request.","exampleAgentPrompt":"Remember that my preferred meeting time is Tuesday mornings — save that to your persistent memory so you can recall it in future conversations.","exampleUseCases":[{"title":"Persisting user preferences across sessions","prompt":"Save to your long-term memory that I prefer concise bullet-point summaries over long paragraphs, so you remember this in every future conversation."},{"title":"Recording agent task context mid-workflow","prompt":"We're halfway through the onboarding workflow for Acme Corp — store that context in your persistent memory so we can pick up exactly where we left off tomorrow."},{"title":"Storing learned facts about a project","prompt":"Remember that the Project Apollo deadline is March 15th and the lead contact is Sarah Chen — save both of those to your memory storage for future reference."}],"resultDescription":"Returns a JSON object containing a list of memories with a relevance score (e.g. 0.95) and the stored memory content, confirming successful persistence.","failureModes":["Payment not completed (402 response if x402 payment fails or is missing)","Invalid input schema (missing required 'type' or 'method' fields)","Storage backend unavailable (Cloudflare Worker error or timeout)","Duplicate memory not deduplicated — same content may be stored multiple times","Memory content too large or malformed causing rejection"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to persist information across sessions or conversations using an x402 micropayment-gated storage API hosted on Cloudflare Workers. It is best suited for lightweight agent memory writes where per-call pricing (~$0.02 USDC) is acceptable and the agent needs durable, retrievable memory without managing its own database infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:34:09.659Z","isFirstParty":false}