Skip to content

Commit 01d242e

Browse files
authored
refactor(sessions): rename to RedisSessionMemoryService (0.0.8) (#21)
* refactor(sessions): rename to RedisSessionMemoryService; bump to 0.0.8 Rename the session service to match the managed Redis Agent Memory "session memory" terminology and ADK's <Backend>SessionService convention: - RedisWorkingMemorySessionService -> RedisSessionMemoryService - RedisWorkingMemorySessionServiceConfig -> RedisSessionMemoryServiceConfig - module sessions/working_memory.py -> sessions/session_memory.py The old names remain as deprecated aliases that emit a DeprecationWarning and will be removed in 0.1.0. RedisLongTermMemoryService is unchanged. Docs, examples, and tests move to the new names. Bump version to 0.0.8 and add CHANGELOG entries. * fix(sessions): keep legacy working_memory module path importable Address PR review feedback: - Add a compatibility shim at adk_redis/sessions/working_memory.py that re-exports the session classes and emits a DeprecationWarning on import, so `from adk_redis.sessions.working_memory import ...` keeps working until 0.1.0. - Cover the legacy module path in tests/test_imports.py. - Move the `warnings` import (and importlib/sys helpers) to module scope in the test, per the no-inline-imports project standard. - Note the module-path shim in the CHANGELOG Deprecated section.
1 parent 9adc02d commit 01d242e

34 files changed

Lines changed: 1093 additions & 942 deletions

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
## [0.0.8] - 2026-06-24
11+
12+
### Changed
13+
14+
- Renamed `RedisWorkingMemorySessionService` to `RedisSessionMemoryService`
15+
and `RedisWorkingMemorySessionServiceConfig` to
16+
`RedisSessionMemoryServiceConfig`, aligning with the managed Redis Agent
17+
Memory "session memory" terminology and ADK's `<Backend>SessionService`
18+
convention. The module `adk_redis.sessions.working_memory` moved to
19+
`adk_redis.sessions.session_memory`. Docs and examples now use the new
20+
names.
21+
22+
### Deprecated
23+
24+
- `RedisWorkingMemorySessionService` and
25+
`RedisWorkingMemorySessionServiceConfig` remain as deprecated aliases that
26+
emit a `DeprecationWarning` and will be removed in 0.1.0. Switch to
27+
`RedisSessionMemoryService` / `RedisSessionMemoryServiceConfig`.
28+
- The old module path `adk_redis.sessions.working_memory` remains as a
29+
compatibility shim that re-exports the classes and emits a
30+
`DeprecationWarning` on import. It will be removed in 0.1.0. Import from
31+
`adk_redis.sessions.session_memory` or the top-level `adk_redis` package.
32+
1033
## [0.0.7] - 2026-06-18
1134

1235
### Added

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ from google.adk.runners import Runner
7272
from adk_redis import (
7373
RedisLongTermMemoryService,
7474
RedisLongTermMemoryServiceConfig,
75-
RedisWorkingMemorySessionService,
76-
RedisWorkingMemorySessionServiceConfig,
75+
RedisSessionMemoryService,
76+
RedisSessionMemoryServiceConfig,
7777
)
7878

79-
session_service = RedisWorkingMemorySessionService(
80-
config=RedisWorkingMemorySessionServiceConfig(
79+
session_service = RedisSessionMemoryService(
80+
config=RedisSessionMemoryServiceConfig(
8181
backend="redis-agent-memory",
8282
api_base_url="http://localhost:8088",
8383
api_key="...",

SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ from google.adk.runners import Runner
9494
from adk_redis import (
9595
RedisLongTermMemoryService,
9696
RedisLongTermMemoryServiceConfig,
97-
RedisWorkingMemorySessionService,
98-
RedisWorkingMemorySessionServiceConfig,
97+
RedisSessionMemoryService,
98+
RedisSessionMemoryServiceConfig,
9999
)
100100

101-
session_service = RedisWorkingMemorySessionService(
102-
config=RedisWorkingMemorySessionServiceConfig(
101+
session_service = RedisSessionMemoryService(
102+
config=RedisSessionMemoryServiceConfig(
103103
api_base_url="http://localhost:8000",
104104
),
105105
)

docs/concepts/adk_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ flowchart TD
3737

3838
| ADK Interface | `adk-redis` implementation | Concept page |
3939
|---------------|---------------------------|-------------|
40-
| `BaseSessionService` | `RedisWorkingMemorySessionService` | [Sessions + Memory Services](sessions.md) |
40+
| `BaseSessionService` | `RedisSessionMemoryService` | [Sessions + Memory Services](sessions.md) |
4141
| `BaseMemoryService` | `RedisLongTermMemoryService` | [Sessions + Memory Services](sessions.md) |
4242
| `BaseTool` | Search tools (`RedisVectorSearchTool`, `RedisHybridSearchTool`, etc.) and memory tools (`SearchMemoryTool`, `CreateMemoryTool`, etc.) | [Search Tools](search.md), [Memory MCP + Tools](memory.md) |
4343
| Model callbacks | `LLMResponseCache` with `RedisVLCacheProvider` or `LangCacheProvider` | [Semantic Caching](caching.md) |

docs/concepts/sessions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sessions + Memory with Services
22

3-
Use `RedisWorkingMemorySessionService` and `RedisLongTermMemoryService` when you want the ADK `Runner` to manage sessions and memory automatically. Plug them in and let the framework handle the rest.
3+
Use `RedisSessionMemoryService` and `RedisLongTermMemoryService` when you want the ADK `Runner` to manage sessions and memory automatically. Plug them in and let the framework handle the rest.
44

55
## Quick Reference
66

@@ -54,12 +54,12 @@ from google.adk.runners import Runner
5454
from adk_redis import (
5555
RedisLongTermMemoryService,
5656
RedisLongTermMemoryServiceConfig,
57-
RedisWorkingMemorySessionService,
58-
RedisWorkingMemorySessionServiceConfig,
57+
RedisSessionMemoryService,
58+
RedisSessionMemoryServiceConfig,
5959
)
6060

61-
session_service = RedisWorkingMemorySessionService(
62-
config=RedisWorkingMemorySessionServiceConfig(
61+
session_service = RedisSessionMemoryService(
62+
config=RedisSessionMemoryServiceConfig(
6363
backend="redis-agent-memory",
6464
api_base_url="http://localhost:8000",
6565
api_key="...",
@@ -103,7 +103,7 @@ adk web .
103103

104104
## Configuration
105105

106-
### Session Service (`RedisWorkingMemorySessionServiceConfig`)
106+
### Session Service (`RedisSessionMemoryServiceConfig`)
107107

108108
| Option | Default | Description |
109109
|--------|---------|-------------|

docs/examples/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ directory and explains what it demonstrates.
1111

1212
| Example | What it shows |
1313
|---------|---------------|
14-
| [**Simple Redis memory**](https://github.com/redis-developer/adk-redis/tree/main/examples/simple_redis_memory) | Minimal agent with `RedisWorkingMemorySessionService` and `RedisLongTermMemoryService`. |
14+
| [**Simple Redis memory**](https://github.com/redis-developer/adk-redis/tree/main/examples/simple_redis_memory) | Minimal agent with `RedisSessionMemoryService` and `RedisLongTermMemoryService`. |
1515
| [**Fitness coach (MCP)**](https://github.com/redis-developer/adk-redis/tree/main/examples/fitness_coach_mcp) | MCP-based memory with `McpToolset` and Agent Memory Server. |
1616
| [**Travel agent (hybrid)**](https://github.com/redis-developer/adk-redis/tree/main/examples/travel_agent_memory_hybrid) | Framework-managed sessions + memory with vector search over travel docs. |
1717
| [**Travel agent (tools)**](https://github.com/redis-developer/adk-redis/tree/main/examples/travel_agent_memory_tools) | Same travel agent using LLM-controlled memory tools instead of framework services. |

docs/for-ais-only/BUILD_AND_TEST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ should ship with tests in the matching subdirectory under `tests/`.
4646
## Running a single test
4747

4848
```
49-
uv run pytest tests/sessions/test_working_memory.py::<test_name> -vv
49+
uv run pytest tests/sessions/test_session_memory.py::<test_name> -vv
5050
uv run pytest tests/tools/test_vector_search.py -vv
5151
```
5252

docs/for-ais-only/FAILURE_MODES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ service method, and any prompt fragments together.
1313

1414
## Sessions and memory go through Agent Memory Server, not Redis directly
1515

16-
Both `RedisWorkingMemorySessionService` and `RedisLongTermMemoryService`
16+
Both `RedisSessionMemoryService` and `RedisLongTermMemoryService`
1717
talk to Agent Memory Server, not raw Redis. Reaching into Redis from
1818
either service bypasses dedup, summarization, embedding, and the
1919
working-to-long-term promotion pipeline. Stay on the AMS client.

docs/for-ais-only/REPOSITORY_MAP.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ src/adk_redis/
1515
session, search, tool, and cache classes).
1616
_version.py Build-time version string.
1717
sessions/
18-
__init__.py Re-exports RedisWorkingMemorySessionService.
19-
working_memory.py ADK BaseSessionService implementation backed by
20-
Redis Agent Memory Server working memory.
18+
__init__.py Re-exports RedisSessionMemoryService.
19+
session_memory.py ADK BaseSessionService implementation backed by
20+
Redis Agent Memory or Agent Memory Server.
2121
memory/
2222
__init__.py Re-exports RedisLongTermMemoryService and the
2323
memory tools (Memory Prompt / Search / Create /
@@ -50,7 +50,7 @@ tests/
5050
test_imports.py Smoke test for every public re-export.
5151
test_version.py `__version__` is set.
5252
sessions/
53-
test_working_memory.py RedisWorkingMemorySessionService end-to-end.
53+
test_session_memory.py RedisSessionMemoryService end-to-end.
5454
memory/
5555
test_long_term_memory.py RedisLongTermMemoryService end-to-end.
5656
tools/
@@ -77,7 +77,7 @@ tests/
7777

7878
| Feature | Module(s) |
7979
|---|---|
80-
| Working-memory session storage | `sessions/working_memory.py` |
80+
| Session storage (session memory) | `sessions/session_memory.py` |
8181
| Long-term memory + Memory Server proxy | `memory/long_term_memory.py`, `memory/_utils.py` |
8282
| ADK Memory tools (FunctionTool wrappers) | `tools/memory/` |
8383
| MCP (RedisVL or AMS) | Use ADK's native `McpToolset` directly; no adk-redis wrapper. |
@@ -92,9 +92,10 @@ tests/
9292
`FunctionTool` plus a thin RedisVL query. Tools are independent; copy
9393
the closest existing one. Wire it through `tools/__init__.py` and the
9494
re-export in `adk_redis/__init__.py`.
95-
- **The session service.** `sessions/working_memory.py` implements ADK's
96-
`BaseSessionService`. It calls Agent Memory Server working-memory
97-
endpoints; do not reach into Redis directly from the session layer.
95+
- **The session service.** `sessions/session_memory.py` implements ADK's
96+
`BaseSessionService`. It calls the configured memory backend (Redis Agent
97+
Memory or the self-hosted Agent Memory Server working-memory endpoints); do
98+
not reach into Redis directly from the session layer.
9899
- **The memory service.** `memory/long_term_memory.py` implements ADK's
99100
`BaseMemoryService`. The memory tools under `tools/memory/` are thin
100101
`FunctionTool` wrappers and must keep parameter names aligned with

docs/llms.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ For task-oriented recipes, browse the
2828
- [Redis setup](user_guide/how_to_guides/redis_setup.md): start Redis 8.4 locally or in Redis Cloud.
2929
- [Managed memory setup](user_guide/how_to_guides/managed_memory_setup.md): connect to the managed Redis Agent Memory backend.
3030
- [Memory server setup](user_guide/how_to_guides/memory_server_setup.md): run Agent Memory Server.
31-
- [Session service](user_guide/how_to_guides/session_service.md): wire `RedisWorkingMemorySessionService`.
31+
- [Session service](user_guide/how_to_guides/session_service.md): wire `RedisSessionMemoryService`.
3232
- [Memory service](user_guide/how_to_guides/memory_service.md): wire `RedisLongTermMemoryService`.
3333
- [Search tools](user_guide/how_to_guides/search_tools.md): use the five search tools and the RedisVL MCP toolset.
3434
- [Semantic cache](user_guide/how_to_guides/semantic_cache.md): add self-hosted or managed semantic caching.
3535

3636
## API reference
3737

38-
- [Sessions](api/python/sessions.md): `RedisWorkingMemorySessionService`, `RedisWorkingMemorySessionServiceConfig`.
38+
- [Sessions](api/python/sessions.md): `RedisSessionMemoryService`, `RedisSessionMemoryServiceConfig`.
3939
- [Memory](api/python/memory.md): `RedisLongTermMemoryService`, `RedisLongTermMemoryServiceConfig`.
4040
- [Tools](api/python/tools.md): search tools, memory tools, MCP toolset helpers.
4141
- [Cache](api/python/cache.md): cache providers, `LLMResponseCache`, `ToolCache`, callback factories.

0 commit comments

Comments
 (0)