Self-host kiwi-mem
v1.7.0Self-hosted AI memory gateway with human-like recall
- Stars
- 342
- CPU
- 1 core
- RAM
- 1 GB
- Port
- 8080 (HTTP gateway and admin panel)
- Requires
- Docker, Docker Compose, PostgreSQL + pgvector
What is kiwi-mem?
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.
Should you self-host kiwi-mem?
kiwi-mem scores 50/100 on selfhost.directory (how scoring works) and ranks #40 of 120 in AI Assistant. It has 342 GitHub stars.
It shipped 9 stable releases in the past year. The latest, v1.7.0, came out on 10 September 2026. New versions land roughly every 6 days.
Setup is moderate: expect some configuration beyond a single command. It is Other-licensed and written mostly in Python.
Its closest alternative on selfhost.directory is hermes-agent (89/100, 257 989 stars). It scores higher overall, so compare the two before you pick. See kiwi-mem vs hermes-agent side by side.
Features
- Auto-update with rollback
- Backup and Restore
- Calendar hierarchy summaries
- Chinese segmentation (jieba)
- Contradiction detection and memory locking
- Dream sleep consolidation
- Human-like memory heat system
- MCP server and client
- Multi-provider LLM routing
- Project memory isolation
- Prompt caching optimization
- Reminder System
- Tool drawer (vector-routed)
- Web Admin Panel
- Web search (7 engines)
kiwi-mem README
FAQ
How do I import existing memories from past conversations?
Use the admin panel → Memories → Add Memory for manual entry. Bulk import is being rebuilt for a future version.
What is the difference between the API Base URL in my chat client and the provider URL in the admin panel?
The chat client's API Base URL points to your kiwi-mem gateway (https://your-domain/v1). The admin panel's provider URL points to the upstream AI service (e.g., https://openrouter.ai/api/v1). kiwi-mem sits in between.
Why can't my iOS/mobile client connect?
Mobile clients require HTTPS. You need a domain with a valid certificate (via Cloudflare Tunnel or similar).
Why do I get a 500 API_KEY not set error?
No provider is configured in the admin panel, or the provider's model isn't linked. Add a provider with API Key and at least one model.
Why do I get a 401 Missing Authentication header error?
The 401 comes from the upstream AI provider, not kiwi-mem. Check that the provider's API Key is correctly configured in the admin panel.
Is kiwi-mem suitable for a work knowledge base?
Not really. It excels at remembering a person's life, habits, and relationships, not document storage or retrieval. Use a dedicated RAG tool for enterprise knowledge.
How do I update and will I lose memories?
Run `bash scripts/update.sh` — it shows changes, backs up the database, rebuilds with --build, and auto-rolls back on failure. Memories, config, and provider settings are preserved; DB schema auto-migrates.
How much does Dream cost?
Approximately ¥0.01–0.03 per run using Claude Haiku.
Will memories grow without bound?
No. Heat-based decay, Dream consolidation, calendar compression, and per-request injection limits keep memory size controlled.
Which LLMs are supported?
Any OpenAI-compatible provider (OpenRouter, OpenAI, DeepSeek, Ollama, etc.) plus Anthropic native API directly — choose format in the admin panel.
Do I need to know how to code to use kiwi-mem?
No. Docker one-click deploy and a browser-based admin panel handle everything; the creator doesn't write code either.
More in Chat
LeonAn open-source personal assistant you run self-hosted on your own machine, with voice chat, offline STT/TTS, modular skills, layered memory, and agentic tool execution.
LibreChatSelf-hosted open-source AI chat unifying OpenAI, Anthropic, Google, Azure, AWS, and local models with agents, code interpreter, artifacts, MCP, and enterprise auth.
LightableLightable is an open-source chat app with a self-hosted Kotlin server and Vue.js clients. Uses MongoDB, ScyllaDB, TensorFlow. Closed alpha, invite-only.
local-ai-toolkitSelf-hosted AI toolkit bundling an LLM proxy, visual workflow builder, and chat UI backed by PostgreSQL. Deploy with Docker Compose or Helm charts.
LuckyLucky is a self-hosted, open-source Discord music bot with Spotify-first search, smart autoplay, a React dashboard, and moderation tools. No paywall or premium tier.
luna-agentA compact self-hosted AI agent that runs locally with SQLite-backed memory, MCP tool support, and Discord or terminal interfaces.
LurkerLurker is a self-hosted, open-source IRC bouncer and client with full history, search, reactions, replies, and native mobile apps.
MaelstromOpen-source Rust Matrix homeserver that scales horizontally via stateless nodes, SurrealDB on TiKV, and UDP gossip clustering.
marchatSelf-hosted, open-source terminal chat for developers with real-time WebSocket messaging, optional E2E encryption, plugin system, and SQLite/PostgreSQL/MySQL backends.
MarveenMarveen is a self-hosted, open-source AI agent harness running specialized Claude Code agents with persistent memory, scheduled tasks, and a web dashboard.
Matrix-Discord bridgeSelf-hosted open-source bridge connecting Matrix and Discord for using Matrix clients with Discord chats, featuring webhook relay and encryption.
matrix-docker-ansible-deployOpen-source Ansible playbook automating a Matrix homeserver and services like Element Web, bridges, and admin tools via Docker on your Linux server.
0 comments