Skip to content

Add Context Engine (Redis Iris) agent type to the AI agent builder - #3791

Merged
mich-elle-luna merged 4 commits into
mainfrom
iris-agent-template
Aug 12, 2026
Merged

Add Context Engine (Redis Iris) agent type to the AI agent builder#3791
mich-elle-luna merged 4 commits into
mainfrom
iris-agent-template

Conversation

@mich-elle-luna

@mich-elle-luna mich-elle-luna commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Adds a fourth agent type, "Context Engine Agent", whose memory is fully managed by the Redis Iris Context Engine instead of raw Redis. Each turn the agent searches long-term memory, loads recent session/working memory, calls the LLM with that context, and writes both turns back — long-term facts are promoted automatically by the managed service.

  • Python template uses the redis-agent-memory SDK (AgentMemory)
  • JavaScript template uses the agent-memory-client SDK (MemoryAPIClient)
  • Wires the type into agent-builder.js (CONFIG, icon, default name, chip), the agent-builder.html initial chips, and the agent-builder _index.md

SDK calls verified against the published packages: the Python signatures were bound against the redis-agent-memory 0.2.1 wheel source and the JS calls against the agent-memory-client 0.3.1 type definitions.


Note

Low Risk
Documentation and static templates/UI only; no auth or production runtime changes in this repo.

Overview
Adds a fourth agent builder optionRedis Iris Conversational Assistant — for conversational agents that use managed Redis Iris Agent Memory instead of DIY Redis vector/session storage.

The interactive builder (agent-builder.js, shortcode chips) registers the new iris type with icons, default class name, and suggestion flows. Python and JavaScript templates (iris_agent.py / iris_agent.js) implement the per-turn loop: semantic long-term search, session events + summary for context, LLM call, then write turns back to session memory.

Docs on the agent builder index and How agents work now describe four agent types and link to Agent Memory as a managed memory option. Suggestion chips use a 2-column grid (single column on small screens) so four starter choices fit cleanly.

Reviewed by Cursor Bugbot for commit 0c0e452. Bugbot is set up for automated code reviews on this repo. Configure here.

mich-elle-luna and others added 2 commits August 11, 2026 14:15
Adds a fourth agent type, "Context Engine Agent", whose memory is fully
managed by the Redis Iris Context Engine instead of raw Redis. Each turn the
agent searches long-term memory, loads recent session/working memory, calls
the LLM with that context, and writes both turns back — long-term facts are
promoted automatically by the managed service.

- Python template uses the redis-agent-memory SDK (AgentMemory)
- JavaScript template uses the agent-memory-client SDK (MemoryAPIClient)
- Wires the type into agent-builder.js (CONFIG, icon, default name, chip),
  the agent-builder.html initial chips, and the agent-builder _index.md

SDK calls verified against the published packages: the Python signatures were
bound against the redis-agent-memory 0.2.1 wheel source and the JS calls
against the agent-memory-client 0.3.1 type definitions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the Redis Iris Context Engine (managed Agent Memory) as an alternative
to building agent memory yourself with Redis data structures, in the Agent
memory section and the Next steps links — consistent with the new Context
Engine agent type in the agent builder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 7 related items from repository history (1 new this commit):

Memory updated at 0c0e452

@github-actions

Copy link
Copy Markdown
Contributor

Comment thread static/code/agent-templates/javascript/iris_agent.js Outdated
Comment thread static/code/agent-templates/javascript/iris_agent.js Outdated
Comment thread static/code/agent-templates/python/iris_agent.py Outdated

@dwdougherty dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the ever-present bugbot issues, I'll approve. However, I suggest the following change to assets/css/index.css:

diff --git a/assets/css/index.css b/assets/css/index.css
index 7cd6a3db8..b2ae32071 100644
--- a/assets/css/index.css
+++ b/assets/css/index.css
@@ -1297,7 +1297,7 @@ a[href*="#no-click"], img[src*="#no-click"] {
 }
 
 .suggestion-chips {
-  @apply flex flex-wrap gap-2 mt-3;
+  @apply grid grid-cols-2 gap-2 mt-3;
 }
 
 .suggestion-chip {

The layout of the "pills" wasn't great when I viewed the preview.

@dwdougherty
dwdougherty requested a review from a team August 12, 2026 14:34

@andy-stark-redis andy-stark-redis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andy-stark-redis
andy-stark-redis requested a review from a team August 12, 2026 14:45
Addresses the Cursor Bugbot review and dwdougherty's layout note on the
Context Engine agent PR.

Templates (Bugbot):
- JS (was High): it used agent-memory-client, which talks to the
  non-store-scoped Agent Memory Server working-memory endpoints, so it could
  never run against Iris Cloud (no STORE_ID). Rewritten to call the
  store-scoped Agent Memory REST API directly via fetch (POST
  session-memory/events, GET session-memory/{sessionId}, POST
  long-term-memory/search), matching the Python template. This also removes the
  working-memory PUT that dropped server-managed context/data on every write.
- Both templates now fold the compacted session `summary` into the LLM context,
  so once the service summarizes older turns they still reach the model.
- Endpoints and field names verified against the repo's OpenAPI spec.

Chip layout (dwdougherty): .suggestion-chips now uses a two-column grid
(grid grid-cols-2) instead of flex-wrap, collapsing to one column under 768px.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d083092. Configure here.

Comment thread static/js/agent-builder.js Outdated
Two refinements to the new agent type from the review round:

- Rename "Context Engine Agent" to "Redis Iris Conversational Assistant".
  The template only uses the Agent Memory service, so the old name overclaimed
  the whole Context Engine. The new name states the function (conversational
  assistant) and keeps the brand, without implying the other Iris services.
  Updated across agent-builder.js, the initial chips, the agent-builder
  landing page, and both template headers/banners. Internal key stays `iris`.

- Narrow the routing keywords to the distinctive terms "iris", "context
  engine", "agent memory" (Bugbot finding). The previous generic terms
  (context, memory, persistent, managed, long-term) hijacked the longest-match
  selector, so "persistent chatbot" and "rag with long-term memory" resolved
  to this type instead of Conversational / Knowledge Assistant. Deliberately
  did not add "conversational"/"assistant" as keywords — they would collide
  with the Conversational type; the chip routes by key regardless.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mich-elle-luna
mich-elle-luna merged commit 30bc2bf into main Aug 12, 2026
128 of 132 checks passed
@mich-elle-luna
mich-elle-luna deleted the iris-agent-template branch August 12, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants