three-tier-memory_skill

This skill manages conversation memory with a three-tier system (short-term, mid-term summaries, long-term vector search) to keep context and knowledge
  • Python

2.6k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill three-tier-memory

  • _meta.json292 B
  • SKILL.md1.6 KB

Overview

This skill implements a Three-Tier Memory system for AI agents: short-term sliding window, medium-term automatic summaries (LLM), and long-term semantic vector retrieval. It helps manage conversation history, create automatic summaries, and build a searchable personal knowledge base. The design balances real-time context with compressed summaries and scalable semantic retrieval.

How this skill works

Short-term memory holds the most recent N messages in a FIFO sliding window for immediate context. When token or window thresholds are reached, medium-term memory automatically generates LLM-based summaries saved as persistent notes. Long-term memory indexes summaries and important entries into a vector store for semantic retrieval and RAG-style augmentation. Hooks can auto-save sessions and trigger summaries, and a CLI provides init/add/search/status operations.

When to use it

  • Maintaining relevant short-term conversation context during multi-turn dialogues.
  • Automatically compressing long chat histories into concise, retrievable summaries.
  • Building a personal knowledge base that supports semantic search and retrieval.
  • Augmenting agent responses with relevant long-term facts via RAG.
  • Backing up and archiving conversational data with layered retention policies.

Best practices

  • Keep short-term window small (default 10 items) to reduce prompt size and cost.
  • Tune medium-term summary thresholds to balance detail and storage.
  • Use the vector store for semantic queries and set top_k to a sensible default (e.g., 3).
  • Enable session hooks to automatically persist end-of-session context and reduce manual steps.
  • Protect and encrypt sensitive long-term entries; avoid storing raw secrets in long-term memory.

Example use cases

  • Customer support agent that keeps recent conversation context, summarizes long interactions, and retrieves archived solutions.
  • Personal assistant that remembers user preferences short-term, summarizes meeting notes, and finds related past notes via semantic search.
  • Research assistant that archives ideas and drafts into a vector store for later retrieval and citation.
  • Chatbot integrated with OpenClaw hooks to auto-save sessions and trigger summaries when windows fill.
  • Backup pipeline that archives all versions of skills or conversation artifacts and supports fast semantic lookup.

FAQ

Summaries are triggered when the short-term token/window threshold is exceeded or when configured session-end hooks fire.

Which vector store is supported?

Chromadb is supported (optional dependency) for semantic indexing and retrieval; other vector stores can be integrated.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
three-tier-memory skill by openclaw/skills | VeilStrat