Persistent memory for LLMs and apps. Content-addressed storage with dedupe, compression, full-text and vector search.
  • C++ 93.1%
  • Python 2.4%
  • Shell 1.6%
  • Meson 1.6%
  • Lean 0.7%
  • Other 0.6%
Find a file
2025-10-13 20:09:53 -04:00
.act v0.6.12 experiemental 2025-09-11 11:28:42 -04:00
.conan v0.2.6 2025-08-14 06:52:24 -04:00
.devcontainer v0.7.0-prerelease 2025-09-20 22:55:34 -04:00
.githooks v0.6.9 2025-09-06 00:11:43 -04:00
.github v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
.vscode testing fixings for ubuntu and grep / search improvements 2025-10-12 08:03:58 -04:00
.zed docs update 2025-09-27 21:41:48 -04:00
conan/profiles missing profile 2025-10-10 13:34:40 -04:00
data v0.1.5 2025-08-13 19:25:31 -04:00
docker/local-ci checkpoint. Expanded tests and resolved minor issues with grep, ci/cd and daemon protocol add spec 2025-09-29 14:38:04 -04:00
docs v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
examples v0.7.5 2025-10-11 00:34:31 -04:00
homebrew-yams@553a213f5b v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
include v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
meson improved ft5s checks for builds 2025-10-04 22:09:09 -04:00
packaging v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
plugins v0.7.4 2025-10-10 12:51:39 -04:00
public v0.2.0 2025-08-13 23:11:02 -04:00
scripts v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
spec v0.6.30 2025-09-16 10:55:37 -04:00
sql yams 2025-08-10 23:41:49 -04:00
src v0.7.5 2025-10-13 20:07:48 -04:00
tests v0.7.5 2025-10-13 20:07:48 -04:00
third_party v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
tools test framework stabilizations and bug fixes 2025-09-23 22:07:22 -04:00
.actrc v0.7.0-prerelease 2025-09-20 22:55:34 -04:00
.build.yml test flakiness improvements, ci improvements and fixes documented for v0.7.1 2025-09-26 06:40:48 -04:00
.clang-format v0.3.3 clang-format now in use 2025-08-15 15:51:18 -04:00
.cppcheck-suppressions v0.4.0 2025-08-20 14:02:06 -04:00
.dockerignore v0.5.7 2025-08-29 06:12:50 -04:00
.gitignore v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
.gitmodules ci updates 2025-09-22 14:26:40 -04:00
CHANGELOG.md bumping to v0.7.6 2025-10-13 20:09:53 -04:00
CODE_OF_CONDUCT.md v0.6.9 2025-09-06 00:11:43 -04:00
conanfile.py v0.7.5 2025-10-13 20:07:48 -04:00
CONTRIBUTING.md updating contributing for new meson build system. 2025-09-21 22:19:20 -04:00
Dockerfile v0.7.5 2025-10-13 20:07:48 -04:00
GOVERNANCE.md v0.6.12 experiemental 2025-09-11 11:28:42 -04:00
LICENSE v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
MAINTAINERS.md v0.6.12 experiemental 2025-09-11 11:28:42 -04:00
meson.build v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
meson_options.txt v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
mkdocs.yml hotfix mcp 2025-10-11 00:49:32 -04:00
NOTICE v0.7.5 staging and license updates 2025-10-13 17:07:31 -04:00
README.md v0.7.5 2025-10-13 20:07:48 -04:00
SECURITY.md v0.6.9 2025-09-06 00:11:43 -04:00
spdlog.pc yams 2025-08-10 23:41:49 -04:00

YAMS — Yet Another Memory System

Persistent memory for LLMs and apps. Content‑addressed storage with dedupe, compression, full‑text and vector search.

license language github builds last commit

Features

  • SHA‑256 content‑addressed storage
  • Block‑level dedupe (Rabin)
  • Full‑text search (SQLite FTS5) + semantic search (embeddings)
  • WAL‑backed durability, high‑throughput I/O, thread‑safe
  • Portable CLI and MCP server
  • Extensible with Plugin Support
  • Experimental path-tree traversal for prefix/semantic/diff workloads (see [search.path_tree] in the config template) enabling ~62–66% faster scans vs. baseline grep queries when coupled with the new hierarchical benchmarks. citedocs/delivery/051/benchmark_plan.md:160

Install

Supported platforms: Linux x86_64/ARM64, macOS x86_64/ARM64

# 1. Resolve dependencies
conan install . -of build/release -s build_type=Release -b missing

# 2. Configure
meson setup build/release \
  --native-file build/release/build-release/conan/conan_meson_native.ini \
  --buildtype=release

# 3. Build
meson compile -C build/release

# 4. (Optional) Install
meson install -C build/release

Dependencies quick ref:

  • Linux: libssl-dev sqlite3 libsqlite3-dev protobuf-compiler ninja-build cmake (TUI enabled by default)
  • macOS (Homebrew): openssl@3 protobuf sqlite3 ninja cmake (TUI enabled by default)
    • Export OPENSSL_ROOT_DIR=$(brew --prefix openssl@3) if CMake cannot locate OpenSSL
  • ONNX runtime (plugins): requires oneTBB at runtime. Provide via system packages (e.g., libtbb12/libtbb-dev) or Conan (onetbb).

Common build options (Meson): -Dbuild-tests=true|false, -Denable-tui=true|false (defaults to true), -Denable-onnx=enabled|disabled|auto, -Dplugin-onnx=true|false, -Dyams-version=.... Fast iteration: set FAST_MODE=1 when running meson setup --reconfigure to disable ONNX & tests in CI (SourceHut) or locally. Media metadata: install mediainfo + dev package (e.g. libmediainfo-dev) or FFmpeg (ffprobe) to enable richer video parsing.

Further build documentation:

  • GCC specifics / quick reference: docs/BUILD-GCC.md
  • Developer build system & internal ONNX Runtime path: docs/developer/build_system.md

ONNX embeddings (experimental):

  • The ONNX plugin is experimental and may not work as intended.
  • Conan: default profiles enable yams/*:enable_onnx=True. With custom profiles, pass -o yams/*:enable_onnx=True to conan install.
  • Plain CMake: configure with -DYAMS_ENABLE_ONNX=ON and ensure onnxruntime is discoverable (e.g., via CMAKE_PREFIX_PATH).
  • Verify configure logs include: ONNX Runtime found - enabling local embedding generation (and not disabled).
  • Internal newer ORT (GenAI headers) path: run Conan with -o yams/*:use_conan_onnx=False and configure with -DYAMS_BUILD_INTERNAL_ONNXRUNTIME=ON (see developer build doc for details).

Note: Plain CMake without Conan may miss dependencies; prefer Conan builds.

Quick Start

export YAMS_STORAGE="$HOME/.local/share/yams"
yams init --non-interactive

# add
echo hello | yams add - --tags demo

# search
yams search hello --limit 5

# get
yams list --format minimal --limit 1 

Path-Tree Search (Experimental)

The CLI and daemon can bias path-aware traversals when [search.path_tree] is enabled in config.toml. This instructs the metadata layer to reuse the hierarchical index that powers the PBI-051 benchmarks, yielding significantly faster prefix and diff scans. Toggle it by adding:

[search.path_tree]
enable = true
mode = "preferred" # or "fallback" to keep legacy scans as backup

When enabled, yams grep accepts tag or path filters (it defaults the pattern to .* for pure filters) and, when you specify explicit path prefixes, the service seeds candidates through MetadataRepository::listPathTreeChildren—the same engine exercised by tests/benchmarks/search_tree_bench.cpp. citetests/benchmarks/search_tree_bench.cpp:188src/app/services/grep_service.cpp:247

CLI Cheat Sheet

# set storage per-run
yams --data-dir /tmp/yams add -

# list (minimal for pipes)
yams list --format minimal

# fuzzy search
yams search database --fuzzy --similarity 0.8

# delete preview
yams delete --pattern "*.log" --dry-run

Plugins (ONNX Provider)

YAMS loads optional plugins via a stable C‑ABI host with a simple trust policy.

  • Trust file: ~/.config/yams/plugins_trust.txt (one absolute path per line; default deny)
  • Discovery order:
    • YAMS_PLUGIN_DIR (exclusive override)
    • $HOME/.local/lib/yams/plugins
    • /usr/local/lib/yams/plugins, /usr/lib/yams/plugins
    • ${CMAKE_INSTALL_PREFIX}/lib/yams/plugins
  • Disable plugin subsystem: start daemon with --no-plugins.

ONNX plugin build/install/runtime:

  • Prerequisite: onnxruntime (headers + shared libraries) must be available at build and runtime.
  • Build: yams_onnx_plugin is built when onnxruntime is found and ONNX is enabled.
  • Install: plugin installs under ${CMAKE_INSTALL_LIBDIR}/yams/plugins (e.g., /usr/local/lib/yams/plugins).
  • Packaging: set -DYAMS_PACKAGE_PLUGINS=ON (default) and run cpack to include the plugin in binary packages.
  • Discovery: daemon logs a line on startup with plugin scan directories (useful for troubleshooting).

Usage (CLI):

# scan, trust, load
yams plugin scan
yams plugin trust add /usr/local/lib/yams/plugins
yams plugin load /usr/local/lib/yams/plugins/libyams_onnx_plugin.so

First‑time setup with yams init:

  • The init dialog asks whether to enable plugins; if yes, it creates and trusts ~/.local/lib/yams/plugins.
  • Non‑interactive: pass --enable-plugins.

Dev overrides:

  • Set YAMS_PLUGIN_DIR to your build output (e.g., .../build/.../plugins/onnx) to have the daemon scan it.

Behavior:

  • If a trusted plugin advertises model_provider_v1, the daemon prefers it for embeddings. Otherwise it falls back to the legacy registry or mock/null providers (env: YAMS_USE_MOCK_PROVIDER, YAMS_DISABLE_ONNX).

MCP

yams serve  # stdio transport

MCP config (example):

{
  "mcpServers": { "yams": { "command": "/usr/local/bin/yams", "args": ["serve"] } }
}

Troubleshooting

Conan: create default profile

conan profile detect --force

PDF support issues: build with -DYAMS_ENABLE_PDF=OFF.

Plugins not listed by yams plugin list:

  • Ensure the ONNX plugin exists in a scanned directory (install prefix or ~/.local/lib/yams/plugins).
  • Ensure the directory is trusted (yams plugin trust add <dir> or via yams init).
  • Ensure onnxruntime shared libs are resolvable by the loader (e.g., ldd libyams_onnx_plugin.so).
  • Check the daemon startup log for: Plugin scan directories: dir1;dir2;... to confirm discovery paths.

Monitor with yams stats --verbose and yams doctor.

Cite

@misc{yams,
author = {Trevon Williams},
title = {yams: Content addressable storage with excellent search },
year = {2025},
publisher = {GitHub},
url = {https://github.com/trvon/yams}
}

it