# Human-like Memory Hermes Agent Integration

Canonical website: https://plugin.human-like.me

The Hermes integration is a native long-term memory provider for Hermes Agent. It supports automatic recall, automatic writes, and shared memory across clients when `user_id`, `agent_id`, and `scenario` are aligned.

## Runtime Requirements

- Hermes Agent is installed.
- Hermes Agent can reach `https://plugin.human-like.me`.
- A Human-like Memory API key exists in the Dashboard under `API Keys`.

## Important: Shared Memory Across Multiple AI Agents

To share the same memory pool across Hermes and other clients, align both:

- `HUMAN_LIKE_MEM_AGENT_ID`
- `HUMAN_LIKE_MEM_SCENARIO`

By default, Hermes matches the historical HumanLike OpenClaw plugin:

```text
agent_id=main
scenario=openclaw-plugin
```

If another client writes under `agent_id=default` and `scenario=claude`, configure Hermes with the same values:

```bash
HUMAN_LIKE_MEM_AGENT_ID=default
HUMAN_LIKE_MEM_SCENARIO=claude
```

If these values do not match across clients, writes may succeed but cross-agent retrieval may not line up.

## Install the Hermes Memory Provider

The Hermes integration is a memory provider, not a skill. The install script links the provider to:

```text
~/.hermes/hermes-agent/plugins/memory/humanlike
```

It also switches Hermes to:

```yaml
memory:
  provider: humanlike
```

## Configure the API Key

Write the API key into `~/.hermes/.env`. If Hermes is already running, restart it afterward.

```bash
HUMAN_LIKE_MEM_API_KEY=mp_your_key_here
HUMAN_LIKE_MEM_BASE_URL=https://plugin.human-like.me
```

## Optional Runtime Settings

| Key | Default | Description |
| --- | --- | --- |
| `HUMAN_LIKE_MEM_API_KEY` | - | Human-like Memory API key. Recommended location: `~/.hermes/.env`. |
| `HUMAN_LIKE_MEM_BASE_URL` | `https://plugin.human-like.me` | Memory service base URL. |
| `HUMAN_LIKE_MEM_USER_ID` | - | User isolation identifier. Keep it stable for the same user. |
| `HUMAN_LIKE_MEM_AGENT_ID` | `main` | Agent isolation identifier. Recommended for multi-agent setups. |
| `HUMAN_LIKE_MEM_SCENARIO` | `openclaw-plugin` | Scenario name used for both writes and searches. |
| `HUMAN_LIKE_MEM_RECALL_GLOBAL` | `true` | Whether recall can search across conversations. |
| `HUMAN_LIKE_MEM_LIMIT` | `6` | Maximum memories returned by one recall or search request. |
| `HUMAN_LIKE_MEM_MIN_SCORE` | `0.1` | Minimum relevance score. Lower values usually return more results. |
| `HUMAN_LIKE_MEM_MIN_TURNS` | `5` | Minimum completed turns before auto-flush. |
| `HUMAN_LIKE_MEM_SESSION_TIMEOUT_MS` | `300000` | Idle timeout before buffered memory is flushed automatically. |
| `HUMAN_LIKE_MEM_TIMEOUT_MS` | `15000` | Request timeout in milliseconds. |
| `HUMAN_LIKE_MEM_RECALL_ENABLED` | `true` | Enable recall and search commands. |
| `HUMAN_LIKE_MEM_ADD_ENABLED` | `true` | Enable save and save-batch commands. |

## Verify the Provider

Check that Hermes switched to the `humanlike` provider:

```bash
grep -n "provider: humanlike" ~/.hermes/config.yaml
```

Check that the provider install path exists:

```bash
ls -la ~/.hermes/hermes-agent/plugins/memory/humanlike
```

Restart and inspect logs after changing `~/.hermes/.env`:

```bash
hermes gateway restart
tail -n 200 ~/.hermes/agent.log
```

## Best-fit Scenarios

- Continue previous work by recalling only the most relevant context for the current request.
- Remember durable preferences such as timezones, naming preferences, collaboration patterns, and project constraints.
- Keep memory boundaries clean across users and multiple agents with `user_id` and `agent_id`.
- Verify setup through config, provider links, and runtime logs before debugging deeper integration issues.

## Troubleshooting

1. If you do not see `human-like-memory` under `~/.hermes/skills`, that does not mean it is missing. Hermes uses a memory provider, usually installed at `~/.hermes/hermes-agent/plugins/memory/humanlike`.
2. If the provider is not active, confirm `~/.hermes/config.yaml` contains `memory.provider: humanlike`, then run `hermes gateway restart`.
3. If shared retrieval is empty, confirm `user_id`, `agent_id`, and `scenario` exactly match the client that wrote the memories. Then try lowering `HUMAN_LIKE_MEM_MIN_SCORE` to `0.1` or `0.05`.
4. A repository-level `scripts/memory.mjs` file is a source-debug entry point, not the runtime entry for the Hermes plugin. In plugin mode, inspect `~/.hermes/.env`, `config.yaml`, and `agent.log` first.

## Related Docs

- REST API integration: https://plugin.human-like.me/docs/api.md
- OpenClaw plugin usage: https://plugin.human-like.me/docs/plugin.md
