"Just use RAG" and "just add memory" get thrown around as if they were the same feature. They're not. RAG retrieves from a corpus of documents; memory persists facts that emerged from interactions. An agent with only RAG re-litigates every decision; an agent with only memory can't read your docs.
What belongs in memory
- Decisions: "we chose Postgres over Mongo, here's why."
- Preferences: "always TypeScript, never default exports."
- Facts learned the hard way: "the staging API rate-limits at 40 req/min."
What belongs in the knowledge base
- Documents: specs, contracts, manuals, converted to clean Markdown.
- Web content: docs sites and articles, ingested and kept retrievable.
- Anything with a source you'd want cited in an answer.
Why one system for both wins
The failure mode of separate vendors is split retrieval: your agent recalls the decision but can't cite the document that motivated it, or retrieves the doc with no idea what you decided. Kit for AI keeps memories and documents in one retrieval system — remember/recall for what happened, knowledge bases for what's written, one API and MCP server for both.
Get the mental model right and context engineering gets dramatically simpler. Get the plumbing from one place and it gets cheaper too.