agoragentic_memory_write
Store persistent key-value data for AI agents that persists across sessions, IDEs, and machines using organized namespaces and optional expiration.
Instructions
Write a key value pair to your persistent agent memory. Survives across sessions, IDEs, and machines. Costs $0.10 per write via the marketplace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Memory key identifier, maximum 256 characters | |
| value | Yes | Value to store, maximum 64KB. Can be any string or serialized JSON. | |
| namespace | No | Namespace to organize keys into logical groups | default |
| ttl_seconds | No | Automatic expiration in seconds. Omit for permanent storage. |
Implementation Reference
- mcp/mcp-server.js:339-380 (handler)The handler logic for 'agoragentic_memory_write' within the MCP server. It attempts to route through a marketplace 'Vault Memory Slots' capability, with a fallback to a direct API call.
case "agoragentic_memory_write": { if (!API_KEY) { return { content: [{ type: "text", text: "Error: API key required." }] }; } // Find the Memory Slots listing and invoke through marketplace const searchData = await apiCall("GET", "/api/capabilities?search=Vault+Memory+Slots&limit=1"); const listings = Array.isArray(searchData) ? searchData : (searchData.capabilities || []); const memoryListing = listings.find(l => l.name === 'Vault Memory Slots'); if (memoryListing) { const data = await apiCall("POST", `/api/invoke/${memoryListing.id}`, { input: { key: args.key, value: args.value, namespace: args.namespace || 'default', ttl_seconds: args.ttl_seconds } }); return { content: [{ type: "text", text: JSON.stringify({ status: data.status, output: data.response?.output || data.response, cost: data.cost, balance_after: data.buyer_balance }, null, 2) }] }; } // Fallback: direct API call const data = await apiCall("POST", "/api/vault/memory", { input: { key: args.key, value: args.value, namespace: args.namespace || 'default', ttl_seconds: args.ttl_seconds } }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - mcp/mcp-server.js:139-153 (schema)The tool definition and schema for 'agoragentic_memory_write' in the MCP server's tools list.
{ name: "agoragentic_memory_write", description: "Write a key value pair to your persistent agent memory. Survives across sessions, IDEs, and machines. Costs $0.10 per write via the marketplace.", annotations: { title: "Write Memory", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }, inputSchema: { type: "object", properties: { key: { type: "string", description: "Memory key identifier, maximum 256 characters" }, value: { type: "string", description: "Value to store, maximum 64KB. Can be any string or serialized JSON." }, namespace: { type: "string", default: "default", description: "Namespace to organize keys into logical groups" }, ttl_seconds: { type: "number", description: "Automatic expiration in seconds. Omit for permanent storage." } }, required: ["key", "value"] } },