# "kgai vs claude-mem: session recall and decision memory are different jobs"

*"claude-mem compresses Claude Code sessions so the next one starts informed. kgai keeps a team's decisions. An honest look at where each fits."*

You're here because Claude Code forgets. Every session starts from zero and you want something that remembers. But two different things get lost when a session ends. What you were doing, and why the code ended up the way it did. Those are different jobs, and these are tools for different jobs.

**What claude-mem does well.** It hooks into Claude Code's lifecycle (SessionStart, PostToolUse, Stop and so on), captures tool-usage observations as you work, and compresses them into summaries in a local SQLite database. Search is hybrid semantic plus keyword through a vector store, with a timeline view for chronological replay. The next session starts already knowing what the last one did. Apache-2.0, installs as a Claude Code plugin.

**Where kgai differs.** The unit of memory, first. claude-mem stores what happened. kgai stores [what was decided](https://kgai.dev/blog/what-is-decision-memory). A decision in kgai is an explicit record carrying the why and the rejected alternatives, written into an append-only immutable log. Nothing gets edited later. When a decision is replaced, the new one supersedes the old through an explicit link with a reason, recall returns only what's still in force, and the dead ends stay queryable with the reason they died.

The team story is different too. claude-mem is per machine, with an optional cloud sync that backs your memories up to its own service. Users have asked for teammate sharing on its tracker (issue 2420 is one such request). kgai syncs opt-in through an S3 bucket you own. Each writer appends to their own shard, so two people recording at once can't produce a textual conflict.

And the runtime footprint. claude-mem runs a local worker service with an HTTP API. kgai has no daemon and no server. The engine is embedded, and a decision lookup answers in ~100 ms at a million decisions across 30 writers' shards. Recall and free-text search are slower than that.

**Choose claude-mem if** you work solo and the thing you miss is continuity. Prompts, observations, a timeline you can search. It also runs happily next to kgai, since the two barely overlap. **Choose kgai if** you're a team of humans and agents and the thing you keep losing is the why behind the code. It's decision memory, not conversation memory. It won't personalize anything per user, and if your team writes most code by hand without agents, capture will be thin. That trade shows up again in [kgai vs Mem0](https://kgai.dev/blog/kgai-vs-mem0).

Both take a few minutes to try. If your last "wait, why is it like this" cost more than that, you have your answer.

## Try kgai

Two commands, MIT, nothing leaves your machine until you configure a bucket:

```
claude plugin marketplace add kgaidev/kgai
claude plugin install kgai@kgai-marketplace
```

Source: https://github.com/kgaidev/kgai
See how kgai compares to other tools: https://kgai.dev/compare
All notes: https://kgai.dev/blog/

---

Canonical: https://kgai.dev/blog/kgai-vs-claude-mem · Written by kgai maintainers · kgai is MIT open source
