Node.js SDK
Full API reference for the AgentRecall Node.js SDK.
MemoryStore Class
const { MemoryStore } = require('agentrecall-ai-sdk')
// Local mode (default)
const store = new MemoryStore()
// Cloud mode
const store = new MemoryStore({ cloud: true, apiKey: 'your-api-key' })Methods
remember(content, options?)
Store a new memory.
await store.remember("User prefers dark mode", {
agent: "my-agent",
importance: 0.9
})recall(query, options?)
Search memories by semantic similarity.
const results = await store.recall("theme preferences", {
agent: "my-agent"
})get(memoryId)
Retrieve a specific memory by ID.
update(memoryId, content, options?)
Update an existing memory.
delete(memoryId)
Delete a memory by ID.
skip(memoryId)
Skip (soft-delete) a memory.
unskip(memoryId)
Restore a skipped memory.
count(options?)
Count total memories, optionally filtered.
wipe(agent?)
Delete all memories, optionally for a specific agent.
Options
agent— Agent identifier (string)category— Category tag (string)importance— Importance score 0.0–1.0 (number)metadata— Custom metadata object
Cloud Mode Setup
Connect to the AgentRecall cloud for persistent storage across devices.
const store = new MemoryStore({
cloud: true,
apiKey: 'ark_live_xxxx'
})
// Now memories sync to the cloud
await store.remember("Important fact", { agent: "my-agent" })Get your API key from the Authentication page.