解决代理记忆的魔法棒

2作者: fokkedekker27 天前原帖
我与数百位人工智能代理开发者进行了交流,针对“如果你有一根魔法棒可以解决一个问题,那会是什么?”这个问题,大家的答案都是代理记忆。 我们在Raindrop中构建了SmartMemory,以解决这个问题,为代理提供了四种协同工作的记忆类型: ### 记忆类型概述 **工作记忆** - 在会话中保持活跃的对话上下文 - 将思维组织成不同的时间线(主题) - 代理可以搜索您讨论过的内容,并在之前的基础上进行扩展 - 类似于正在进行的对话的短期记忆 **情节记忆** - 将完成的对话会话存储为可搜索的历史记录 - 记住您几周或几个月前讨论的内容 - 可以恢复之前的对话,从您离开的地方继续 - 您代理的长期对话档案 **语义记忆** - 存储事实、文档和参考材料 - 在所有对话中保持知识的持续性 - 积累关于您项目和偏好的信息 - 您代理的知识库,随着时间的推移而增长 **程序记忆** - 保存工作流程、工具交互模式和程序 - 学习如何一致地处理不同情况 - 存储决策树和响应模式 - 您代理的学习技能和操作程序 ### 实际有效的多层搜索 **工作记忆**使用嵌入和向量搜索。当您搜索“身份验证问题”时,它可以找到关于“登录问题”或“安全漏洞”的记忆,即使确切的词语不匹配。 **情节记忆、语义记忆和程序记忆**采用三层搜索方法: - 基于语义意义的向量搜索 - 基于提取的实体和关系的图搜索 - 精确查询的关键词和主题匹配 这种多层方法意味着无论您是通过概念、特定的思想关系还是确切的术语进行搜索,您的代理都能找到相关信息。 ### 使用SmartMemory的三种方式 **选项1:完整的Raindrop框架** 在Raindrop中构建您的代理,并获得完整的记忆系统以及其他代理基础设施: ```hcl application "my-agent" { smartmemory "agent_memory" {} } ``` **选项2:MCP集成** 已经有代理了吗?将我们的MCP(模型上下文协议)服务器连接到您现有的设置。启动一个SmartMemory实例,您的代理可以通过MCP调用访问所有记忆功能——无需重建任何东西。 **选项3:API/SDK** 如果您已经有代理但不熟悉MCP,我们也提供了简单的API和SDK(Python、TypeScript、Java和Go),供您使用。 ### 一些有用的链接以便开始 - 注册请访问:[https://liquidmetal.ai/](https://liquidmetal.ai/) - 概念文档请访问:[https://docs.liquidmetal.ai/concepts/smartmemory/](https://docs.liquidmetal.ai/concepts/smartmemory/) - 实施文档请访问:[https://docs.liquidmetal.ai/reference/resources/smartmemory/](https://docs.liquidmetal.ai/reference/resources/smartmemory/) - 快速入门请访问:[https://docs.liquidmetal.ai/tutorials/smartmemory-app-deployment/](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;