Quick start
Get Engram running in your agent in under 5 minutes. This guide assumes you have Node.js 18+ and an agent with a stable identifier.
1. Install the SDK
npm install @engram/sdk
2. Initialize Engram
Create an Engram instance tied to your agent's identity and your target chain (Base for production, Base Sepolia for testing).
import { Engram } from "@engram/sdk";
const engram = new Engram({
agentId: "agent.atlas", // stable agent identifier
chain: "base-sepolia", // or "base" for mainnet
apiKey: process.env.ENGRAM_API_KEY,
});3. Write a memory
Call remember() after any task that produces durable context worth keeping. Specify the memory type so retrieval is precise.
const memory = await engram.remember({
type: "episodic",
content: "Ran payroll reconciliation for March. All 47 records matched. No exceptions.",
metadata: { jobId: "payroll-march-2026", outcome: "success" },
});
console.log(memory.hash); // 0xae21...f0 · anchored on Base4. Recall relevant memories
Use recall() at the start of a new session or task to load relevant context. The query is matched semantically; you don't need to know which specific memory to fetch.
const memories = await engram.recall({
query: "previous payroll runs",
type: "episodic", // optional filter
limit: 5,
});
// inject into your agent's context
const context = memories.map(m => m.content).join("\n");5. Delete a memory
Use forget() to remove a memory by its hash. The deletion is recorded onchain, the agent's memory trail stays auditable even after removal.
await engram.forget("0xae21...f0");The SDK and hosted infrastructure are in active development. API keys are granted on request during the private testnet phase. Get early access →