Skip to content

Commit 61be38b

Browse files
committed
google-adk: bring docs to parity with adk-redis 0.0.5
adk-redis 0.0.5 shipped to PyPI today with several changes that the redis.io ADK docs were behind on. This brings the docs to parity. Drift fixed: - `_index.md`: AMS Docker command bumped from `gemini-2.0-flash` to `gemini-2.5-flash`. Added a Linux note for `host.docker.internal` (it does not resolve by default on Linux). Added the `pip install adk-redis[sql]` and `pip install redisvl[mcp]>=0.18.2` install lines. Capabilities table now mentions the SQL tool and the `rvl mcp` server, and the example count goes from seven to nine. - `search-tools.md`: page now describes FIVE search tools (the new `RedisSQLSearchTool` was missing). Added a SQL search section with a runnable snippet and the parameterized-query pattern. Added a "RedisVL MCP server" section showing ADK's native `McpToolset` wired to `rvl mcp` over stdio, following the maintainer guidance on `google/adk-docs#1777`. Bottom links now point at the two new examples (`redis_sql_search`, `redisvl_mcp_search`). - `redis-agent-memory.md`: working-memory `model_name` bumped from `gemini-2.0-flash` to `gemini-2.5-flash`. - `examples.md`: count bumped to nine; added `redis_sql_search` and `redisvl_mcp_search` entries. - `semantic-caching.md`: vectorizer model bumped from `redis/langcache-embed-v1` to `redis/langcache-embed-v2` (matches the runnable examples and the rest of adk-redis docs). Agent model bumped from `gemini-2.0-flash` to `gemini-2.5-flash`. What is intentionally NOT in this PR: - No mention of `create_redisvl_mcp_toolset(...)`. That helper was in the adk-redis main branch briefly but was removed before 0.0.5 shipped, per the catalog-page review feedback that pushed us toward using ADK's native `McpToolset` directly. The repo no longer ships it; the docs should not reference it. - No mention of the `[mcp-search]` extra. Same reason. Verified all five files pass a grep for stale references (`create_redisvl_mcp_toolset`, `mcp-search`, `gemini-2.0-flash`, `langcache-embed-v1`, "four search tools", "seven examples").
1 parent 649d60c commit 61be38b

5 files changed

Lines changed: 116 additions & 12 deletions

File tree

content/integrate/google-adk/_index.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,17 @@ docker run -d --name redis -p 6379:6379 redis:8.4-alpine
4242
docker run -d --name agent-memory-server -p 8088:8088 \
4343
-e REDIS_URL=redis://host.docker.internal:6379 \
4444
-e GEMINI_API_KEY=your-key \
45-
-e GENERATION_MODEL=gemini/gemini-2.0-flash \
45+
-e GENERATION_MODEL=gemini/gemini-2.5-flash \
4646
-e EMBEDDING_MODEL=gemini/text-embedding-004 \
4747
redislabs/agent-memory-server:latest \
4848
agent-memory api --host 0.0.0.0 --port 8088 --task-backend=asyncio
4949
```
5050

51+
On Linux, `host.docker.internal` does not resolve by default. Use
52+
`--network=host` plus `REDIS_URL=redis://127.0.0.1:6379`, or point
53+
`REDIS_URL` at the Docker bridge gateway (typically
54+
`redis://172.17.0.1:6379`).
55+
5156
## Installation
5257

5358
```bash
@@ -57,11 +62,17 @@ pip install adk-redis[memory]
5762
# Search tools via RedisVL
5863
pip install adk-redis[search]
5964

65+
# SQL-style search tool (sql-redis)
66+
pip install adk-redis[sql]
67+
6068
# Managed semantic caching via LangCache
6169
pip install adk-redis[langcache]
6270

6371
# Everything
6472
pip install adk-redis[all]
73+
74+
# For the RedisVL MCP server (used with ADK's native McpToolset)
75+
pip install 'redisvl[mcp]>=0.18.2'
6576
```
6677

6778
## Quick start
@@ -118,9 +129,9 @@ runner = Runner(
118129
|------------|-------------|------|
119130
| **Redis Agent Memory** | Working and long-term memory via framework services, REST tools, or MCP | [Redis Agent Memory]({{< relref "/integrate/google-adk/redis-agent-memory" >}}) |
120131
| **Integration patterns** | Framework-managed, LLM-controlled REST, and MCP tools | [Integration patterns]({{< relref "/integrate/google-adk/integration-patterns" >}}) |
121-
| **Search tools** | Vector, hybrid, text, and range search via RedisVL | [Search tools]({{< relref "/integrate/google-adk/search-tools" >}}) |
132+
| **Search tools** | Vector, hybrid, text, range, and SQL search via RedisVL, plus the `rvl mcp` server over `McpToolset` | [Search tools]({{< relref "/integrate/google-adk/search-tools" >}}) |
122133
| **Semantic caching** | LLM response and tool result caching | [Semantic caching]({{< relref "/integrate/google-adk/semantic-caching" >}}) |
123-
| **Examples** | Seven complete examples covering all capabilities | [Examples]({{< relref "/integrate/google-adk/examples" >}}) |
134+
| **Examples** | Nine complete examples covering all capabilities | [Examples]({{< relref "/integrate/google-adk/examples" >}}) |
124135

125136
## More info
126137

content/integrate/google-adk/examples.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ categories:
1111
description: Complete examples for every adk-redis capability.
1212
group: ai
1313
stack: true
14-
summary: Seven runnable examples covering Redis Agent Memory, search tools, semantic
14+
summary: Nine runnable examples covering Redis Agent Memory, search tools, semantic
1515
caching, and MCP integration.
1616
type: integration
1717
weight: 5
1818
---
1919

20-
The [adk-redis repository](https://github.com/redis-developer/adk-redis/tree/main/examples) includes seven complete examples. Each focuses on a specific capability.
20+
The [adk-redis repository](https://github.com/redis-developer/adk-redis/tree/main/examples) includes nine complete examples. Each focuses on a specific capability.
2121

2222
## Prerequisites
2323

@@ -64,10 +64,26 @@ Demonstrates MCP-based memory integration. The agent connects to the Agent Memor
6464

6565
**Capability:** Vector, hybrid, text, and range search
6666

67-
All four RedisVL [search tools]({{< relref "/integrate/google-adk/search-tools" >}}) plugged into a single agent with a product catalog dataset.
67+
Four in-process RedisVL [search tools]({{< relref "/integrate/google-adk/search-tools" >}}) plugged into a single agent with a product catalog dataset.
6868

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

71+
## `redis_sql_search`
72+
73+
**Capability:** SQL `SELECT` search
74+
75+
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]'`.
76+
77+
[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/redis_sql_search)
78+
79+
## `redisvl_mcp_search`
80+
81+
**Capability:** RedisVL MCP server via ADK's `McpToolset`
82+
83+
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.
84+
85+
[View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/redisvl_mcp_search)
86+
7187
## `semantic_cache`
7288

7389
**Capability:** Local semantic caching (RedisVL)

content/integrate/google-adk/redis-agent-memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ session_service = RedisWorkingMemorySessionService(
4545
config=RedisWorkingMemorySessionServiceConfig(
4646
api_base_url="http://localhost:8088",
4747
default_namespace="my_app",
48-
model_name="gemini-2.0-flash",
48+
model_name="gemini-2.5-flash",
4949
context_window_max=8000,
5050
)
5151
)

content/integrate/google-adk/search-tools.md

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ categories:
88
- oss
99
- rs
1010
- rc
11-
description: Vector, hybrid, text, and range search tools for Google ADK agents.
11+
description: Vector, hybrid, text, range, and SQL search tools for Google ADK agents, plus the RedisVL MCP server.
1212
group: ai
1313
stack: true
1414
summary: Add retrieval-augmented generation (RAG) to ADK agents using RedisVL-powered
@@ -17,7 +17,7 @@ type: integration
1717
weight: 3
1818
---
1919

20-
adk-redis provides four search tools that wrap [RedisVL]({{< relref "/develop/ai/redisvl" >}}) query types into ADK-compatible tools. The LLM sees each tool as a callable function with a `query` parameter and gets back structured results.
20+
adk-redis provides five in-process search tools that wrap [RedisVL]({{< relref "/develop/ai/redisvl" >}}) query types into ADK-compatible tools. The LLM sees each tool as a callable function and gets back structured results. For multi-agent or polyglot deployments, the same RedisVL index can also be served over MCP via the `rvl mcp` server and consumed with ADK's native `McpToolset` (see the [RedisVL MCP server](#redisvl-mcp-server) section below).
2121

2222
## Overview
2323

@@ -27,6 +27,7 @@ adk-redis provides four search tools that wrap [RedisVL]({{< relref "/develop/ai
2727
| `RedisHybridSearchTool` | Vector + BM25 | Queries with specific terms + concepts |
2828
| `RedisTextSearchTool` | BM25 keyword | Exact terms, error messages, IDs |
2929
| `RedisRangeSearchTool` | Distance threshold | Exhaustive retrieval within a radius |
30+
| `RedisSQLSearchTool` | SQL `SELECT` | Structured filters (`WHERE`, `BETWEEN`, parameterized) |
3031

3132
## Vector search
3233

@@ -106,6 +107,80 @@ range_tool = RedisRangeSearchTool(
106107
)
107108
```
108109

110+
## SQL search
111+
112+
`RedisSQLSearchTool` wraps `redisvl.query.SQLQuery`. The LLM emits a SQL `SELECT` statement (with optional `:name` parameter placeholders) and the tool translates it into the right `FT.SEARCH` or `FT.AGGREGATE` call. Best for structured filters: tag equality, numeric ranges, multi-predicate `WHERE` clauses. Requires `pip install 'adk-redis[sql]'`.
113+
114+
```python
115+
from adk_redis import RedisSQLSearchTool
116+
117+
sql_tool = RedisSQLSearchTool(
118+
index=index,
119+
name="catalog_sql_search",
120+
description=(
121+
"Run a SQL SELECT against the product catalog. "
122+
"Use :name placeholders for values."
123+
),
124+
)
125+
```
126+
127+
The LLM might emit a call like:
128+
129+
```sql
130+
SELECT title, brand, price
131+
FROM products
132+
WHERE category = 'electronics' AND price < :max_price
133+
```
134+
135+
with `params={"max_price": 100}`. See the [redis_sql_search example](https://github.com/redis-developer/adk-redis/tree/main/examples/redis_sql_search) for a runnable demo.
136+
137+
## RedisVL MCP server
138+
139+
The five tools above run in-process against a Python `SearchIndex`. To serve one Redis index to multiple agents (Python, JS, Claude Desktop), or to put server-side guardrails like `--read-only` and bearer auth between the agent and the index, run RedisVL's MCP server (`rvl mcp`) and connect ADK's native `McpToolset` to it.
140+
141+
```python
142+
from google.adk import Agent
143+
from google.adk.tools.mcp_tool import McpToolset
144+
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
145+
from mcp import StdioServerParameters
146+
147+
agent = Agent(
148+
model="gemini-2.5-flash",
149+
name="redis_mcp_agent",
150+
instruction="Use the search-records tool to answer questions.",
151+
tools=[
152+
McpToolset(
153+
connection_params=StdioConnectionParams(
154+
server_params=StdioServerParameters(
155+
command="rvl",
156+
args=[
157+
"mcp",
158+
"--config",
159+
"/path/to/mcp_config.yaml",
160+
"--read-only",
161+
],
162+
),
163+
timeout=30,
164+
),
165+
tool_filter=["search-records"],
166+
),
167+
],
168+
)
169+
```
170+
171+
The server is configured per index via a YAML file and exposes two tools: `search-records` (vector / fulltext / hybrid, chosen at server start, with schema-aware filter and return-field hints) and `upsert-records` (suppress with `--read-only`). Supports `stdio`, `sse`, and `streamable-http` transports; bearer auth on HTTP.
172+
173+
Install the CLI with `pip install 'redisvl[mcp]>=0.18.2'`. For a runnable demo, see the [redisvl_mcp_search example](https://github.com/redis-developer/adk-redis/tree/main/examples/redisvl_mcp_search).
174+
175+
### When to choose in-process vs MCP
176+
177+
| Path | Use when |
178+
|------|----------|
179+
| In-process tools (above) | Single Python agent, fast onboarding, complex Python-side `FilterExpression` composition. |
180+
| MCP server | Multi-agent or polyglot deployments, server-side ops gates, schema-aware tool descriptions. |
181+
182+
Range and SQL search have no MCP equivalent today; use the in-process tools for either.
183+
109184
## Multi-tool agent
110185

111186
Wire multiple search tools into a single agent and let the LLM choose the right one:
@@ -129,5 +204,7 @@ The `name` and `description` on each tool matter: the LLM reads them to decide w
129204

130205
## More info
131206

132-
- [redis_search_tools example](https://github.com/redis-developer/adk-redis/tree/main/examples/redis_search_tools): All four search tools with a product catalog
207+
- [redis_search_tools example](https://github.com/redis-developer/adk-redis/tree/main/examples/redis_search_tools): vector, text, and range tools with a product catalog
208+
- [redis_sql_search example](https://github.com/redis-developer/adk-redis/tree/main/examples/redis_sql_search): SQL `SELECT` against a bound index
209+
- [redisvl_mcp_search example](https://github.com/redis-developer/adk-redis/tree/main/examples/redisvl_mcp_search): same corpus served via `rvl mcp` + ADK `McpToolset`
133210
- [RedisVL documentation]({{< relref "/develop/ai/redisvl" >}})

content/integrate/google-adk/semantic-caching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ provider = RedisVLCacheProvider(
4545
ttl=3600,
4646
distance_threshold=0.1,
4747
),
48-
vectorizer=HFTextVectorizer(model="redis/langcache-embed-v1"),
48+
vectorizer=HFTextVectorizer(model="redis/langcache-embed-v2"),
4949
)
5050
```
5151

@@ -89,7 +89,7 @@ before_cb, after_cb = create_llm_cache_callbacks(llm_cache)
8989

9090
agent = Agent(
9191
name="cached_agent",
92-
model="gemini-2.0-flash",
92+
model="gemini-2.5-flash",
9393
instruction="You are a helpful assistant.",
9494
before_model_callback=before_cb,
9595
after_model_callback=after_cb,

0 commit comments

Comments
 (0)