@oh-my-pi/pi-mnemopi
Local SQLite memory engine for Oh My Pi agents
pinned to #7aa1d58updated 2 weeks ago
Ask your AI client: “install mcps/oh-my-pi-pi-mnemopi”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install mcps/oh-my-pi-pi-mnemopimetahub onboarded this repo on the author's behalf.
If you own github.com/can1357/oh-my-pi on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
17,190
Last commit
2 weeks ago
Latest release
published
- #agent
- #ai-agent
- #ai-coding-agent
- #anthropic
- #bun
- #claude
- #cli
- #coding-assistant
- #embeddings
- #llm
- #mcp
- #memory
- #multi-provider
- #openai
- #rust
- #sqlite
- #terminal
- #tui
- #typescript
What this server exposes
Surfaces parsed from this server's source at publish time.
Launches: mnemopi
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.7aa1d58· 2 weeks ago
Kind-specific
31MCP: launch path
bin: mnemopi
MCP: @modelcontextprotocol/sdk in dependencieswarn
No @modelcontextprotocol/sdk dependency declared
Run `npm i @modelcontextprotocol/sdk` so consumers can audit your stack.
MCP: ESM package
"type": "module"
MCP: server surface
0 tools
Release history
1- releasecurrent7aa1d58warn2 weeks ago
Contents
Local SQLite memory engine for Oh My Pi agents.
This package is the Bun/TypeScript port of the Mnemosyne memory engine. It provides:
Mnemopi, a small facade for remember/recall/stats/sleep workflows.BeamMemory, the lower-level working/episodic memory engine.- MCP tool definitions and a dispatcher for host integrations.
- Optional local ONNX embeddings through
fastembedand optional OpenAI-compatible embedding/LLM endpoints.
The package does not bundle or download a local GGUF LLM. LLM paths are host-backend or OpenAI-compatible remote only; when no LLM is configured, deterministic heuristic paths are used.
Basic use
import { Mnemopi } from "@oh-my-pi/pi-mnemopi";
const memory = new Mnemopi({ dbPath: "./mnemopi.db", bank: "project" });
const id = memory.remember("The deployment target is stable-cluster.", {
source: "notes",
importance: 0.8,
veracity: "true",
});
const results = memory.recall("deployment target", 5);
console.log(id, results[0]?.content);
memory.close();
Configuration
Mnemopi accepts LLM and embedding options directly. MNEMOPI_* environment variables remain fallbacks/defaults when the matching constructor option is omitted.
import { Mnemopi } from "@oh-my-pi/pi-mnemopi";
import type { Model } from "@oh-my-pi/pi-ai";
const ftsOnly = new Mnemopi({ noEmbeddings: true });
const remoteEmbeddings = new Mnemopi({
embeddingModel: "text-embedding-3-small",
embeddingApiUrl: "https://api.openai.com/v1",
embeddingApiKey: process.env.OPENAI_API_KEY,
});
const remoteLlm = new Mnemopi({
llm: {
baseUrl: "https://api.openai.com/v1",
apiKey: process.env.OPENAI_API_KEY,
model: "gpt-4.1-mini",
},
// Equivalent aliases: llmBaseUrl, llmApiKey, llmModel.
});
declare const smolModel: Model;
const piAiLlm = new Mnemopi({ llm: smolModel });
const dynamicLlm = new Mnemopi({
llm: async (prompt, opts) => {
const token = await getFreshOauthToken();
return await completeWithPiAi(prompt, {
token,
maxTokens: opts?.maxTokens,
temperature: opts?.temperature,
});
},
});
Banks and host scoping
Mnemopi itself exposes banks directly through constructor options such as bank; it does not hard-code coding-agent project scoping.
The Oh My Pi coding-agent wrapper adds mnemopi.scoping on top of those constructor options:
global: one shared bankper-project: isolated project memoryper-project-tagged: project-local writes plus global recall visibility
In per-project-tagged, the wrapper is responsible for combining project-local retention with global recall visibility. The package still just exposes banks plus constructor-level LLM and embedding options.
Common environment fallbacks:
MNEMOPI_DATA_DIR/MNEMOPI_DB_PATH: default storage location.MNEMOPI_NO_EMBEDDINGS=1: force FTS-only recall.MNEMOPI_EMBEDDING_MODEL: defaults toBAAI/bge-small-en-v1.5.MNEMOPI_EMBEDDING_API_URLandMNEMOPI_EMBEDDING_API_KEY: OpenAI-compatible embedding endpoint.MNEMOPI_LLM_ENABLED=1,MNEMOPI_LLM_BASE_URL,MNEMOPI_LLM_API_KEY,MNEMOPI_LLM_MODEL: OpenAI-compatible LLM endpoint.
Local embeddings use the fastembed npm package. Its default BGESmallENV15 model is 384-dimensional and uses the package's CLS pooling plus vector normalization path. Local GGUF LLMs are not available in this package.
Commands
mnemopi remember "Use stable-cluster for production deploys"
mnemopi recall "production deploy target"
mnemopi stats
mnemopi sleep
Tests
bun --cwd packages/mnemopi test
bun --cwd packages/mnemopi run check
Reviews
No reviews yet. Be the first.
Related
Nanobot
A lightweight personal AI assistant framework
@aisuite/chub
CLI for Context Hub - search and retrieve LLM-optimized docs and skills
ClawMem
On-device memory layer for AI agents. Claude Code, OpenClaw, and Hermes. Hooks + MCP server + hybrid RAG search.
mh install mcps/oh-my-pi-pi-mnemopi