Memory Cache for Openclaw

A standardized Redis-backed caching system for managing AI agent state, session context, and high-speed data retrieval.

1999azzar
v1.1.9
Feb 17, 2026
1
2.8k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install memory-cache

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 memory-cache 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 Memory Cache?

Memory Cache is a high-performance temporary storage system designed specifically for AI agents within the Openclaw Skills ecosystem. By utilizing Redis, it provides a robust framework for saving agent states, caching expensive API results, and facilitating data sharing between multiple sub-agents. The skill emphasizes organization through namespaced keys and efficient memory management via Time-To-Live (TTL) configurations.

Implementing this skill allows developers to maintain session continuity and improve the responsiveness of their AI workflows. It acts as a centralized memory layer, ensuring that critical context is preserved across different execution cycles while preventing data collisions through strict naming conventions.

Memory Cache Use Cases

  • Storing and retrieving agent execution states to maintain continuity across sessions.
  • Caching high-latency API responses to improve speed and reduce operational costs.
  • Sharing real-time context and variables between primary agents and sub-agents.
  • Managing temporary session data with automatic expiration using TTL management.

How Memory Cache Works

  1. The agent establishes a connection to a Redis instance via the REDIS_URL environment variable.
  2. Data is written to the cache using the cache_manager.py script, applying the appropriate mema: namespace.
  3. TTL (Time-To-Live) values are optionally assigned to keys to automate the cleanup of volatile data.
  4. Agents retrieve stored context or state by querying specific namespaced keys, ensuring seamless data flow.
  5. Maintenance commands like scan and ping are used to monitor cache health and search for specific data patterns.

Memory Cache Setup

To integrate this into your workflow, ensure you have python3 and a running Redis instance. This is a core component for developers looking to expand their library of Openclaw Skills.

# Install required dependencies
pip install -r requirements.txt

# Configure environment variables
cp env.example.txt .env
# Define REDIS_URL in your .env file

Memory Cache Data Schema & Taxonomy

The skill organizes data within Redis using a strict prefix-based taxonomy to ensure clarity and prevent overwrites:

Key Prefix Type Description
mema:context:* Session Stores active session state and conversation history.
mema:cache:* Volatile Used for temporary API results and short-term data.
mema:state:* Persistent Holds long-term agent state across multiple runs.

Memory Cache Advanced Features

  • TTL Management: Granular control over data expiration to optimize Redis memory usage.
  • Namespace Isolation: Standardized prefixes (mema:) ensure compatibility with other Openclaw Skills.
  • Sub-agent Synchronization: Enables complex multi-agent workflows by providing a shared memory bus.
  • Pattern Scanning: Built-in search capabilities to identify and manage keys within specific namespaces.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins python3
Github Stars: 0
forks: 0

Featured*