yams

yams

Content addressable storage with excellent search

Stars: 341

Visit
 screenshot

YAMS (Yet Another Memory System) is a persistent memory system designed for Large Language Models (LLMs) and applications. It provides content-addressed storage with features such as deduplication, compression, full-text search, and vector search. The system is built with SHA-256 content-addressed store, block-level deduplication, full-text search using SQLite FTS5, semantic search with embeddings, WAL-backed durability, high-throughput I/O, and thread-safe operations. YAMS supports Linux x86_64/ARM64 and macOS x86_64/ARM64 platforms. It is recommended to build using Conan for managing dependencies and ensuring proper installation. Users can interact with YAMS through a command-line interface for tasks like initialization, adding content, searching, and retrieving data. Additionally, YAMS provides LLM-friendly patterns for caching web content, storing code diffs, and integrating with other systems through an API in C++. Troubleshooting tips include creating a default Conan profile and handling PDF support issues during the build process. The project is licensed under Apache-2.0.

README:

Ask DeepWiki Release

YAMS — Yet Another Memory System

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

What it is

  • SHA-256 content-addressed store with block-level dedupe (Rabin)
  • Full-text search (SQLite FTS5) and semantic search (embeddings)
  • WAL-backed durability, high-throughput I/O, thread-safe

Install

Supported: Linux x86_64/ARM64, macOS x86_64/ARM64

Build with Conan (recommended):

pip install conan
conan profile detect --force
conan install . -of build/yams-release -s build_type=Release -b missing
cmake --preset yams-release
cmake --build --preset yams-release -j
sudo cmake --install build/yams-release && sudo ldconfig

Deps quick refs:

  • Linux: libssl-dev sqlite3 libsqlite3-dev protobuf-compiler libncurses-dev
  • macOS: openssl@3 protobuf sqlite3 ncurses (export OPENSSL_ROOT_DIR=$(brew --prefix openssl@3))

Build options (common): YAMS_BUILD_TESTS=ON|OFF, YAMS_BUILD_BENCHMARKS=ON|OFF, YAMS_ENABLE_PDF=ON|OFF, YAMS_ENABLE_TUI=ON|OFF, YAMS_ENABLE_ONNX=ON|OFF.

Note: Plain CMake without Conan may miss deps. 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 | xargs yams get

CLI cheat sheet

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

# list (minimal for pipes)
yams list --format minimal | head -3

# fuzzy search
yams search databse --fuzzy --similarity 0.8

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

LLM-friendly patterns

# cache web content
curl -s https://example.com | yams add - --tags web,cache --name example.html

# stash code diffs
git diff | yams add - --tags git,diff,$(date +%Y%m%d)

# chain search -> get
hash=$(yams search "topic" --format minimal | head -1); yams get "$hash"

MCP

yams serve  # stdio transport

MCP config (example):

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

API (C++)

#include <yams/api/content_store.h>
auto store = yams::api::createContentStore(getenv("YAMS_STORAGE"));
yams::api::ContentMetadata meta{.tags={"code","v1.0"}};
auto r = store->store("file.txt", meta);
auto q = store->search("query", 10);
store->retrieve(hash, "out.txt");

Troubleshooting

Conan: create default profile

conan profile detect --force

PDF support issues: build with -DYAMS_ENABLE_PDF=OFF.

License

Apache-2.0

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for yams

Similar Open Source Tools

For similar tasks

For similar jobs