Skip to content
Open
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
58 changes: 29 additions & 29 deletions agentarts-memory-plugins/agentarts-memory-hermes/README.en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# agentarts-memory-hermes

A Hermes Memory Provider plugin that uses Huawei Cloud AgentArts Memory as the long-term memory backend for Hermes Agent.
A Hermes Memory Provider plugin that uses Huawei Cloud AgentArts Memory as the cloud memory backend for Hermes Agent.

## Overview

Expand All @@ -19,37 +19,21 @@ A Hermes Memory Provider plugin that uses Huawei Cloud AgentArts Memory as the l

| Parameter | Description |
|---------------------------------|------------------------------------|
| `AGENTARTS_MEMORY_SPACE_ID` | AgentArts memory space ID |
| `HUAWEICLOUD_SDK_MEMORY_API_KEY`| AgentArts memory space API Key |
| `HUAWEICLOUD_SDK_REGION` | Region (default `cn-southwest-2`) |
| `AGENTARTS_MEMORY_SPACE_ID` | AgentArts memory space ID |
| `HUAWEICLOUD_SDK_MEMORY_API_KEY`| AgentArts memory space API Key |
| `HUAWEICLOUD_SDK_REGION` | Region (default `cn-southwest-2`) |

## Installation

There are two installation methods — choose either one.

### Option 1: Install as a memory provider

Copy the plugin directory to Hermes' memory provider plugin path:
Copy the plugin directory `agentarts-memory-hermes` to Hermes' memory provider plugin path and rename it to `agentarts`:

```bash
cp -r agentarts-memory-hermes ~/.hermes/hermes-agent/plugins/memory/
cp -r agentarts-memory-hermes ~/.hermes/hermes-agent/plugins/memory/agentarts
```

Configure interactively via `hermes memory setup`, or manually set the environment variables above. Follow the prompts to select `agentarts_memory` and complete configuration.

### Option 2: Install as a general plugin

Copy the plugin directory to Hermes' general plugin path and register via the `hermes plugins` command:

```bash
cp -r agentarts-memory-hermes ~/.hermes/plugins/
```

Configure interactively via `hermes plugins`, or manually set the environment variables above. Follow the prompts to select `agentarts_memory` and complete configuration.

## Configuration

During configuration, you will be prompted to enter the API Key, Space ID, etc. Sensitive fields (API Key) are written to `.env`, while non-sensitive config (`space_id`, `region`) is written to `$HERMES_HOME/agentarts.json`.
Configure interactively via the `hermes memory setup` command. Follow the prompts to select `agentarts`, then enter the correct parameters to complete configuration.

## Tools

Expand All @@ -74,11 +58,11 @@ Get a list of AgentArts memory summaries.

After the plugin is registered, the following CLI subcommands are available (only when the provider is active):

| Command | Description |
|---|---|
| `hermes agentarts_memory status` | Show provider status and environment variable configuration |
| `hermes agentarts_memory config` | Show saved non-sensitive configuration |
| `hermes agentarts_memory test` | Test provider connectivity |
| Command | Description |
|------------------------|--------------------------|
| `hermes memory status` | Show provider status |
| `hermes memory setup` | Configure the provider |
| `hermes memory off` | Disable the provider |

## Architecture

Expand Down Expand Up @@ -116,5 +100,21 @@ Check:

```bash
pip install -e ".[dev]"
pytest tests/unit/ -v
pytest tests/agentarts-memory-hermes/ -v
```

## About AgentArts Memory

Huawei Cloud AgentArts Memory is a cloud-based memory solution for AI agents, providing full-lifecycle management of agent memory data.

### Advantages of AgentArts Memory

1. **Out of the box**: Supports both short-term memory (7–365 days) and long-term memory (persistent storage), meeting different time-span memory requirements.

2. **Multiple memory strategies**: Supports strategies such as semantic memory, user preferences, session summaries, and episodic memory to meet various scenario needs.

3. **Multi-dimensional isolation**: Supports memory isolation by space, session, and user dimension, ensuring data security and independence.

4. **Fully managed, zero maintenance**: Fully managed on the cloud — no need to manage databases or memory processing engines, enabling fast business launch and reducing operational costs and complexity.

> Official documentation: [Memory Space Overview](https://support.huaweicloud.com/highcode-agentarts/agentarts_10_015.html)
51 changes: 27 additions & 24 deletions agentarts-memory-plugins/agentarts-memory-hermes/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# agentarts-memory-hermes

Hermes Memory Provider 插件,将华为云 AgentArts Memory 作为 Hermes Agent 的长期记忆后端
Hermes Memory Provider 插件,将华为云 AgentArts Memory 作为 Hermes Agent 的云端记忆

## 功能概述

Expand All @@ -26,30 +26,16 @@ Hermes Memory Provider 插件,将华为云 AgentArts Memory 作为 Hermes Agen

## 安装

有两种安装方式,任选其一。

### 方式一:作为 memory provider 安装

将插件目录复制到 Hermes 的 memory provider 插件路径:

```bash
cp -r agentarts-memory-hermes ~/.hermes/hermes-agent/plugins/memory/
```
通过 `hermes memory setup` 交互式配置,或手动设置上述环境变量。 按提示选择 `agentarts_memory` 并完成配置。

### 方式二:作为通用插件安装

将插件目录复制到 Hermes 的通用插件路径,通过 `hermes plugins` 命令注册:
将插件目录agentarts-memory-hermes复制到 Hermes 的 memory provider 插件路径并重命名为agentarts:

```bash
cp -r agentarts-memory-hermes ~/.hermes/plugins/
cp -r agentarts-memory-hermes ~/.hermes/hermes-agent/plugins/memory/agentarts
```

通过 `hermes plugins` 交互式配置,或手动设置上述环境变量。 按提示选择 `agentarts_memory` 并完成配置。

## 配置

配置过程中会提示输入 API Key、Space ID 等。敏感字段(API Key)写入 `.env`,非敏感配置(`space_id`、`region`)写入 `$HERMES_HOME/agentarts.json`
通过命令 `hermes memory setup` 进行交互式配置,按提示选择 `agentarts` 后,输入正确的参数完成配置

## 工具说明

Expand All @@ -74,11 +60,12 @@ cp -r agentarts-memory-hermes ~/.hermes/plugins/

插件注册后提供以下 CLI 子命令(仅在 provider 活跃时可用):

| 命令 | 说明 |
|---|---|
| `hermes agentarts_memory status` | 显示 provider 状态和环境变量配置 |
| `hermes agentarts_memory config` | 显示已保存的非敏感配置 |
| `hermes agentarts_memory test` | 测试 provider 连通性 |
| 命令 | 说明 |
|-------------------------|------------------|
| `hermes memory status` | 查看 provider 状态 |
| `hermes memory setup` | 配置 provider |
| `hermes memory off` | 禁用 provider |


## 架构说明

Expand Down Expand Up @@ -116,5 +103,21 @@ AgentArts Memory 从对话消息生成记忆需要时间(约 30 秒)。`sync

```bash
pip install -e ".[dev]"
pytest tests/unit/ -v
pytest tests/agentarts-memory-hermes/ -v
```

## 关于AgentArts Memory

华为云 AgentArts Memory 是智能体云端记忆解决方案,对智能体记忆数据提供全生命周期管理。

### AgentArts Memory优势

1、开箱即用:短期记忆 + 长期记忆:支持短期记忆(7~365天)和长期记忆(持久化存储),满足不同时间跨度的记忆需求。

2、多种记忆策略:支持语义记忆、用户偏好、会话摘要、情景记忆等策略,满足不同场景的记忆需求。

3、多维度隔离:按策略类型隔离:支持按空间、会话、用户维度进行记忆隔离,确保数据的安全性和独立性。

4、全托管免运维:云上全托管:无需管理数据库等基础设施和记忆处理引擎,实现业务快速上线,降低运维成本和复杂度。

> 官方文档:[记忆库概述](https://support.huaweicloud.com/highcode-agentarts/agentarts_10_015.html) ****
132 changes: 0 additions & 132 deletions agentarts-memory-plugins/agentarts-memory-hermes/cli.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def initialize(self, session_id: str, **kwargs: Any) -> None:
"""
self._hermes_home = kwargs.get("hermes_home", "")
self._session_id = session_id
self._actor_id = session_id
self._actor_id = kwargs.get("user_id", "hermes-user")
self._space_id = os.getenv(ENV_SPACE_ID, "")
region = os.getenv(ENV_REGION, DEFAULT_REGION)
api_key = os.getenv(ENV_API_KEY, "")
Expand Down
Loading
Loading