AgentMemory for Openclaw

A persistent memory system that allows AI agents to store facts, learn from experiences, and track entities across multiple sessions.

dennis-da-menace
v1.0.0
Feb 1, 2026
34
34k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install agent-memory

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 agent-memory 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 AgentMemory?

AgentMemory is a robust framework designed to solve the problem of context loss in AI agent workflows. By providing a persistent storage layer, this tool enables agents within the Openclaw Skills ecosystem to maintain continuity over time. It allows for the storage of structured facts, behavioral lessons, and entity-specific metadata, ensuring that every session builds upon the previous one rather than starting from zero.

This capability is essential for building sophisticated, long-running agentic systems that require a deep understanding of historical interactions and project-specific nuances. Using Openclaw Skills like AgentMemory transforms a stateless agent into a knowledgeable assistant that evolves alongside your development process.

AgentMemory Use Cases

  • Initializing a new agent session by loading historical context and relevant project facts.
  • Capturing durable insights and facts at the conclusion of a conversation to prevent data loss.
  • Logging lessons learned after failed attempts or errors to improve future agent performance.
  • Building a directory of entities, such as people, roles, or project definitions, to maintain consistency in multi-agent environments.

How AgentMemory Works

  1. Initialize the memory system using the Python API to establish a connection to the local SQLite database.
  2. Store information via the remember function for general facts or the learn function for actions and outcomes.
  3. Query stored data using semantic recall or context-specific filters during active agent workflows.
  4. Integrate the memory protocol into lifecycle files like AGENTS.md to automate fact extraction and lesson retrieval.
  5. Persist all data locally in a structured database, allowing for cross-session access and easy backup for Openclaw Skills users.

AgentMemory Setup

To begin using this entry in the Openclaw Skills library, install the package via the CLI:

clawdhub install agent-memory

Then, initialize the memory in your Python scripts:

from src.memory import AgentMemory
mem = AgentMemory()

By default, data is stored at ~/.agent-memory/memory.db, but you can specify a custom path during initialization: AgentMemory(db_path="/path/to/memory.db").

AgentMemory Data Schema & Taxonomy

AgentMemory organizes information into several key segments within a SQLite database:

Component Purpose
Facts Stores general information with associated tags for semantic retrieval.
Lessons Tracks actions, contexts, outcomes (positive/negative), and derived insights.
Entities Manages profiles for specific names (people, projects) with flexible metadata JSON.
Metadata Tracks timestamps and source session identifiers for every entry.

AgentMemory Advanced Features

  • Semantic recall capabilities to find information based on query intent rather than exact matches.
  • Integration hooks for Clawdbot HEARTBEAT protocols to automate memory updates during session cycles.
  • Custom database pathing for self-hosted or shared memory environments.
  • Binary outcome tracking (positive/negative) to facilitate reinforcement learning from agent experiences.
  • Multi-entity tracking for complex project management within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*