hermes-memory-libravdb 0.5.1__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_memory_libravdb-0.5.1/PKG-INFO +10 -0
- hermes_memory_libravdb-0.5.1/README.md +161 -0
- hermes_memory_libravdb-0.5.1/pyproject.toml +28 -0
- hermes_memory_libravdb-0.5.1/setup.cfg +4 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb/__init__.py +782 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb/cli.py +586 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb/identity.py +133 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb/markdown_ingest.py +1400 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb/provider.py +1145 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb/scopes.py +166 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb.egg-info/PKG-INFO +10 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb.egg-info/SOURCES.txt +17 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb.egg-info/dependency_links.txt +1 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb.egg-info/entry_points.txt +2 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb.egg-info/requires.txt +6 -0
- hermes_memory_libravdb-0.5.1/src/hermes_memory_libravdb.egg-info/top_level.txt +1 -0
- hermes_memory_libravdb-0.5.1/tests/test_cli.py +53 -0
- hermes_memory_libravdb-0.5.1/tests/test_register.py +13 -0
- hermes_memory_libravdb-0.5.1/tests/test_sync_turn.py +89 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hermes-memory-libravdb
|
|
3
|
+
Version: 0.5.1
|
|
4
|
+
Summary: Native LibraVDB memory provider for Hermes Agent using real gRPC
|
|
5
|
+
Requires-Python: >=3.9
|
|
6
|
+
Requires-Dist: grpcio>=1.60
|
|
7
|
+
Requires-Dist: libravdb-contracts>=2.0.5
|
|
8
|
+
Provides-Extra: dev
|
|
9
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
10
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# ♎ LibraVDB - Memory and Context Management
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<img src="./docs/assets/libravdb-logo.svg" alt="LibraVDB" width="640">
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div align="center">
|
|
8
|
+
<a href="https://github.com/xDarkicex/libravdbd"><img src="https://img.shields.io/badge/Go-1.25%2B-00ADD8?logo=go&logoColor=white" alt="Go 1.25+"></a>
|
|
9
|
+
<a href="./pyproject.toml"><img src="https://img.shields.io/badge/Python-3.9%2B-3776AB?logo=python&logoColor=white" alt="Python 3.9+"></a>
|
|
10
|
+
<a href="./plugin.yaml"><img src="https://img.shields.io/badge/Hermes-memory%20provider-00D8FF?logo=hermes&logoColor=white" alt="Hermes memory provider"></a>
|
|
11
|
+
<a href="https://pypi.org/project/hermes-memory-libravdb/"><img src="https://img.shields.io/pypi/v/hermes-memory-libravdb?label=release&color=5B21B6" alt="Release"></a>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
`hermes-memory-libravdb` is a native Python memory provider for Hermes Agent
|
|
15
|
+
backed by the `libravdbd` vector service. It replaces the lightweight default memory
|
|
16
|
+
path with scoped session, user, and global memory; continuity-aware prompt
|
|
17
|
+
assembly; durable recall; and sidecar-owned compaction.
|
|
18
|
+
|
|
19
|
+
[Install](./docs/install.md) · [Configuration](./docs/configuration.md) · [Architecture](./docs/architecture.md) · [Security](./docs/security.md) · [Contributing](./docs/contributing.md)
|
|
20
|
+
|
|
21
|
+
New install? Start here: [Install guide](./docs/install.md).
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
Install `libravdbd` with your system package manager, then install
|
|
26
|
+
the Hermes plugin.
|
|
27
|
+
|
|
28
|
+
**macOS (Homebrew)**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
brew tap xDarkicex/homebrew-libravdbd
|
|
32
|
+
brew install libravdbd
|
|
33
|
+
brew services start libravdbd
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Linux (APT)**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
sudo apt install libravdbd
|
|
40
|
+
systemctl --user enable --now libravdbd
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Plugin (all platforms)**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install hermes-memory-libravdb
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then configure the plugin in `~/.hermes/plugins/memory/libravdb/` or via
|
|
50
|
+
`hermes memory setup` and select `libravdb` as the memory provider.
|
|
51
|
+
|
|
52
|
+
Verify the service:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
hermes libravdb status
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Healthy output should show `ok: true`, stored memory counts, and the active
|
|
59
|
+
gate threshold.
|
|
60
|
+
|
|
61
|
+
## Quick Start
|
|
62
|
+
|
|
63
|
+
Runtime requirements:
|
|
64
|
+
|
|
65
|
+
- Hermes Agent `>= 0.9`
|
|
66
|
+
- Python `>= 3.9`
|
|
67
|
+
- a separately installed `libravdbd` service
|
|
68
|
+
|
|
69
|
+
Compatibility note:
|
|
70
|
+
|
|
71
|
+
- this plugin is currently verified against Hermes Agent `0.9.x`
|
|
72
|
+
|
|
73
|
+
Default endpoint:
|
|
74
|
+
|
|
75
|
+
- macOS/Linux user-local service: `unix:$HOME/.libravdbd/run/libravdb.sock`
|
|
76
|
+
- Homebrew service on Apple Silicon: `unix:/opt/homebrew/var/libravdbd/run/libravdb.sock`
|
|
77
|
+
|
|
78
|
+
If your service runs elsewhere, set the `LIBRAVDB_GRPC_ENDPOINT` environment variable:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
export LIBRAVDB_GRPC_ENDPOINT="tcp:127.0.0.1:37421"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Highlights
|
|
85
|
+
|
|
86
|
+
- **Native gRPC** — direct connection to `libravdbd` using Connect-RPC compatible protocol
|
|
87
|
+
- **HMAC nonce authentication** — same secure challenge-response scheme as the TypeScript plugin
|
|
88
|
+
- **Three memory scopes** — keeps active session, durable user, and global memory separate
|
|
89
|
+
- **Hybrid retrieval** — blends semantic similarity, scope, recency, and summary quality
|
|
90
|
+
- **Continuity-aware assembly** — preserves the recent working tail while fitting recalled memory into a bounded prompt budget
|
|
91
|
+
- **Background turn sync** — asynchronous message ingestion that doesn't block the UI
|
|
92
|
+
- **Local-first inference** — uses local embedding and compaction paths by default
|
|
93
|
+
|
|
94
|
+
## Security Defaults
|
|
95
|
+
|
|
96
|
+
Stored memory is treated as untrusted historical context. Retrieved memory is
|
|
97
|
+
framed before it reaches the downstream model, memory collections are scoped by
|
|
98
|
+
session/user/global namespace, and service installation is outside the Python package.
|
|
99
|
+
|
|
100
|
+
Before exposing Hermes over remote channels, read [Security](./docs/security.md).
|
|
101
|
+
|
|
102
|
+
## Operator Quick Refs
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
hermes libravdb status # daemon health, collection counts
|
|
106
|
+
hermes libravdb health # quick liveness check
|
|
107
|
+
hermes libravdb search "query" # semantic memory search
|
|
108
|
+
hermes libravdb flush --user-id X # wipe user namespace
|
|
109
|
+
hermes libravdb export --user-id X # NDJSON memory export
|
|
110
|
+
hermes libravdb journal --session-id X # lifecycle journal
|
|
111
|
+
hermes libravdb index --user-id X --force # rebuild search index
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Configuration
|
|
115
|
+
|
|
116
|
+
Provider config lives in `$HERMES_HOME/libravdb.json`. All keys are optional. For the full 60+ key reference, see [Configuration](./docs/configuration.md).
|
|
117
|
+
|
|
118
|
+
| Key | Type | Default | |
|
|
119
|
+
|---|---|---|---|
|
|
120
|
+
| `endpoint` | string | `auto` | `"auto"` probes standard paths; set `unix:/path` or `tcp:host:port` to override |
|
|
121
|
+
| `userId` | string | auto-derived | Stable identity for cross-session durable memory |
|
|
122
|
+
| `topK` | number | `8` | Default number of recalled memory hits |
|
|
123
|
+
| `minScore` | number | `0.35` | Minimum semantic score for prefetched/tool search results |
|
|
124
|
+
|
|
125
|
+
Set `memory.provider: "libravdb"` in Hermes `config.yaml` to activate. Run `hermes memory setup` for guided configuration.
|
|
126
|
+
|
|
127
|
+
## Environment Variables
|
|
128
|
+
|
|
129
|
+
| Variable | Description |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `LIBRAVDB_GRPC_ENDPOINT` | gRPC endpoint (e.g., `unix:/path` or `tcp:host:port`) |
|
|
132
|
+
| `LIBRAVDB_AUTH_SECRET` | HMAC secret for daemon authentication |
|
|
133
|
+
| `LIBRAVDB_AUTH_SECRET_FILE` | Path to file containing HMAC secret |
|
|
134
|
+
| `HERMES_HOME` | Hermes configuration directory (default: `~/.hermes`) |
|
|
135
|
+
|
|
136
|
+
## Docs By Goal
|
|
137
|
+
|
|
138
|
+
- New install: [Install](./docs/install.md)
|
|
139
|
+
- Verify your setup: [Beta Tester Checklist](./docs/beta-checklist.md)
|
|
140
|
+
- Understand the design: [Architecture](./docs/architecture.md)
|
|
141
|
+
- How it fits Hermes: [Hermes Integration](./docs/hermes-integration.md)
|
|
142
|
+
- Configure: [Configuration](./docs/configuration.md), [TLS configuration](./docs/TLS_configuration.md)
|
|
143
|
+
- Operate safely: [Security](./docs/security.md), [Uninstall](./docs/uninstall.md)
|
|
144
|
+
- Contributing: [Contributing](./docs/contributing.md)
|
|
145
|
+
|
|
146
|
+
## From Source
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pip install -e .
|
|
150
|
+
pip install -e ".[dev]"
|
|
151
|
+
pytest
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Runtime Facts
|
|
155
|
+
|
|
156
|
+
- PyPI package: `hermes-memory-libravdb`
|
|
157
|
+
- Hermes plugin kind: `memory`
|
|
158
|
+
- Hermes memory provider name: `libravdb`
|
|
159
|
+
- minimum Python version: `>= 3.9`
|
|
160
|
+
- default data path: `$HOME/.libravdbd/data_nomic-embed-text-v1_5.libravdb`
|
|
161
|
+
- default macOS/Linux endpoint: `unix:$HOME/.libravdbd/run/libravdb.sock`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "hermes-memory-libravdb"
|
|
7
|
+
version = "0.5.1"
|
|
8
|
+
description = "Native LibraVDB memory provider for Hermes Agent using real gRPC"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"grpcio>=1.60",
|
|
12
|
+
"libravdb-contracts>=2.0.5",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.entry-points."hermes_agent.plugins"]
|
|
16
|
+
libravdb-memory = "hermes_memory_libravdb:register"
|
|
17
|
+
|
|
18
|
+
[project.optional-dependencies]
|
|
19
|
+
dev = [
|
|
20
|
+
"pytest>=8.0",
|
|
21
|
+
"pytest-asyncio>=0.23",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[tool.setuptools.packages.find]
|
|
25
|
+
where = ["src"]
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.package-data]
|
|
28
|
+
hermes_memory_libravdb = ["py.typed"]
|