Lily Memory for Openclaw

A persistent memory plugin for AI agents that enables hybrid keyword and semantic search for long-term context retention.

kevinodell
v5.1.0
Feb 17, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install lily-memory-plugin

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install lily-memory-plugin using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Lily Memory?

Lily Memory is a sophisticated extension designed to give your agents a permanent cognitive footprint. By integrating this into your Openclaw Skills, you enable agents to survive session resets, compaction, and restarts without losing vital information. It utilizes a zero-dependency architecture, relying on native system tools like SQLite for high-performance keyword indexing and Ollama for advanced vector embeddings.

This skill ensures that every interaction adds to a cumulative knowledge base, allowing for seamless context retrieval. Whether it is remembering specific project configurations or tracking long-term user preferences, Lily Memory acts as the central nervous system for persistent agent workflows.

Lily Memory Use Cases

  • Managing long-term project context across multiple development sessions.
  • Automatically extracting and storing facts from agent-user conversations.
  • Breaking infinite loops in agent reasoning through built-in stuck detection.
  • Creating a searchable knowledge base of previous decisions and system configurations.

How Lily Memory Works

  1. Keyword Extraction: The skill analyzes incoming messages to identify primary keywords for retrieval.
  2. Hybrid Search: It executes a simultaneous search using SQLite FTS5 for exact matches and Ollama for vector-based semantic similarity.
  3. Context Injection: Relevant memories are deduplicated and injected into the prompt context before the LLM processes the turn.
  4. Auto-Capture: The plugin monitors agent responses for specific patterns to identify and save new facts to the database.
  5. Logic Monitoring: It calculates the Jaccard similarity of consecutive responses to detect topic repetition and nudge the agent back on track.

Lily Memory Setup

To integrate this memory layer into your Openclaw Skills, ensure you have Node.js 18+ and SQLite 3.33+ installed. Follow these steps:

  1. Install the plugin files into your extensions directory.
  2. Update your openclaw.json configuration:
{
  "plugins": {
    "slots": { "memory": "lily-memory" },
    "entries": {
      "lily-memory": {
        "enabled": true,
        "config": {
          "dbPath": "~/.openclaw/memory/decisions.db",
          "entities": ["config", "system"]
        }
      }
    }
  }
}
  1. Restart your gateway to apply changes:
openclaw gateway restart

Lily Memory Data Schema & Taxonomy

Lily Memory organizes data within a persistent SQLite database. It manages facts, entities, and vector embeddings to optimize Openclaw Skills performance.

Available Tools

Tool Function
memory_search Executes FTS5 keyword searches across stored facts
memory_entity Retrieves all stored facts associated with a specific entity
memory_store Manually persists a new fact to the database
memory_semantic_search Performs vector similarity searches via Ollama
memory_add_entity Registers new entity types at runtime

Configuration Options

Key Default Purpose
autoRecall true Enables automatic memory injection per turn
autoCapture true Enables automatic fact extraction from responses
vectorSearch true Enables semantic similarity via Ollama

Lily Memory Advanced Features

  • Memory consolidation that automatically deduplicates database entries during startup to maintain database health.
  • Dynamic entity allow-listing which permits the agent to register new categories of information on the fly.
  • Graceful degradation support that allows the skill to revert to keyword-only search if the Ollama embedding service is unavailable.
  • Intelligent stuck detection that injects reflexion nudges when it identifies repetitive agent behavior patterns.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*