
Orma Memory
io.github.wizardwithcodehazardPublished by GitHub account wizardwithcodehazardv0.1.13Updated Nov 1, 2026
Episode-first, zero-latency long-term memory for local LLMs and AI coding assistants.
The publisher's own server: Memory.fit
Overview
Orma Memory gives coding assistants a local, SQLite-backed long-term memory over stdio, so facts, decisions and anti-patterns persist across sessions.
- What you can do
- Recall token-budgeted active facts, past decisions and forbidden rules for a query
- Record project decisions, architecture rules and user constraints, including anti-patterns
- Register hard prohibitions that are hoisted to the top of the injected memory block
- Inspect all active canonical truths, optionally with outdated history
- Close an obsolete or superseded constraint by its state ID
- Keep separate memory spaces per user or session
- When to use it
- Useful when a coding agent keeps losing context between sessions and you want persistent project decisions, user constraints and "never do this" rules recalled quickly without cloud services. Suited to local open-weight models on a laptop.
- Requirements
- Runs as a local process over stdio, installed from the orma-ai PyPI package (Python). A local model endpoint such as Ollama or llama.cpp is used for background consolidation. Memory is stored in a local SQLite file. No API keys or environment variables are declared.
Installation
In SourceWeft
- Open Orma Memory in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Orma (ഓർമ്മ)
Orma (Dravidian / Malayalam for "memory" or "recollection") is an episode-first, zero-latency long-term memory layer built specifically for local, open-weight LLMs (3B–8B models on consumer 8–16 GB laptops).
[PyPI Version] [License] [Python 3.10+] [Tests]
Orma can be used in two ways:
- As a native Python SDK (
from orma import Memory) for direct integration into your agents, chatbots, and apps (like Mem0 and Cognee). - As an OpenAI-compatible proxy (
orma proxyororma up) that transparently adds long-term memory to any LLM tool, client, or framework with zero code changes.
Everything runs locally in SQLite with sqlite-vec and fast on-device embeddings—no external servers, no cloud API keys, and zero data loss.
Quick Navigation
- Why Orma? (Comparison with Mem0 & Cognee)
- Empirical Benchmarks: Tokens & Latency
- Architecture & Data Flow
- Installation & Quickstart
- Usage Options
- Inhibitory Control & Anti-Pattern Prevention (Negative Memory)
- Multi-User & Multi-Tenant Isolation
- CLI Reference
- Cognitive & Mathematical Architecture
- Configuration Switches
Why Orma vs. Mem0 & Cognee?
Most agent memory frameworks (like Mem0 or Cognee) were designed for massive cloud models (GPT-4o, Claude 3.5 Sonnet) and enterprise graph databases:
- They freeze chat turns: Calling an LLM synchronously on every
add()causes 5–15 second freezes on local machines. - They hallucinate graphs: 3B models struggle with complex entity-relation extraction and emit malformed JSON or inverted relations.
- They permanently corrupt facts: Prompting small models with destructive
DELETE / UPDATEinstructions leads to accidental data loss.
The Orma Approach
- Episodes are the memory: Every conversation turn, document, or tool log is kept in full in an append-only log and indexed into sentences immediately.
- Zero LLM calls on recall: Recall runs in
< 25msusing hybrid vector search (sqlite-vec) + BM25 full-text search (FTS5) with bounded recency boosting (ACT-R). - Sleep consolidates state asynchronously: While the machine is idle, a background worker uses the local model to extract single-valued current states (
now true) and dated events citing exact line numbers. - Deterministic code guards: Time resolution, pronoun carry-over (anuvṛtti), and contradiction resolution are handled in verified Python code, not by trusting small model arithmetic.
Empirical Benchmarks: Tokens & Latency
Orma is benchmarked on consumer laptop hardware (Apple Silicon M2 16GB / AMD Ryzen 7) against standard episodic and graph-based memory frameworks.
1. Context Token Overhead (10 Active Memories in Prompt)
Small local LLMs (3B–8B) have limited effective attention windows and generate significantly slower as prompt size increases. Orma's Sutra Dense Packing saves 35% to 45% tokens over standard bulleted memory blocks and up to 68% over verbose narrative prose:
2. Recall & Add Latency (2,000 Episodic Records in SQLite)
Tested using scripts/latency_smoke.py over 2,000 realistic conversational turns and notes:
3. Negative Memory / Anti-Pattern Compliance Rate
Tested on local Qwen 2.5 3B Instruct across developer anti-patterns (e.g., PowerShell semicolon chaining) and strict lifestyle constraints (severe food allergies):
Architecture & Data Flow
1. Online Recall & Cognitive Retrieval Pipeline (< 25ms, Zero LLM Calls)
2. Background Sleep Consolidation & Defeasible Epistemic Logic
Installation
Or install from source for development:
Usage Option 1: Python SDK (Direct In-Code Integration)
Use the Python SDK to embed Orma directly into your agents, pipelines, or web applications:
Usage Option 2: Zero-Code Proxy (OpenAI SDK, LangChain, Cursor, Open WebUI)
Start Orma as a local proxy:
Then point any client to http://localhost:8080/v1:
With the Official OpenAI Python Client:
With LangChain:
With Open WebUI, AnythingLLM, or Cursor:
- Set OpenAI Base URL to:
http://localhost:8080/v1 - Set API Key to:
none
Usage Option 3: One-Command Web UI (orma up)
If you are using llama.cpp or Ollama with a browser web UI, run:
This immediately:
- Starts the Orma memory proxy on port 8080.
- Automatically opens your default web browser to
http://127.0.0.1:8080/#/. - Passes through the web UI frontend while transparently routing all chat completions through Orma's memory layer.
Usage Option 4: Model Context Protocol (MCP) Server for Coding Assistants
Orma natively speaks the Model Context Protocol (MCP) over standard stdio. This gives coding agents (Claude Code, Cursor, Antigravity IDE, Windsurf, Roo Code, Hermes) persistent, zero-latency memory across editing sessions without session amnesia.
In Claude Code:
In Cursor (.cursor/mcp.json or Settings > MCP):
In Windsurf / Antigravity IDE / Roo Code (mcp.json):
One-Click Install via Smithery.ai:
Tools Exposed to Agents:
orma_recall(query, space): Returns token-budgeted, Sutra-packed active facts, anti-patterns, and past decisions (< 20ms).orma_remember(text, kind, role, space): Permanently records a project decision, architecture rule, or user constraint. Setkind="anti_pattern"to mark a forbidden mistake to avoid.orma_forbid(rule, space): Directly registers a hard anti-pattern or prohibited behavior (e.g., "Never chain PowerShell commands with semicolons").orma_facts(space, include_history): Inspects all active canonical truths without running a search.orma_forget(state_id, space): Closes an obsolete or superseded constraint.
Inhibitory Control & Anti-Pattern Prevention (Negative Memory)
A pervasive failure mode in AI coding assistants and small LLMs is forbidden mistake recurrence: when a user says "Stop using semicolons to chain terminal commands in PowerShell", standard autoregressive models place high attention weight on the word semicolon and continue repeating the exact same error.
Orma introduces Inhibitory Control:
- Schema-Level Attribution: Negative rules are identified during sleep extraction with
prohibited: trueor directly registered viaorma_forbid(rule). - Sutra Inhibitory Hoisting: Prohibited states are rendered as
[FORBIDDEN: <rule>]and hoisted to the very top of the system prompt (above all positive facts and conversation history). - Dynamic Negative Framing: Orma dynamically injects explicit negative constraint semantics into the system prompt whenever anti-patterns are present:
- Universal Applicability: Works identically for developer pain points (terminal syntax, forbidden dependencies, deprecated API calls) and personal constraints (severe allergies, tone boundaries, forbidden buzzwords).
Multi-User & Multi-Tenant Isolation
Orma supports isolated memory spaces out of the box so multiple users or agent sessions don't contaminate each other's memories:
- In Python SDK:
- In HTTP Requests / Proxies:
Pass the
x-orma-spaceheader or"user"field:
CLI Reference
Orma provides a command-line tool for managing your memory:
Memory Prompt Output Format (Sutra Dense Packing)
When Orma recalls memories, it packs them into an unambiguous, high-density symbolic bracket representation (saving 35–45% context tokens over conversational prose):
(Note: Can be toggled back to classic natural language section blocks via enable_sutra_packing = False)
Cognitive & Mathematical Architecture
Orma integrates established principles from cognitive science, stochastic point processes, and non-monotonic logic directly into its zero-latency retrieval engine:
1. Hawkes Self-Exciting Temporal Process (enable_hawkes)
Cognitive Rationale: Human dialogues exhibit natural clustering and temporal burstiness (Hawkes 1971, Kleinberg 2002). When a user brings up a topic (e.g., an ongoing project or medical symptom), subsequent exchanges revolve around that cluster. Standard recency decay either forgets past topics too fast or keeps them active too long.
Mathematical Formulation:
- Burst Amplitude (
alpha = 0.4): Boosts items accessed in active conversational bursts. - Decay Constant (
beta = ln(2) / 1800): A 30-minute half-life ensures topics discussed earlier in a session maintain strong conversational momentum without lingering indefinitely into future days. - Bounded Ranking: Implemented in orma/recall/rank.py as a bounded additive boost so temporal bursts never override exact factual matches.
2. Ebbinghaus Spaced Repetition Stability (enable_ebbinghaus)
Cognitive Rationale: The human forgetting curve (Ebbinghaus 1885, Cepeda et al. 2008) demonstrates that memory retention decays exponentially, but each spaced retrieval increases the memory's underlying stability (half-life). A fact stated once in passing should gracefully fade, whereas a fact confirmed across 4 different days should remain permanently accessible.
Mathematical Formulation:
- Baseline Stability (
S0 = 2.0days): Initial stability for a single mention. - Rehearsal Gain (
gain = 0.5): For every subsequent citation or spaced rehearsaln, memory stability expands linearly, lengthening the half-life before decay. - Dual Protection: Single-pass noise drops out of recall candidate pools, while repeated preferences resist decay for months.
3. ACT-R Spreading Activation & Anderson's Fan Effect (enable_spreading_activation)
Cognitive Rationale: Human memory recalls information associatively (Anderson 1983). When asked "Where should I go for my toothache?", the query may not contain the doctor's name, but the concept of toothache is associatively linked to dentist and Dr. Rao. Traditional graph databases (e.g. Neo4j) add 50–150ms of network overhead. Orma executes associative graph traversal directly within SQLite using indexed adjacency tables.
Mathematical Formulation:
- Source Seed Extraction: Seed entities are identified from hybrid text matches and active states.
- The Fan Effect: John R. Anderson's Fan Effect proves that associative activation spreading from a concept is inversely proportional to the number of facts associated with it:
- A specific entity (e.g.,
"Dr. Rao"withFan = 2) channels 50% of its associative energy directly to the target clinic state. - A general hub (e.g.,
"Pune"withFan = 60) dissipates its energy across dozens of states, preventing generic concepts from hijacking the recall budget.
- A specific entity (e.g.,
4. Defeasible Epistemic Logic (enable_defeasible_logic)
Cognitive Rationale: Real-world beliefs are non-monotonic. When a user states:
"I drink black coffee every morning." followed later by: "When I have a sore throat, I drink ginger tea with honey."
Naive memory systems (like Mem0 or basic graph extraction) detect a contradiction on the entity-attribute (user, drink) and destructively overwrite the baseline habit.
Epistemic Rule Engine:
- Orma inspects assertions via schema attribution (
item.conditionextracted by the model during sleep) rather than brittle keyword matching. - Categorical Assertions (
condition: ""e.g.,"I moved to Bangalore"): Trigger state supersession (active = 0, superseded_by_id = new_state_id). - Defeasible Overrides (
condition: "sore throat"e.g.,"When sick, drink tea"): Registered as conditional exceptions without closing or corrupting the baseline categorical truth. Both facts are preserved in context.
5. Adaptive Noise Floor Calibration & Reciprocal Rank Fusion
Algorithmic Rationale: Small embedding models (e.g., 384-dimensional bge-small-en-v1.5) suffer from geometric concentration on high-dimensional unit hyperspheres—unrelated sentences frequently score 0.45–0.55 cosine similarity by pure random chance.
- Noise Floor Estimation: Orma dynamically samples pairwise distances to compute the 50th-percentile noise floor of the embedding space.
- Similarity Floor Truncation: Scores below the space noise floor carry zero evidential weight.
- Reciprocal Rank Fusion (RRF): Fuses exact keyword recall (FTS5 BM25) with semantic vector search (sqlite-vec) with zero hyperparameter tuning.
6. Sutra Context Encoding (enable_sutra_packing)
Cognitive & LLM Rationale: Small 3B models are heavily trained on code and structured JSON. Natural language narrative memory blocks ("Now true:", "Things said before:") waste precious context budget on formatting boilerplate and can cause models to ask redundant clarifying questions.
- Dense Declarative Syntax: Packs states, conditions, events, and outdated lineages into atomic bracketed forms (
[user.attribute: value (metadata)]). - Token Savings: Reduces prompt memory overhead by 35% to 45%, providing faster generation speeds and more room for user instructions.
- Zero Syntax Bleed: Formatted to ensure instruction-tuned models absorb the knowledge as background system facts without outputting brackets to the user.
7. Inhibitory Control & Attention Hoisting
Cognitive & Neuro-Symbolic Rationale: In human cognitive neuroscience, executive inhibitory control (prefrontal cortex) suppresses prepotent motor or verbal impulses. In autoregressive Transformers, negative phrasing ("do not use X") paradoxically increases the probability of generating X because token attention activates on the semantic representations of the mentioned words.
- Hoisting Precedence: Rather than interweaving negative rules inside narrative facts, Orma isolates negative boundaries into
[FORBIDDEN: <rule>]tokens and places them at the very beginning of the system prompt. - Instruction-Tuning Alignment: Modern instruction-tuned models (e.g. Qwen 2.5, Llama 3.2, Claude 3.5) treat top-level boundaries as hard system constraints when defined prior to task context.
- Dual Channel Registration:
- Declarative Extraction: Asynchronous sleep maps "never use semicolon in terminal" to
prohibited = Trueand namespaced attributeforbidden_<name>. - Immediate MCP Tool: Coding assistants directly call
orma_forbid(rule)to establish an instant guardrail without waiting for background consolidation.
- Declarative Extraction: Asynchronous sleep maps "never use semicolon in terminal" to
Storage & Data Durability (100% Local & Persistent)
- Single File SQLite Storage: All memories reside in
~/.orma/memory.dbwith Write-Ahead Logging (WAL) enabled. - Survives Restarts & Power Cycles: You can shut down
orma up, restart your machine, or close your terminal at any time; your complete memory state, episodic history, and consolidated facts remain permanently stored. - Lossless Append-Only: Episodes are never destructively overwritten or pruned by hallucinating models. You can inspect or re-consolidate your history anytime with
orma facts --history.
Configuration & Ablation Switches
Every mechanism in Orma can be independently configured or ablated in orma/config.py or passed via OrmaConfig:
License
Distributed under the Apache-2.0 License. See LICENSE for more information.
Source: README.md at commit 1583d04
Tools
0Version history
1- v0.1.13LatestNov 1, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Memory integrations

Memory.fit
fit.memoryOfficial publisher
Hosted Memory.fit server that lets an AI read your training, sleep, recovery and nutrition data and write back weekly plans, targets and meal plans.
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pgOfficial publisher
pg.ddx.io: the PostgreSQL community's memory's hosted MCP server, published by pg.ddx.io; no sign-in required; Streamable HTTP; 29 tools.
var.gg Naming Memory
gg.varOfficial publisher
Remote MCP server that suggests and searches code identifier names from domain concepts in Korean, Japanese, Chinese, Vietnamese and English, and exposes ERD…

Counterparts
ai.counterparts
Local-first long-term memory for Claude Code and Claude Desktop: the assistant writes notes about you and your projects and recalls them in later sessions.

LAHZE - Persian AI Memory Platform
Published by GitHub account pedramgholizadeh
LAHZE - Persian AI Memory Platform's hosted MCP server; no sign-in required; Streamable HTTP; 13 tools.