Skip to content

Commit 532a080

Browse files
authored
Merge pull request #151 from nowledge-co/dev_0615
feat: Pi and Hermes support
2 parents 8c1f3b2 + 14511b1 commit 532a080

15 files changed

Lines changed: 799 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Each directory is a standalone integration. Pick the one that matches your tool.
3737
| **[OpenClaw Plugin](nowledge-mem-openclaw-plugin)** | `openclaw plugins install @nowledge/openclaw-nowledge-mem` | Full memory lifecycle with memory tools, thread tools, automatic capture, and distillation. |
3838
| **[Alma Plugin](nowledge-mem-alma-plugin)** | Search Nowledge in Alma official Plugin marketplace | Alma-native plugin with Working Memory, thread-aware recall, structured saves, and optional auto-capture. |
3939
| **[Bub Plugin](nowledge-mem-bub-plugin)** | `pip install nowledge-mem-bub` | Bub-native plugin: cross-tool knowledge, auto-capture via save_state, Working Memory, and graph exploration. |
40+
| **[Pi Package](nowledge-mem-pi-package)** | `pi install npm:nowledge-mem-pi` | Five composable skills for Working Memory, routed recall, distillation, and resumable handoffs in Pi. |
41+
| **[Hermes Agent](nowledge-mem-hermes)** | Add MCP server to `~/.hermes/config.yaml` | Cross-tool knowledge in Hermes via MCP: search, save, Working Memory, and thread history. |
4042
| **[Raycast Extension](nowledge-mem-raycast)** | Search Nowledge in Raycast Extension Store | Search memories from Raycast launcher. |
4143
| **[Claude Desktop](https://github.com/nowledge-co/claude-dxt)** | Download from [nowled.ge/claude-dxt](https://nowled.ge/claude-dxt), double-click `.mcpb` file | One-click extension for Claude Desktop with memory search, save, and update. |
4244
| **[Browser Extension](https://chromewebstore.google.com/detail/nowledge-memory-exchange/kjgpkgodplgakbeanoifnlpkphemcbmh)** | Install from Chrome Web Store | Side-panel capture for ChatGPT, Claude, Gemini, Perplexity, and other web AI surfaces. |

integrations.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,73 @@
286286
"skills": ["nowledge-mem"],
287287
"slashCommands": []
288288
},
289+
{
290+
"id": "pi",
291+
"name": "Pi",
292+
"category": "coding",
293+
"type": "skills",
294+
"version": "0.1.0",
295+
"directory": "nowledge-mem-pi-package",
296+
"transport": "cli",
297+
"capabilities": {
298+
"workingMemory": true,
299+
"search": true,
300+
"distill": true,
301+
"autoRecall": false,
302+
"autoCapture": false,
303+
"graphExploration": false,
304+
"status": true
305+
},
306+
"threadSave": {
307+
"method": "handoff-only",
308+
"note": "Pi does not have a native transcript importer; save-thread creates a structured handoff summary"
309+
},
310+
"install": {
311+
"command": "pi install npm:nowledge-mem-pi",
312+
"updateCommand": "pi install npm:nowledge-mem-pi@latest",
313+
"detectionHint": "Running as Pi agent; ~/.pi/ exists",
314+
"docsUrl": "/docs/integrations/pi"
315+
},
316+
"toolNaming": {
317+
"convention": "cli-direct",
318+
"note": "Skills teach agent to invoke nmem CLI directly"
319+
},
320+
"skills": ["read-working-memory", "search-memory", "distill-memory", "save-thread", "status"],
321+
"slashCommands": []
322+
},
323+
{
324+
"id": "hermes",
325+
"name": "Hermes Agent",
326+
"category": "coding",
327+
"type": "connector",
328+
"version": "0.1.0",
329+
"directory": "nowledge-mem-hermes",
330+
"transport": "mcp",
331+
"capabilities": {
332+
"workingMemory": true,
333+
"search": true,
334+
"distill": true,
335+
"autoRecall": false,
336+
"autoCapture": false,
337+
"graphExploration": true,
338+
"status": false
339+
},
340+
"threadSave": {
341+
"method": "mcp-tool",
342+
"note": "thread_persist available via MCP; full transcript depends on client capabilities"
343+
},
344+
"install": {
345+
"command": "Add nowledge-mem MCP server to ~/.hermes/config.yaml",
346+
"detectionHint": "Running as Hermes agent; ~/.hermes/ exists",
347+
"docsUrl": "/docs/integrations/hermes"
348+
},
349+
"toolNaming": {
350+
"convention": "mcp-backend",
351+
"note": "MCP tools defined by backend (memory_search, memory_add, etc.)"
352+
},
353+
"skills": [],
354+
"slashCommands": []
355+
},
289356
{
290357
"id": "npx-skills",
291358
"name": "npx Skills",

nowledge-mem-hermes/AGENTS.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Nowledge Mem for Hermes
2+
3+
You have access to the user's knowledge graph through MCP tools provided by the `nowledge-mem` server.
4+
5+
## Working Memory
6+
7+
At session start, load the user's current context:
8+
9+
```
10+
read_working_memory
11+
```
12+
13+
This returns priorities, recent decisions, and open questions. Reference relevant parts naturally as the conversation progresses. If it returns empty, mention there is no briefing yet and continue.
14+
15+
Do not re-read unless the user asks or the session context changes materially.
16+
17+
## Proactive Search
18+
19+
Search when past insights would improve the response. Do not wait for the user to say "search my memory".
20+
21+
**Search when:**
22+
- The user references previous work, a prior fix, or an earlier decision
23+
- The task resumes a named feature, bug, refactor, or subsystem
24+
- A debugging pattern resembles something solved before
25+
- The user asks for rationale, preferences, or procedures
26+
- The user uses recall language: "that approach", "like before", "the pattern we used"
27+
28+
**Skip when:**
29+
- Fundamentally new topic with no prior history
30+
- Generic syntax or API questions answerable from documentation
31+
- User explicitly asks for a fresh perspective
32+
33+
```
34+
memory_search query="your search query"
35+
```
36+
37+
For past conversations specifically:
38+
39+
```
40+
thread_search query="your search query"
41+
thread_fetch_messages thread_id="<id>" limit=8
42+
```
43+
44+
## Saving Knowledge
45+
46+
Save proactively when the conversation produces a decision, procedure, learning, or important context. Do not wait to be asked.
47+
48+
```
49+
memory_add content="What was decided and why" title="Descriptive title" unit_type="decision" labels=["relevant-label"] importance=0.8
50+
```
51+
52+
**Good candidates:** architectural decisions with rationale, repeatable procedures, lessons from debugging, durable preferences, plans that future sessions will need.
53+
54+
**Quality bar:**
55+
- Importance 0.8 to 1.0: major decisions, architectural choices, critical learnings
56+
- Importance 0.5 to 0.7: useful patterns, conventions, secondary decisions
57+
- Importance 0.3 to 0.4: minor notes, preferences, contextual observations
58+
59+
One strong memory is better than three weak ones.
60+
61+
Unit types: `fact`, `preference`, `decision`, `plan`, `procedure`, `learning`, `context`, `event`
62+
63+
## Add vs Update
64+
65+
Search first to avoid duplicates. If an existing memory already captures the same concept and the new information refines it, update instead of creating a new one:
66+
67+
```
68+
memory_search query="the concept you're about to save"
69+
memory_update memory_id="<existing_id>" content="Updated content with new information"
70+
```
71+
72+
## Thread Tools
73+
74+
Save the current conversation when the user asks:
75+
76+
```
77+
thread_persist summary="Brief description of what was discussed"
78+
```
79+
80+
Browse past conversations to recover context:
81+
82+
```
83+
thread_search query="topic from a previous session"
84+
thread_fetch_messages thread_id="<id>" limit=8
85+
```
86+
87+
## Labels
88+
89+
Use `list_memory_labels` to see existing categories before creating new labels. Reuse existing labels when they fit.

nowledge-mem-hermes/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
## [0.1.0] - 2026-03-31
4+
5+
### Added
6+
7+
- MCP-based integration connecting Hermes Agent to the Nowledge Mem knowledge graph.
8+
- Full MCP tool access: memory search, add, update, delete, Working Memory, thread operations.
9+
- Behavioral guidance (`AGENTS.md`) for project-level memory behavior in Hermes sessions.
10+
- Remote access configuration for multi-machine setups.

nowledge-mem-hermes/README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Nowledge Mem for Hermes Agent
2+
3+
> Cross-tool knowledge, accessible in every Hermes session. Your decisions, procedures, and context travel with you.
4+
5+
Hermes has its own memory and learning system. Nowledge Mem complements it with knowledge that spans tools: insights from Claude Code, Cursor, Codex, Gemini, and every other environment you work in. One knowledge graph, available everywhere.
6+
7+
## What you get
8+
9+
- **Start every session informed.** Hermes loads your Working Memory briefing: current priorities, recent decisions, open questions.
10+
- **The agent searches for you.** When past context would improve the answer, Hermes finds it through your knowledge graph without being asked.
11+
- **Insights stick around.** Key decisions and learnings are saved to Nowledge Mem, ready for any future session in any tool.
12+
- **Full session history.** Save Hermes conversations as structured threads you can search later.
13+
14+
## Prerequisites
15+
16+
1. **Nowledge Mem desktop app** running (or the server accessible on port 14242)
17+
2. **Hermes Agent** installed and configured
18+
19+
## Setup
20+
21+
Add the Nowledge Mem MCP server to your Hermes configuration:
22+
23+
```yaml title="~/.hermes/config.yaml"
24+
mcp_servers:
25+
nowledge-mem:
26+
url: "http://127.0.0.1:14242/mcp"
27+
timeout: 120
28+
```
29+
30+
Restart Hermes to pick up the new server.
31+
32+
## Verify
33+
34+
Start a new Hermes session and ask:
35+
36+
> Search my memories for recent decisions.
37+
38+
Hermes should call `memory_search` and return results from your knowledge graph. If Mem is not running, you will see a connection error.
39+
40+
## Update
41+
42+
The MCP server runs inside Nowledge Mem. When you update the desktop app, all MCP tools update automatically. No changes to your Hermes config needed.
43+
44+
## MCP tools
45+
46+
These tools are available to Hermes once the MCP server is connected:
47+
48+
| Tool | Purpose |
49+
|------|---------|
50+
| `read_working_memory` | Load your daily context briefing |
51+
| `memory_search` | Search memories and distilled knowledge |
52+
| `memory_add` | Save a new memory |
53+
| `memory_update` | Refine an existing memory |
54+
| `memory_delete` | Remove a memory |
55+
| `thread_search` | Search past conversations |
56+
| `thread_fetch_messages` | Read messages from a specific thread |
57+
| `thread_persist` | Save a conversation thread |
58+
| `list_memory_labels` | Browse memory categories |
59+
60+
Additional tools for graph exploration, source analysis, and knowledge processing are available depending on your server configuration.
61+
62+
## Behavioral guidance (optional)
63+
64+
For stronger memory behavior in a specific project, copy the included `AGENTS.md` into your project root as `AGENTS.md` or `HERMES.md`. Hermes reads these files for project-level context.
65+
66+
```bash
67+
cp AGENTS.md /path/to/your/project/HERMES.md
68+
```
69+
70+
This tells Hermes when to search, when to save, and how to use Working Memory. Without it, the MCP tools still work, but Hermes relies on its own judgment for when to call them.
71+
72+
## Remote access
73+
74+
If Nowledge Mem runs on another machine, update the MCP server URL:
75+
76+
```yaml title="~/.hermes/config.yaml"
77+
mcp_servers:
78+
nowledge-mem:
79+
url: "https://your-server:14242/mcp"
80+
timeout: 120
81+
```
82+
83+
Ensure the remote server has API access enabled. See [Remote Access](https://mem.nowledge.co/docs/remote-access) for setup details.
84+
85+
## Troubleshooting
86+
87+
- **"Cannot connect to MCP server"**: Verify the Nowledge Mem desktop app is running and the server is listening on port 14242. Check with `curl http://127.0.0.1:14242/health`.
88+
- **Tools not appearing**: Restart Hermes after editing `config.yaml`. Confirm the `mcp_servers` block is properly indented.
89+
- **Slow responses**: The default timeout of 120 seconds covers deep search. If searches consistently time out, check server performance or network latency for remote setups.
90+
- **No results from search**: Nowledge Mem may be empty. Add a few memories first through the desktop app or another integration, then try again.
91+
92+
## Links
93+
94+
- [Hermes integration guide](https://mem.nowledge.co/docs/integrations/hermes)
95+
- [Documentation](https://mem.nowledge.co/docs/integrations)
96+
- [Discord](https://nowled.ge/discord)
97+
- [GitHub](https://github.com/nowledge-co/community)
98+
99+
---
100+
101+
Made with care by [Nowledge Labs](https://nowledge-labs.ai)

nowledge-mem-npx-skills/skills/check-integration/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ The canonical source for this table is `community/integrations.json`.
4343
| **Droid** | Running inside Droid (Factory) | Add nowledge-co/community marketplace, install nowledge-mem@nowledge-community | [Guide](https://mem.nowledge.co/docs/integrations/droid) |
4444
| **Codex CLI** | Running as Codex CLI agent; `~/.codex/` exists | Copy `nowledge-mem-codex-plugin` to `~/.codex/plugins/nowledge-mem` | [Guide](https://mem.nowledge.co/docs/integrations/codex-cli) |
4545
| **Bub** | Running inside Bub | `pip install nowledge-mem-bub` | [Guide](https://mem.nowledge.co/docs/integrations/bub) |
46+
| **Pi** | Running as Pi agent; `~/.pi/` exists | `pi install npm:nowledge-mem-pi` | [Guide](https://mem.nowledge.co/docs/integrations/pi) |
47+
| **Hermes Agent** | Running as Hermes agent; `~/.hermes/` exists | Add MCP server to `~/.hermes/config.yaml` | [Guide](https://mem.nowledge.co/docs/integrations/hermes) |
4648

4749
If the agent is not listed above, the npx skills you already have are the best option. They work everywhere via the `nmem` CLI.
4850

nowledge-mem-pi-package/AGENTS.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Nowledge Mem for Pi
2+
3+
You have access to the user's cross-tool knowledge through the `nmem` CLI and five installed skills: `read-working-memory`, `search-memory`, `distill-memory`, `save-thread`, and `status`.
4+
5+
## Working Memory at Session Start
6+
7+
Load the user's current context at the beginning of every session:
8+
9+
```bash
10+
nmem --json wm read
11+
```
12+
13+
If it returns `exists: false`, mention there's no briefing yet and continue. Don't re-read during the same session unless the user asks.
14+
15+
## Proactive Search
16+
17+
Search when the task connects to prior work, the user references a past decision, or context from before would improve the answer. Don't search speculatively for every message.
18+
19+
```bash
20+
nmem --json m search "query"
21+
```
22+
23+
Use `--mode deep` when the first pass returns weak results or the query is conceptual.
24+
25+
## Retrieval Routing
26+
27+
Use memory search for distilled knowledge (decisions, procedures, preferences). Use thread search for past conversations:
28+
29+
```bash
30+
nmem --json t search "query" --limit 5
31+
nmem --json t show <thread_id> --limit 8 --offset 0 --content-limit 1200
32+
```
33+
34+
Load threads progressively. Increase `--offset` only when the user needs more.
35+
36+
If a memory result includes `source_thread`, inspect the original conversation with `nmem --json t show <thread_id> --limit 8 --offset 0 --content-limit 1200`.
37+
38+
## Autonomous Save
39+
40+
Save proactively when the conversation produces a decision, procedure, learning, or important context. Don't wait for the user to ask.
41+
42+
```bash
43+
nmem --json m add "content" -t "Title" --unit-type decision -i 0.8
44+
```
45+
46+
Unit types: `fact`, `preference`, `decision`, `plan`, `procedure`, `learning`, `context`, `event`.
47+
48+
Use `-l` to attach labels for easier retrieval: `nmem --json m add "content" -t "Title" --unit-type decision -i 0.8 -l backend -l auth`.
49+
50+
## Add vs Update
51+
52+
Search before saving to avoid duplicates. If a memory already captures the same concept and the new information refines it, update it:
53+
54+
```bash
55+
nmem --json m update <memory_id> -c "updated content"
56+
```
57+
58+
One strong memory is better than three weak ones.
59+
60+
## Thread Save Honesty
61+
62+
Pi does not have a native transcript importer. When the user asks to save the session, create a structured handoff summary using `nmem --json t create`. Be transparent: this is a curated summary, not a verbatim transcript. Include goals, decisions, files touched, risks, and next steps.
63+
64+
```bash
65+
nmem --json t create \
66+
-t "Session Handoff - <topic>" \
67+
-c "Goal: ... Decisions: ... Files: ... Risks: ... Next: ..." \
68+
-s generic-agent
69+
```
70+
71+
## Remote Configuration
72+
73+
If Nowledge Mem runs on a different machine, credentials live in `~/.nowledge-mem/config.json` with `apiUrl` and `apiKey` fields. Environment variables `NMEM_API_URL` and `NMEM_API_KEY` override the config file.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to the Nowledge Mem Pi package will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2026-03-31
9+
10+
### Added
11+
12+
- Initial release with five skills:
13+
- `read-working-memory`: Daily briefing with focus areas, priorities, and recent changes
14+
- `search-memory`: Semantic search across memories and past conversations
15+
- `distill-memory`: Save decisions, procedures, and insights as durable memories
16+
- `save-thread`: Structured handoff summaries for session continuity
17+
- `status`: Server connectivity check
18+
- Behavioral guidance companion (`AGENTS.md`)
19+
- Pi package manifest for `pi install npm:nowledge-mem-pi`

0 commit comments

Comments
 (0)