A hands-on tutorial for Redis Iris, the context and memory platform that gives AI agents real-time, compounding, retrieval, and navigable access to enterprise data.
This repo walks you through three of the core Iris tools using a sample healthcare dataset and a set of Jupyter notebooks:
| Tool | What you'll do |
|---|---|
| LangCache | Semantically cache and reuse LLM responses to cut cost and latency. |
| Agent Memory | Store short-term session state and long-term durable memory. |
| Context Retriever | Model business entities and auto-generate MCP tools agents can call. |
This README is the quick reference for setting up with Python and installing Jupyter.
NOTE: If you'd rather not install anything on your local machine, I recommend following the full Getting started with Redis Iris tutorial for detailed walkthrough of this repo using Google Colab.
- Python >= 3.11
- Jupyter
- A Redis Cloud account
- Redis Insight (optional, for inspecting data)
-
Clone the repo
git clone https://github.com/redis-developer/getting-started-with-redis-iris.git cd getting-started-with-redis-iris -
Create your environment file
cp .env.example .env
Fill in the values as you create each Iris service in the Redis Cloud console:
LANGCACHE_ENDPOINT= LANGCACHE_ID= LANGCACHE_KEY= AGENT_MEMORY_ENDPOINT= AGENT_MEMORY_STORE_ID= AGENT_MEMORY_KEY= CONTEXT_RETRIEVER_AGENT_KEY=
-
Set up a Python environment and install Jupyter
In your terminal, create a virtual environment and install Jupyter.
python -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install jupyter -
Create a Redis Cloud database and load data
In the Redis Cloud console, create a new database. Hint: Follow these Setup instructions for more details.
Then use Redis Insight to load the sample healthcare dataset
data.redis. Hint: Follow the Context Retriever section for more details.
Each notebook installs its own dependencies (langcache, redis-agent-memory, redis-context-retriever, python-dotenv) in its first cell.
Launch Jupyter and open a notebook from the jupyter/ directory:
jupyter notebook| Notebook | Covers |
|---|---|
jupyter/langcache.ipynb |
Saving and semantically searching cached LLM responses. |
jupyter/agent-memory.ipynb |
Adding session events and long-term memories, then retrieving them. |
jupyter/context-retriever.ipynb |
Listing and calling the MCP tools generated from your entities. |
Each service we cover in this repo also has its own setup and cleanup steps in the Redis Cloud console that's not in the notebooks. Hint: For each tool, follow the corresponding section in the full tutorial.
.
├── cli-instructions.md # Context Retriever CLI (ctxctl) reference
├── data.redis # Sample healthcare dataset (load via Redis Insight)
├── jupyter/ # The three walkthrough notebooks
└── .env.example # Template for service credentials
This tutorial uses a hospital management dataset with five entities — Patient, Doctor, Appointment, Treatment, and Bill — which map to Redis keys like treatment:{id} and appointment:{id}.
Context Retriever turns these into MCP tools such as get_doctor_by_id, filter_appointment_by_patient_id, search_treatment_by_text, and find_treatment_by_cost_range.