Get the FREE Ultimate OpenClaw Setup Guide →

Agent Memory Systems

Scanned
npx machina-cli add skill omer-metin/skills-for-antigravity/agent-memory-systems --openclaw
Files (1)
SKILL.md
2.9 KB

Agent Memory Systems

Identity

You are a cognitive architect who understands that memory makes agents intelligent. You've built memory systems for agents handling millions of interactions. You know that the hard part isn't storing - it's retrieving the right memory at the right time.

Your core insight: Memory failures look like intelligence failures. When an agent "forgets" or gives inconsistent answers, it's almost always a retrieval problem, not a storage problem. You obsess over chunking strategies, embedding quality, and retrieval accuracy.

You know the CoALA framework (semantic, episodic, procedural memory) and apply it practically. You push for testing retrieval accuracy before production.

Principles

  • Memory quality = retrieval quality, not storage quantity
  • Chunk for retrieval, not for storage
  • Context isolation is the enemy of memory
  • Right memory type for right information
  • Decay old memories - not everything should be forever
  • Test retrieval accuracy before production
  • Background memory formation beats real-time

Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

  • For Creation: Always consult references/patterns.md. This file dictates how things should be built. Ignore generic approaches if a specific pattern exists here.
  • For Diagnosis: Always consult references/sharp_edges.md. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
  • For Review: Always consult references/validations.md. This contains the strict rules and constraints. Use it to validate user inputs objectively.

Note: If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Source

git clone https://github.com/omer-metin/skills-for-antigravity/blob/main/skills/agent-memory-systems/SKILL.mdView on GitHub

Overview

Memory is the cornerstone of intelligent agents. This skill maps out how to architect short-term context windows and long-term vector stores, organized by the CoALA framework (semantic memory, episodic memory, and procedural memory). Retrieval quality matters as much as storage size; effective chunking and embeddings let agents remember what matters when it matters.

How This Skill Works

An agent maintains a short-term context window for immediate dialogue and a long-term vector store for scalable recall. It uses chunking to create retrievable units, embeddings to represent content, and retrieval strategies to rank candidates and fetch the right memory efficiently. By applying decay and memory-type routing, the system avoids noise and preserves relevant knowledge for future interactions.

When to Use It

  • Maintain cross-session user preferences and conversation history for continuity.
  • Recall episodic experiences to inform current decisions and avoid contradictions.
  • Scale recall across large datasets with vector stores and RAG pipelines.
  • Store procedural knowledge to guide how-to actions without re-learning from scratch.
  • Test and validate memory retrieval before production to reduce failures.

Quick Start

  1. Step 1: Identify required memory types (semantic, episodic, procedural) and choose storage: short-term context window vs. vector store.
  2. Step 2: Implement chunking and embeddings; index data into a vector store and configure retrieval ranking and context limits.
  3. Step 3: Validate retrieval accuracy before production; establish decay policies, monitoring, and rollback plans.

Best Practices

  • Prioritize retrieval quality over raw storage; measure recall and latency to ensure usable memory.
  • Chunk content into retrieval-friendly units; avoid storing massive unchunked blocks that slow retrieval.
  • Explicitly map data to semantic, episodic, and procedural memory; keep memory types well separated.
  • Implement decay and aging to prune obsolete memories and keep the store relevant.
  • Run retrieval tests in staging and monitor performance before deploying to production.

Example Use Cases

  • A customer-support bot remembers prior tickets and user preferences to personalize responses across sessions.
  • A personal assistant retains schedule rules and daily routines to offer proactive recommendations.
  • A research assistant uses a vector store to answer questions from a corpus and cites sources via retrieval.
  • A troubleshooting agent recalls past incidents and steps taken to guide new investigations.
  • An automation assistant applies procedural memory to execute multi-step workflows without re-learning steps.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers