用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-ai-agents --skill agent-memory命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Ensure agent safety - guardrails, content filtering, monitoring, and compliance
Master AI agent fundamentals - architectures, ReAct patterns, cognitive loops, and autonomous system design
Integrate LLMs into applications - APIs, prompting, fine-tuning, and context management
基于 SOC 职业分类
正在显示 SKILL.md
| name | agent-memory |
| description | Implement agent memory - short-term, long-term, semantic storage, and retrieval |
| sasmp_version | 1.3.0 |
| bonded_agent | 06-agent-memory |
| bond_type | PRIMARY_BOND |
| version | 2.0.0 |
Give agents the ability to remember and learn across conversations.
Invoke this skill when:
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
task | string | Yes | Memory goal | - |
memory_type | enum | No | buffer, summary, vector, hybrid | hybrid |
persistence | enum | No | session, user, global | session |
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())
| Type | Use Case | Pros | Cons |
|---|---|---|---|
| Buffer | Short chats | Simple | No compression |
| Summary | Long chats | Compact | Loses detail |
| Vector | Semantic recall | Relevant | Slower |
| Hybrid | Production | Best of all | Complex |
class ProductionMemory:
def __init__(self):
self.short_term = BufferMemory(k=10) # Recent
self.summary = SummaryMemory() # Compressed
self.long_term = VectorMemory() # Semantic
| Issue | Solution |
|---|---|
| Context overflow | Add summarization |
| Slow retrieval | Cache, reduce k |
| Irrelevant recall | Improve embeddings |
| Memory not persisting | Check storage backend |
rag-systems - Vector retrievalllm-integration - Context managementai-agent-basics - Agent architecture