# adk-redis examples

```json metadata
{
  "schema_version": 2,
  "title": "adk-redis examples",
  "description": "Complete examples for every adk-redis capability.",
  "categories": ["docs","integrate","oss","rs","rc"],
  "group": "ai",
  "tableOfContents": {"sections":[{"id":"prerequisites","title":"Prerequisites"},{"id":"managed_memory_quickstart","title":"managed_memory_quickstart"},{"id":"travel_agent_memory_tools","title":"travel_agent_memory_tools"},{"id":"redis_search_tools","title":"redis_search_tools"},{"id":"redis_sql_search","title":"redis_sql_search"},{"id":"redisvl_mcp_search","title":"redisvl_mcp_search"},{"id":"semantic_cache","title":"semantic_cache"},{"id":"langcache_cache","title":"langcache_cache"},{"id":"running-an-example","title":"Running an example"},{"id":"deprecated-backend-examples","title":"Deprecated backend examples"},{"id":"more-info","title":"More info"}]}

,
  "codeExamples": []
}
```


The [adk-redis repository](https://github.com/redis-developer/adk-redis/tree/main/examples) includes ten complete examples, each focused on a specific capability. The seven below run on supported backends; the remaining three are listed under [Deprecated backend examples](#deprecated-backend-examples).

## Prerequisites

All examples require:

- **Python 3.10+**
- **Redis 8.4+**: `docker run -d --name redis -p 6379:6379 redis:8.4-alpine`
- **A memory backend** (for memory examples): a [Redis Agent Memory](https://redis.io/docs/latest/integrate/google-adk/redis-agent-memory) store on Redis Cloud or self-managed.
- **API keys**: Most examples need a `GOOGLE_API_KEY` for Gemini

## `managed_memory_quickstart`

**Backend:** `redis-agent-memory` &middot; **Run:** `python main.py`

The smallest memory example, and the counterpart to `simple_redis_memory`. Uses `redis-agent-memory`, so there is no Agent Memory Server and no Docker to set up. Wires `RedisSessionMemoryService` and `RedisLongTermMemoryService` to an agent with ADK's built-in `preload_memory` and `load_memory` tools.

[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/managed_memory_quickstart)

## `travel_agent_memory_tools`

**Backend:** `redis-agent-memory`, switchable &middot; **Run:** `adk web .`

Uses REST-based memory tools exclusively, without framework-managed services. The LLM has full control over when to search, create, update, and delete memories. Set `REDIS_MEMORY_BACKEND` to switch backends.

[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/travel_agent_memory_tools)

## `redis_search_tools`

**Capability:** Vector, text, and range search &middot; **Run:** `adk web .`

Three in-process RedisVL [search tools](https://redis.io/docs/latest/integrate/google-adk/search-tools) plugged into a single agent with a product catalog dataset.

[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/redis_search_tools)

## `redis_sql_search`

**Capability:** SQL `SELECT` search &middot; **Run:** `adk web .`

A 10-product catalog with the `RedisSQLSearchTool`. The agent emits parameterized SQL (`WHERE category = 'electronics' AND price < :max_price`) to answer structured catalog questions. Requires `pip install 'adk-redis[sql]'`.

[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/redis_sql_search)

## `redisvl_mcp_search`

**Capability:** RedisVL MCP server via ADK's `McpToolset` &middot; **Run:** `adk web .`

The MCP counterpart of `redis_search_tools`. A `rvl mcp` server hosts a knowledge-base index in hybrid (vector + BM25) mode and the agent connects via ADK's native `McpToolset`. No adk-redis wrapper involved; the standard `McpToolset` + `StdioConnectionParams` pattern is used.

[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/redisvl_mcp_search)

## `semantic_cache`

**Capability:** Local semantic caching (RedisVL) &middot; **Run:** `python main.py`

Demonstrates LLM response caching and tool result caching using the `RedisVLCacheProvider` with local embeddings and ADK callbacks.

[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/semantic_cache)

## `langcache_cache`

**Capability:** Managed semantic caching (LangCache) &middot; **Run:** `python main.py`

Uses the managed [LangCache](https://redis.io/docs/latest/integrate/google-adk/semantic-caching) service for semantic caching with server-side embeddings. No local vectorizer required.

[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/langcache_cache)

## Running an example

Examples marked `python main.py` run as scripts. Examples marked `adk web .`
run in the ADK developer UI from inside the example directory.

```bash
pip install adk-redis[all]
cd examples/managed_memory_quickstart
export GOOGLE_API_KEY=your-key
python main.py
```

## Deprecated backend examples

Three examples are written against the deprecated `opensource-agent-memory`
backend: `simple_redis_memory`, `travel_agent_memory_hybrid`, and
`fitness_coach_mcp`. They are listed under
[Agent Memory Server (deprecated)](https://redis.io/docs/latest/integrate/google-adk/agent-memory-server#examples-still-on-this-backend).
For a `redis-agent-memory` starting point, use `managed_memory_quickstart` above.

## More info

- [Car dealership tutorial](https://redis.io/tutorials/build-a-car-dealership-agent-with-google-adk-and-redis-agent-memory/): Full walkthrough building an agent from scratch
- [adk-redis README](https://github.com/redis-developer/adk-redis): Installation and overview

