QuickstartFrom scratch

Build Mnemosyne from source

The path for contributors. You need Node 22.18 or later, pnpm 9 and Docker.

Clone, build and test

git clone https://github.com/lucasmailland/mnemosyne
cd mnemosyne
pnpm install
pnpm build
pnpm typecheck
pnpm test

pnpm test runs the unit and contract suites with no Docker. The repository has more than 1,000 test files.

Run the integration tests

pnpm test:integration

This suite runs against real Postgres and pgvector in containers, starting from an empty database and its 70 migrations.

Run the stack from your checkout

Compose builds the server and the migrate job from the source tree, so the Docker stack runs your code:

cd docker
cp .env.example .env
docker compose up -d
docker exec mnemosyne-ollama ollama pull bge-m3
docker exec mnemosyne-ollama ollama pull qwen2.5:3b
curl http://localhost:3939/health/ready

After you change the server, rebuild its image and start it again:

docker compose build --no-cache server
docker compose up -d

The docs site you are reading lives in its own repository, not in the monorepo.

Workspace layout

Published to npm. All four are clients and need a running server.

PackageWhat it is
@mnemo-ai/cliThe mnemo command: recall, remember, sessions, keys, export and import, and mnemo install
@mnemo-ai/mcpMCP server over stdio with 37 tools
@mnemo-ai/client-tsTyped HTTP client for Node 20+, Bun, Deno, Workers and browsers
@mnemo-ai/typesShared types; the other three install it for you

Internal packages under packages/, not on npm:

PackageWhat it is
serverHono HTTP API with OpenAPI 3.1, gRPC, bearer auth and the dashboard sign-in
dashboardThe Next.js web dashboard
coreThe engine: kinds of memory, recall, bitemporal facts, session collapse
adapter-postgres, adapter-vector, adapter-redisStorage, vector search over pgvector and the cache
llm-providers, adapter-llmThe eight LLM providers, a router and a spending cap
consolidation, federation, plugins, cupBackground consolidation, signed sync between servers, plugins and schema upgrades
harness, pluginConversation capture behind mnemo install --capture, and the host plugin
mock-serverAn in-memory mock of the REST API for offline development
sdk-python, sdk-goThe Python and Go SDKs, installed from the repository

Outside packages/: docker/ holds the Dockerfiles and Compose files, docs/ the documentation, examples/graph-viewer the one worked example and scripts/ the release and maintenance scripts.

Conventions

  • TypeScript runs in strict mode with noUncheckedIndexedAccess.
  • The 70 v3 migrations live in packages/adapter-postgres/migrations/baseline/. packages/core/migrations/ is the older 40-file stream.
  • Tests are *.test.ts files inside each package’s src/.
  • Commit messages follow Conventional Commits.
  • Formatting is Prettier: run pnpm format before committing. There is no ESLint or Biome; pnpm lint runs typecheck-based and custom checks.
  • There is no CI today: GitHub Actions is off for the repository. Run pnpm test && pnpm lint && pnpm typecheck before opening a pull request. Releases pass a local gate, FULL=1 bash scripts/full-sweep.sh.

Read CONTRIBUTING.md before you open your first pull request.