Hybrid search, typed relations, static publishing. Built for humans and AI agents.
pip install memex-kb
Everything you need to manage knowledge, nothing you don't.
BM25 keyword search combined with semantic embeddings, merged with Reciprocal Rank Fusion.
Explicit directed links in frontmatter with CLI helpers and linting.
Wikilinks, relations, and semantic links queryable via CLI and published sites.
Project KB (./kb/) and user KB (~/.memex/kb/) with shared search.
Generate HTML with embedded search, tag pages, and graph visualization.
mx prime, mx schema, mx batch. Built for AI coding assistants.
uv tool install memex-kb
pip install memex-kb
Requires Python 3.11+. Semantic search included; first run downloads ~90MB embedding model.
mx init # Create kb/ directory
mx add --title="API Notes" \ # Add an entry
--tags="api,docs" \
--category=reference \
--content="Endpoint details..."
mx search "authentication" # Hybrid search
mx get reference/api-notes.md # Read an entry
| Command | Description |
|---|---|
mx search <query> |
Hybrid search (BM25 + semantic) |
mx search --mode=semantic |
Semantic search only |
mx get <path> |
Read an entry |
mx list --tags=<tag> |
List entries by tag |
mx tree |
Directory structure |
mx whats-new |
Recent changes |
| Command | Description |
|---|---|
mx add |
Create new entry with metadata |
mx append |
Append to existing or create |
mx patch |
Find/replace in an entry |
mx ingest |
Import file into KB |
| Command | Description |
|---|---|
mx relations <path> |
Query entry relations |
mx relations-add |
Add typed relation |
mx relations-lint |
Check relation consistency |
mx hubs |
Find high-connectivity entries |
mx suggest-links |
Semantic link suggestions |
| Command | Description |
|---|---|
mx health |
Audit KB integrity |
mx reindex |
Rebuild search indices |
mx eval |
Search quality metrics |
mx publish |
Generate static site |
| Command | Description |
|---|---|
mx prime |
Session context for agents |
mx schema --compact |
CLI schema (minimal tokens) |
mx batch |
Multiple commands, one invocation |
Entries are Markdown files with YAML frontmatter:
---
title: API Guide
tags: [api, docs]
description: Endpoints and auth
relations:
- path: reference/auth.md
type: documents
---
# API Guide
See [[reference/auth]] for auth details.
Relation types: depends_on, implements,
extends, documents, references,
blocks, related.
mx --help