Skip to main content
Private Beta
Stage 14

MemoryWell Beta Kit

Persistent memory infrastructure for AI apps. Four functions. Under 30 minutes to first success.

< 30 min
Time to first success
4 functions
API endpoints
Enforced
Tenant isolation

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.

🌍 Hello World Demo →

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

1

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.

2

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:

bash
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: 68fd7f06eefc7c2e6c12ec5e

You'll get back a memory_id. Keep it — you'll need it for the recall step.

3

Run the golden path

Copy this and run it. It covers all four SDK functions end-to-end: store → list → recall → search.

javascript
// 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);
4

Integrate into your AI app

The typical integration pattern for an AI chatbot:

javascript
// 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

HOT
Most recent, fastest access
WARM
Default for new memories
COLD
Older, less accessed
FROZEN
Archived, long-term storage

Tiering is managed automatically. You can filter by tier in mwListMemories. New memories are always stored as WARM.

Error Reference

CodeStatusMeaningRetry?
UNAUTHORIZED401Invalid or missing API keyNo
FORBIDDEN403You don't own that memoryNo
NOT_FOUND404Memory ID doesn't existNo
INVALID_REQUEST400Bad input — check the fieldNo
RATE_LIMITED429Slow down — check Retry-After headerYes
INTERNAL_ERROR500Our fault — report itYes

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