Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.0.6] - 2026-05-20

### Breaking

- Removed `create_memory_mcp_toolset()` and all MCP wrapper constants
(`ALL_MCP_TOOLS`, `MCP_TOOL_*`) from the package. Use ADK's native
`McpToolset` with `SseConnectionParams` pointed at the Agent Memory
Server `/sse` endpoint instead. This aligns AMS MCP wiring with the
standard pattern used by all other ADK catalog integrations.

### Changed

- Updated `fitness_coach_mcp` example to use native `McpToolset` +
`SseConnectionParams` directly.

## [0.0.5] - 2026-05-19

### Breaking
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
| **Sessions** (`RedisWorkingMemorySessionService`) | `BaseSessionService` with auto-summarization and context-window management | Agent Memory Server (REST) |
| **Long-term memory** (`RedisLongTermMemoryService`) | `BaseMemoryService` with semantic search and recency boosting | Agent Memory Server (REST) |
| **Memory tools** (`SearchMemoryTool`, `CreateMemoryTool`, ...) | LLM-controlled memory operations | Agent Memory Server (REST) |
| **AMS MCP toolset** (`create_memory_mcp_toolset`) | Exposes `search_long_term_memory`, `create_long_term_memories`, `edit_long_term_memory`, `delete_long_term_memories`, `get_long_term_memory`, `memory_prompt`, and `set_working_memory` over SSE | Agent Memory Server (MCP) |
| **RedisVL MCP** (native `McpToolset` against `rvl mcp`) | <ul><li>Tools exposed: `search-records`, `upsert-records` (gate writes with `--read-only`).</li><li>Search modes (one per server, chosen via YAML): `vector` KNN, `fulltext` BM25, or `hybrid` (LINEAR or RRF fusion).</li><li>Server-side query embedding via a configured RedisVL vectorizer; agents never load one locally.</li><li>Schema-aware tool descriptions: filter and return-field hints derived from the bound `IndexSchema`.</li><li>JSON filter language with tag, text, and numeric operators (`eq`, `in`, `between`, `gt`, `lt`, `ne`).</li><li>Transports: stdio, sse, streamable-http. Bearer auth on HTTP. Pagination via `limit` / `offset`.</li></ul> | `rvl mcp` server (`redisvl[mcp]`) |
| **Search tools with REST** (5 in-process tools) | Vector, hybrid, range, text, SQL search as `BaseTool` subclasses | RedisVL (Python) |
| **Semantic cache** (`RedisVLCacheProvider`, `LangCacheProvider`) | Skip repeat LLM calls and tool calls by semantic similarity | RedisVL `SemanticCache` or [Redis LangCache](https://redis.io/langcache) |
Expand Down Expand Up @@ -287,15 +286,14 @@ For the full decision matrix and runnable demo, see [docs/user_guide/how_to_guid

## Memory backends

Three ways to ingest, store, and retrieve memory with Agent Memory Server, all interoperable:
Two ways to ingest, store, and retrieve memory with Agent Memory Server, both interoperable:

| Approach | What it is | Reach for it when |
|---|---|---|
| **ADK Services** (`RedisLongTermMemoryService`, `RedisWorkingMemorySessionService`) | The `BaseMemoryService` and `BaseSessionService` implementations. ADK calls AMS for you. | You want framework-managed sessions and automatic memory extraction. Most production cases. |
| **REST tools** (`MemoryPromptTool`, `SearchMemoryTool`, `CreateMemoryTool`, `UpdateMemoryTool`, `DeleteMemoryTool`, `GetMemoryTool`) | `BaseTool` subclasses that call AMS REST directly. The LLM decides when to invoke them. | You want the agent to control when memory is read or written. |
| **MCP toolset** (`create_memory_mcp_toolset`) | Same memory operations surfaced over MCP/SSE. Standard MCP tool discovery. | You want one AMS instance shared across many agents, or you prefer MCP wiring over Python tool wrappers. |

The protocol is REST in both of the first two; MCP for the third. All three operate on the same underlying memory.
Both approaches use REST and operate on the same underlying memory. If you need MCP access to Agent Memory Server, use ADK's native `McpToolset` with `SseConnectionParams` pointed at the AMS `/sse` endpoint.

---

Expand Down Expand Up @@ -333,7 +331,7 @@ All examples run via `adk web` and ship with a README and `.env.example`.
| [`simple_redis_memory`](examples/simple_redis_memory/) | Two-tier memory + auto-summarization |
| [`travel_agent_memory_hybrid`](examples/travel_agent_memory_hybrid/) | Framework-managed memory: `RedisWorkingMemorySessionService` + `RedisLongTermMemoryService` in a custom FastAPI runner |
| [`travel_agent_memory_tools`](examples/travel_agent_memory_tools/) | LLM-controlled memory: REST `SearchMemoryTool` / `CreateMemoryTool` / etc. in a default ADK runner |
| [`fitness_coach_mcp`](examples/fitness_coach_mcp/) | AMS memory exposed over MCP via `create_memory_mcp_toolset` |
| [`fitness_coach_mcp`](examples/fitness_coach_mcp/) | AMS memory exposed over MCP via ADK's native `McpToolset` |
| [`redis_search_tools`](examples/redis_search_tools/) | In-process RAG with vector + text + range search tools |
| [`redis_sql_search`](examples/redis_sql_search/) | `RedisSQLSearchTool` answering catalog questions via parameterized SQL |
| [`redisvl_mcp_search`](examples/redisvl_mcp_search/) | Same knowledge base as `redis_search_tools/`, served via `rvl mcp` over MCP |
Expand Down
3 changes: 2 additions & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ links:
to run [Redis Agent Memory Server](https://github.com/redis/agent-memory-server).
- The user wants to expose a Redis index to ADK via MCP. For the index
itself, point ADK's native `McpToolset` at a `rvl mcp` server. For
Agent Memory Server's MCP endpoint, use `create_memory_mcp_toolset`.
Agent Memory Server's MCP endpoint, use ADK's native `McpToolset`
with `SseConnectionParams` pointed at the AMS `/sse` endpoint.
- The user wants semantic caching for an ADK agent (self-hosted via
RedisVL or managed via Redis LangCache).

Expand Down
19 changes: 9 additions & 10 deletions docs/for-ais-only/FAILURE_MODES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@ The `redisvl.extensions.llmcache` path still works but emits a
to the old path; the regression test in
`tests/cache/test_provider.py` asserts no `DeprecationWarning` fires.

## One MCP helper, not two

`create_memory_mcp_toolset(...)` exists for Agent Memory Server because
AMS's MCP URL has a non-trivial `/sse` suffix and the tool-name vocabulary
is bespoke. There is **no** matching helper for the RedisVL MCP server
(`rvl mcp`): users wire it with ADK's native `McpToolset` plus
`StdioConnectionParams` / `SseConnectionParams` /
`StreamableHTTPConnectionParams`. The maintainers chose this on purpose
to keep the MCP wiring story aligned with every other ADK catalog
integration. Do not reintroduce a `create_redisvl_mcp_toolset` wrapper.
## No MCP wrapper helpers

There are no custom MCP wrapper helpers in this package. For both the
RedisVL MCP server (`rvl mcp`) and Agent Memory Server's MCP endpoint,
users wire ADK's native `McpToolset` with `StdioConnectionParams` /
`SseConnectionParams` / `StreamableHTTPConnectionParams` directly. This
keeps the MCP wiring story aligned with every other ADK catalog
integration. Do not introduce `create_redisvl_mcp_toolset` or
`create_memory_mcp_toolset` wrappers.

## Two cache providers exist on purpose

Expand Down
6 changes: 2 additions & 4 deletions docs/for-ais-only/REPOSITORY_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ src/adk_redis/
service (MemoryPromptTool, SearchMemoryTool,
CreateMemoryTool, DeleteMemoryTool,
UpdateMemoryTool).
mcp_memory.py MCP tool surface for the same memory operations
(Agent Memory Server).

cache/
__init__.py Re-exports the cache providers.
_provider.py Provider protocol and base class.
Expand Down Expand Up @@ -81,8 +80,7 @@ tests/
| Working-memory session storage | `sessions/working_memory.py` |
| Long-term memory + Memory Server proxy | `memory/long_term_memory.py`, `memory/_utils.py` |
| ADK Memory tools (FunctionTool wrappers) | `tools/memory/` |
| MCP memory tool surface (Agent Memory Server) | `tools/mcp_memory.py` |
| MCP search (RedisVL `rvl mcp` server) | Use ADK's native `McpToolset` directly; no adk-redis wrapper. |
| MCP (RedisVL or AMS) | Use ADK's native `McpToolset` directly; no adk-redis wrapper. |
| Vector / Hybrid / Range / Text / SQL search tools | `tools/search/` |
| LLM and tool semantic caching | `cache/llm_cache.py`, `cache/tool_cache.py` |
| Cache provider abstraction (RedisVL / LangCache) | `cache/_provider.py` |
Expand Down
19 changes: 11 additions & 8 deletions docs/user_guide/01_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,15 @@ agent = Agent(

### 3. MCP-Based Tools (Protocol-Based)

Best for: MCP ecosystem integration and standardized tool discovery.
Best for: MCP ecosystem integration and standardized tool discovery. Use ADK's native `McpToolset` with `SseConnectionParams` to connect to Agent Memory Server's SSE endpoint.

```python
from adk_redis import create_memory_mcp_toolset
from google.adk import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams

memory_tools = create_memory_mcp_toolset(
server_url="http://localhost:8000",
memory_tools = McpToolset(
connection_params=SseConnectionParams(url="http://localhost:8000/sse"),
tool_filter=["search_long_term_memory", "create_long_term_memories"],
)

Expand All @@ -317,7 +319,7 @@ See the [fitness_coach_mcp example](../examples/fitness_coach_mcp/) for a comple
|----------|---------------------|
| Full ADK integration | Memory Services |
| LLM decides when to remember | REST Tools |
| MCP ecosystem | MCP Tools |
| MCP ecosystem | MCP Tools (native `McpToolset`) |
| Debugging/development | REST Tools |
| Multi-agent systems | MCP Tools |

Expand Down Expand Up @@ -360,11 +362,12 @@ MCP provides a standardized protocol for connecting agents to tools via Server-S

```python
from google.adk import Agent
from adk_redis import create_memory_mcp_toolset
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams

# Connect to Agent Memory Server's MCP endpoint
memory_tools = create_memory_mcp_toolset(
server_url="http://localhost:9000", # MCP server port
memory_tools = McpToolset(
connection_params=SseConnectionParams(url="http://localhost:9000/sse"),
tool_filter=["search_long_term_memory", "create_long_term_memories"],
)

Expand Down
10 changes: 6 additions & 4 deletions examples/fitness_coach_mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ Open **http://localhost:8000** in your browser.

## How MCP Memory Works

This example uses `create_memory_mcp_toolset()` to connect to the Agent Memory Server's MCP endpoint:
This example uses ADK's native `McpToolset` to connect to the Agent Memory Server's MCP endpoint:

```python
from adk_redis.tools.mcp_memory import create_memory_mcp_toolset
from google.adk import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams

memory_tools = create_memory_mcp_toolset(
server_url="http://localhost:8088",
memory_tools = McpToolset(
connection_params=SseConnectionParams(url="http://localhost:8088/sse"),
tool_filter=[
"search_long_term_memory",
"create_long_term_memories",
Expand Down
11 changes: 6 additions & 5 deletions examples/fitness_coach_mcp/fitness_coach/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""Personal Fitness Coach Agent with MCP Memory Tools.

This agent demonstrates MCP-based memory integration:
- Uses create_memory_mcp_toolset() for memory operations
- Uses ADK's native McpToolset to connect to Agent Memory Server
- Stores semantic memories (profile, injuries, equipment, goals)
- Stores episodic memories (workouts with event_date, milestones)
- Searches memory before making recommendations
Expand All @@ -24,17 +24,18 @@
import os

from google.adk import Agent

from adk_redis.tools.mcp_memory import create_memory_mcp_toolset
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams

# Configuration from environment
# MCP server runs on port 9000 (separate from REST API on 8088)
MEMORY_MCP_URL = os.getenv("MEMORY_MCP_URL", "http://localhost:9000")

# Create MCP toolset for Agent Memory Server
# Connects to the MCP server's SSE endpoint
memory_tools = create_memory_mcp_toolset(
server_url=MEMORY_MCP_URL,
sse_url = MEMORY_MCP_URL.rstrip("/")
memory_tools = McpToolset(
connection_params=SseConnectionParams(url=f"{sse_url}/sse"),
tool_filter=[
Comment thread
nkanu17 marked this conversation as resolved.
"search_long_term_memory",
"create_long_term_memories",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "adk-redis"
version = "0.0.5"
version = "0.0.6"
Comment thread
nkanu17 marked this conversation as resolved.
description = "Redis integrations for Google's Agent Development Kit (ADK)"
readme = "README.md"
license = "Apache-2.0"
Expand Down
Loading
Loading