Thermodynamic memory for AI agents. Zero dependencies.
Sulcus is a memory system where physics decides what to forget. Memories have heat — hot memories are instantly accessible, cold ones fade naturally. CRDT sync keeps agents in lockstep.
npm install sulcusimport { Sulcus } from "sulcus";
const client = new Sulcus({ apiKey: "sk-..." });
// Remember something
await client.remember("User prefers dark mode", { memoryType: "preference" });
await client.remember("Meeting with design team at 3pm", { memoryType: "episodic" });
await client.remember("API rate limit is 1000 req/min", { memoryType: "semantic" });
// Search memories
const results = await client.search("dark mode");
for (const m of results) {
console.log(`[${m.memory_type}] ${m.pointer_summary} (heat: ${m.current_heat.toFixed(2)})`);
}
// List hot memories
const memories = await client.list({ limit: 10 });
// Update a memory
await client.update(memories[0].id, { label: "Updated preference" });
// Pin important memories (prevents decay)
await client.pin(memories[0].id);
// Forget
await client.forget(memories[0].id);const client = new Sulcus({
apiKey: "your-key",
baseUrl: "http://localhost:4200",
});// Store with full control over retention
await client.remember("Deploy procedure for production", {
memoryType: "procedural",
decayClass: "permanent", // "volatile" | "normal" | "stable" | "permanent"
isPinned: true, // Prevents decay below minHeat
minHeat: 0.5, // Floor — never decays below this
keyPoints: ["docker build", "az containerapp update", "DEPLOY_TS trick"],
});
// Bulk update multiple memories at once
await client.bulkUpdate(["mem-1", "mem-2", "mem-3"], {
isPinned: true,
decayClass: "stable",
});| Type | Description | Default Decay |
|---|---|---|
episodic |
Events, conversations, experiences | Fast |
semantic |
Facts, knowledge, definitions | Slow |
preference |
User preferences, settings | Medium |
procedural |
How-to knowledge, workflows | Slow |
fact |
Stable knowledge, decisions | Near-permanent |
Create a client. baseUrl defaults to Sulcus Cloud.
Store a memory with full lifecycle control. Options: memoryType, decayClass (volatile/normal/stable/permanent), isPinned, minHeat, keyPoints.
Text search. Results sorted by heat (most active first).
List memories with optional filters.
Get a single memory by ID.
Update fields on a memory.
Permanently delete a memory.
Pin/unpin a memory. Pinned memories don't decay.
Get account/org info.
Get storage and health metrics.
- Node.js 18+ (uses native
fetch) - No runtime dependencies
MIT