@memcell/sdk
Official TypeScript and Node.js SDK for MemCell—persistent cognitive memory and reasoning substrate for AI coding agents.
Installation
npm install @memcell/sdk
pnpm add @memcell/sdk
yarn add @memcell/sdk
Quickstart
import { MemCell } from "@memcell/sdk";
const memory = new MemCell({
auth: { apiKey: process.env.MEMCELL_API_KEY! },
});
const recall = await memory.recall({
namespace: "my-org/my-project",
query: "production deployment procedure",
});
console.log(recall.promptContext);
Agentic Loop Wrapper (wrapExecution)
const devopsMemory = memory.scope("my-org/devops", {
subject: "pipeline:deploy",
});
const result = await devopsMemory.wrapExecution(
{
action: "promote_canary",
externalRef: "github:run:98213",
},
async (ctx) => {
return await runPromotion(ctx.promptContext);
},
);
OAuth 2.0 Machine-to-Machine (M2M) Authentication
const memory = new MemCell({
auth: {
clientId: process.env.MEMCELL_CLIENT_ID!,
clientSecret: process.env.MEMCELL_CLIENT_SECRET!,
scope: "memory:read:acme/* memory:write:acme/backend",
},
});
Dual-Threshold Rate Limiting & Resilience
const memory = new MemCell({
auth: { apiKey: "mc_live_..." },
maxRetries: 3,
onRateLimitWarning: (warning, response) => {
console.warn("Approaching rate limit capacity:", warning);
},
});
License
Apache-2.0 © MemCell