agent-memory-management

Architect AI agent memory systems with sliding-window buffers and vector retrieval.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/KrystianYCSilva/math-theory-lib --skill agent-memory-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-memory-management
Source: https://github.com/KrystianYCSilva/math-theory-lib/tree/main/.codex/skills/agent-memory-management
Command: npx skills add https://github.com/KrystianYCSilva/math-theory-lib --skill agent-memory-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides patterns and operational guidance to design memory systems that preserve relevant context, reduce hallucinations, and enable persistent or episodic state across interactions so agents act coherently over time.

Core Features & Use Cases

  • Context strategies: sliding-window, FIFO buffers, and token budgeting to manage limited context windows.
  • Compression & retrieval: recursive summarization into system notes and vector/RAG retrieval for scalable long-term memory.
  • Entity & multi-agent state: key-value entity memory for personalization and shared-blackboard, message-passing, or role-based views for multi-agent coordination.
  • Troubleshooting: timestamping, deduplication, and token-counting practices to mitigate hallucinations, repetition, and context overflow.
  • Use Case: synchronize a coder and reviewer agent on task state while preserving a searchable history of past episodes for debugging and learning.

Quick Start

Summarize the last 50 messages into a concise system note, extract key user attributes into entity memory, and store semantically indexed chunks for retrieval.

Frequently Asked Questions about agent-memory-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage context window limits for AI agents without losing critical conversation history?

Manage AI agent context limits by applying sliding-window buffers, FIFO queues, and token budgeting. These strategies preserve recent interactions while recursive summarization compresses older messages into concise system notes to prevent context overflow.

What is the best way to persist long-term memory and reduce hallucinations in a retrieval-augmented generation pipeline?

Reduce hallucinations in retrieval-augmented generation pipelines by storing semantically indexed chunks in a vector database. This provides scalable long-term retrieval, allowing agents to fetch relevant historical context accurately rather than guessing.

How do I synchronize state between multiple agents in a coordination workflow?

Synchronize multi-agent state by implementing shared-blackboard patterns, message-passing, or role-based views. These coordination patterns ensure agents share task state accurately while maintaining distinct operational boundaries.

Can I use entity key-value memory for user personalization in conversational bots?

Yes, you can use key-value entity memory for user personalization in conversational bots. It extracts and stores specific user attributes, enabling the agent to recall individual preferences and maintain coherent state across interactions.

Why does my multi-agent system repeat actions or lose track of timestamps during state sync?

Multi-agent state sync issues and repetition occur without proper timestamping and deduplication safeguards. Implementing strict token-counting and chronological timestamping mitigates these errors and prevents context overflow.

When do I need recursive summarization instead of a sliding-window buffer for agent memory?

You need recursive summarization when preserving long-term episodic memory exceeds the token budget of a sliding-window buffer. Summarization compresses past interactions into searchable system notes for debugging and learning, whereas buffers only keep recent messages.