loci
Provides a Hermes plugin adapter for loci, enabling automatic extraction of typed memories from conversations via the post_llm_call hook and injection of ranked context before every LLM call, using the same remember, recall, and forget tools as the MCP server.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lociremember that my anniversary is June 12th"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
loci
Typed long-term memory for AI agents. One core, two adapters.
The name comes from the method of loci, the ancient memory palace technique where every recollection gets a place and a structure. That is the thesis of this project.
An agent that forgets you every session is a search box with manners. This is the layer that fixes that: durable facts about a person, typed and ranked, extracted from the conversation rather than typed into a settings page, consolidated daily so the list does not rot.
Ported from the memory system running in production in Lima, rewritten host-agnostic.
What it does
Eight categories (routine, study, preferences, finance, goals, relationships, constraints, ephemeral), four importance tiers, a status lifecycle. A preference and a deadline are not the same kind of thing and do not age the same way.
Extraction runs on two paths. A model reads the exchange for meaning; regex heuristics catch the phrasings you wrote them for. Merged with model precedence. When the provider is down the regex path still runs.
A write filter keeps the store from becoming a mood diary. Passing mood is the case it exists for. "Tired today" is true for hours and wrong for months.
The injection cap keeps context from growing without bound. Twelve facts reach the model, ranked by importance and then by deadline proximity and recency.
Daily consolidation and decay keep the list honest. Exact duplicates merge; guesses nobody confirmed expire on their own; ephemeral facts carry a 24-hour TTL; completed goals expire after 90 days.
Related MCP server: Cairn
The two adapters
MCP server | Hermes plugin | |
Runs in | Any MCP client | Hermes only |
Tools |
| the same three |
Automatic extraction | no | yes |
Context injection | on request | before every call |
MCP is request and response. Nothing calls a server when a turn ends, so there
is no moment for it to read the exchange on its own. Through MCP the agent has
to call remember on purpose. Automatic extraction needs a hook in the host,
and Hermes has one (post_llm_call). Same core underneath; the Hermes adapter
just has somewhere to stand.
Install
pip install mowave-loci
pip install mowave-loci[mcp]MCP client config (after pip install mowave-loci[mcp]):
{
"mcpServers": {
"loci": {
"command": "python",
"args": ["-m", "loci.adapters.mcp_server.server"]
}
}
}Hermes:
hermes plugins install <you>/loci
hermes plugins enable lociThe store is a SQLite file at ~/.loci/memory.db, overridable with LOCI_DB.
No server to run, because a memory layer that needs one is not installable.
Use it directly
from loci import Store, extract, should_persist, context_block
store = Store()
for memory in extract("eu prefiro respostas curtas", assistant_text=reply):
if should_persist(memory):
store.upsert(memory)
system_prompt += "\n\n" + context_block(store.active())Where changes go
This repo owns the shape of a memory and its lifecycle. It does not own:
Thing | Owner |
Model calls, API keys, provider SDKs | your app (inject a |
The agent loop, tool dispatch, sessions | the host (Hermes, OpenClaw, Claude Code) |
Scheduling the daily jobs | the host's cron, s6 or systemd |
Transport and auth | the adapter |
The core imports nothing but the standard library. If a change here would make that untrue, it belongs in an adapter.
Tests
pytest -q92 tests against a real SQLite store on a temp file. Nothing of ours is mocked: a memory layer whose tests pass against a fake store tells you nothing about the one people run.
License
MIT.
This server cannot be deployed
Maintenance
Related MCP Connectors
- KogniteOAuthdev.kognite
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Cross-tool persistent memory and context for AI assistants over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Hosted long-term memory for AI agents via MCP. Recalld updates facts as information changes and retrieves relevant context. Connect with a Recalld EU account.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides persistent, inspectable memory storage for AI agents using SQLite. Agents can store, recall, and search memories across sessions via three MCP tools.3MIT
- AlicenseNot gradedqualityAmaintenanceEnables agents to assert and recall typed facts with idempotent writes, freshness, and assurance verdicts. Provides MCP tools for persistent memory across sessions via SQLite-backed storage.35 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store and semantically retrieve durable memories across sessions via MCP or REST, with tools for remembering, recalling, asking, updating, and forgetting memories.18 npmMIT
- AlicenseNot gradedqualityAmaintenanceExposes a local SQLite-based memory and knowledge base as standard MCP tools, enabling AI clients to search content, recall memory fragments, and query entity relationships through natural language.1MIT