Module 3: Context Retriever¶
Vector search finds documents. But questions like "Why is my order late?" need live data that changes constantly. Context Retriever connects your agent directly to that data.
| Vector Search | Context Retriever | |
|---|---|---|
| Data | Static documents | Live business data |
| Query | "What's your refund policy?" | "Why is my order late?" |
| How | Searches by meaning | Queries orders, drivers, customers directly |
You define your entities. Context Retriever generates the tools. Your agent calls them at runtime.
Cloud setup¶
1. Create Service¶
-
In the Redis Cloud console, find Context Retriever in the left sidebar and click Create custom service.
-
Fill in the general settings:
- Service name:
digital-native - Database: select your workshop database
- Service name:
-
Click Entities, then Add Entity:
- Entity name:
Customer - Key Template:
reddash_customer:{customer_id}
- Entity name:
This tells Context Retriever how your records are stored in Redis.
-
Click Fields, then Auto-Detect Fields.


-
Click Create.
2. Get your credentials¶
Now that your surface exists, you need two things from the Console:
-
Surface ID — copy the Surface ID at the end of the URL bar:
app.redislabs.com/#/context-retriever/<surface-id> -
Click back to Context Retriever Surfaces

-
Admin Key — Click the Admin Keys tab and create a new key.

Add both to your .env:
3. Complete the surface and load data¶
You defined one entity. The app needs all 9 (Customer, Order, Restaurant, Driver, Payment, DeliveryEvent, OrderItem, SupportTicket, Policy).
Run these scripts to automatically add the remaining entities for you.
Explore the Tools & Entities¶
Go back to your Context Retriever service in the Redis Cloud console and scroll down.
You defined the entities and Redis created the pathways for the agent to retrieve data in line with your business logic via MCP tools.
9 entities, each mapped to your Redis keys with full field definitions, types, and relationships:

Expand any entity. Context Retriever understands every field and how entities relate to each other (e.g. Order.driver_id → Driver).
62 auto generated MCP tools

Your agent now has filter_customer_by_city, get_order_by_order_id, search_restaurant_by_name, and 59 more, all backed by sub millisecond Redis queries.
Try it¶
Restart with make dev, then open localhost:3040.
The mode toggle now shows Real-time Context and the top-right button says Redis Iris.
- Click Redis Iris to open the activity panel
- Ask: "Why is my order running late?" — watch the agent chain multiple MCP tools to pull your order, your driver, and your delivery events
- Try: "Show me my order history"
- Switch back to Simple RAG and ask the same question. Notice the difference