# kiwi-mem

> Self-hosted memory gateway giving AI companions human-like long-term memory that fades, strengthens, sleeps, compresses — OpenAI/Anthropic compatible, Docker.

- **Category:** AI Assistant
- **Licence:** Other
- **Latest version:** v1.7.0
- **Open source:** oss
- **Languages:** JavaScript, Python
- **Platforms:** Docker Compose
- **Tags:** PostgreSQL, Mcp, Chatbot, Anthropic, Vector Search, Memory, Docker, Python, Fastapi, Pgvector, Self Hosted, Model Context Protocol, Ai memory, Long term memory, Openai compatible, Ai companion, Llm gateway, Sillytavern, Dream Consolidation, Calendar Summaries, Ai Companion Systems, Ai Memory System

## Description

kiwi-mem is a lightweight proxy gateway that gives AI companions long-term memory with human-like dynamics. It runs between your chat frontend (ChatBox, NextChat, SillyTavern, etc.) and any LLM provider (OpenAI-compatible or Anthropic native). Memories have a heat score that decays over time but warms up when recalled; a nightly Dream process consolidates fragments into coherent scenes and infers implicit knowledge; a calendar system compresses history into day/week/month/quarter/year summaries. Static prompt sections (persona, profile, locked memories, calendar) are placed first to hit API prompt caching, cutting input costs up to 90%. A tool drawer loads only the tools each turn needs via vector routing. Projects isolate private memories per context. Deployment is via Docker Compose (includes PostgreSQL + pgvector) or one-click on Zeabur. The admin panel configures providers and 80+ parameters; no built-in auth, so public exposure requires external protection. Licensed AGPL-3.0-or-later.

## Links

- [Homepage](https://github.com/lucieeveille/kiwi-mem)
- [GitHub Repository](https://github.com/LucieEveille/kiwi-mem)
- [Upgrade Guide](https://github.com/LucieEveille/kiwi-mem/blob/main/docs/UPGRADING.md)

---
Source: https://selfhost.directory/project/kiwi-mem