解决 Agent 记忆问题的魔杖

2作者: fokkedekker5 个月前
我与数百位 AI 智能体开发者交流过,对于“如果给你一根魔杖解决一个问题,你会选择什么?”这个问题,他们的答案都是智能体记忆。<p>我们在 Raindrop 中构建了 SmartMemory 来解决这个问题,它为智能体提供了四种协同工作的记忆类型:<p>记忆类型概述<p>工作记忆 • 在会话过程中保存活跃的上下文 • 将想法组织成不同的时间线(主题) • 智能体可以搜索你讨论过的内容,并在之前的观点基础上进行构建 • 就像正在进行的对话的短期记忆<p>情景记忆 • 将已完成的会话存储为可搜索的历史记录 • 记住几周或几个月前你讨论过的内容 • 可以恢复之前的对话,以便在中断的地方继续 • 你的智能体的长期对话档案<p>语义记忆 • 存储事实、文档和参考资料 • 在所有对话中保持知识 • 积累关于你的项目和偏好的信息 • 你的智能体的知识库,随着时间的推移而增长<p>程序记忆 • 保存工作流程、工具交互模式和程序 • 学会如何一致地处理不同的情况 • 存储决策树和响应模式 • 你的智能体学习的技能和操作程序<p>真正有效的多层搜索<p>*工作记忆* 使用嵌入和向量搜索。当你搜索“身份验证问题”时,它会找到关于“登录问题”或“安全漏洞”的记忆,即使确切的单词不匹配。<p>*情景记忆、语义记忆和程序记忆* 使用三层搜索方法: • 基于语义含义的向量搜索 • 基于提取的实体和关系的图搜索 • 关键词和主题匹配,用于精确查询<p>这种多层方法意味着你的智能体可以找到相关信息,无论你是通过概念、想法之间的特定关系还是确切的术语进行搜索。<p>使用 SmartMemory 的三种方式<p>选项 1:完整的 Raindrop 框架 在 Raindrop 中构建你的智能体,并获得完整的记忆系统以及其他智能体基础设施:<p>```hcl application &quot;my-agent&quot; { smartmemory &quot;agent_memory&quot; {} }<p>```<p>选项 2:MCP 集成 已经有一个智能体了?将我们的 MCP(模型上下文协议)服务器连接到你现有的设置。启动一个 SmartMemory 实例,你的智能体就可以通过 MCP 调用访问所有记忆功能——无需重建任何东西。<p>选项 3:API/SDK 如果你已经有一个智能体,但对 MCP 不熟悉,我们也有一个简单的 API 和 SDK(Python、TypeScript、Java 和 Go)供你使用<p>一些有用的链接,帮助你开始<p>注册请访问:https://liquidmetal.ai/ 概念文档请访问:https://docs.liquidmetal.ai/concepts/smartmemory/ 实现文档请访问:https://docs.liquidmetal.ai/reference/resources/smartmemory/ 快速入门请访问:https://docs.liquidmetal.ai/tutorials/smartmemory-app-deployment/
查看原文
I spoke to hundreds of AI agent developers and the answer to the question - &quot;if you had one magic wand to solve one thing, what would it be?&quot; - was agent memory.<p>We built SmartMemory in Raindrop to solve this problem by giving agents four types of memory that work together:<p>We built SmartMemory in Raindrop to solve this problem by giving agents four types of memory that work together:<p>Memory Types Overview<p>Working Memory • Holds active conversation context within sessions • Organizes thoughts into different timelines (topics) • Agents can search what you&#x27;ve discussed and build on previous points • Like short-term memory for ongoing conversations<p>Episodic Memory • Stores completed conversation sessions as searchable history • Remembers what you discussed weeks or months ago • Can restore previous conversations to continue where you left off • Your agent&#x27;s long-term conversation archive<p>Semantic Memory • Stores facts, documents, and reference materials • Persists knowledge across all conversations • Builds up information about your projects and preferences • Your agent&#x27;s knowledge base that grows over time<p>Procedural Memory • Saves workflows, tool interaction patterns, and procedures • Learns how to handle different situations consistently • Stores decision trees and response patterns • Your agent&#x27;s learned skills and operational procedures<p>Multi-Layer Search That Actually Works<p>*Working Memory* uses embeddings and vector search. When you search for &quot;authentication issues,&quot; it finds memories about &quot;login problems&quot; or &quot;security bugs&quot; even though the exact words don&#x27;t match.<p>*Episodic, Semantic, and Procedural Memory* use a three-layer search approach: • Vector search for semantic meaning • Graph search based on extracted entities and relationships • Keyword and topic matching for precise queries<p>This multi-layer approach means your agent can find relevant information whether you&#x27;re searching by concept, by specific relationships between ideas, or by exact terms.<p>Three Ways to Use SmartMemory<p>Option 1: Full Raindrop Framework Build your agent within Raindrop and get the complete memory system plus other agent infrastructure:<p>```hcl application &quot;my-agent&quot; { smartmemory &quot;agent_memory&quot; {} }<p>```<p>Option 2: MCP Integration Already have an agent? Connect our MCP (Model Context Protocol) server to your existing setup. Spin up a SmartMemory instance and your agent can access all memory functions through MCP calls - no need to rebuild anything.<p>Option 3: API&#x2F;SDK If you already have an agent but are not familar with MCP we also have a simple API and SDK (pytyon, TypeScript, Java and Go) you can use<p>A couple of helpful links to get started<p>For signup check: https:&#x2F;&#x2F;liquidmetal.ai&#x2F; For concepts documentation check: https:&#x2F;&#x2F;docs.liquidmetal.ai&#x2F;concepts&#x2F;smartmemory&#x2F; For implementation documentation check: https:&#x2F;&#x2F;docs.liquidmetal.ai&#x2F;reference&#x2F;resources&#x2F;smartmemory&#x2F; For quick start check https:&#x2F;&#x2F;docs.liquidmetal.ai&#x2F;tutorials&#x2F;smartmemory-app-deployment&#x2F;