agentscope-ai / agentscope-ai/agentscope-runtime-java

[Feature Request] Implement RedisStateService to Align with Python Runtime

未关闭
#71 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Java
星标
184
派生
38
PR 合并指标
30 天内没有已合并 PR

描述

### Description

The current Java runtime only provides `MemoryStateService`, which stores agent conversation states in memory. This is insufficient for:

- Multi-instance deployments
- Long-running sessions that survive restarts
- Production environments requiring persistence

The **Python runtime already supports a `RedisStateService`** for durable, distributed state management.

To ensure feature parity and production readiness, we propose adding a **`RedisStateService` implementation in Java version** that:

- Uses **Redis** as backend
- Supports TTL for automatic cleanup of stale sessions

### Requirements

- Implement the existing `StateService` interface
- Minimal dependencies (avoid heavy frameworks)
- Thread-safe and performant for concurrent agent sessions

### Scope Note

This is a **straightforward port** of the Python capability — no need for advanced features (e.g., clustering, Lua scripts) unless already present in Python version.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。