Mneuma is a local-first identity and memory substrate for LLM systems.
It is designed for one Person at a time:
Person= the one human the Mneuma world is built aroundpresence= a named, returnable identity in relation to that Personthread= a conversation branch within one presence
Mneuma is not a hosted SaaS or generic vector-memory wrapper. It is an ownable substrate for giving otherwise flat LLMs continuity, memory, mood, and evolving identity.
Status: early alpha
Mneuma is infrastructure for giving one human-centered memory world to otherwise stateless LLM systems.
Use it when you want:
- durable memory with line-level provenance
- named presences that can return over time
- thread branching inside one presence
- bounded mood / lens / reflection state that stays inspectable and local-first
- explicit scope isolation across presences and threads in one workspace
- not a hosted SaaS
- not a generic vector database wrapper
- not an agent framework that hides state behind opaque orchestration
- not a claim that the system is sentient, autobiographical, or unconstrained
- Markdown as canonical storage
- SQLite + FTS5 derived index
- provenance-first retain / recall / reflect / inspect / edit / forget
- bounded interaction cognition:
- attunement
- impressions
- experiences
- lessons
- lens shifts
- mood
- loop artifacts
- first-class presence and thread registries
- JavaScript bridge for tool-calling integrations
Person- the one human Mneuma evolves around
presence- a named, returnable identity with its own private continuity
persona- the expressive style/voice layer of a presence
thread- a branch within one presence
shared memory- memory shared across presences for one Person
presence memory- private identity memory for one presence
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -e .Then use either:
mneuma --helpor:
python3 -m mneuma --helpCreate a workspace:
mkdir -p ./demo-workspace
mneuma --root ./demo-workspace initCreate a presence:
mneuma --root ./demo-workspace presence-create --name SarahCreate a thread inside that presence:
mneuma --root ./demo-workspace thread-create --presence-id prs_xxx --title "Release planning"Write memory into that presence:
mneuma --root ./demo-workspace retain \
--raw "Sarah prefers dry humor and terse replies." \
--kind-hint opinion \
--presence-id prs_xxxRecall with provenance:
mneuma --root ./demo-workspace recall --query "dry humor" --presence-id prs_xxx -k 5Run interaction attunement for that presence:
mneuma --root ./demo-workspace --interaction-layer-enabled attune \
--presence-id prs_xxx \
--message "maybe this is wrong, i'm not sure" \
--turn-count 4 \
--session-minutes 8Fast local verification:
python3 -m unittest discover -s tests -vLive model-backed verification:
cp .env.example .env.local
# set OPENAI_API_KEY in .env.local or export it in your shell
OPENAI_API_KEY=... python3 scripts/live_openai_validation.pyThe live validator creates a temporary workspace, creates a presence and thread, retains memory, recalls it with provenance, runs attunement, and completes a real OpenAI tool-calling loop against the local CLI.
Security and dependency checks:
python3 -m pip install bandit pip-audit
bandit -q -r src scripts
pip-auditIdentity and continuity:
initpresence-createpresence-listpresence-inspectthread-createthread-listthread-inspect
Memory:
retainrecallreflectinspecteditforget
Interaction layer:
attuneruminatereframeexperiencesimulatelensmoodloop
Interaction-layer commands require --interaction-layer-enabled.
That flag gates:
attuneruminatereframeexperiencesimulatelensmoodloop
A small bridge is included at:
examples/openai-memory-tools.mjs
It exports:
MEMORY_TOOLSrunMemoryTool(toolName, args)
It supports:
- installed/global
mneumaCLI - fallback to
python3 -m mneumafrom this repo withPYTHONPATH=src
This is the intended integration path for companion apps such as mneuma-chat.
The exposed tool names are stable, and the bridge now ships explicit per-tool JSON schemas instead of catch-all permissive objects.
inspect --inner-stateis intentionally high-sensitivity and private by default; only call it from trusted local tooling.- Presence-scoped commands now fail closed on unknown presences instead of broadening to a wider person scope.
inspect,edit, andforgethonor the optional--presence-id/--person-idscope and reject cross-scope record access.- CLI
--jsonpayloads must be JSON objects and are size-bounded so companion apps fail deterministically on malformed input. - Canonical storage is local Markdown plus a derived SQLite index; Mneuma does not expose a network service in this release.
mkdir -p ./demo-workspace
mneuma --root ./demo-workspace init
mneuma --root ./demo-workspace presence-create --name Sarah
mneuma --root ./demo-workspace thread-create --presence-id prs_xxx --title "Release planning"
mneuma --root ./demo-workspace retain --presence-id prs_xxx --raw "Sarah prefers dry humor." --kind-hint opinion
mneuma --root ./demo-workspace recall --presence-id prs_xxx --query "dry humor" -k 5
mneuma --root ./demo-workspace --interaction-layer-enabled attune --presence-id prs_xxx --message "maybe this is wrong"For a live model-backed tool-calling verification run, see:
scripts/live_openai_validation.py
src/mneuma/ Python package
examples/ JS bridge example
docs/spec/ technical docs
tests/ integration-style tests
Workspace data is created by init and should live outside the package source tree.
DOCS.md— practical usage guidedocs/spec/mneuma-spec.md— technical specdocs/spec/mneuma-interaction-layer.md— interaction-layer behaviordocs/spec/mneuma-lens-dynamics.md— lens and adaptation notesmneuma-threat-model.md— repo-grounded local-first threat modelsecurity_best_practices_report.md— prioritized AppSec review notesdocs/research/memory-landscape-2026.md— short comparison memo against current memory repos
MIT
Contributions are welcome. Start with:
CONTRIBUTING.mdSECURITY.mdSUPPORT.md- open an issue before large architectural changes