hermes-memory-vault 0.2.0__py3-none-any.whl

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.
@@ -0,0 +1,300 @@
1
+ Metadata-Version: 2.4
2
+ Name: hermes-memory-vault
3
+ Version: 0.2.0
4
+ Summary: Portable Context Protocol β€” package AI agent sessions into portable .hermes-memory packs
5
+ Author-email: Jules Zhou <juleszhou01@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/iruzen-dono/memory-vault
8
+ Project-URL: Repository, https://github.com/iruzen-dono/memory-vault
9
+ Project-URL: Issues, https://github.com/iruzen-dono/memory-vault/issues
10
+ Project-URL: Documentation, https://github.com/iruzen-dono/memory-vault/blob/master/docs/ARCHITECTURE.md
11
+ Project-URL: Changelog, https://github.com/iruzen-dono/memory-vault/blob/master/CHANGELOG.md
12
+ Keywords: hermes,ai-agent,memory,portable,open-source
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: typer<1.0,>=0.12
24
+ Requires-Dist: pydantic<3.0,>=2.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest<9.0,>=7.0; extra == "dev"
27
+ Requires-Dist: mypy<2.0,>=1.0; extra == "dev"
28
+ Requires-Dist: ruff<1.0,>=0.1; extra == "dev"
29
+ Provides-Extra: vault
30
+ Requires-Dist: markdown<4.0,>=3.5; extra == "vault"
31
+ Provides-Extra: tui
32
+ Requires-Dist: textual<3.0,>=2.0; extra == "tui"
33
+ Provides-Extra: all
34
+ Requires-Dist: memory-vault[tui,vault]; extra == "all"
35
+ Dynamic: license-file
36
+
37
+ # Memory Vault β€” Portable Context Protocol
38
+
39
+ > **From agent session to shareable context in one command.**
40
+
41
+ [![CI](https://github.com/iruzen-dono/memory-vault/actions/workflows/ci.yml/badge.svg)](https://github.com/iruzen-dono/memory-vault/actions/workflows/ci.yml)
42
+ [![PyPI version](https://img.shields.io/pypi/v/hermes-memory-vault.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/hermes-memory-vault/)
43
+ [![PyPI downloads](https://img.shields.io/pypi/dm/hermes-memory-vault.svg?style=flat-square)](https://pypi.org/project/hermes-memory-vault/)
44
+ ![Python](https://img.shields.io/badge/Python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white)
45
+ ![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)
46
+ ![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey?style=flat-square)
47
+
48
+ Memory Vault turns any Hermes session into a portable `.hermes-memory` **context pack** β€” the conversation, the tool traces, the artifacts created, and a handoff brief that lets another agent pick up exactly where you left off.
49
+
50
+ ## Installation
51
+
52
+ ```bash
53
+ pipx install hermes-memory-vault
54
+ # or
55
+ pip install hermes-memory-vault
56
+ ```
57
+
58
+ > The distribution is named **`hermes-memory-vault`** because `memory-vault`
59
+ > is already taken on PyPI by an unrelated project. The package you import is
60
+ > still `memory_vault`, and the command is still `memory-vault`.
61
+
62
+ Or install from source:
63
+
64
+ ```bash
65
+ git clone https://github.com/iruzen-dono/memory-vault.git
66
+ cd memory-vault
67
+ pip install -e .
68
+ ```
69
+
70
+ Requires Python 3.11+. The CLI exposes the `memory-vault` command:
71
+
72
+ ```bash
73
+ # Launch the interactive TUI browser
74
+ memory-vault browse
75
+
76
+ # List sessions
77
+ memory-vault list-sessions
78
+
79
+ # Export a session into a shareable pack
80
+ memory-vault export <session-id> --project-root . -o bot.hermes-memory
81
+
82
+ # Inspect a pack
83
+ memory-vault info bot.hermes-memory
84
+
85
+ # Import (show handoff + artifacts)
86
+ memory-vault import-pack bot.hermes-memory
87
+ ```
88
+
89
+ ## Features
90
+
91
+ ### πŸ–₯️ Interactive TUI (`memory-vault browse`)
92
+
93
+ Browse sessions with enriched titles (LLM-generated), search, export, and re-index β€” all from the terminal.
94
+
95
+ ```
96
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ Session Browser ───────────┐
97
+ β”‚ Config Fix β”‚
98
+ β”‚ 20260629_06423 Β· deepseek-v4-flash β”‚
99
+ β”‚ The AI agent fixed config issues… β”‚
100
+ β”‚ β”‚
101
+ β”‚ LLM: βœ… cloudflare β”‚
102
+ β”‚ Memory Vault Dev β”‚
103
+ β”‚ 20260628 Β· deepseek-v4-flash β”‚
104
+ β”‚ Developed and tested Memory Vault… β”‚
105
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
106
+ ```
107
+
108
+ Press `i` to re-index a session, `e` to export, `Ctrl+P` to search. The footer shows your active LLM provider with its availability status.
109
+
110
+ ### πŸ“‹ Provider Management (`memory-vault providers`)
111
+
112
+ List all registered LLM providers and whether they're available (creds detected):
113
+
114
+ ```bash
115
+ $ memory-vault providers
116
+ Provider Available
117
+ ──────────────── ────────────
118
+ cloudflare βœ…
119
+ anthropic ❌
120
+ openai ❌
121
+ ```
122
+
123
+ Persist a provider choice so you don't need env vars:
124
+
125
+ ```bash
126
+ memory-vault config set llm.provider cloudflare
127
+ memory-vault config get llm.provider # cloudflare
128
+ memory-vault config list # show all stored config
129
+ ```
130
+
131
+ ### 🧠 Smart Session Indexing (`memory-vault index`)
132
+
133
+ Generate descriptive titles and summaries for all your Hermes sessions using an LLM provider. Supports any OpenAI-compatible API and Cloudflare Workers AI out of the box.
134
+
135
+ ```bash
136
+ # Index all sessions (auto-detects provider)
137
+ memory-vault index
138
+
139
+ # Index with 4 parallel workers (much faster)
140
+ memory-vault index --workers 4
141
+
142
+ # Use Cloudflare Workers AI
143
+ export CLOUDFLARE_ACCOUNT_ID="..."
144
+ export CLOUDFLARE_API_TOKEN="..."
145
+ memory-vault index --force
146
+
147
+ # Use any OpenAI-compatible API
148
+ export OPENAI_BASE_URL="https://api.openai.com/v1"
149
+ export OPENAI_API_KEY="sk-..."
150
+ memory-vault index
151
+
152
+ # Override the model per run
153
+ MEMORY_VAULT_INDEX_MODEL="gpt-4o" memory-vault index
154
+ ```
155
+
156
+ ### πŸ“¦ Context Packs
157
+
158
+ Shareable, self-contained archives of any Hermes session.
159
+
160
+ ## Why context packs?
161
+
162
+ AI agent sessions produce **context** β€” conversations, decisions, files, tool calls β€” but it's trapped inside the agent's database. Memory Vault extracts it into a structured, portable format that's:
163
+
164
+ - **Shareable** β€” send a `.hermes-memory` file to a teammate or another agent
165
+ - **Restartable** β€” the handoff brief tells the receiving agent what was done and how
166
+ - **Auditable** β€” full transcript + tool traces + artifact copies in one file
167
+ - **Self-contained** β€” includes everything needed to understand the session
168
+
169
+ ## The format
170
+
171
+ A `.hermes-memory` file is a **tar.gz archive** with a clean layout:
172
+
173
+ ```
174
+ bot.hermes-memory/
175
+ β”œβ”€β”€ manifest.json # Metadata: title, tags, source session, git commit, tool usage
176
+ β”œβ”€β”€ narrative.md # Chronological story of the session
177
+ β”œβ”€β”€ messages.json # Raw session messages (for deep reference)
178
+ β”œβ”€β”€ decisions.json # Key decisions extracted (AI-generated)
179
+ β”œβ”€β”€ artifacts/ # Files created or modified during the session
180
+ β”‚ β”œβ”€β”€ src/bot.py
181
+ β”‚ └── ...
182
+ β”œβ”€β”€ tool-traces.json # Tool usage summary (calls per tool)
183
+ └── context/
184
+ β”œβ”€β”€ handoff.md # Brief for the receiving agent
185
+ └── references.md # URLs and resources used in the session
186
+ ```
187
+
188
+ ## Quick start
189
+
190
+ ### 1. Install
191
+
192
+ ```bash
193
+ pip install "memory-vault[tui]" # with TUI
194
+ pip install "memory-vault" # CLI only (lighter)
195
+ ```
196
+
197
+ ### 2. Browse sessions
198
+
199
+ ```bash
200
+ memory-vault browse
201
+ # or just list:
202
+ memory-vault list-sessions
203
+ ```
204
+
205
+ ### 3. Index sessions (optional, for meaningful titles)
206
+
207
+ Requires an LLM provider. By default tries `CLOUDFLARE_ACCOUNT_ID` + `CLOUDFLARE_API_TOKEN` for Cloudflare Workers AI. Falls back gracefully with template titles.
208
+
209
+ ```bash
210
+ # Auto-detect Cloudflare Workers AI
211
+ memory-vault index
212
+
213
+ # Or set any OpenAI-compatible provider
214
+ export OPENAI_BASE_URL="https://api.openai.com/v1"
215
+ export OPENAI_API_KEY="sk-..."
216
+ memory-vault index
217
+
218
+ # Only new sessions (skip already-indexed)
219
+ memory-vault index --new
220
+ ```
221
+
222
+ ### 4. Export a session
223
+
224
+ ```bash
225
+ memory-vault export 20260620_143021_a1b2c3 \
226
+ --title "Hyperliquid Trading Bot" \
227
+ --tags trading,hyperliquid,defi \
228
+ --project-root /path/to/project \
229
+ --author iruzen
230
+ ```
231
+
232
+ ### 5. Share or archive
233
+
234
+ Send the `.hermes-memory` file anywhere. The receiving agent loads it with:
235
+
236
+ ```bash
237
+ memory-vault import-pack bot.hermes-memory
238
+ ```
239
+
240
+ ## Commands
241
+
242
+ | Command | Description |
243
+ |---------|-------------|
244
+ | `browse` | Launch interactive TUI (sessions or packs) |
245
+ | `list-sessions` | Browse available Hermes sessions |
246
+ | `export <id>` | Pack a session into .hermes-memory |
247
+ | `info <pack>` | Inspect a pack (metadata, artifacts, tools) |
248
+ | `import-pack <pack>` | Show handoff brief, artifacts, and tool traces |
249
+ | `list` | List all packs in a directory |
250
+ | `search <pattern>` | Regex search across packs |
251
+ | `render <pack>` | Render pack as Markdown or HTML |
252
+ | `index [--workers N]` | Enrich session titles & summaries via LLM |
253
+ | `providers` | List available LLM providers and their status |
254
+ | `config set/get/list` | Manage persistent configuration |
255
+ | `diff <pack1> <pack2>` | Compare two context packs side-by-side |
256
+
257
+ ## Use cases
258
+
259
+ - **Handoff between agents**: finish a session on desktop, continue on Telegram
260
+ - **Project snapshots**: capture the full context of building a feature
261
+ - **Debugging archives**: save the session that led to a bug
262
+ - **Knowledge base**: build a library of past agent actions
263
+ - **Onboarding**: share how a complex task was done
264
+
265
+ ## How it works
266
+
267
+ Memory Vault reads directly from the Hermes sessions database (`state.db`). It:
268
+
269
+ 1. Queries the session metadata (title, model, platform, duration)
270
+ 2. Reads all messages (user prompts, assistant responses, tool calls)
271
+ 3. Builds a chronological narrative from the conversation
272
+ 4. Detects artifacts by scanning `write_file` and `patch` tool calls
273
+ 5. Counts tool usage for the summary
274
+ 6. Generates a handoff brief with the original goal and key results
275
+ 7. Packages everything into a compressed `.hermes-memory` archive
276
+
277
+ ## Project structure
278
+
279
+ ```
280
+ src/memory_vault/
281
+ β”œβ”€β”€ __init__.py # Version + public exports
282
+ β”œβ”€β”€ __main__.py # CLI entry point
283
+ β”œβ”€β”€ cli/
284
+ β”‚ └── main.py # Typer commands (export, info, import, list, search, render, index, browse)
285
+ β”œβ”€β”€ core/
286
+ β”‚ β”œβ”€β”€ __init__.py
287
+ β”‚ β”œβ”€β”€ llm.py # LLMProvider ABC + CloudflareAI + OpenAICompatibleProvider
288
+ β”‚ β”œβ”€β”€ config.py # JSON config persistence (llm.provider, etc.)
289
+ β”‚ β”œβ”€β”€ manifest.py # Manifest dataclass + serialization
290
+ β”‚ β”œβ”€β”€ pack.py # ContextPack β€” in-memory representation + tar.gz I/O
291
+ β”‚ β”œβ”€β”€ builder.py # ContextBuilder β€” reads Hermes sessions, builds packs
292
+ β”‚ β”œβ”€β”€ narrator.py # SessionNarrator β€” compresses conversations via LLM
293
+ β”‚ β”œβ”€β”€ renderer.py # Export packs as Markdown or HTML
294
+ β”‚ β”œβ”€β”€ session_index.py # SessionIndex β€” SQLite cache for LLM-enriched titles
295
+ β”‚ └── tui.py # MemoryVaultTUI β€” Textual-based interactive browser
296
+ ```
297
+
298
+ ## License
299
+
300
+ MIT
@@ -0,0 +1,22 @@
1
+ hermes_memory_vault-0.2.0.dist-info/licenses/LICENSE,sha256=xpbMHUPnauDVw4srMDqz2E8SiWVakvDKIeQqo86HR6E,1067
2
+ memory_vault/__init__.py,sha256=q1eQPMs9Umg3CzgmhDLVNy_bLhkRg3YlAP_IguMAi8k,748
3
+ memory_vault/__main__.py,sha256=wYeSqcz4xsVuNMbMQNC2ifUfH1hXkLkt-0KVdxeuskk,127
4
+ memory_vault/cli/__init__.py,sha256=AlfZwJa0fKuf2lAjyp96mkM-A0OE4reTlUdrLzN8Xbc,67
5
+ memory_vault/cli/main.py,sha256=VNtQaixZviQkUCy1zY-ezrSV5CpH8RTEU2KveLJNWjI,30885
6
+ memory_vault/core/__init__.py,sha256=zzd7IoR6J5XkryZ6bYeCJVc_QLglKKvql3bOTtW6SHM,58
7
+ memory_vault/core/builder.py,sha256=hiCYO_91sGVgumqxP-BOegitXjvyuENJYCufjWdhjUw,29836
8
+ memory_vault/core/config.py,sha256=cu1emR4Su_CtQU0Q_uekdbBAmy_8AHkUTrvXUNsguYw,1852
9
+ memory_vault/core/llm.py,sha256=kdF3Vl5eZA_RlX-VvWCsTHSyMtagsAIA0VMnOt5pCP0,12975
10
+ memory_vault/core/manifest.py,sha256=em9_mth2DQDHygxkkBnSTtFBQ9t2uOLIMWUjDa2U_g0,3534
11
+ memory_vault/core/narrator.py,sha256=tVPXBnBYv2qU0hgcvVviUpseOusV9rqnNm6I1xHUd2w,11569
12
+ memory_vault/core/pack.py,sha256=KudEs5Cyp0rklv8GCevKn5lCjGWhVKCjtJ0-Elqj_xw,12095
13
+ memory_vault/core/renderer.py,sha256=bNZVPMmjmIH_D2nVzEpqRCgIAZeVc6C7WUkvw1fO83I,16441
14
+ memory_vault/core/session_index.py,sha256=WwrlG3m3K4WzB-sM8BNGIjLKn1laVaF4BclwELbgFCA,18734
15
+ memory_vault/core/tui.py,sha256=KwrXdjEcLE930UUswe_LC2-CDOcAVSWFyV5v17BWuQI,18945
16
+ memory_vault/webhook/__init__.py,sha256=hSX6fDYGdx_5I-AFK3r76ShO6SeggNifGC6KgUvd6kg,8403
17
+ memory_vault/webhook/__main__.py,sha256=o5jYeOuozZGNKo85--31q-6aa-LFAPYddUiz5aScqdE,409
18
+ hermes_memory_vault-0.2.0.dist-info/METADATA,sha256=A9NMSde_ouBJArxdNeQii70h4ty-5jdbduFSBbiZTfc,11117
19
+ hermes_memory_vault-0.2.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
20
+ hermes_memory_vault-0.2.0.dist-info/entry_points.txt,sha256=w0__tjvF6GIvIqVm2CJID09cxhiJ_LaUGL3XxOkVTUA,109
21
+ hermes_memory_vault-0.2.0.dist-info/top_level.txt,sha256=4pqKiWm2TKc5jLfDggBnhiR6ZuS9OZZdWZ-ziFCmYFY,13
22
+ hermes_memory_vault-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ memory-vault = memory_vault.cli.main:app
3
+ memory-vault-webhook = memory_vault.webhook:serve
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jules Zhou
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ memory_vault
@@ -0,0 +1,29 @@
1
+ """Memory Vault β€” Portable Context Protocol.
2
+
3
+ A standard format + CLI for packaging AI agent sessions into portable
4
+ .hermes-memory context packs: conversations, tool traces, artifacts,
5
+ decisions, and a handoff brief for another agent.
6
+ """
7
+
8
+ from memory_vault.core.builder import ContextBuilder
9
+ from memory_vault.core.manifest import (
10
+ CURRENT_FORMAT_VERSION,
11
+ PACK_TYPE_CONTEXT,
12
+ ArtifactIndex,
13
+ Manifest,
14
+ ToolUsage,
15
+ )
16
+ from memory_vault.core.pack import ContextPack
17
+ from memory_vault.core.session_index import SessionIndex
18
+
19
+ __version__ = "0.1.0"
20
+ __all__ = [
21
+ "ContextPack",
22
+ "ContextBuilder",
23
+ "Manifest",
24
+ "ToolUsage",
25
+ "ArtifactIndex",
26
+ "SessionIndex",
27
+ "CURRENT_FORMAT_VERSION",
28
+ "PACK_TYPE_CONTEXT",
29
+ ]
@@ -0,0 +1,5 @@
1
+ """Allows running Memory Vault as `python -m memory_vault`."""
2
+ from .cli.main import app
3
+
4
+ if __name__ == "__main__":
5
+ app()
@@ -0,0 +1 @@
1
+ """CLI β€” Typer-based command-line interface for memory-vault."""