Skip to content

feat(storage): add SQLite vector store, VectorStore protocol, and tests#1

Open
MbappeWU wants to merge 1 commit intoclaude/add-claude-documentation-kYGTjfrom
codex/start-project-setup
Open

feat(storage): add SQLite vector store, VectorStore protocol, and tests#1
MbappeWU wants to merge 1 commit intoclaude/add-claude-documentation-kYGTjfrom
codex/start-project-setup

Conversation

@MbappeWU
Copy link
Copy Markdown
Owner

@MbappeWU MbappeWU commented Feb 5, 2026

Motivation

  • Provide a pluggable, persistent vector storage option for local-first workflows so memories can be persisted beyond process lifetime.
  • Standardize the expected vector store interface so storage backends can be swapped (InMemoryVectorStore vs SQLite).
  • Add basic tests and developer conveniences to validate similarity search and persistence behavior.

Description

  • Introduce a VectorStore protocol and serialization helpers with dumps_vector, loads_vector, dumps_payload, and loads_payload in src/memomind/storage/.
  • Add SqliteVectorStore as a SQLite-backed implementation that persists serialized vectors and payloads and uses cosine_similarity for scoring.
  • Keep the existing InMemoryVectorStore and refactor MemoryStore to accept a pluggable VectorStore backend and upsert embeddings with a payload summary.
  • Add documentation and project metadata (README.md, docs/SPEC.md, docs/ARCHITECTURE.md, pyproject.toml) and add .gitignore for common files.

Testing

  • Ran pytest after adding tests/conftest.py to ensure the test runner can import the src path; the test suite collected 2 items and 2 passed.
  • Tests include tests/test_vector_store.py which verifies InMemoryVectorStore ordering and that SqliteVectorStore persists and returns the inserted record.
  • No automated test failures remain after the import path fix; all automated tests succeeded.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant