iris-development

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Iris: Redis Agent Memory

Iris: Redis Agent Memory

Iris is the umbrella brand for Redis's AI-focused products. This skill currently covers one product in that family: Redis Agent Memory (RAM) — the persistent memory layer for AI agents, delivered as a managed service on Redis Cloud. Additional Iris products will be added as separate sections when they ship.
Redis Agent Memory exposes a REST/JSON data-plane API with two memory tiers:
  • Session memory — append-only conversation history per session (working memory).
  • Long-term memory — semantically searchable records extracted from sessions (or created directly).
A background promotion worker — managed by Redis Cloud — extracts durable facts from session events and writes them into long-term memory.
Iris 是 Redis 旗下专注于AI领域的产品体系。本技能目前涵盖该体系中的一款产品:Redis Agent Memory (RAM) —— 为AI Agent提供的持久化内存层,作为Redis Cloud上的托管服务交付。后续推出的其他Iris产品将作为独立章节添加。
Redis Agent Memory 提供REST/JSON数据平面API,包含两种内存层级:
  • 会话内存 —— 每个会话的追加式对话历史(工作内存)。
  • 长期内存 —— 从会话中提取(或直接创建)的可语义搜索记录。
由Redis Cloud托管的后台升级工作进程会从会话事件中提取持久化事实,并将其写入长期内存。

Official SDKs

官方SDK

All code samples use the official SDKs:
LanguagePackageClassInstall
Python
redis-agent-memory
AgentMemory
pip install redis-agent-memory
TypeScript
@redis-iris/agent-memory
AgentMemory
npm add @redis-iris/agent-memory
Both SDKs read the bearer token from
AGENT_MEMORY_API_KEY
and the default store ID from
AGENT_MEMORY_STORE_ID
. The production data-plane URL is
https://gcp-us-east4.memory.redis.io
; the exact URL for your service is also shown in the Cloud console after provisioning.
所有代码示例均使用官方SDK:
编程语言包名类名安装命令
Python
redis-agent-memory
AgentMemory
pip install redis-agent-memory
TypeScript
@redis-iris/agent-memory
AgentMemory
npm add @redis-iris/agent-memory
两款SDK均从
AGENT_MEMORY_API_KEY
读取Bearer令牌,从
AGENT_MEMORY_STORE_ID
读取默认存储ID。生产环境数据平面URL为
https://gcp-us-east4.memory.redis.io
;您的服务具体URL也会在Redis Cloud控制台完成配置后显示。

When to Apply

适用场景

Reference these guidelines when:
  • Creating a memory service on Redis Cloud (https://cloud.redis.io/#/agent-memory)
  • Wiring an agent to call
    AgentMemory.add_session_event(...)
    /
    addSessionEvent(...)
  • Searching long-term memory with
    search_long_term_memory(...)
    /
    searchLongTermMemory(...)
  • Choosing between session events and direct long-term memory writes
在以下场景中可参考本指南:
  • 在Redis Cloud上创建内存服务(https://cloud.redis.io/#/agent-memory
  • 为Agent接入
    AgentMemory.add_session_event(...)
    /
    addSessionEvent(...)
    方法
  • 使用
    search_long_term_memory(...)
    /
    searchLongTermMemory(...)
    搜索长期内存
  • 选择使用会话事件还是直接写入长期内存

Rule Categories by Priority

按优先级划分的规则类别

PriorityCategoryImpactPrefix
1Setup & Cloud ServiceHIGH
setup-
2Session Memory / EventsHIGH
session-
3Long-Term MemoryHIGH
ltm-
4Memory PromotionMEDIUM
promotion-
优先级类别影响程度前缀
1配置与云服务
setup-
2会话内存 / 事件
session-
3长期内存
ltm-
4记忆升级
promotion-

Quick Reference

快速参考

1. Setup & Cloud Service (HIGH)

1. 配置与云服务(高)

  • setup-cloud-service
    - Create a Memory service on Redis Cloud
  • setup-auth-token
    - Authenticate the SDK with a store API key
  • setup-cloud-service
    - 在Redis Cloud上创建内存服务
  • setup-auth-token
    - 使用存储API密钥为SDK认证

2. Session Memory / Events (HIGH)

2. 会话内存 / 事件(高)

  • session-when-to-use
    - Choose session events vs direct long-term memory
  • session-add-event
    - Append a session event correctly
  • session-retrieval
    - Retrieve session memory and individual events
  • session-when-to-use
    - 选择会话事件还是直接写入长期内存
  • session-add-event
    - 正确追加会话事件
  • session-retrieval
    - 检索会话内存及单个事件

3. Long-Term Memory (HIGH)

3. 长期内存(高)

  • ltm-bulk-create
    - Create long-term memories in bulk with idempotent IDs
  • ltm-search
    - Search long-term memory semantically with filters
  • ltm-organize
    - Organize records with namespace, ownerId, topics, and memoryType
  • ltm-bulk-create
    - 使用幂等ID批量创建长期记忆
  • ltm-search
    - 带过滤条件的语义化搜索长期内存
  • ltm-organize
    - 使用命名空间、ownerId、主题和memoryType整理记录

4. Memory Promotion (MEDIUM)

4. 记忆升级(中)

  • promotion-overview
    - How background promotion works
  • promotion-overview
    - 后台升级机制的工作原理

How to Use

使用方法

Read individual rule files under
references/
for detailed explanations and code examples:
references/setup-cloud-service.md
references/session-add-event.md
references/promotion-overview.md
Each rule file contains:
  • Brief explanation of why it matters
  • Correct example(s) with Python and TypeScript SDK code
  • Either an "Incorrect" example or "When to use / When NOT needed" guidance
  • Additional context and references
阅读
references/
目录下的单个规则文件,获取详细说明和代码示例:
references/setup-cloud-service.md
references/session-add-event.md
references/promotion-overview.md
每个规则文件包含:
  • 简要说明该规则的重要性
  • 使用Python和TypeScript SDK的正确示例
  • 错误示例或“适用/不适用场景”指引
  • 额外背景信息及参考资料