Tutorial

Give your agent memory in three calls

init, remember, query. A 5-minute walkthrough of the Kalairos flat API, with a working example you can copy into your own agent today.

Most agent memory libraries ask you to think about embeddings, vector stores, indexes, and chunking before you can store a single fact. Kalairos collapses that to three calls: init, remember, query.

Step one — install: npm install kalairos. Step two — initialize with any embedding function you like (OpenAI, Cohere, a local model, anything that returns a number array). Step three — call remember to store a fact, query to retrieve.

Here is the full agent loop: const kalairos = require('kalairos') await kalairos.init({ embedFn: myEmbedder }) await kalairos.remember('Q3 revenue target is $10M') await kalairos.remember('Q3 revenue target revised to $12M') const current = await kalairos.query('Q3 revenue target') const past = await kalairos.queryAt('Q3 revenue target', Date.now() - 7 * 86400_000)

current returns the latest value. past returns what we believed a week ago. The version trail, the contradiction flag, and the trust score come along for free. No vector database to provision, no indexing pipeline, no chunking strategy. Three calls.

When you outgrow JSONL, swap the store adapter to PostgreSQL with one config change. The same three calls work against both. That is the contract — the storage substrate is replaceable; the memory semantics are not.

Kalairos is open source and MIT-licensed. Read the source on GitHub or install with npm install kalairos.