memvid
Version, currently main branch1 version
- main branchlatestJan 30, 2026
github.com/trans/memvid.cr
Crystal extension for memvid (using C FFI fork)
Installation
# Add this to your shard.yml
dependencies:
memvid:
github: trans/memvid.cr
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.18.2- License
- MIT
- Author
- Thomas Sawyer
Dependencies
This version declares no dependencies.
README
memvid.cr
Crystal bindings for memvid, the single-file AI memory format.
Status
Core API complete. Development paused.
This library covers memvid's core local-only API (create, put, search, ask, verify, doctor). Development has been paused due to memvid's trajectory toward a SaaS model with API key requirements for advanced features.
57 specs passing, 22 FFI functions wrapped
Installation
-
Build the FFI library:
git clone https://github.com/trans/memvid-ffi cd memvid-ffi cargo build --release -
Add the dependency to your
shard.yml:dependencies: memvid: github: trans/memvid.cr -
Run
shards install -
Set the library path when running:
LD_LIBRARY_PATH=/path/to/memvid-ffi/target/release crystal run src/myapp.cr
Usage
require "memvid"
# Create a new memory file
mem = Memvid::Memory.create("knowledge.mv2")
# Add content
mem.put("Crystal is a compiled language with Ruby-like syntax.")
mem.put("It features static typing and null safety.")
mem.commit
# Search
results = mem.search("What is Crystal?", top_k: 5)
results.hits.each do |hit|
puts "#{hit.score}: #{hit.snippet}"
end
# RAG-style Q&A
response = mem.ask("What are Crystal's main features?")
puts response.answer
# Get stats
stats = mem.stats
puts "Frames: #{stats.frame_count}"
# Clean up
mem.close
API Coverage
| Feature | Status |
|---|---|
| Create / Open / Close | Done |
| Put / Delete / Commit | Done |
| Search (lexical) | Done |
| Ask (RAG) | Done |
| Frame retrieval | Done |
| Timeline queries | Done |
| Verify / Doctor | Done |
| Memory Cards | Not implemented |
| Enrichment | Not implemented |
| CLIP / Vector search | Not implemented |
Development
# Run specs (requires libmemvid.so in library path)
LD_LIBRARY_PATH=/path/to/memvid-ffi/target/release crystal spec
License
MIT
Contributors
- Thomas Sawyer - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Jan 30, 2026
- Crystal
>= 1.18.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/trans/memvid.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1