Loci
cmoraes10/loci
Typed long-term memory for AI agents, as an MCP server and a Hermes plugin
Loci is a long-term memory layer for AI agents that stores typed facts about a person in a local SQLite file. It ships a Hermes plugin that extracts memories automatically after each model call and injects them before the next, plus an MCP server for other clients.
What Loci does
Loci stores durable facts about a user in eight categories: routine, study, preferences, finance, goals, relationships, constraints and ephemeral. Each fact has one of four importance tiers and a status lifecycle. Extraction runs on two paths, a model that reads the exchange and regex heuristics for known phrasings, merged with the model taking precedence; the regex path keeps working when the provider is down. A write filter stops passing moods from becoming permanent memories.
At most twelve facts are injected into the model's context, ranked by importance, then deadline proximity and recency. A daily job merges exact duplicates and expires unconfirmed guesses, ephemeral facts after 24 hours and completed goals after 90 days. The Hermes plugin uses the post_llm_call hook for automatic extraction, while the MCP server exposes remember, recall and forget and needs the agent to call remember on purpose. The store is a SQLite file at ~/.loci/memory.db, which LOCI_DB can override.
Key features
- Eight memory categories, four importance tiers and a status lifecycle
- Two-path extraction: a model plus regex heuristics, with model precedence
- Write filter that keeps passing moods out of long-term memory
- Injection cap of twelve facts per call, ranked by importance, deadline and recency
- Daily consolidation and decay, including a 24-hour TTL for ephemeral facts
- One standard-library core shared by an MCP server and a Hermes plugin
When to use it
- Giving a Hermes agent memory of preferences and deadlines across sessions
- Adding remember, recall and forget tools to any MCP client
- Embedding the Python core in your own agent with Store, extract and context_block
Who it is for: Developers who want persistent, structured memory for a Hermes agent or another MCP-capable agent without running a database server.
How it fits with Hermes Agent
Ships a Hermes plugin that adds automatic extraction through the post_llm_call hook and injects memory before every call; the same core also runs as an MCP server for other hosts.
How to install Loci
These commands are copied from the project's README. Check the repository for the latest steps before you run them.
pip install mowave-loci
pip install mowave-loci[mcp]
hermes plugins install <you>/loci
hermes plugins enable lociRequirements: Python and pip; no server is needed because memories live in a local SQLite file
FAQ
What is Loci?
Loci is a typed long-term memory layer for AI agents. It keeps durable facts about a person in a local SQLite file, ranks them, and consolidates them daily so the list does not go stale.
Does Loci work with Hermes Agent?
Yes. Loci includes a Hermes plugin that extracts memories automatically through the post_llm_call hook and injects context before every call. The MCP server version has no automatic extraction, so the agent must call remember on purpose.
How do I install Loci?
Run pip install mowave-loci, plus pip install mowave-loci[mcp] if you want the MCP server. For Hermes, run hermes plugins install <you>/loci and then hermes plugins enable loci.
Similar memory for Hermes Agent
All memoryPersona, emotion and governed long-term memory framework for Hermes Agent, with a read-only WebUI
conorbronsdon Context OSGit-backed context and workflow layer shared by Claude Code, Codex, Hermes Agent and other agents
andrihakim146 Hermes Second BrainObsidian second brain controlled from Telegram through Hermes Agent and a local MCP server
kigner Multimodal WikiHermes skill that builds an interlinked markdown wiki from text, web pages, PDFs, screenshots and audio
B1Z0N Hermes MeshKeeps skills and durable memory in sync across every machine that runs a Hermes agent
skynetcmd m3 MemoryLocal-first shared memory for AI agents with hybrid search, MCP tools and a fully offline mode
Related guides: SOUL.md for Hermes Agent: what it is and how to write one · Run multiple Hermes agents with profiles