MemoryKit

Quickstart

Store your first memory and search it in 30 seconds.

1. Get an API key

Create a free account at platform.memorykit.io and copy your API key. It starts with ctx_.

2. Install and run

// npm install memorykit
import { MemoryKit } from "memorykit";
const mk = new MemoryKit({ apiKey: "ctx_..." });
 
// Store
await mk.memories.create({
  content: "MemoryKit is a memory infrastructure for AI apps. It supports hybrid search and retrieval.",
});
 
// Search — ranked results from your data
const results = await mk.memories.search({ query: "What does MemoryKit do?" });
for (const hit of results.results) {
  console.log(`[${hit.score.toFixed(2)}] ${hit.content}`);
}

That's it. You stored a memory and searched it in one script.


Try more

Upload a file

const memory = await mk.memories.upload({
  file: new Blob([pdfBuffer], { type: "application/pdf" }),
  title: "Product Documentation",
  tags: ["docs"],
});
console.log(memory.status); // → "processing"

Search without LLM

Get raw search results ranked by relevance — no AI generation, just retrieval.

const results = await mk.memories.search({
  query: "refund policy",
  limit: 5,
});
results.results.forEach((r) => console.log(r.score, r.content));

Search with filters

Narrow results with tags, precision, and date filters.

const results = await mk.memories.search({
  query: "product documentation",
  limit: 5,
  tags: "docs",
  precision: "high",
});
results.results.forEach((r) => console.log(r.score, r.content));

What's next

Edit on GitHub

On this page