All notable changes to the Memori Python SDK will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added input validation for the
queryargument ofMemori.recall(...): a non-stringquerynow raisesTypeErrorand an empty or whitespace-onlyqueryraisesValueError, matching the existinglimitvalidation and failing fast instead of issuing an empty recall against the database/LLM path.
3.3.6 - 2026-05-27
- Added MCP client setup guidance for project-scoped attribution using workspace-derived values for
X-Memori-Entity-IdandX-Memori-Process-Idto prevent memory mixing across projects. (Refs #404) - Added TiDB Zero BYODB provisioning via
Memori.provision(...), thepython -m memori provisionCLI command, and thetidb-zerooptional dependency extra.
- Local embeddings now use the native Rust
fastembedbackend exclusively, including PythonMemori.embed_texts(...), recall query embeddings, and advanced augmentation fact embeddings. The Pythonsentence-transformersfallback has been removed; theembeddingsoptional extra remains as a no-op for install compatibility. - Advanced augmentation fact embeddings are attached in the Rust worker before persistence, and the Python write callback reuses the active rust-core engine when available.
- Advanced augmentation fact writes no longer depend on Python
sentence-transformersor its transitive dependencies. - Rust augmentation now logs when fact embedding attachment is skipped due to a row-count mismatch.
- Rust-backed BYODB recall now serializes nested recalled summaries before
passing rows into the native engine, preventing TiDB Zero/MySQL datetime
values from raising
TypeError: Object of type datetime is not JSON serializable.
3.3.2 - 2026-04-28
- Android wheel build coverage for the Rust-backed Python extension, targeting
android_24_arm64_v8aandandroid_24_x86_64via cibuildwheel. The Rust core ONNX Runtime bootstrap can now download and select the matchinglibonnxruntime.sofrom Microsoft's Android AAR at runtime.
- Rust-backed retrieval and augmentation are now enabled by default for BYODB
mode when
memori_pythonloads successfully. The Python SDK still orchestrates provider wrapping, storage adapters, conversation persistence, and fallbacks. Override withuse_rust_core=FalseonMemori(...),MEMORI_DISABLE_RUST_CORE=1, or legacyMEMORI_USE_RUST_CORE=0; unsuccessful Rust core loads still fall back to the pure-Python path with a warning.
- Conversation injection no longer corrupts OpenAI-compatible message
sequences for tool-using conversations. Recalled history previously
replayed
role="tool"rows (with notool_call_id) and empty assistant rows (whosetool_callswere never persisted), causing upstream providers to reject the request with400: An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The OpenAI/Anthropic/Bedrock injection paths now sanitise recalled history before prepending it. Legacy Gemini-erarole="model"rows are normalised torole="assistant"for the same reason. The injected-message counter now tracks the post-sanitisation count so the post-response payload does not slice into the current user message before persistence and augmentation. (#434)
3.3.0rc1 - 2026-04-16
- Experimental Rust-backed retrieval and augmentation path. Opt-in via
MEMORI_USE_RUST_CORE=1in BYODB mode. Provides a native hybrid-search recall pipeline (dense + lexical re-ranking) and lower-overhead background augmentation dispatch via atokio-based worker runtime. The pure-Python path remains the default and is unchanged. - Prebuilt platform wheels. Released as
cp310-abi3wheels covering Python 3.10 through 3.14 onmanylinux_2_28_{x86_64,aarch64},macosx_{x86_64,arm64}, andwin_amd64. First-time users of the Rust core will download a ~25 MB ONNX embedding model from Hugging Face on first use, cached under~/.fastembed_cache/. - Source distribution now includes the
core/Rust crate. Users on unsupported platforms (or who opt out of the wheel) can build from source provided a Rust toolchain is available. - Continuous integration for the Rust core (
core-ci.yml) coveringcargo fmt,clippy, unit tests, and cross-platform wheel build smoke viacibuildwheel. dry_runandpublish_memorisdkinputs on the PyPI publish workflow for release dress rehearsals without touching the index.
- Internal crate directory
rust-core/renamed tocore/. No public import path is affected; the Rust crate name (engine-orchestrator) and the Python extension name (memori_python) are unchanged. - Debug payload logging in the augmentation pipeline now routes through the
standard
loggingmodule atDEBUGlevel. The previous stdout-based behavior gated byMEMORI_DEBUG_AA_PAYLOAD=1has been removed; enable debug-level logging on thememori._rust_coreandengine_orchestratorloggers instead. - PyPI publish pipeline rewritten around
cibuildwheelv3.4.0 for PyPI-compliant wheel tags across all supported platforms. Pure-Python fallback is still available via the sdist.
- Fixed multi-turn conversation ingestion for AzureOpenAI and OpenAI clients.
Previously, only the first conversation turn was being recorded. Now
conversation_idis resolved early in the request lifecycle, ensuring all conversation turns are properly ingested into the same conversation. (Fixes #83)