mneuma-chat is the reference companion client for Mneuma.
It is an opinionated Next.js chat app that demonstrates how Mneuma can create and persist distinct presences for one Person.
Status: early alpha
- creates a new Mneuma presence for each new chat
- keeps returning to that same presence when you reopen the same chat session
- supports lightweight branching via new threads for the same presence
- uses Mneuma on every turn for attunement and recall
- supports hosted OpenAI or OpenAI-compatible endpoints
- exposes development inspection surfaces for presence/mood/lens/recall state
This is the reference UX for:
- presence creation
- presence continuity
- thread branching inside a presence
- practical integration of Mneuma into a chat surface
It is not yet intended to be a full general-purpose multi-provider chat platform.
- Node 20.9+
- npm 10+
- Mneuma memory runtime, provided separately as either:
- an installed
mneumaCLI, or - a local
mneumacheckout referenced withMNEUMA_REPO_ROOT
- an installed
- a Mneuma workspace root
- either:
- hosted OpenAI credentials, or
- an OpenAI-compatible endpoint for local or self-hosted models
Create .env.local:
# Hosted OpenAI
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini
# Optional OpenAI-compatible override for local/custom runtimes
# MNEUMA_CHAT_BASE_URL=http://127.0.0.1:11434/v1
# MNEUMA_CHAT_MODEL=qwen2.5:14b
# MNEUMA_CHAT_API_KEY=
MNEUMA_ROOT=/absolute/path/to/mneuma-workspace
# Optional explicit CLI
# MNEUMA_CLI=mneuma
# Optional repo-local fallback when the CLI is not installed
# MNEUMA_REPO_ROOT=/absolute/path/to/mneuma
NEXT_PUBLIC_RUN_ID=localmneuma-chat does not bundle the Mneuma memory/personality runtime. It is a
reference chat client that shells out to the mneuma CLI or a local Mneuma
source checkout, while keeping each user's memory workspace outside this repo.
npm install
npm run devOpen http://localhost:3000.
npm test
npm run buildPer new chat session:
/api/bootstrapcreates a new Mneuma presence- it also creates the initial Mneuma thread for that presence
- the configured runtime chooses a name/persona seed and greeting
- the browser session stores the resulting
presenceIdandthreadId
Per user message:
/api/chatreads the currentpresenceIdandthreadId- it calls Mneuma for attunement and recall
- it gives the LLM memory tools with session-aware defaults so writes land on the correct presence/thread
- reply text is lightly post-processed for style/safety guardrails
- the UI surfaces continuity, mood, and top recall provenance without exposing raw internals
Works now with:
- hosted OpenAI API access
- OpenAI-compatible endpoints such as:
- Ollama
- LM Studio
- vLLM
- llama.cpp-compatible servers
Not implemented yet:
- direct ChatGPT/Codex OAuth-backed chat transport
- full provider/account switching UI
- full OAuth flows for multiple hosted providers
src/app/ Next.js app routes and UI
src/lib/ bridge/runtime/policy helpers
src/components/ UI components
public/ static assets
MIT
This repo is intentionally early and focused. Please open an issue before large product or architectural changes. See:
CONTRIBUTING.mdSECURITY.mdSUPPORT.mdCODE_OF_CONDUCT.md