Skip to content

redis/redis-iris-demos

Repository files navigation

Redis Iris Demos

Reusable demo apps powered by Redis Iris

Multi-domain AI agent demos for Redis Iris: Redis's unified context engine for AI agents.

Every domain runs Context Retriever, Agent Memory, LangCache, and Semantic Routign.


Iris Components in Demo

Solution What it does
Semantic Routing Blocks off-topic queries before they reach the LLM
LangCache Returns cached responses for semantically similar questions
Agent Memory Enriches prompts with short-term session context + long-term user knowledge
Context Retriever Give agents clean, schema-first paths through all business data

Domains

Domain App Industry Screenshot
reddash Reddash Food delivery
electrohub ElectroHub Electronics retail
finance-researcher ShiftIQ Financial research
healthcare RedHealthConnect Healthcare
radish-bank Radish Bank Retail banking

Legacy

The legacy/context-engine-demos/ directory contains an archived copy of the original redis/context-engine-demos repository — the first-generation demo that showcased Context Retriever only. The current repo supersedes it with Semantic Routing, LangCache, Agent Memory, and domain-specific branding.

Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • uv (Python package manager)

Redis Cloud services needed

Service What you need
Redis database Host, port, password
Context Surfaces Admin key
Agent Memory Base URL, store ID, API key
LangCache Host, cache ID, API key
OpenAI API key

First time

make install                      # Install Python + JS dependencies
cp .env.example .env              # Fill in credentials
make setup                        # Generate data, load Redis, seed memory + cache
make dev                          # Start at localhost:3040

Coming back (same domain)

make dev                          # Data persists in Redis

If the agent has no tools (Redis was flushed, instance recycled), reload:

make reset                        # Reload data + re-seed
make dev

Switching domains

 # Update the DEMO_DOMAIN in .env
make setup      
make dev

What make setup does

  1. Sets DEMO_DOMAIN in .env
  2. Generates Context Surface models from the domain schema
  3. Generates synthetic data (JSONL files)
  4. Flushes Redis database
  5. Creates a new Context Surface (writes CTX_SURFACE_ID + MCP_AGENT_KEY to .env)
  6. Loads data into Redis (creates search indexes)
  7. Seeds Agent Memory (clears existing, seeds 2 long-term memories per domain)
  8. Seeds LangCache (flushes cache, seeds 1 cached response per domain)
  9. Semantic Routing initializes automatically when the server starts

make reset does steps 4-9 only (faster — reuses existing models and data files).

Creating a New Domain

make create-domain DOMAIN=my-industry

This scaffolds the required files under domains/my-industry/. See the domain-pack-authoring skill for the full contract, checklist, and Iris-specific requirements (guardrail routes, seed memories, LangCache entries, landing page backgrounds).

Each domain implements the DomainPack protocol defined in backend/app/core/domain_contract.py.

Project Structure

backend/
  app/
    main.py                  # FastAPI app, SSE streaming, 7-phase pipeline
    langgraph_agent.py       # LangGraph ReAct agent
    memory_service.py        # Redis Agent Memory client
    context_surface_service.py  # MCP tool wrapper
    guardrail_service.py     # Semantic routing guardrail
    langcache_service.py     # Semantic cache client
    settings.py              # Pydantic BaseSettings
    core/
      domain_contract.py     # DomainPack protocol + configs
      domain_schema.py       # EntitySpec definition

domains/
  reddash/                   # Food delivery
  electrohub/                # Electronics retail
  finance-researcher/        # Financial research
  healthcare/                # Patient portal
  radish-bank/               # Retail banking

frontend/
  src/
    App.tsx                  # React chat UI, SSE handler
    components/              # ConversationView, ActivityPanel, EmptyState

scripts/                     # Setup, data loading, seeding, validation

.codex/skills/
  domain-pack-authoring/     # AI skill for creating new domains

Make Targets

Target What it does
make domains List available domains
make setup [DOMAIN=X] Full setup: models, data, Redis, seed
make reset Reload current domain into Redis + re-seed
make dev Start backend (:8040) + frontend (:3040)
make install Install Python + JS dependencies
make create-domain DOMAIN=X Scaffold a new domain
make seed-memories Re-seed long-term memories for current domain
make seed-langcache Re-seed LangCache entries for current domain
make flush-redis Wipe Redis database

All targets read DEMO_DOMAIN from .env — no need to pass DOMAIN= unless switching.


License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors