Releases: divagr18/memlayer
Memlayer v0.1.8 - Plug and Play Memory for LLMs
Memlayer Release Notes - v0.1.8
"Ollama Stability Update"
This patch release focuses on significantly improving the stability of the Ollama wrapper, specifically addressing issues with JSON parsing and support for local models that output internal thought processes.
Key Improvements
Support for "Thinking" Models (<think> tags)
Many modern local models output an internal monologue wrapped in <think>...</think> tags before providing the final JSON response. Previously, this caused JSONDecodeError because the parser attempted to read the thought process as data.
- Fix: The Ollama wrapper now identifies and strips
<think>tags via Regex before attempting to parse tool calls or knowledge extraction. - Result: You can now use models with "Chain of Thought" capabilities for memory operations without crashing.
Robust JSON Extraction
Local models are chatty. They often wrap JSON in Markdown code blocks (```json) or add conversational filler ("Here is the data...").
- Fix: Replaced strict
json.loadswith a robust Regex extraction strategy (_clean_and_parse_json). Memlayer now surgically locates the JSON object ({...}) inside the model's raw output, ignoring surrounding noise. - Addressed Errors: Fixes
Expecting value: line 1 column 1andExtra dataerrors that occurred when models "thought out loud."
Bug Fixes
- Trace Event Error: Fixed an
AttributeError: 'TraceEvent' object has no attribute 'event_type'inexamples/05_providers/ollama_example.py. The script now correctly usesevent.name. - Default Model Updates: Updated docstrings and examples to default to
llama3.2, ensuring examples run smoothly out of the box with standard Ollama setups.
Upgrade Instructions
Update your package to apply these fixes:
pip install --upgrade memlayerMemlayer v0.1.7 - Plug and Play Memory for LLMs
Memlayer Release Notes - v0.1.7
New Provider: LM Studio Support
We have added a dedicated wrapper for LM Studio, enabling a completely offline, privacy-focused memory layer.
- New Wrapper:
memlayer.wrappers.lmstudio.LMStudio - Offline-First: Defaults to
operation_mode="local", utilizing local sentence-transformers for embeddings to ensure no data leaves your machine. - Robust Extraction: Implemented a Regex-based fallback for Knowledge Extraction. This allows Memlayer to correctly parse JSON from local quantized models (GGUF) even if they include conversational filler or refuse strict API schema constraints.
- Aggressive Tooling: Injects specialized system prompts to force local models to use the
search_memorytool instead of asking the user for permission.
Documentation Updates
- LM Studio Guide: Added a comprehensive provider guide detailing setup, model recommendations (e.g., Qwen 2.5, Mistral Nemo), and performance tuning for local inference.
- New Example Script: Added
examples/lmstudio_example.py. This script demonstrates the "Teach -> Consolidate -> Recall" loop and includes logic to reset the session history, proving that the model is retrieving answers from Long-Term Memory rather than the active context window.
Bug Fixes
- Observability Trace Metadata: Fixed a critical
AttributeError: 'Trace' object has no attribute 'metadata'that occurred when inspecting search results. TheTraceclass inobservability.pynow correctly initializes themetadatadictionary, allowing developers to see how many memories were retrieved during a search operation.
Memlayer v0.1.6 - Plug and Play Memory for LLMs
Memlayer v0.1.6 — Release Notes
Unified Import System (Legacy + Current)
__init__.py has been updated with a cleaner lazy-import mechanism. This fixes broken legacy imports while keeping modern import structures intact.
Both styles now work reliably:
# Legacy style
from memlayer import OpenAI
# Modern / Explicit style
from memlayer.wrappers.openai import OpenAIStreaming Support Added
You can now enable streaming directly through Memlayer providers. This enables token-level streaming responses with zero extra setup.
Usage:
# Enable streaming by passing stream=True
OpenAI(...).chat(prompt, stream=True)Faster, Safer Imports
The package now loads without pulling in heavy dependencies immediately. This results in:
- Significantly faster startup times.
- Reduced risk of circular dependency errors during initialization.
Memlayer v0.1.5 - Plug and Play Memory for LLMs
MemLayer is now live on PyPI!
Install
pip install memlayerKey Features
- Universal LLM Support — OpenAI, Claude, Gemini, Ollama
- Plug-and-Play — Minimal setup, works out of the box
- Three Operation Modes —
LOCAL(offline),ONLINE(serverless),LIGHTWEIGHT(graph-only) - Hybrid Search — Vector similarity + knowledge-graph traversal
- Three Search Tiers — Fast (<100ms), Balanced (<500ms), Deep (<2s)
- Automatic Knowledge Extraction — Entities, relationships, facts
- Proactive Task Reminders — Schedule + auto-inject reminders
- Built-in Observability — Trace all search operations
- Production-ready — Serverless-friendly with fast cold starts
What's New in v0.1.1
- Fixed README rendering on PyPI
- Improved table of contents navigation
- Better bold/markdown formatting
Links
- PyPI: https://pypi.org/project/memlayer/
- Documentation: See
README.md - Examples:
/examples