MemoryWell Beta Kit
Persistent memory infrastructure for AI apps. Four functions. Under 30 minutes to first success.
Start here
Run the Hello World demo first.
Two sessions. One claim. See resumed_from_prior: true in the response — that's the proof the lifecycle works before you write a single line of integration code.
What is MemoryWell?
MemoryWell is a memory infrastructure layer for AI applications. It gives your AI a place to store, retrieve, and semantically search conversations and knowledge — across sessions, across users, across time.
Every memory is stored with a unique ID, automatically embedded for semantic search, catalogued by tier and time, and isolated per tenant — so your users' data never touches each other.
The core idea:
Your AI calls mwStoreMemory after each conversation. Before the next session, it calls mwSearchMemories to find what's relevant. That's it. Your AI now has memory.
Getting Started
Get your API key
You've been invited as a private beta developer. Your API key is the same credential used to authenticate with MemoryWell. Email beta@memorywell.ai if you haven't received yours.
Your API key authenticates you AND establishes your tenant. Every memory you store is automatically scoped to your account — no configuration needed.
Make your first call
All four SDK functions use the same pattern: POST request with JSON body, Bearer token auth. Here's everything you need to store your first memory:
curl -X POST https://app.base44.com/api/apps/YOUR_APP_ID/functions/mwStoreMemory \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"content": "This is my first MemoryWell memory. Hello world.",
"metadata": { "name": "First Memory", "source": "curl-test" }
}'
# Your App ID: 68fd7f06eefc7c2e6c12ec5eYou'll get back a memory_id. Keep it — you'll need it for the recall step.
Run the golden path
Copy this and run it. It covers all four SDK functions end-to-end: store → list → recall → search.
// MemoryWell SDK — Golden Path
// Store → List → Search in ~20 lines
const BASE_URL = "https://app.base44.com/api/apps/68fd7f06eefc7c2e6c12ec5e/functions";
const API_KEY = "your-api-key";
const mw = async (fn, body) => {
const res = await fetch(`${BASE_URL}/${fn}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify(body)
});
return res.json();
};
// 1. Store a memory
const stored = await mw("mwStoreMemory", {
content: "We discussed building a persistent memory layer for AI apps.",
metadata: { name: "Architecture Chat", source: "my-app" }
});
console.log("Stored:", stored.memory_id);
// 2. List recent memories
const list = await mw("mwListMemories", { tiers: ["WARM"], limit: 10 });
console.log("Memories:", list.count);
// 3. Recall full content
const memory = await mw("mwRecallMemory", { memory_id: stored.memory_id });
console.log("Recalled:", memory.conversation);
// 4. Semantic search
const results = await mw("mwSearchMemories", {
query: "persistent memory for AI",
limit: 5
});
console.log("Search results:", results.results);Integrate into your AI app
The typical integration pattern for an AI chatbot:
// BEFORE each AI response — inject relevant memories as context
async function getMemoryContext(userMessage) {
const relevant = await mw("mwSearchMemories", {
query: userMessage,
limit: 5
});
return relevant.results
.filter(r => r.score > 0.7)
.map(r => r.bottle_name)
.join("\n");
}
// AFTER each AI response — store the conversation
async function saveConversation(userMessage, aiResponse) {
await mw("mwStoreMemory", {
content: `User: ${userMessage}\nAssistant: ${aiResponse}`,
metadata: { name: `Chat ${new Date().toLocaleDateString()}`, source: "my-chatbot" }
});
}
// In your chat handler:
const context = await getMemoryContext(userInput);
const systemPrompt = `You are a helpful assistant.
Relevant past context:\n${context}`;
const aiResponse = await callYourLLM(systemPrompt, userInput);
await saveConversation(userInput, aiResponse);API Reference
Click any endpoint to see request/response shapes.
Storage Tiers
Tiering is managed automatically. You can filter by tier in mwListMemories. New memories are always stored as WARM.
Error Reference
| Code | Status | Meaning | Retry? |
|---|---|---|---|
| UNAUTHORIZED | 401 | Invalid or missing API key | No |
| FORBIDDEN | 403 | You don't own that memory | No |
| NOT_FOUND | 404 | Memory ID doesn't exist | No |
| INVALID_REQUEST | 400 | Bad input — check the field | No |
| RATE_LIMITED | 429 | Slow down — check Retry-After header | Yes |
| INTERNAL_ERROR | 500 | Our fault — report it | Yes |
Security Guarantees
Tenant Isolation
Your API key establishes your identity. You can only read and write memories you own. Cross-tenant access returns 403 — not 404.
Auth-Derived Tenancy
Your tenant ID is derived from your authenticated token server-side. It cannot be spoofed or overridden in the request body.
Audit Trail
Every read and write is logged with timestamp, action type, and outcome. Full audit history available on request.
Rate Limiting
Abuse limits enforced per tenant per endpoint. When limited, the response includes a Retry-After header telling you exactly when to try again.
You're one of three.
This is a private beta with three developers. Your feedback directly shapes the SDK. If something breaks, is confusing, or is missing — that's the most valuable thing you can tell us.
Beta feedback
scott.dalmeida75@hotmail.com
Response time
Within 24 hours