{
  "id": "context-engine",
  "title": "Context engine",
  "url": "https://redis.io/docs/latest/develop/ai/context-engine/",
  "summary": "Redis Iris is a suite of fully-managed services that give AI agents the context engine they need to reliably act on business data.",
  "tags": [
    "docs",
    "develop",
    "ai"
  ],
  "last_updated": "2026-05-18T05:44:54-07:00",
  "children": [
    {
      "id": "langcache",
      "summary": "Store LLM responses for AI apps in a semantic cache.",
      "title": "Redis LangCache",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/langcache/"
    },
    {
      "id": "agent-memory",
      "summary": "Store agent memory for AI applications in Redis.",
      "title": "Redis Agent Memory",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/"
    },
    {
      "id": "context-retriever",
      "summary": "Expose tools to Agents to query your Redis databases.",
      "title": "Redis Context Retriever",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/context-retriever/"
    },
    {
      "id": "data-integration",
      "summary": "Keep Redis in sync with your primary databases so AI agents always have access to fresh, accurate business data.",
      "title": "Redis Data Integration",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/data-integration/"
    }
  ],
  "page_type": "content",
  "content_hash": "85d7a5ad923991b8f4e33f763343238506e8fec4287747116d93ec266431b49c",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Context engine includes four services:\n\n- **[LangCache](https://redis.io/docs/latest/develop/ai/context-engine/langcache)**: A semantic caching service that stores and reuses LLM responses for similar queries, reducing API costs and improving response latency.\n- **[Agent Memory](https://redis.io/docs/latest/develop/ai/context-engine/agent-memory)**: A persistent memory service that maintains short-term session memory and long-term memory across agent interactions.\n- **[Context Retriever](https://redis.io/docs/latest/develop/ai/context-engine/context-retriever)**: Turns your business data into structured tools that AI agents can safely and reliably use, defined once and reused across all agents.\n- **[Data integration](https://redis.io/docs/latest/develop/ai/context-engine/data-integration)**: Syncs live data from your existing relational databases into Redis Cloud so agents always have access to fresh, accurate business data.\n\nAll four services are available on [Redis Cloud](https://redis.io/docs/latest/operate/rc/context-engine) using the REST API, with no database setup or management required."
    },
    {
      "id": "langcache",
      "title": "LangCache",
      "role": "content",
      "text": "[LangCache](https://redis.io/docs/latest/develop/ai/context-engine/langcache) uses semantic similarity to match incoming prompts against previously cached LLM responses. When LangCache finds a semantically similar response in the cache, it returns that response immediately without making an LLM call.\n\n**Key benefits:**\n\n- **Lower LLM costs**: Reduces redundant API calls for semantically equivalent queries.\n- **Faster responses**: Serves cached answers in milliseconds instead of waiting for an LLM.\n- **Managed embeddings**: LangCache handles embedding generation automatically.\n- **Cache control**: Configure similarity thresholds, TTLs, and eviction policies.\n\nLangCache works well for AI assistants, chatbots, RAG applications, AI agents, and centralized AI gateway services.\n\n[Get started with LangCache](https://redis.io/docs/latest/develop/ai/context-engine/langcache)"
    },
    {
      "id": "agent-memory",
      "title": "Agent Memory",
      "role": "content",
      "text": "[Redis Agent Memory](https://redis.io/docs/latest/develop/ai/context-engine/agent-memory) gives AI agents a structured, persistent memory layer using a two-tier model:\n\n- **Session memory** (short-term or working memory): Holds the current conversation state and session metadata, with configurable TTL-based expiration.\n- **Long-term memory**: Stores information extracted from past sessions, including user preferences and learned patterns, as text with vector embeddings for semantic retrieval.\n\nPromotion from session memory to long-term memory is automatic and non-blocking. As a conversation progresses, the service asynchronously extracts and stores important information in the background, keeping agent interactions responsive. You can also create long-term memories directly using the API for bulk imports or external knowledge sources.\n\nAgent Memory is available as a REST API and Python SDK.\n\n[Get started with Redis Agent Memory](https://redis.io/docs/latest/develop/ai/context-engine/agent-memory)"
    },
    {
      "id": "context-retriever",
      "title": "Context Retriever",
      "role": "content",
      "text": "Agents don't fail because they lack data. They fail because they don't know how to use it. Context Retriever turns your raw business data into structured tools that agents can reliably act on, without requiring each project to rediscover how your data works.\n\nYou define your data model once, specifying the entities that matter (such as customers or orders) and the fields agents need. Context Retriever automatically generates the tools agents use to query and work with that data. Agents never access your database directly. They call the generated tools, and the system handles the rest.\n\n**Key benefits:**\n\n- **Define once, reuse everywhere**: Business context is captured once and shared across all agents.\n- **Automatic tool generation**: Tools are generated from your data model, not hand-coded per agent.\n- **Controlled access**: Each agent requires a key, and access tags automatically filter what data each agent can see.\n- **Governed by design**: Agents can only use tools that have been explicitly defined, with no direct database access.\n\n[Get started with Context Retriever](https://redis.io/docs/latest/develop/ai/context-engine/context-retriever)"
    },
    {
      "id": "data-integration",
      "title": "Data integration",
      "role": "content",
      "text": "AI agents are only as reliable as the data they work with. [Redis Data Integration (RDI)](https://redis.io/docs/latest/operate/rc/databases/rdi) keeps your Redis Cloud database in sync with your existing relational databases, including Oracle, MySQL, PostgreSQL, and SQL Server, so agents always have access to current, accurate business data without querying slow primary databases directly.\n\nRDI uses a data pipeline that performs an initial sync of your source data into Redis, then captures changes in real time. Updates from your primary database appear in Redis within seconds, eliminating stale data and cache misses. Your agents interact only with Redis, which provides fast and predictable query performance.\n\n**Key benefits:**\n\n- **Always-fresh data**: Changes in your source database propagate to Redis within seconds.\n- **No direct database access**: Agents query Redis, not your production databases.\n- **Minimal setup**: No infrastructure to manage. Redis Cloud handles the pipeline.\n- **Broad source support**: Works with Oracle, MySQL, PostgreSQL, MariaDB, SQL Server, and AWS Aurora.\n\n[Get started with Data integration](https://redis.io/docs/latest/develop/ai/context-engine/data-integration)"
    }
  ],
  "examples": []
}
