Redis Context Retriever

Expose tools to Agents to query your Redis databases.

Give your agents structured, governed access to business data — without building custom tools for every project.

Context Retriever lets you define your data model once. It automatically generates the retrieval tools agents call at runtime, so agents always work with accurate, live data through a controlled interface rather than guessing at SQL or calling databases directly.

What is Context Retriever?

Redis Context Retriever is a schema-first context layer for AI agents that:

  • Defines business context once — Model your entities, fields, and relationships in one place, reused across all agents
  • Auto-generates retrieval tools — Tools are created from your data model, not hand-coded per agent
  • Keeps agents out of your database — Agents call generated tools; the system handles data access safely
  • Governs access by design — Each agent key has access tags that automatically filter what data it can see
  • Exposes tools via MCP — Agents call tools through a standard MCP interface at runtime

Why use Context Retriever?

For AI applications

  • Agents reliably follow defined data paths instead of guessing at SQL
  • Live, structured context from your business data at every agent step
  • No tool zoo sprawl — one model definition, consistent tool surface
  • Access control built in — agents only see what they're allowed to see

For developers

  • Python client and ctxctl CLI for modeling and deploying
  • UI-based setup available in Redis Cloud console
  • No per-agent tool engineering — the platform handles tool generation
  • Fully managed on Redis Cloud, no infrastructure required

Quick example

Install the Python client, which also includes the ctxctl CLI:

pip install redis-context-retriever

Use the ctxctl CLI, the Python client, or the Redis Cloud UI to model your entities and relationships. Context Retriever uses that model to automatically generate retrieval tools that agents call at runtime through its MCP interface — agents never access your database directly.

See the Redis Cloud setup guide to create your first Context Retriever service.

Redis Context Retriever helps teams expose operational context to AI agents through schema-first retrieval. It models the entities, fields, keys, and relationships that matter to an agent workflow, then presents that context through a governed tool surface the agent can call at runtime. Context Retriever helps an AI Agent understand what business objects exist, how they connect, and which paths are safe to use.

Overview

Production agents fail not because the model is wrong, but because the context layer breaks. Enterprise data can be fragmented across multiple different databases, and can be disorganized. Teams try to patch this with text-to-SQL, OpenAPI-to-MCP wrappers, or hand-built tools — which works for demos but creates tool zoo sprawl, SQL risk, and agents that can't reliably choose the right path in production. Redis Context Retriever gives teams a governed, schema-first surface agents can traverse safely.

When you set up Redis Context Retriever, you model the objects that matter to your agent workflow and connect the relationships between them. You can do this either through the UI, using the Context Surfaces Python Client, or the ctxctl CLI (available when you install the python client). Context Retriever will use those relationships to automatically create and deploy retrieval tools from your entity model.

When an agent needs context during execution, it calls the MCP tools Context Retriever exposes. Instead of guessing which tool to use, or generating SQL, the agent follows the defined entity paths and gets back structured, live, operational context.

Get started with Redis Context Retriever

Get started with Redis Context Retriever on Redis Cloud or join the private preview for Redis Software.

To set up a Redis Context Retriever on Redis Cloud, you need a database on Redis Cloud that already has relevant data. If you use a relational database, use Redis Data Integration (RDI) to ingest data into a Redis Cloud database.

When you have a database, Create a context retriever service for your database on Redis Cloud.

After you set up Context Retriever, you can view your service. See the Context Surfaces Python Client for more information on how to call your tools.

RATE THIS PAGE
Back to top ↑