agent-memory

Implement agent memory - short-term, long-term, semantic storage, and retrieval

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "agent-memory" with this command: npx skills add pluginagentmarketplace/custom-plugin-ai-agents/pluginagentmarketplace-custom-plugin-ai-agents-agent-memory

Agent Memory

Give agents the ability to remember and learn across conversations.

When to Use This Skill

Invoke this skill when:

  • Adding conversation history
  • Implementing long-term memory
  • Building personalized agents
  • Managing context windows

Parameter Schema

ParameterTypeRequiredDescriptionDefault
taskstringYesMemory goal-
memory_typeenumNobuffer, summary, vector, hybridhybrid
persistenceenumNosession, user, globalsession

Quick Start

from langchain.memory import ConversationBufferWindowMemory

# Simple buffer (last k messages)
memory = ConversationBufferWindowMemory(k=10)

# With summarization
from langchain.memory import ConversationSummaryBufferMemory
memory = ConversationSummaryBufferMemory(llm=llm, max_token_limit=2000)

# Vector store memory
from langchain.memory import VectorStoreRetrieverMemory
memory = VectorStoreRetrieverMemory(retriever=vectorstore.as_retriever())

Memory Types

TypeUse CaseProsCons
BufferShort chatsSimpleNo compression
SummaryLong chatsCompactLoses detail
VectorSemantic recallRelevantSlower
HybridProductionBest of allComplex

Multi-Layer Architecture

class ProductionMemory:
    def __init__(self):
        self.short_term = BufferMemory(k=10)    # Recent
        self.summary = SummaryMemory()           # Compressed
        self.long_term = VectorMemory()          # Semantic

Troubleshooting

IssueSolution
Context overflowAdd summarization
Slow retrievalCache, reduce k
Irrelevant recallImprove embeddings
Memory not persistingCheck storage backend

Best Practices

  • Use multi-layer memory for production
  • Set token limits to prevent overflow
  • Add metadata (timestamps, importance)
  • Implement TTL for old memories

Related Skills

  • rag-systems - Vector retrieval
  • llm-integration - Context management
  • ai-agent-basics - Agent architecture

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

multi-agent

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

rag-systems

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

agent-safety

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

tool-calling

No summary provided by upstream source.

Repository SourceNeeds Review