Skip to content

Releases: divagr18/memlayer

Memlayer v0.1.8 - Plug and Play Memory for LLMs

22 Nov 00:48

Choose a tag to compare

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.loads with 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 1 and Extra data errors that occurred when models "thought out loud."

Bug Fixes

  • Trace Event Error: Fixed an AttributeError: 'TraceEvent' object has no attribute 'event_type' in examples/05_providers/ollama_example.py. The script now correctly uses event.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 memlayer

Memlayer v0.1.7 - Plug and Play Memory for LLMs

22 Nov 00:43

Choose a tag to compare

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_memory tool 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. The Trace class in observability.py now correctly initializes the metadata dictionary, allowing developers to see how many memories were retrieved during a search operation.

Memlayer v0.1.6 - Plug and Play Memory for LLMs

22 Nov 00:49

Choose a tag to compare

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 OpenAI

Streaming 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

16 Nov 11:39

Choose a tag to compare

MemLayer is now live on PyPI!

Install

pip install memlayer

Key Features

  • Universal LLM Support — OpenAI, Claude, Gemini, Ollama
  • Plug-and-Play — Minimal setup, works out of the box
  • Three Operation ModesLOCAL (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