Agent memory

From lxyeternal/MalSkillBench · View interactive version

Agent memory is an AI agent skill from the GitHub repository lxyeternal/MalSkillBench. > Persistent memory system for AI agents

How to use this skill

Skill file

AgentMemory Skill

Persistent memory system for AI agents

Overview

AgentMemory enables AI agents to retain information across sessions. It provides fact storage, experience learning, and entity tracking with zero external dependencies.

Key Features

Installation

# Via ClawHub (recommended)
clawdhub install agent-memory

# Or clone
git clone https://github.com/openclaw/skills
cp -r skills/dennis-da-menace/agent-memory ~/.clawdbot/skills/

Storage

Default location: ~/.agent-memory/memory.db

Custom path supported via configuration.

Core API

Remember Facts

from memory import AgentMemory

mem = AgentMemory()

# Store a fact
mem.remember(
    "User prefers dark mode",
    tags=["preference", "ui"],
    confidence=0.9
)

# Store with entity link
mem.remember(
    "John's birthday is March 15",
    tags=["personal"],
    entity="john"
)

Learn from Experience

mem.learn(
    action="Deployed to production without tests",
    context="Friday evening rush",
    outcome="failure",
    insight="Always run tests before deploy, especially on Fridays"
)

Recall Memories

# Search facts
facts = mem.recall("user preferences")

# Get lessons
lessons = mem.get_lessons(context="deployment", outcome="failure")

Track Entities

mem.track_entity("john", {
    "role": "client",
    "company": "Acme Inc",
    "preferences": ["email", "brief updates"]
})

Integration Protocol

Recommended workflow for agent configuration:

memory_protocol:
  session_start:
    - Load recent lessons
    - Check entity context
  during_session:
    - Extract durable facts
    - Learn from outcomes
  session_end:
    - Update entity information
    - Record session summary

Dependencies

No external packages required.

License

MIT

Author

Dennis Da Menace - Built for the OpenClaw community

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.