DOC-7113: Add a scripted Context Retriever interactive demo - #4105
Conversation
Adds a browser-only demo page for Redis Context Retriever, to promote the Redis Iris GA. Sample data from a fictional food delivery app (customers, restaurants, orders) is stored as JSON keys. The reader edits the data model, watches the MCP tools regenerate, and then watches a scripted agent answer six questions over JSON-RPC tools/call. No service is called; results are computed in the browser from the sample data. Tool names, argument schemas, and response envelopes copy what a live Context Retriever service returned. Relationship names and text/numeric conditions on the per-entity filter tool are modelled, not observed. - New page under develop/ai/context-engine/context-retriever, linked from the section overview. - New context-retriever-demo shortcode with its own JS and CSS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🧠 Redis MemoryFound 13 related items from repository history:
Memory updated at c705253 |
|
|
…ross tabs - ts() treated an explicit hour of 0 as missing and used noon, so the "this month" bounds ran noon to noon. Only a missing hour now defaults to noon. - The Ask panel was rebuilt on every visit, which dropped the chat and left the question buttons dead until an orphaned replay finished. It is now built once, so a replay keeps playing across tab switches; returning reconnects only when the data model changed the tools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
get_*_by_id returned a not-found object, and the scripted agent read .name from it, so editing a key template to match no keys produced answers like "from undefined". A missing record now fails the call as a tool error (result with isError: true, the shape the live server uses for failed lookups), and the agent says which lookup failed and points at that entity's key template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button/select/input reset (font and color: inherit) had higher specificity than single-class rules, so the red CTA buttons rendered dark ink on red at 15px, and tabs, sub-tabs, chips, and selects lost their sizes and colors. The reset is now wrapped in :where() so it has zero specificity; computed styles checked in the browser now match the intended values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you! This is really cool 💟 |
|
@n-valchev what do you think of the demo on this page https://redis.io/docs/staging/DOC-7113/develop/ai/context-engine/context-retriever/interactive-demo/ ? thanks |
The "Behind the scenes" panel added INDEXMISSING to every indexed field, while its note said only the index names were illustrative. The live service varies the options by field type, so the panel now does too: - TAG fields: TAG INDEXMISSING - NUMERIC fields: NUMERIC SORTABLE - TEXT fields: plain TEXT The note now says tag fields are the ones that use INDEXMISSING, so the Redis 7.4 requirement still holds, and that tag fields used for access control also get INDEXEMPTY, which the demo doesn't include. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
To list Maya's orders by date, the scripted agent sorted the filter_order result in place. That array is also what the tools/call card shows as the tool's response, so the card showed the orders in date order (o3018 before o3003) instead of the order the tool returned. The answer now sorts a copy, as the diet question already did. A check over all six questions confirms none of them changes a stored tool result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ 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 e55827f. Configure here.
The badge counted every key a template matched, but queries and the generated FT.CREATE ... ON JSON index only use JSON documents. Pointing a template at cart:u104 (a hash) showed a green match, then lookups and filters returned nothing. The badge now counts JSON documents only, and a template that matches only other key types shows "Matches 1 key, but not JSON" in red, with a tooltip that Context Retriever only reads JSON. Also fixes "Matches 1 keys". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Editing a key template kept the entity's fields, so pointing Customer at
cart:u104 still listed the eight customer fields, which describe
documents the template no longer reaches. Changing a template now
re-detects the fields from the JSON documents it matches, as Auto-detect
fields does in the console: restaurant:{id} gives restaurant fields, and
a template that matches no JSON documents gives none, so the entity gets
no tools. Index edits are kept per document type, so switching the
template back restores them. If the agent needs a tool that no longer
exists, it now says the entity has no fields instead of blaming an index.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An edited key template stayed in place after switching to another
entity, so coming back to Customer still showed cart:{id} and no fields.
Switching sub-tabs now puts the template of the entity being left back to
its default, with its default fields. Index choices made on the entity's
own documents are kept; anything set while the template pointed at other
documents is dropped. Going to the Ask step keeps the edit, so readers
can still see what a broken template does to the agent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resetting a template whenever the reader switched entities undid the point of editing it: a changed or broken template is how readers see what it does to the agent's answers. Edits now stay across sub-tab and step switches. A Reset button next to the template, shown only while it differs from the default, puts it back with its default fields. Index choices made on the entity's own documents are kept, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a browser-only Context Retriever interactive demo page with its own shortcode, JS and CSS.
Adds a browser-only Context Retriever interactive demo page with its own shortcode, JS and CSS.

Adds a browser-only demo page for Redis Context Retriever, to promote the Redis Iris GA. Sample data from a fictional food delivery app (customers, restaurants, orders) is stored as JSON keys. The reader edits the data model, watches the MCP tools regenerate, and then watches a scripted agent answer six questions over JSON-RPC tools/call. No service is called; results are computed in the browser from the sample data.
Tool names, argument schemas, and response envelopes copy what a live Context Retriever service returned. Relationship names and text/numeric conditions on the per-entity filter tool are modelled, not observed.
Note
Low Risk
Static documentation and client-side demo assets only; no production services, auth, or data paths are modified.
Overview
Adds a browser-only interactive demo for Redis Context Retriever so readers can see how a data model becomes MCP tools before creating a Cloud service.
A new docs page embeds the
context-retriever-demoHugo shortcode, which loads scoped CSS/JS once per page. The widget walks through three steps—sample Redis JSON keys (food-delivery customers/restaurants/orders), an editable entity model that regenerates tool schemas when templates or field indexes change, and a scripted “agent” that replays six sample questions as JSON-RPCtools/callflows (computed in-memory; no real MCP service). The Context Retriever section overview now links to this page.Core logic mirrors live tool names, argument shapes, and response envelopes;
window.ContextRetrieverDemoexposes helpers for tests.Reviewed by Cursor Bugbot for commit c705253. Bugbot is set up for automated code reviews on this repo. Configure here.