mcpField
I
iris-development

iris-development

github.com/redisAgent 工作流1711.7k 次安装7 周前更新
代码仓库

关于 iris-development

为将 Redis Agent Memory(RAM)集成到 AI Agent 提供指南;它是 Redis Cloud 托管服务,支持会话历史和语义可搜索的长期记忆,并由后台流程提升记忆。指南包含 Python 和 TypeScript SDK 示例。

主要功能

  1. 01配置 Redis Cloud 记忆服务
  2. 02存储和检索会话事件
  3. 03语义搜索长期记忆
  4. 04批量创建及组织记忆
  5. 05后台记忆提升指南
  6. 06Python 和 TypeScript SDK 示例

适用场景

  1. 01创建 Redis Cloud 记忆服务
  2. 02将 Agent 接入会话记忆
  3. 03搜索和筛选长期记忆
  4. 04选择会话事件或直接写入记忆

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/redis/agent-skills --skill iris-development

安装后在 Claude Code 中输入/iris-development确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
ltm-bulk-create.md
ltm-organize.md
ltm-search.md
promotion-overview.md
session-add-event.md
session-retrieval.md
session-when-to-use.md
setup-auth-token.md
setup-cloud-service.md

详细介绍

Iris:Redis Agent Memory

Iris 是 Redis 面向 AI 产品的统称。本技能目前涵盖该系列中的一款产品:Redis Agent Memory(RAM)——AI Agent 的持久化记忆层,以 Redis Cloud 上的托管服务形式提供。其他 Iris 产品发布后,将作为单独的章节添加。

Redis Agent Memory 提供 REST/JSON 数据平面 API,包含两个记忆层:

  • 会话记忆 — 每个会话仅追加的对话历史(工作记忆)。
  • 长期记忆 — 从会话中提取(或直接创建)的、可进行语义搜索的记录。

由 Redis Cloud 管理的后台 提升工作进程会从会话事件中提取持久事实,并将其写入长期记忆。

官方 SDK

所有代码示例均使用官方 SDK:

语言包类安装
Pythonredis-agent-memoryAgentMemorypip install redis-agent-memory
TypeScript@redis-iris/agent-memoryAgentMemorynpm add @redis-iris/agent-memory

两个 SDK 都会从 AGENT_MEMORY_API_KEY 读取 bearer token,并从 AGENT_MEMORY_STORE_ID 读取默认存储 ID。生产环境的数据平面 URL 为 https://gcp-us-east4.memory.redis.io;服务的确切 URL 也会在配置完成后显示于 Cloud 控制台中。

何时使用

在以下场景中参考这些指南:

  • 在 Redis Cloud 上创建记忆服务(https://cloud.redis.io/#/agent-memory)
  • 配置 Agent 调用 AgentMemory.add_session_event(...) / addSessionEvent(...)
  • 使用 search_long_term_memory(...) / searchLongTermMemory(...) 搜索长期记忆
  • 在会话事件和直接写入长期记忆之间进行选择

按优先级划分的规则类别

优先级类别影响前缀
1设置与 Cloud 服务高setup-
2会话记忆 / 事件高session-
3长期记忆高ltm-
4记忆提升中promotion-

快速参考

1. 设置与 Cloud 服务(高)
2. 会话记忆 / 事件(高)
3. 长期记忆(高)
  • ltm-bulk-create - 使用幂等 ID 批量创建长期记忆
  • ltm-search - 使用筛选条件对长期记忆进行语义搜索
  • ltm-organize - 使用 namespace、ownerId、topics 和 memoryType 整理记录
4. 记忆提升(中)

使用方法

如需详细说明和代码示例,请阅读 references/ 下的各个规则文件:

references/setup-cloud-service.md
references/session-add-event.md
references/promotion-overview.md

每个规则文件包含:

  • 简要说明其重要性
  • 使用 Python 和 TypeScript SDK 的正确示例
  • “错误”示例,或“何时使用 / 何时不需要”的指南
  • 补充背景信息和参考资料

评论

支持 Markdown