← 返回
未分类 中文

Agent Memory Layer

Scalable memory system for AI agents with short-term, long-term, and episodic memory. Use when building agent memory persistence, conversation context manage...
可扩展的AI代理记忆系统,支持短期、长期和情景记忆,用于构建代理记忆持久化和对话上下文管理。
evezart
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 316
下载
💾 1
安装
1
版本
#latest

概述

Agent Memory Layer

Three-tier memory system for AI agents: short-term, long-term, and episodic.

Quick Start

from memory_layer import AgentMemory

mem = AgentMemory(agent_id="my-agent")
mem.short_term.add("User prefers dark mode", priority=0.8)
mem.long_term.store("Project uses React + TypeScript", tags=["tech", "project"])
mem.episodic.record("Debugged auth bug", outcome="success", duration_min=15)

# Recall
context = mem.short_term.recall(limit=10)
relevant = mem.long_term.search("frontend framework")
similar = mem.episodic.find_similar("debugging session")

Architecture

┌─────────────────────────────────────────┐
│            Agent Memory                  │
├───────────┬───────────┬─────────────────┤
│ Short-Term│ Long-Term │   Episodic      │
│ (Redis)   │ (Vectors) │  (Timeline)     │
│ TTL: 1hr  │ Permanent │ Decay: 30d      │
│ Hot cache │ Semantic  │ Consolidated    │
└───────────┴───────────┴─────────────────┘

Memory Tiers

Short-Term (Working Memory)

  • Recent context, active conversation, current task state
  • TTL-based expiry (default 1 hour)
  • Priority-weighted retention
  • See references/short-term.md

Long-Term (Knowledge)

  • Persistent facts, preferences, learned patterns
  • Vector similarity search for retrieval
  • Tags and metadata for filtering
  • See references/long-term.md

Episodic (Experience)

  • Timeline-ordered events with outcomes
  • Decay function reduces old episode weight
  • Consolidation moves recurring patterns to long-term
  • See references/episodic.md

Consolidation

Episodic memories that recur are automatically promoted to long-term:

  • If the same outcome occurs 3+ times → store as learned pattern
  • Failed approaches get negative weight in long-term
  • See scripts/consolidate.py

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-13 06:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Workflow Orchestrator

evezart
可视化工作流构建器,用于编排多智能体系统,支持分支、并行执行、错误处理和重试逻辑。适用于构建代理...
★ 0 📥 334

Cross Domain Engine

evezart
利用EVEZ OODA循环架构发现不同研究领域的隐藏关联,用于寻找跨领域新关联、检测...
★ 0 📥 301

Evez Skill Vetter

evezart
在安装前对OpenClaw技能进行安全审查。用于评估第三方技能的安全性、检查权限范围、检测可疑行为。
★ 0 📥 293