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 testpnpm 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:integrationThis 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/readyAfter you change the server, rebuild its image and start it again:
docker compose build --no-cache server
docker compose up -dThe 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.
| Package | What it is |
|---|---|
@mnemo-ai/cli | The mnemo command: recall, remember, sessions, keys, export and import, and mnemo install |
@mnemo-ai/mcp | MCP server over stdio with 37 tools |
@mnemo-ai/client-ts | Typed HTTP client for Node 20+, Bun, Deno, Workers and browsers |
@mnemo-ai/types | Shared types; the other three install it for you |
Internal packages under packages/, not on npm:
| Package | What it is |
|---|---|
server | Hono HTTP API with OpenAPI 3.1, gRPC, bearer auth and the dashboard sign-in |
dashboard | The Next.js web dashboard |
core | The engine: kinds of memory, recall, bitemporal facts, session collapse |
adapter-postgres, adapter-vector, adapter-redis | Storage, vector search over pgvector and the cache |
llm-providers, adapter-llm | The eight LLM providers, a router and a spending cap |
consolidation, federation, plugins, cup | Background consolidation, signed sync between servers, plugins and schema upgrades |
harness, plugin | Conversation capture behind mnemo install --capture, and the host plugin |
mock-server | An in-memory mock of the REST API for offline development |
sdk-python, sdk-go | The 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.tsfiles inside each package’ssrc/. - Commit messages follow Conventional Commits.
- Formatting is Prettier: run
pnpm formatbefore committing. There is no ESLint or Biome;pnpm lintruns typecheck-based and custom checks. - There is no CI today: GitHub Actions is off for the repository. Run
pnpm test && pnpm lint && pnpm typecheckbefore 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.