Python: issue-5260 adds valkey message history#5473
Open
MatthiasHowellYopp wants to merge 1 commit intomicrosoft:mainfrom
Open
Python: issue-5260 adds valkey message history#5473MatthiasHowellYopp wants to merge 1 commit intomicrosoft:mainfrom
MatthiasHowellYopp wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Author
|
@microsoft-github-policy-service agree [company="Amazon"] |
Author
|
@microsoft-github-policy-service agree company="Amazon" |
88a6432 to
26cbf6d
Compare
Author
|
@moonbox3 - I'm getting this error: Is there something that can be done? |
dd41cae to
b8df739
Compare
b8df739 to
6189cc2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new Python Valkey integration package to avoid RedisVL/RediSearch dependencies and enable Valkey-compatible chat history + long-term memory providers.
Changes:
- Introduces
agent-framework-valkeywithValkeyChatMessageStore(list-based history) andValkeyContextProvider(FT.* search + optional vector/hybrid search). - Adds unit tests, docs, and a runnable sample demonstrating both providers.
- Registers the package in the Python workspace/config and updates repo docs/status listings.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/02-agents/context_providers/valkey_sample.py | Adds an end-to-end sample using the new Valkey providers. |
| python/pyproject.toml | Registers the new workspace package and pyright test environment; adds an additional dependency entry. |
| python/packages/valkey/tests/test_providers.py | Adds unit coverage for Valkey chat store + context provider behaviors. |
| python/packages/valkey/pyproject.toml | New package metadata, deps, extras, and tool configuration. |
| python/packages/valkey/conftest.py | Skips test collection when glide isn’t installed (e.g., Windows). |
| python/packages/valkey/agent_framework_valkey/_context_provider.py | Implements the Valkey long-term memory context provider with FT.CREATE/FT.SEARCH. |
| python/packages/valkey/agent_framework_valkey/_chat_message_store.py | Implements Valkey-backed chat history storage using list operations. |
| python/packages/valkey/agent_framework_valkey/init.py | Exposes the new provider/store as public package API. |
| python/packages/valkey/README.md | Documentation for server requirements and usage. |
| python/packages/valkey/LICENSE | Adds package license file. |
| python/packages/valkey/AGENTS.md | Registers package documentation in repo’s agent docs structure. |
| python/PACKAGE_STATUS.md | Marks agent-framework-valkey as alpha. |
| python/AGENTS.md | Adds Valkey to “Storage & Memory” index. |
| .gitignore | Ignores .kiro/. |
a2a7644 to
65363e2
Compare
65363e2 to
04d0446
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Fixes #5260
The current agent-framework-redis package depends on redisvl, which requires Redis Stack's RediSearch module. This creates an incompatibility for teams running Valkey — whether self-hosted or through managed cloud services (AWS ElastiCache, GCP Memorystore) — since RedisVL has known incompatibilities with Valkey's search module. Additionally, even the RedisChatMessageStore (which only needs basic key-value operations) pulls in RedisVL as a transitive dependency.
This PR adds a dedicated agent-framework-valkey package that uses valkey-glide (the official Valkey Python client) directly, with no RedisVL dependency.
Description
New package: agent-framework-valkey (python/packages/valkey/)
Two components:
ValkeyChatMessageStore — Persistent chat message storage implementing the HistoryProvider protocol. Uses only basic Valkey key-value/list operations via valkey-glide, so it works with any Valkey (or Redis OSS) server with no search module required.
ValkeyContextProvider — Long-term memory context provider implementing the ContextProvider protocol. Uses Valkey's native FT.CREATE / FT.SEARCH commands via valkey-glide's custom_command API for full-text and optional hybrid vector search. Requires valkey-search >= 1.2 (ships with valkey-bundle >= 9.1.0).
The package follows the same structure and patterns as agent-framework-redis and agent-framework-mem0. Key design decisions:
Uses valkey-glide (official Valkey client, Apache-2.0 licensed) instead of RedisVL
Vector search uses Valkey's native FT commands directly rather than an abstraction layer, keeping the dependency tree minimal
embed_fn is typed as Callable[[str], Awaitable[list[float]]] — a proper async callable type rather than a framework-specific vectorizer class, making it easy to plug in any embedding provider
numpy is an optional dependency under the [vector] extra, so users who only need ValkeyChatMessageStore don't pull it in
Includes a sample (
valkey_sample.py
) demonstrating both components with Bedrock
Changes:
python/packages/valkey/ — new package with implementation, tests, README, LICENSE
pyproject.toml
— added workspace source and pyright test environment for valkey
PACKAGE_STATUS.md
— registered as alpha
AGENTS.md
— added valkey to Storage & Memory section
uv.lock
— updated with valkey-glide resolution
All checks pass: ruff formatting/linting, pyright, mypy, and 51 unit tests at 84% coverage.
Contribution Checklist