All skills
redis avatar

/iris-development

@d20b723 official
by redisredis/agent-skills163 stars
30

Iris is Redis's umbrella for AI-focused products. Use this skill when integrating with the Iris Redis Agent Memory (RAM) data plane on Redis Cloud — recording session events for an AI agent, creating or searching long-term memories, configuring a memory store, or tuning background memory promotion. Code examples use the official `redis-agent-memory` (Python) and `@redis-iris/agent-memory` (TypeScript) SDKs.

Use this Skill: https://skilld.dev/gh/redis/agent-skills/iris-development

This session only. Nothing lands on disk.

referencesltm-organize.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Organize Long-Term Memory with namespace, ownerId, topics, and memoryType

LTM records carry four structured fields that exist purely to scope search. They cost nothing extra to populate at write time and make every later search call faster and more precise.

Field Type Purpose Typical use
owner_id / ownerId 1–64 chars [a-zA-Z0-9-] The user/agent the memory is about Multi-tenant scoping — always set this for per-user memories
namespace 1–64 chars [a-zA-Z0-9-] Logical bucket within a store Separate profile facts from interactions from tools
topics List of up to 50 tags, each 1–100 chars Categorical labels ["preferences", "ui"], ["incident", "p1"]
memory_type / memoryType semantic | episodic | message What the record is See below

memory_type semantics:

  • semantic — a durable fact ("user prefers dark mode"). Cheapest to keep around long-term; survives across sessions.
  • episodic — something that happened at a point in time ("user asked about pricing on 2026-05-10"). Pair with created_at filters.
  • message — a raw conversational turn that was deemed worth retaining verbatim.

Correct: Populate every applicable field at create time.

Python:

from redis_agent_memory import models

agent_memory.bulk_create_long_term_memories(memories=[
    {
        "id":          "user-42-pref-theme",
        "text":        "User 42 prefers dark mode in the dashboard.",
        "memory_type": models.MemoryType.SEMANTIC,
        "owner_id":    "user-42",
        "namespace":   "preferences",
        "topics":      ["ui", "theme"],
    },
    {
        "id":          "user-42-incident-7821",
        "text":        "User 42 hit a 500 on /api/checkout on 2026-05-10 and was refunded.",
        "memory_type": models.MemoryType.EPISODIC,
        "owner_id":    "user-42",
        "namespace":   "interactions",
        "topics":      ["incident", "billing"],
    },
])

TypeScript:

await agentMemory.bulkCreateLongTermMemories({
  memories: [
    {
      id:         "user-42-pref-theme",
      text:       "User 42 prefers dark mode in the dashboard.",
      memoryType: "semantic",
      ownerId:    "user-42",
      namespace:  "preferences",
      topics:     ["ui", "theme"],
    },
    {
      id:         "user-42-incident-7821",
      text:       "User 42 hit a 500 on /api/checkout on 2026-05-10 and was refunded.",
      memoryType: "episodic",
      ownerId:    "user-42",
      namespace:  "interactions",
      topics:     ["incident", "billing"],
    },
  ],
});

Later searches can then scope cheaply:

Python:

from datetime import datetime, timedelta, timezone

# All preferences for one user
agent_memory.search_long_term_memory(
    filter_={"owner_id": {"eq": "user-42"}, "namespace": {"eq": "preferences"}},
)

# Incidents across all users in the last 7 days
seven_days_ago = datetime.now(timezone.utc) - timedelta(days=7)
agent_memory.search_long_term_memory(
    text="checkout failure",
    filter_={
        "topics":     {"all": ["incident", "billing"]},
        "created_at": {"gte": seven_days_ago},     # tz-aware UTC datetime
    },
)

TypeScript:

// All preferences for one user
await agentMemory.searchLongTermMemory({
  filter: { ownerId: { eq: "user-42" }, namespace: { eq: "preferences" } },
});

// Incidents across all users in the last 7 days
const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
await agentMemory.searchLongTermMemory({
  text: "checkout failure",
  filter: {
    topics:    { all: ["incident", "billing"] },
    createdAt: { gte: sevenDaysAgo },             // Date
  },
});

Incorrect: Stuffing all of these into the text field.

# Bad: structured signals hidden inside free text. Search can't filter on them
# without an LLM re-parse, and similarity threshold becomes the only knob.
agent_memory.bulk_create_long_term_memories(memories=[{
    "id":   "fact-1",
    "text": "[owner=user-42][namespace=preferences][topic=ui] prefers dark mode",
}])

Updating organization later: update_long_term_memory(memory_id=..., ...) / updateLongTermMemory(memoryId, ...) accepts namespace, owner_id, session_id, topics, and memory_type. To clear a field, send an empty string ("") — omitting the field leaves it unchanged.

Avoid leakage between owners. If a record can be attributed to one user, set owner_id. A search request without an owner_id filter will happily return facts from any user in the same store.

Source: SKILL.md on GitHub

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides comprehensive documentation and code examples for integrating with Redis Agent Memory (RAM) using official Python and TypeScript SDKs. It follows security best practices for credential management and relies on official Redis infrastructure.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

Signed by skilld at d20b723. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 4 months ago
metadata
{
  "author": "redis",
  "version": "1.0.0"
}
  • Python
  • TypeScript
  • redis
  • agent-memory
  • session-memory
  • long-term-memory
  • semantic-search
  • redis-cloud

README badge

README badge for redis/agent-skills/iris-development

Manages session and long-term memory for AI agents on Redis Cloud using the official `redis-agent-memory` (Python) and `@redis-iris/agent-memory` (TypeScript) SDKs. Covers recording conversation events, searching semantically indexed memories, configuring memory stores, and tuning background memory promotion between session and persistent tiers.

Generated from the current SKILL.md.

Does this skill work with both Python and TypeScript?
Yes. The skill provides code examples for both the official `redis-agent-memory` (Python) SDK and `@redis-iris/agent-memory` (TypeScript) SDK.
What is Redis Agent Memory (RAM)?
It is a managed persistent memory service for AI agents on Redis Cloud with two tiers: session memory for conversation history and long-term memory for semantically searchable facts. A background promotion worker extracts durable facts from sessions automatically.
Do I need to set up a Redis Cloud service first?
Yes. You must create a Memory service on Redis Cloud and obtain an API key and store ID, which the SDK reads from `AGENT_MEMORY_API_KEY` and `AGENT_MEMORY_STORE_ID` environment variables.
Can I search memories semantically?
Yes. The skill covers semantic search of long-term memory with filtering using the `search_long_term_memory()` (Python) or `searchLongTermMemory()` (TypeScript) method.
What is the difference between session events and long-term memory?
Session memory is append-only conversation history per session. Long-term memory stores semantically searchable records extracted from sessions by the background promotion worker or created directly; use the skill's session-when-to-use rule to decide which to use.

Generated from the current SKILL.md. These answers refresh after source changes.