Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Each plugin lives in `plugins/<slug>`. The directory name is the install keyword
| `linear` | Linear SDK scripting skill for issue, project, team, cycle, and comment workflows. |
| `mac-notify` | macOS notifications when a Cline run completes. |
| `nanobanana` | Image generation through OpenRouter and Gemini image models. |
| `redis-development` | Redis data modeling, Query Engine, vector search, caching, security, clustering, and observability skills. |
| `speak` | Speaks completed Cline replies with ElevenLabs text to speech. |
| `typescript-lsp` | TypeScript language service `goto_definition` support. |
| `weather-metrics` | Demo weather tool plus runtime metrics hooks. |
Expand Down
24 changes: 24 additions & 0 deletions plugins/redis-development/NOTICE.redis-agent-skills
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This plugin includes Redis workflow skill material adapted from Redis agent skills.

Source: https://github.com/redis/agent-skills
License: MIT

Copyright (c) Redis, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
46 changes: 46 additions & 0 deletions plugins/redis-development/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# redis-development

Use Redis development guidance in Cline for data modeling, connection tuning, Query Engine indexes, vector search, semantic caching, clustering, security, observability, and Redis AI product workflows.

## What It Adds

The plugin bundles Redis workflow skills for:

- Choosing Redis data structures and key naming conventions.
- Designing Redis Query Engine indexes and search queries.
- Building vector search and RAG retrieval flows.
- Tuning client connections, pooling, pipelining, timeouts, and client-side caching.
- Planning cluster hash tags, multi-key operations, and replica reads.
- Hardening authentication, ACLs, TLS, network exposure, and dangerous commands.
- Monitoring Redis health with INFO, SLOWLOG, MEMORY, CLIENT, and FT.PROFILE guidance.
- Using Redis LangCache and Redis Agent Memory services.

## Install

```bash
cline plugin install redis-development
```

For local development from this repository:

```bash
cline plugin install ./plugins/redis-development --cwd .
```

## Example Usage

Ask Cline to design a Redis key model for a cache-heavy feature, review a Redis Query Engine index, troubleshoot connection pool exhaustion, plan Redis Cluster hash tags, or harden ACL/TLS/network settings before production.

## Requirements

No external runtime is required to install the plugin. Some workflows may ask the user to run Redis CLI commands, Redis client libraries, Redis Insight, Redis Cloud setup steps, or SDK examples depending on the user's project and task.

## Safety Notes

The bundled skills include live Redis safety guidance: confirm the target environment and ask before destructive, broad, blocking, administrative, credential-changing, SDK/REST write, delete, bulk-read, or production smoke-test operations.

The plugin does not connect to Redis or start local services at install time. It is an offline skill pack with safety guidance inside the skills.

## License

The bundled Redis workflow skills are adapted from Redis agent skill material under the MIT license. See `NOTICE.redis-agent-skills`.
10 changes: 10 additions & 0 deletions plugins/redis-development/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { AgentPlugin } from "@cline/sdk"

const plugin: AgentPlugin = {
name: "redis-development",
manifest: {
capabilities: ["skills"],
},
}

export default plugin
19 changes: 19 additions & 0 deletions plugins/redis-development/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "redis-development",
"version": "0.0.0",
"private": true,
"type": "module",
"description": "Cline plugin that bundles Redis development, Query Engine, vector search, caching, security, clustering, and observability skills.",
"cline": {
"plugins": [
{
"paths": [
"./index.ts"
],
"capabilities": [
"skills"
]
}
]
}
}
92 changes: 92 additions & 0 deletions plugins/redis-development/skills/iris-development/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
name: iris-development
description: 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.
license: MIT
metadata:
author: redis
version: "1.0.0"
---

# 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.

## Official SDKs

All code samples use the official SDKs:


| Language | Package | Class | Install |
| ---------- | -------------------------- | ------------- | ---------------------------------- |
| 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.

## When to Apply

Reference these guidelines when:

- Creating a memory service on Redis Cloud ([https://cloud.redis.io/#/agent-memory](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

## Rule Categories by Priority


| Priority | Category | Impact | Prefix |
| -------- | ----------------------- | ------ | ------------ |
| 1 | Setup & Cloud Service | HIGH | `setup-` |
| 2 | Session Memory / Events | HIGH | `session-` |
| 3 | Long-Term Memory | HIGH | `ltm-` |
| 4 | Memory Promotion | MEDIUM | `promotion-` |


## Quick Reference

### 1. Setup & Cloud Service (HIGH)

- [`setup-cloud-service`](references/setup-cloud-service.md) - Create a Memory service on Redis Cloud
- [`setup-auth-token`](references/setup-auth-token.md) - Authenticate the SDK with a store API key

### 2. Session Memory / Events (HIGH)

- [`session-when-to-use`](references/session-when-to-use.md) - Choose session events vs direct long-term memory
- [`session-add-event`](references/session-add-event.md) - Append a session event correctly
- [`session-retrieval`](references/session-retrieval.md) - Retrieve session memory and individual events

### 3. Long-Term Memory (HIGH)

- [`ltm-bulk-create`](references/ltm-bulk-create.md) - Create long-term memories in bulk with idempotent IDs
- [`ltm-search`](references/ltm-search.md) - Search long-term memory semantically with filters
- [`ltm-organize`](references/ltm-organize.md) - Organize records with namespace, ownerId, topics, and memoryType

### 4. Memory Promotion (MEDIUM)

- [`promotion-overview`](references/promotion-overview.md) - How background promotion works

## 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@

## Create Long-Term Memories in Bulk with Idempotent IDs

`bulk_create_long_term_memories` (Python) / `bulkCreateLongTermMemories` (TypeScript) accepts up to 100 records per call. The client supplies the `id` for each record so a retry never creates a duplicate. The response splits into `created` (IDs that landed) and `errors` (per-ID failures).

Correct: Generate a deterministic ID per logical fact and batch up to 100.

Python:

```python
import uuid
from redis_agent_memory import AgentMemory, models

def upsert_facts(agent_memory: AgentMemory, facts: list[dict]):
# Cap at 100 per call - the API enforces this.
res = agent_memory.bulk_create_long_term_memories(memories=[
{
"id": fact["id"], # stable, deterministic
"text": fact["text"], # 1-50000 chars
"memory_type": fact.get("memory_type", models.MemoryType.SEMANTIC),
"session_id": fact.get("session_id"),
"owner_id": fact.get("owner_id"),
"namespace": fact.get("namespace"),
"topics": fact.get("topics", []),
}
for fact in facts[:100]
])
# res.created = [...ids...], res.errors = [BulkOperationError(...)]
return res

# Deterministic IDs make retries safe: same fact -> same id -> no duplicate.
facts = [{
"id": f"user-42-pref-{uuid.uuid5(uuid.NAMESPACE_OID, 'theme:dark')}",
"text": "User 42 prefers dark mode.",
"owner_id": "user-42",
"topics": ["profile", "ui-preferences"],
}]
upsert_facts(agent_memory, facts)
```

TypeScript:

```typescript
import { AgentMemory } from "@redis-iris/agent-memory";

async function upsertFacts(
agentMemory: AgentMemory,
facts: Array<{
id: string; text: string;
memoryType?: "semantic" | "episodic" | "message";
sessionId?: string; ownerId?: string; namespace?: string;
topics?: string[];
}>,
) {
const res = await agentMemory.bulkCreateLongTermMemories({
memories: facts.slice(0, 100).map((f) => ({
id: f.id,
text: f.text,
memoryType: f.memoryType ?? "semantic",
sessionId: f.sessionId,
ownerId: f.ownerId,
namespace: f.namespace,
topics: f.topics ?? [],
})),
});
// res.created: string[], res.errors?: Array<{id: string; error: string}>
return res;
}
```

Incorrect: One call per memory, or random IDs on every retry.

```python
# Bad: N round-trips + N embedding calls - slow and hammers your rate limit.
for fact in facts:
agent_memory.bulk_create_long_term_memories(memories=[{
"id": str(uuid.uuid4()), # <-- new id on every retry -> duplicates on transient failures
"text": fact["text"],
}])
```

Partial-success contract - always inspect `errors`:

```python
res = upsert_facts(agent_memory, facts)
if res.errors:
for err in res.errors:
log.warning("LTM create failed", id=err.id, reason=err.error)
# res.created IS persisted; do not retry those.
failed_ids = {e.id for e in res.errors}
retry_later([f for f in facts if f["id"] in failed_ids])
```

```typescript
const res = await upsertFacts(agentMemory, facts);
if (res.errors?.length) {
for (const err of res.errors) {
console.warn("LTM create failed", err.id, err.error);
}
const failedIds = new Set(res.errors.map((e) => e.id));
await retryLater(facts.filter((f) => failedIds.has(f.id)));
}
```

Constraints:
- `memories`: 1-100 items per call.
- `id`: 1-64 chars, `[a-zA-Z0-9-]`.
- `text`: 1-50000 chars.
- `memory_type` / `memoryType`: `semantic` | `episodic` | `message`.
- `topics`: up to 50, each 1-100 chars.
- TTL: defaults to 1 year (`31_536_000` seconds) unless the store's long-term-memory TTL overrides it.

To update a record's text or tags later, use `update_long_term_memory(memory_id=...)` / `updateLongTermMemory(memoryId, ...)` rather than re-creating with the same ID.
Loading