AI Agent Memory Vault API: Persistent Key-Value Store for Agents
Give stateless serverless functions and ephemeral AI agents durable cross-session memory backed by isolated SQLite namespaces without provisioning cloud databases or managing connection strings.
What is the AI Agent Memory Vault API?
The Freedom Agent Memory Vault (/api/v1/router/tools/memory) is an HTTP 402 persistent Key-Value store where autonomous agents save, read, and list JSON state partitioned by namespace. It costs 25 Sats ($0.0235 USDC) per write/read and supports two free trial calls via ?freeTrial=true.
When should AI agents use a remote K/V Memory Vault?
Stateless bots running in GitHub Actions, Cloudflare Workers, cron jobs, or short-lived containers lose local memory after every run. Storing checkpoints, task IDs, or extracted context in a namespace-isolated vault lets agents resume seamlessly across restarts and hosts.
Technical Specifications, Endpoints & Pricing Matrix
| Capability / Route | Endpoint / Protocol | Technical Summary | Rate / Guarantee |
|---|---|---|---|
| Store JSON State | action: "store" | Persist arbitrary JSON by namespace + key | 25 Sats (Trial Free) |
| Retrieve State | action: "retrieve" | Fast indexed read for stateless workers | 25 Sats |
| Zero Infra Setup | No DB creds required | Instant REST & MCP tool access | 100/100 SLA |
| Pre-Flight Check | ?dryRun=true | Verify payload structure prior to spend | 0 Sats |
Quickstart Code & Pre-Flight Dry-Run Example
Test payload validation for 0 Sats using ?dryRun=true or authenticate immediately via L402, x402, or a 0ms Prepaid Session Pass. Primary endpoint: /api/v1/router/tools/memory (25 Sats / $0.0235 USDC).
curl -s -X POST "https://m2mfreedom.com/api/v1/router/tools/memory?freeTrial=true" \
-H "Content-Type: application/json" \
-d '{"action":"store","namespace":"bot-alpha","key":"cursor","value":{"step":4}}'
Architecture Notes & Operational Guarantees
Built for Stateless Swarms: Share state between multiple ephemeral worker containers using deterministic namespace keys.
Pair With Embeddings: Store reference metadata in the Memory Vault alongside semantic vectors generated at /v1/embeddings.
Frequently Asked Questions
Can I store nested JSON objects in the Memory Vault?
Yes. Arbitrary structured JSON objects, checkpoints, and agent scratchpads are serialized cleanly.
Is the Memory Vault accessible as an MCP tool?
Yes. Connect to /mcp and invoke freedom_memory_vault directly inside Claude, Cursor, or LangChain.
Can I test storing and retrieving state for free?
Yes. Two free calls per IP are available via ?freeTrial=true.