hermes-memanto 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hermes_memanto-0.1.0/.env.example +12 -0
- hermes_memanto-0.1.0/.gitignore +106 -0
- hermes_memanto-0.1.0/LICENSE +18 -0
- hermes_memanto-0.1.0/PKG-INFO +152 -0
- hermes_memanto-0.1.0/README.md +122 -0
- hermes_memanto-0.1.0/hermes_memanto/PLUGIN_README.md +99 -0
- hermes_memanto-0.1.0/hermes_memanto/__init__.py +15 -0
- hermes_memanto-0.1.0/hermes_memanto/install.py +96 -0
- hermes_memanto-0.1.0/hermes_memanto/plugin.yaml +5 -0
- hermes_memanto-0.1.0/hermes_memanto/provider.py +836 -0
- hermes_memanto-0.1.0/pyproject.toml +81 -0
- hermes_memanto-0.1.0/tests/__init__.py +0 -0
- hermes_memanto-0.1.0/tests/test_provider.py +543 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# ============================================================================
|
|
2
|
+
# Memanto for Hermes - environment configuration
|
|
3
|
+
# ============================================================================
|
|
4
|
+
# Hermes reads these from $HERMES_HOME/.env (default ~/.hermes/.env). The
|
|
5
|
+
# `hermes memory setup` wizard writes MOORCHEH_API_KEY there for you.
|
|
6
|
+
|
|
7
|
+
# REQUIRED: Moorcheh API key (https://console.moorcheh.ai/api-keys)
|
|
8
|
+
MOORCHEH_API_KEY=your_key_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
9
|
+
|
|
10
|
+
# OPTIONAL: Override the Memanto agent id (memory namespace).
|
|
11
|
+
# Takes priority over agent_id in $HERMES_HOME/memanto.json.
|
|
12
|
+
# MEMANTO_AGENT_ID=hermes-coder
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Environment variables and secrets
|
|
2
|
+
.env
|
|
3
|
+
.env.local
|
|
4
|
+
.env.*.local
|
|
5
|
+
*.key
|
|
6
|
+
*.pem
|
|
7
|
+
*.crt
|
|
8
|
+
secrets/
|
|
9
|
+
.secrets
|
|
10
|
+
|
|
11
|
+
# Python
|
|
12
|
+
__pycache__/
|
|
13
|
+
*.py[cod]
|
|
14
|
+
*$py.class
|
|
15
|
+
*.so
|
|
16
|
+
.Python
|
|
17
|
+
uv.lock
|
|
18
|
+
build/
|
|
19
|
+
develop-eggs/
|
|
20
|
+
dist/
|
|
21
|
+
downloads/
|
|
22
|
+
eggs/
|
|
23
|
+
.eggs/
|
|
24
|
+
lib/
|
|
25
|
+
lib64/
|
|
26
|
+
parts/
|
|
27
|
+
sdist/
|
|
28
|
+
var/
|
|
29
|
+
wheels/
|
|
30
|
+
share/python-wheels/
|
|
31
|
+
*.egg-info/
|
|
32
|
+
.installed.cfg
|
|
33
|
+
*.egg
|
|
34
|
+
MANIFEST
|
|
35
|
+
|
|
36
|
+
# Virtual environments
|
|
37
|
+
venv/
|
|
38
|
+
.venv/
|
|
39
|
+
ENV/
|
|
40
|
+
env/
|
|
41
|
+
.env/
|
|
42
|
+
|
|
43
|
+
# IDEs
|
|
44
|
+
.vscode/
|
|
45
|
+
.idea/
|
|
46
|
+
.claude/
|
|
47
|
+
*.swp
|
|
48
|
+
*.swo
|
|
49
|
+
*~
|
|
50
|
+
.DS_Store
|
|
51
|
+
|
|
52
|
+
# Testing
|
|
53
|
+
.tox/
|
|
54
|
+
.nox/
|
|
55
|
+
.coverage
|
|
56
|
+
.coverage.*
|
|
57
|
+
.cache
|
|
58
|
+
nosetests.xml
|
|
59
|
+
coverage.xml
|
|
60
|
+
*.cover
|
|
61
|
+
*.log
|
|
62
|
+
.pytest_cache/
|
|
63
|
+
|
|
64
|
+
# Jupyter Notebook
|
|
65
|
+
.ipynb_checkpoints
|
|
66
|
+
|
|
67
|
+
# mypy
|
|
68
|
+
.mypy_cache/
|
|
69
|
+
.dmypy.json
|
|
70
|
+
dmypy.json
|
|
71
|
+
|
|
72
|
+
# Pyre type checker
|
|
73
|
+
.pyre/
|
|
74
|
+
|
|
75
|
+
# pytype static type analyzer
|
|
76
|
+
.pytype/
|
|
77
|
+
|
|
78
|
+
# Cython debug symbols
|
|
79
|
+
cython_debug/
|
|
80
|
+
|
|
81
|
+
# Database
|
|
82
|
+
*.db
|
|
83
|
+
*.sqlite
|
|
84
|
+
*.sqlite3
|
|
85
|
+
|
|
86
|
+
# Logs
|
|
87
|
+
logs/
|
|
88
|
+
*.log
|
|
89
|
+
pip-log.txt
|
|
90
|
+
pip-delete-this-directory.txt
|
|
91
|
+
|
|
92
|
+
# OS
|
|
93
|
+
.DS_Store
|
|
94
|
+
Thumbs.db
|
|
95
|
+
Desktop.ini
|
|
96
|
+
|
|
97
|
+
# Temporary files
|
|
98
|
+
tmp/
|
|
99
|
+
temp/
|
|
100
|
+
*.tmp
|
|
101
|
+
*.bak
|
|
102
|
+
*.swp
|
|
103
|
+
*.swo
|
|
104
|
+
|
|
105
|
+
# Generated version file
|
|
106
|
+
**/_version.py
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright 2026 EdgeAI Innovations Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
7
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
+
subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hermes-memanto
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Memanto memory-agent provider for the Hermes agent - typed long-term memory (remember/recall/answer) backed by Moorcheh
|
|
5
|
+
Project-URL: Homepage, https://www.memanto.ai
|
|
6
|
+
Project-URL: Documentation, https://docs.memanto.ai
|
|
7
|
+
Project-URL: Repository, https://github.com/moorcheh-ai/memanto
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/moorcheh-ai/memanto/issues
|
|
9
|
+
Author-email: Memanto <info@memanto.ai>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent memory,hermes,hermes-agent,memanto,memory provider,moorcheh,semantic memory
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: <4,>=3.10
|
|
25
|
+
Requires-Dist: memanto>=0.1.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest<9,>=8.2.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff<0.15,>=0.14.6; extra == 'dev'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# Hermes + Memanto: Persistent Memory Agent
|
|
32
|
+
|
|
33
|
+
This package adds [Memanto](https://memanto.ai) as a **memory agent** for the
|
|
34
|
+
[Hermes agent](https://github.com/NousResearch/hermes-agent). Memanto gives
|
|
35
|
+
Hermes typed long-term memory with confidence and provenance, semantic recall,
|
|
36
|
+
and RAG-style answers, backed by the [Moorcheh](https://moorcheh.ai) vector
|
|
37
|
+
platform.
|
|
38
|
+
|
|
39
|
+
Unlike a passive "memory layer", every namespace in Memanto is a first-class
|
|
40
|
+
**agent** (`memanto agent create/activate`), so this provider maps one Hermes
|
|
41
|
+
identity to one Memanto agent.
|
|
42
|
+
|
|
43
|
+
## What you get
|
|
44
|
+
|
|
45
|
+
- **Auto-recall** — relevant memories are injected before each turn.
|
|
46
|
+
- **Turn capture** — conversation turns are stored as `event` memories.
|
|
47
|
+
- **Explicit tools** — `memanto_remember`, `memanto_recall`, `memanto_answer`.
|
|
48
|
+
- **Memory mirroring** — Hermes' built-in `memory` writes are echoed into Memanto.
|
|
49
|
+
- **Profile isolation** — `agent_id: hermes-{identity}` scopes memory per Hermes profile.
|
|
50
|
+
|
|
51
|
+
## Why a standalone plugin?
|
|
52
|
+
|
|
53
|
+
Hermes' built-in providers under `plugins/memory/` are a closed set; new memory
|
|
54
|
+
backends ship as standalone plugins that users install into
|
|
55
|
+
`~/.hermes/plugins/`. Hermes discovers a memory provider as a **directory**
|
|
56
|
+
under `$HERMES_HOME/plugins/<name>/` containing an `__init__.py` that exposes
|
|
57
|
+
`register(ctx)` plus a `plugin.yaml`. This package ships exactly that, plus an
|
|
58
|
+
installer that drops it into place.
|
|
59
|
+
|
|
60
|
+
## Prerequisites
|
|
61
|
+
|
|
62
|
+
- Python 3.10+
|
|
63
|
+
- A running [Hermes agent](https://github.com/NousResearch/hermes-agent) install
|
|
64
|
+
- A [Moorcheh API key](https://console.moorcheh.ai/api-keys) (free tier: 100K ops/month)
|
|
65
|
+
|
|
66
|
+
## Install
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# 1. Install this package (pulls in the memanto SDK)
|
|
70
|
+
pip install hermes-memanto
|
|
71
|
+
|
|
72
|
+
# 2. Drop the plugin into your Hermes home (~/.hermes/plugins/memanto/)
|
|
73
|
+
hermes-memanto-install
|
|
74
|
+
|
|
75
|
+
# 3. Configure your key + select the provider
|
|
76
|
+
export MOORCHEH_API_KEY=... # https://console.moorcheh.ai/api-keys
|
|
77
|
+
hermes config set memory.provider memanto
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`hermes memory setup` will also list **memanto** once the plugin is installed,
|
|
81
|
+
and writes `MOORCHEH_API_KEY` into `~/.hermes/.env` for you.
|
|
82
|
+
|
|
83
|
+
### From a source checkout
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
git clone https://github.com/moorcheh-ai/memanto.git
|
|
87
|
+
cd memanto/integrations/hermes-agents
|
|
88
|
+
pip install -e .
|
|
89
|
+
hermes-memanto-install # or: hermes-memanto-install --hermes-home /path/to/.hermes
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The installer copies `hermes_memanto/provider.py` verbatim as the plugin's
|
|
93
|
+
`__init__.py`, so the installed plugin is self-contained and only needs the
|
|
94
|
+
`memanto` SDK at runtime (declared in its `plugin.yaml`).
|
|
95
|
+
|
|
96
|
+
## Configuration
|
|
97
|
+
|
|
98
|
+
After install, settings live in `$HERMES_HOME/memanto.json`:
|
|
99
|
+
|
|
100
|
+
| Key | Default | Description |
|
|
101
|
+
|-----|---------|-------------|
|
|
102
|
+
| `agent_id` | `hermes-{identity}` | Memanto agent id (memory namespace). `{identity}` expands to the Hermes profile name. |
|
|
103
|
+
| `pattern` | `tool` | Agent pattern used when auto-creating: `support`, `project`, or `tool`. |
|
|
104
|
+
| `auto_recall` | `true` | Inject relevant memories before each turn. |
|
|
105
|
+
| `auto_capture` | `true` | Store cleaned conversation turns as `event` memories. |
|
|
106
|
+
| `auto_create` | `true` | Create the agent on first use if it does not exist. |
|
|
107
|
+
| `mirror_memory_writes` | `true` | Echo Hermes' built-in `memory` writes into Memanto. |
|
|
108
|
+
| `max_recall_results` | `10` | Max memories formatted into prefetch context (1–100). |
|
|
109
|
+
| `min_confidence` | `null` | Drop recalled memories below this confidence (0.0–1.0). |
|
|
110
|
+
| `session_duration_hours` | `null` | Override Memanto session lifetime. |
|
|
111
|
+
|
|
112
|
+
| Environment variable | Description |
|
|
113
|
+
|----------------------|-------------|
|
|
114
|
+
| `MOORCHEH_API_KEY` | Moorcheh API key (required). |
|
|
115
|
+
| `MEMANTO_AGENT_ID` | Override the agent id (takes priority over the config file). |
|
|
116
|
+
|
|
117
|
+
## Tools exposed to Hermes
|
|
118
|
+
|
|
119
|
+
| Tool | Description |
|
|
120
|
+
|------|-------------|
|
|
121
|
+
| `memanto_remember` | Store a durable fact, preference, decision, goal, or instruction. |
|
|
122
|
+
| `memanto_recall` | Search memories by semantic similarity. |
|
|
123
|
+
| `memanto_answer` | Answer a question grounded only in stored memories (RAG). |
|
|
124
|
+
|
|
125
|
+
Memory types follow Memanto's taxonomy: `fact`, `preference`, `goal`,
|
|
126
|
+
`decision`, `artifact`, `learning`, `event`, `instruction`, `relationship`,
|
|
127
|
+
`context`, `observation`, `commitment`, `error`.
|
|
128
|
+
|
|
129
|
+
## Development
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
pip install -e ".[dev]"
|
|
133
|
+
pytest # provider unit tests (no network; SdkClient is faked)
|
|
134
|
+
ruff check .
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## How it relates to the other integrations
|
|
138
|
+
|
|
139
|
+
| Integration | Package | What it does |
|
|
140
|
+
|-------------|---------|--------------|
|
|
141
|
+
| `integrations/mcp` | `memanto-mcp` | MCP server for any MCP-compatible client (Claude, Cursor). |
|
|
142
|
+
| `integrations/crewai` | `crewai-memanto` | CrewAI tools for multi-agent memory sharing. |
|
|
143
|
+
| `integrations/hermes-agents` | `hermes-memanto` | **This** — a memory provider for the Hermes agent. |
|
|
144
|
+
|
|
145
|
+
All three talk to the same Moorcheh-backed Memanto agents, so memory written by
|
|
146
|
+
one is recallable from the others when they share an `agent_id`.
|
|
147
|
+
|
|
148
|
+
## Support
|
|
149
|
+
|
|
150
|
+
- [Memanto Documentation](https://docs.memanto.ai)
|
|
151
|
+
- [Moorcheh API Keys](https://console.moorcheh.ai/api-keys)
|
|
152
|
+
- [Hermes agent](https://github.com/NousResearch/hermes-agent)
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Hermes + Memanto: Persistent Memory Agent
|
|
2
|
+
|
|
3
|
+
This package adds [Memanto](https://memanto.ai) as a **memory agent** for the
|
|
4
|
+
[Hermes agent](https://github.com/NousResearch/hermes-agent). Memanto gives
|
|
5
|
+
Hermes typed long-term memory with confidence and provenance, semantic recall,
|
|
6
|
+
and RAG-style answers, backed by the [Moorcheh](https://moorcheh.ai) vector
|
|
7
|
+
platform.
|
|
8
|
+
|
|
9
|
+
Unlike a passive "memory layer", every namespace in Memanto is a first-class
|
|
10
|
+
**agent** (`memanto agent create/activate`), so this provider maps one Hermes
|
|
11
|
+
identity to one Memanto agent.
|
|
12
|
+
|
|
13
|
+
## What you get
|
|
14
|
+
|
|
15
|
+
- **Auto-recall** — relevant memories are injected before each turn.
|
|
16
|
+
- **Turn capture** — conversation turns are stored as `event` memories.
|
|
17
|
+
- **Explicit tools** — `memanto_remember`, `memanto_recall`, `memanto_answer`.
|
|
18
|
+
- **Memory mirroring** — Hermes' built-in `memory` writes are echoed into Memanto.
|
|
19
|
+
- **Profile isolation** — `agent_id: hermes-{identity}` scopes memory per Hermes profile.
|
|
20
|
+
|
|
21
|
+
## Why a standalone plugin?
|
|
22
|
+
|
|
23
|
+
Hermes' built-in providers under `plugins/memory/` are a closed set; new memory
|
|
24
|
+
backends ship as standalone plugins that users install into
|
|
25
|
+
`~/.hermes/plugins/`. Hermes discovers a memory provider as a **directory**
|
|
26
|
+
under `$HERMES_HOME/plugins/<name>/` containing an `__init__.py` that exposes
|
|
27
|
+
`register(ctx)` plus a `plugin.yaml`. This package ships exactly that, plus an
|
|
28
|
+
installer that drops it into place.
|
|
29
|
+
|
|
30
|
+
## Prerequisites
|
|
31
|
+
|
|
32
|
+
- Python 3.10+
|
|
33
|
+
- A running [Hermes agent](https://github.com/NousResearch/hermes-agent) install
|
|
34
|
+
- A [Moorcheh API key](https://console.moorcheh.ai/api-keys) (free tier: 100K ops/month)
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# 1. Install this package (pulls in the memanto SDK)
|
|
40
|
+
pip install hermes-memanto
|
|
41
|
+
|
|
42
|
+
# 2. Drop the plugin into your Hermes home (~/.hermes/plugins/memanto/)
|
|
43
|
+
hermes-memanto-install
|
|
44
|
+
|
|
45
|
+
# 3. Configure your key + select the provider
|
|
46
|
+
export MOORCHEH_API_KEY=... # https://console.moorcheh.ai/api-keys
|
|
47
|
+
hermes config set memory.provider memanto
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`hermes memory setup` will also list **memanto** once the plugin is installed,
|
|
51
|
+
and writes `MOORCHEH_API_KEY` into `~/.hermes/.env` for you.
|
|
52
|
+
|
|
53
|
+
### From a source checkout
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git clone https://github.com/moorcheh-ai/memanto.git
|
|
57
|
+
cd memanto/integrations/hermes-agents
|
|
58
|
+
pip install -e .
|
|
59
|
+
hermes-memanto-install # or: hermes-memanto-install --hermes-home /path/to/.hermes
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The installer copies `hermes_memanto/provider.py` verbatim as the plugin's
|
|
63
|
+
`__init__.py`, so the installed plugin is self-contained and only needs the
|
|
64
|
+
`memanto` SDK at runtime (declared in its `plugin.yaml`).
|
|
65
|
+
|
|
66
|
+
## Configuration
|
|
67
|
+
|
|
68
|
+
After install, settings live in `$HERMES_HOME/memanto.json`:
|
|
69
|
+
|
|
70
|
+
| Key | Default | Description |
|
|
71
|
+
|-----|---------|-------------|
|
|
72
|
+
| `agent_id` | `hermes-{identity}` | Memanto agent id (memory namespace). `{identity}` expands to the Hermes profile name. |
|
|
73
|
+
| `pattern` | `tool` | Agent pattern used when auto-creating: `support`, `project`, or `tool`. |
|
|
74
|
+
| `auto_recall` | `true` | Inject relevant memories before each turn. |
|
|
75
|
+
| `auto_capture` | `true` | Store cleaned conversation turns as `event` memories. |
|
|
76
|
+
| `auto_create` | `true` | Create the agent on first use if it does not exist. |
|
|
77
|
+
| `mirror_memory_writes` | `true` | Echo Hermes' built-in `memory` writes into Memanto. |
|
|
78
|
+
| `max_recall_results` | `10` | Max memories formatted into prefetch context (1–100). |
|
|
79
|
+
| `min_confidence` | `null` | Drop recalled memories below this confidence (0.0–1.0). |
|
|
80
|
+
| `session_duration_hours` | `null` | Override Memanto session lifetime. |
|
|
81
|
+
|
|
82
|
+
| Environment variable | Description |
|
|
83
|
+
|----------------------|-------------|
|
|
84
|
+
| `MOORCHEH_API_KEY` | Moorcheh API key (required). |
|
|
85
|
+
| `MEMANTO_AGENT_ID` | Override the agent id (takes priority over the config file). |
|
|
86
|
+
|
|
87
|
+
## Tools exposed to Hermes
|
|
88
|
+
|
|
89
|
+
| Tool | Description |
|
|
90
|
+
|------|-------------|
|
|
91
|
+
| `memanto_remember` | Store a durable fact, preference, decision, goal, or instruction. |
|
|
92
|
+
| `memanto_recall` | Search memories by semantic similarity. |
|
|
93
|
+
| `memanto_answer` | Answer a question grounded only in stored memories (RAG). |
|
|
94
|
+
|
|
95
|
+
Memory types follow Memanto's taxonomy: `fact`, `preference`, `goal`,
|
|
96
|
+
`decision`, `artifact`, `learning`, `event`, `instruction`, `relationship`,
|
|
97
|
+
`context`, `observation`, `commitment`, `error`.
|
|
98
|
+
|
|
99
|
+
## Development
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pip install -e ".[dev]"
|
|
103
|
+
pytest # provider unit tests (no network; SdkClient is faked)
|
|
104
|
+
ruff check .
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## How it relates to the other integrations
|
|
108
|
+
|
|
109
|
+
| Integration | Package | What it does |
|
|
110
|
+
|-------------|---------|--------------|
|
|
111
|
+
| `integrations/mcp` | `memanto-mcp` | MCP server for any MCP-compatible client (Claude, Cursor). |
|
|
112
|
+
| `integrations/crewai` | `crewai-memanto` | CrewAI tools for multi-agent memory sharing. |
|
|
113
|
+
| `integrations/hermes-agents` | `hermes-memanto` | **This** — a memory provider for the Hermes agent. |
|
|
114
|
+
|
|
115
|
+
All three talk to the same Moorcheh-backed Memanto agents, so memory written by
|
|
116
|
+
one is recallable from the others when they share an `agent_id`.
|
|
117
|
+
|
|
118
|
+
## Support
|
|
119
|
+
|
|
120
|
+
- [Memanto Documentation](https://docs.memanto.ai)
|
|
121
|
+
- [Moorcheh API Keys](https://console.moorcheh.ai/api-keys)
|
|
122
|
+
- [Hermes agent](https://github.com/NousResearch/hermes-agent)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Memanto Memory Agent Provider
|
|
2
|
+
|
|
3
|
+
[Memanto](https://memanto.ai) is a **memory agent** — typed long-term memory with
|
|
4
|
+
confidence and provenance, semantic recall, and RAG-style answers, backed by the
|
|
5
|
+
[Moorcheh](https://moorcheh.ai) vector platform. Each Memanto namespace is a
|
|
6
|
+
first-class *agent* (`memanto agent create/activate`), so this provider maps one
|
|
7
|
+
Hermes identity to one Memanto agent.
|
|
8
|
+
|
|
9
|
+
> This file lives inside the installed plugin directory
|
|
10
|
+
> (`$HERMES_HOME/plugins/memanto/`). It was placed here by `hermes-memanto-install`.
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
- `pip install memanto`
|
|
15
|
+
- Moorcheh API key from [console.moorcheh.ai/api-keys](https://console.moorcheh.ai/api-keys)
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
hermes memory setup # select "memanto"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or manually:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
hermes config set memory.provider memanto
|
|
27
|
+
echo 'MOORCHEH_API_KEY=***' >> ~/.hermes/.env
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Config
|
|
31
|
+
|
|
32
|
+
Config file: `$HERMES_HOME/memanto.json`
|
|
33
|
+
|
|
34
|
+
| Key | Default | Description |
|
|
35
|
+
|-----|---------|-------------|
|
|
36
|
+
| `agent_id` | `hermes-{identity}` | The Memanto agent id (memory namespace). Supports the `{identity}` template for per-profile scoping (e.g. `hermes-coder`). |
|
|
37
|
+
| `pattern` | `tool` | Memanto agent pattern used when auto-creating: `support`, `project`, or `tool`. |
|
|
38
|
+
| `auto_recall` | `true` | Inject relevant memories before each turn. |
|
|
39
|
+
| `auto_capture` | `true` | Store cleaned user/assistant turns as `event` memories. |
|
|
40
|
+
| `auto_create` | `true` | Create the agent on first use if it does not exist. |
|
|
41
|
+
| `mirror_memory_writes` | `true` | Echo Hermes built-in `memory` writes into Memanto. |
|
|
42
|
+
| `max_recall_results` | `10` | Max memories formatted into prefetch context (1–100). |
|
|
43
|
+
| `min_confidence` | `null` | Drop recalled memories below this confidence (0.0–1.0). |
|
|
44
|
+
| `session_duration_hours` | `null` | Override Memanto session lifetime (defaults to Memanto's config). |
|
|
45
|
+
|
|
46
|
+
### Environment Variables
|
|
47
|
+
|
|
48
|
+
| Variable | Description |
|
|
49
|
+
|----------|-------------|
|
|
50
|
+
| `MOORCHEH_API_KEY` | Moorcheh API key (required). |
|
|
51
|
+
| `MEMANTO_AGENT_ID` | Override the agent id (takes priority over the config file). |
|
|
52
|
+
|
|
53
|
+
## Tools
|
|
54
|
+
|
|
55
|
+
| Tool | Description |
|
|
56
|
+
|------|-------------|
|
|
57
|
+
| `memanto_remember` | Store a durable fact, preference, decision, goal, or instruction. |
|
|
58
|
+
| `memanto_recall` | Search memories by semantic similarity. |
|
|
59
|
+
| `memanto_answer` | Answer a question grounded only in stored memories (RAG). |
|
|
60
|
+
|
|
61
|
+
## Behavior
|
|
62
|
+
|
|
63
|
+
When enabled, Hermes can:
|
|
64
|
+
|
|
65
|
+
- prefetch relevant memories before each turn (`auto_recall`)
|
|
66
|
+
- store cleaned conversation turns as `event` memories after each response (`auto_capture`)
|
|
67
|
+
- mirror Hermes built-in `memory`/`user` writes into Memanto (`mirror_memory_writes`)
|
|
68
|
+
- expose explicit `remember` / `recall` / `answer` tools
|
|
69
|
+
|
|
70
|
+
Memory types follow Memanto's taxonomy: `fact`, `preference`, `goal`, `decision`,
|
|
71
|
+
`artifact`, `learning`, `event`, `instruction`, `relationship`, `context`,
|
|
72
|
+
`observation`, `commitment`, `error`.
|
|
73
|
+
|
|
74
|
+
## Profile-Scoped Agents
|
|
75
|
+
|
|
76
|
+
Use `{identity}` in `agent_id` to scope memories per Hermes profile:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"agent_id": "hermes-{identity}"
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
A profile named `coder` resolves to `hermes-coder`; the default profile resolves
|
|
85
|
+
to `hermes-default`. Without `{identity}`, all profiles share one Memanto agent.
|
|
86
|
+
|
|
87
|
+
## Notes
|
|
88
|
+
|
|
89
|
+
- The session is warmed up (agent ensured + activated) in the background at
|
|
90
|
+
startup, so the first turn's recall does not also pay activation latency.
|
|
91
|
+
- Writes are skipped in `cron`, `flush`, and `subagent` contexts to avoid
|
|
92
|
+
corrupting the user's memory representation.
|
|
93
|
+
- Only one external memory provider runs at a time, selected via
|
|
94
|
+
`memory.provider` in `config.yaml`.
|
|
95
|
+
|
|
96
|
+
## Support
|
|
97
|
+
|
|
98
|
+
- [memanto.ai](https://memanto.ai)
|
|
99
|
+
- [moorcheh.ai](https://moorcheh.ai)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Memanto memory-agent provider for the Hermes agent.
|
|
2
|
+
|
|
3
|
+
Install the directory plugin with the bundled console script::
|
|
4
|
+
|
|
5
|
+
hermes-memanto-install
|
|
6
|
+
|
|
7
|
+
Then point Hermes at it::
|
|
8
|
+
|
|
9
|
+
hermes config set memory.provider memanto
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from hermes_memanto.provider import MemantoMemoryProvider, register
|
|
13
|
+
|
|
14
|
+
__all__ = ["MemantoMemoryProvider", "register"]
|
|
15
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""Install the Memanto plugin into a Hermes plugins directory.
|
|
2
|
+
|
|
3
|
+
Hermes discovers memory providers as *directories* under
|
|
4
|
+
``$HERMES_HOME/plugins/<name>/`` (default ``~/.hermes/plugins``), each holding
|
|
5
|
+
an ``__init__.py`` that exposes ``register(ctx)`` plus a ``plugin.yaml``
|
|
6
|
+
manifest. This script writes a self-contained ``memanto/`` plugin folder there
|
|
7
|
+
by copying :mod:`hermes_memanto.provider` verbatim as the plugin's
|
|
8
|
+
``__init__.py`` — so once installed it only needs the ``memanto`` SDK (declared
|
|
9
|
+
in ``plugin.yaml``), not this package.
|
|
10
|
+
|
|
11
|
+
Usage::
|
|
12
|
+
|
|
13
|
+
hermes-memanto-install # install into $HERMES_HOME (or ~/.hermes)
|
|
14
|
+
hermes-memanto-install --hermes-home /path/to/.hermes
|
|
15
|
+
hermes-memanto-install --force # overwrite an existing install
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import argparse
|
|
21
|
+
import os
|
|
22
|
+
import shutil
|
|
23
|
+
import sys
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
|
|
26
|
+
_PKG_DIR = Path(__file__).resolve().parent
|
|
27
|
+
_PROVIDER_SRC = _PKG_DIR / "provider.py"
|
|
28
|
+
_PLUGIN_YAML = _PKG_DIR / "plugin.yaml"
|
|
29
|
+
_PLUGIN_README = _PKG_DIR / "PLUGIN_README.md"
|
|
30
|
+
|
|
31
|
+
_PLUGIN_NAME = "memanto"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _default_hermes_home() -> Path:
|
|
35
|
+
env = os.environ.get("HERMES_HOME")
|
|
36
|
+
if env:
|
|
37
|
+
return Path(env).expanduser()
|
|
38
|
+
return Path.home() / ".hermes"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def install(hermes_home: Path, *, force: bool = False) -> Path:
|
|
42
|
+
"""Write the ``memanto`` plugin into ``hermes_home/plugins`` and return its path."""
|
|
43
|
+
target = hermes_home / "plugins" / _PLUGIN_NAME
|
|
44
|
+
if target.exists() and not force:
|
|
45
|
+
raise FileExistsError(
|
|
46
|
+
f"{target} already exists. Re-run with --force to overwrite it."
|
|
47
|
+
)
|
|
48
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
49
|
+
# The provider module doubles as the plugin's __init__.py (it exposes
|
|
50
|
+
# register(ctx) and a MemantoMemoryProvider subclass).
|
|
51
|
+
shutil.copyfile(_PROVIDER_SRC, target / "__init__.py")
|
|
52
|
+
shutil.copyfile(_PLUGIN_YAML, target / "plugin.yaml")
|
|
53
|
+
if _PLUGIN_README.exists():
|
|
54
|
+
shutil.copyfile(_PLUGIN_README, target / "README.md")
|
|
55
|
+
return target
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def main(argv=None) -> int:
|
|
59
|
+
parser = argparse.ArgumentParser(
|
|
60
|
+
prog="hermes-memanto-install",
|
|
61
|
+
description="Install the Memanto memory-agent plugin into Hermes.",
|
|
62
|
+
)
|
|
63
|
+
parser.add_argument(
|
|
64
|
+
"--hermes-home",
|
|
65
|
+
default=None,
|
|
66
|
+
help="Hermes home directory (default: $HERMES_HOME or ~/.hermes).",
|
|
67
|
+
)
|
|
68
|
+
parser.add_argument(
|
|
69
|
+
"--force",
|
|
70
|
+
action="store_true",
|
|
71
|
+
help="Overwrite an existing memanto plugin.",
|
|
72
|
+
)
|
|
73
|
+
args = parser.parse_args(argv)
|
|
74
|
+
|
|
75
|
+
hermes_home = (
|
|
76
|
+
Path(args.hermes_home).expanduser()
|
|
77
|
+
if args.hermes_home
|
|
78
|
+
else _default_hermes_home()
|
|
79
|
+
)
|
|
80
|
+
try:
|
|
81
|
+
target = install(hermes_home, force=args.force)
|
|
82
|
+
except FileExistsError as exc:
|
|
83
|
+
print(str(exc), file=sys.stderr)
|
|
84
|
+
return 1
|
|
85
|
+
|
|
86
|
+
print(f"Installed the Memanto memory plugin at {target}")
|
|
87
|
+
print("Next steps:")
|
|
88
|
+
print(" 1. pip install memanto")
|
|
89
|
+
print(" 2. export MOORCHEH_API_KEY=... (https://console.moorcheh.ai/api-keys)")
|
|
90
|
+
print(" 3. hermes config set memory.provider memanto")
|
|
91
|
+
print(" (or run: hermes memory setup → select 'memanto')")
|
|
92
|
+
return 0
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if __name__ == "__main__": # pragma: no cover
|
|
96
|
+
raise SystemExit(main())
|