Give every user an assistant that remembers them.
Per-user sub-brains turn a stateless model into a personal assistant that knows each user across every session — at scale, from one account.
A way to turn a stateless model into a personal assistant that remembers each user across sessions — driven from a single API key, so it scales to every user without per-user plumbing.
Users expect an assistant that remembers them — their preferences, their history, the way they like answers. A raw model forgets all of it between sessions, so every conversation feels like meeting a stranger, and the product never earns the stickiness of feeling personal.
What changes with a memory layer.
- Memory
Every session meets a stranger.
- Isolation
Risk of one user's data bleeding into another's.
- Personality
Voice drifts turn to turn.
- Retention
Nothing that makes it feel personal.
- Memory
A persistent brain per end-user.
- Isolation
Strict per-user isolation of memory.
- Personality
A coherence gate keeps a steady personality.
- Retention
Real personalization that compounds over time.
The same loop — three calls, your model in the middle.
prepare
Builds the brief — memory + written identity + coherence gate. No LLM call.
your model
You call your own model — your provider, your key. Khwan never touches it.
record
Persists the turn and learns from it — so the next prepare is sharper.
Every run compounds. The brief gets tighter, cost drops, and answers sharpen — the memory that thinks, not just recalls.
A brain per end-user
Per-user sub-brains give each of your users their own persistent memory and identity, isolated from everyone else — driven from a single API key, so it scales without per-user plumbing.
Consistent personality
A written identity plus the coherence gate keeps the assistant's voice steady across long relationships, instead of drifting turn to turn.
Personal, not pooled
One user's memory never leaks into another's. Synthesis quietly sharpens each user's assistant over time, so retention comes from genuine personalization.
Outcomes, not orchestration.
- Assistants that feel personal from the second session on
- Strict per-user isolation of memory
- Higher retention through real personalization
- Any model, your key — no token markup from us
Consumer AI apps, companions, and productivity tools with many end-users.
The whole integration — three calls
import { Khwan } from "@khwan/client";
const kw = new Khwan({ apiKey: process.env.KHWAN_API_KEY });
// 1 — Khwan builds the context (memory + coherence). No LLM call.
const turn = await kw.prepare(input);
// 2 — You call your own model. Your provider, your key.
const answer = await yourModel(turn.messages);
// 3 — Hand it back. Khwan persists + learns; next prepare is sharper.
await kw.record(turn, answer);