The task at hand.
Current goals, plan state, and open questions. Keep your agent oriented while the work is happening.
A Python library and MCP server for persistent, code-aware memory. Keep your copilot’s decisions, conventions, and context across sessions.
python -m pip install memkernelPython library · use an activated Python 3.11–3.13 environment.
Connecting Claude Code or Kiro? Choose the MCP server setup ↗
A new session. A familiar answer.
Use PostgreSQL for the orders service. We need concurrent writes and transactional inventory updates.
MemKernel separates what your agent is doing now from what your project needs to remember. Three tiers. Different lifetimes. One memory service.
Current goals, plan state, and open questions. Keep your agent oriented while the work is happening.
Findings and session checkpoints. Recall reinforces retention; consolidation finds what is worth keeping.
Decisions, conventions, and verified knowledge. Keep the rationale; supersede it when the project changes.
Default retention is configurable. Observations start at 7 days; episodes at 30. Promote useful findings into durable knowledge.
Explore memory tiersYour agent should find the right implementation whether it remembers the function name or only what the function does.
Tree-sitter splits Python code at functions and classes, with a text fallback for other languages.
Dense retrieval and BM25 work together, combined with reciprocal rank fusion.
Revalidate retained code against its source file. Changed or missing snapshots are flagged for review and leave default recall. See code freshness ↗
Illustrative chunk boundary. Actual chunk size is configurable; oversized nodes are split further.
Keep checkpoints across compaction and recover them at the next session start. Use Claude Code hooks or call MemoryLifecycle from your own harness.
Keep large specs and transcripts outside the context window. Store a document, then ask for relevant passages with the local reasoner or optional RLM Studio.
DOCUMENT MEMORYWith the wiki extra, export memories through the proposal gate. Review, promote, and approve the wiki revision before importing it into memory.
EXPLORE WIKI-STUDIOThree tools with different jobs. Start with the one you need, then connect them through your agent host and a shared wiki.
Install project rules, follow research and build phases, and check the result. Explore the workflow and latest release through two interactive guides.
Explore Code Copilot TeamKeep decisions and checkpoints across sessions. Decisions with changed source files stay visible with a review flag. Recheck their evidence before reuse.
See decision review and recoveryTurn memories into reviewed Markdown. Find pages without a model, record conflicts, and run a nightly report with optional link-only proposals.
Explore Wiki-StudioMemKernel’s wiki extra enables gated export and approved-revision import. CCT keeps its own pinned wiki engine; see the integration and environment guidance.
Follow one decision from your coding session to a reviewed wiki page—and back into the next session. See where each tool fits.
Includes copyable examples and a setup builder for Claude Code and Kiro.
Connect Claude Code, Kiro, or another MCP-compatible copilot. Use the same memory service directly in Python.
One package on PyPI. Install for your copilot or your Python code.
pipx install --python python3.11 memkernelRequires pipx and an installed Python 3.11; 3.12 or 3.13 also work. The server runs in its own environment.
Set MEMKERNEL_PROJECT_ID, the absolute MEMKERNEL_PROJECT_ROOT, and an absolute storage path so each project finds the same memories across sessions.
Add Claude Code instructions or Kiro steering and hooks so your agent knows when to recall and retain. For Python, start with build_service().
{
"mcpServers": {
"memkernel": {
"type": "stdio",
"command": "memkernel",
"args": [],
"env": {
"MEMKERNEL_PROJECT_ID": "my-project",
"MEMKERNEL_PROJECT_ROOT": "/absolute/path/to/project",
"MEMKERNEL_CHROMA_PERSIST_PATH": "${HOME}/.memkernel/my-project"
}
}
}
}
Merge into your project’s .mcp.json. Set the project ID, actual absolute project root, and data path; use the executable’s absolute path if Claude cannot find it. Approve the server and check /mcp. Full setup ↗
{
"mcpServers": {
"memkernel": {
"command": "memkernel",
"args": [],
"env": {
"MEMKERNEL_PROJECT_ID": "my-project",
"MEMKERNEL_PROJECT_ROOT": "/absolute/path/to/project",
"MEMKERNEL_CHROMA_PERSIST_PATH": "${HOME}/.memkernel/my-project"
},
"disabled": false,
"autoApprove": ["recall", "get", "ask", "retain", "consolidate"]
}
}
}
Merge this server into your workspace config. Set your project ID, actual absolute project root, and storage path; use an absolute executable path if needed. The template pre-approves five tools. Full Kiro setup, steering & hooks ↗
import os
from memkernel.factory import build_service
from memkernel.core.models import MemoryType
os.environ["MEMKERNEL_PROJECT_ID"] = "my-project"
memory = build_service()
memory.retain(
"Use Postgres for transactional inventory.",
MemoryType.DECISION,
)
for ref in memory.recall("database choice"):
print(ref.tier, ref.preview)
Install into your application’s Python environment with python -m pip install memkernel. A pipx installation only exposes the server command to your shell. Python library guide ↗
# Run in the environment with MemKernel installed
export MEMKERNEL_PROJECT_ID=my-project
export MEMKERNEL_TRANSPORT=streamable-http
memkernel
# Connect an MCP client to:
# http://127.0.0.1:8765/mcp
# stdio is the default transport.
# Use HTTP for a persistent local server.
Binds to localhost by default. See configuration for transport, storage, and retrieval settings.
Understand the architecture, explore the API, and follow the work. The implementation and design decisions are in the repository.
Install MemKernel. Give your project a memory of its own.