memshell 0.1.0 → 0.1.1
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.
- package/README.md +19 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
<p><strong>Persistent memory for AI agents.</strong><br>One line to save. One line to recall.</p>
|
|
6
6
|
|
|
7
|
-
[](https://www.npmjs.com/package/memshell)
|
|
8
|
+
[](https://github.com/justedv/mem.sh/blob/main/LICENSE)
|
|
9
|
+
[](https://www.npmjs.com/package/memshell)
|
|
10
10
|
[](https://github.com/justedv/mem.sh)
|
|
11
11
|
|
|
12
12
|
<br>
|
|
@@ -17,13 +17,19 @@
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm i memshell
|
|
24
|
+
```
|
|
25
|
+
|
|
20
26
|
## Why mem.sh?
|
|
21
27
|
|
|
22
28
|
Agents forget everything between sessions. **mem.sh** gives them a brain.
|
|
23
29
|
|
|
24
30
|
| | mem.sh | LangChain Memory | Roll your own |
|
|
25
31
|
|---|---|---|---|
|
|
26
|
-
| **Setup** | `npx
|
|
32
|
+
| **Setup** | `npx memshell set "..."` | 47 dependencies + config | Hours of boilerplate |
|
|
27
33
|
| **External APIs** | None | OpenAI key required | Depends |
|
|
28
34
|
| **Semantic search** | Built-in TF-IDF | Embedding models | You build it |
|
|
29
35
|
| **Storage** | SQLite (local) | Varies | You choose |
|
|
@@ -42,26 +48,26 @@ Agents forget everything between sessions. **mem.sh** gives them a brain.
|
|
|
42
48
|
|
|
43
49
|
```bash
|
|
44
50
|
# Store a memory
|
|
45
|
-
npx
|
|
51
|
+
npx memshell set "user prefers dark mode"
|
|
46
52
|
|
|
47
53
|
# Recall semantically
|
|
48
|
-
npx
|
|
54
|
+
npx memshell recall "what theme does the user like?"
|
|
49
55
|
# → user prefers dark mode (score: 0.87)
|
|
50
56
|
|
|
51
57
|
# List all memories
|
|
52
|
-
npx
|
|
58
|
+
npx memshell list
|
|
53
59
|
|
|
54
60
|
# Forget a specific memory
|
|
55
|
-
npx
|
|
61
|
+
npx memshell forget <id>
|
|
56
62
|
|
|
57
63
|
# Wipe everything
|
|
58
|
-
npx
|
|
64
|
+
npx memshell clear
|
|
59
65
|
```
|
|
60
66
|
|
|
61
67
|
### SDK
|
|
62
68
|
|
|
63
69
|
```js
|
|
64
|
-
const mem = require('
|
|
70
|
+
const mem = require('memshell');
|
|
65
71
|
|
|
66
72
|
// Store
|
|
67
73
|
await mem.set('user prefers dark mode');
|
|
@@ -94,7 +100,7 @@ Memories are stored in `~/.mem/mem.db` (SQLite). Each memory is tokenized and ve
|
|
|
94
100
|
Run a shared memory server for multiple agents:
|
|
95
101
|
|
|
96
102
|
```bash
|
|
97
|
-
npx
|
|
103
|
+
npx memshell serve --port 3456 --key my-secret-key
|
|
98
104
|
```
|
|
99
105
|
|
|
100
106
|
### Endpoints
|
|
@@ -129,7 +135,7 @@ curl "http://localhost:3456/mem/recall?q=theme+preference" \
|
|
|
129
135
|
### SDK with API Mode
|
|
130
136
|
|
|
131
137
|
```js
|
|
132
|
-
const mem = require('
|
|
138
|
+
const mem = require('memshell');
|
|
133
139
|
|
|
134
140
|
mem.configure({
|
|
135
141
|
api: 'http://localhost:3456',
|
|
@@ -153,5 +159,5 @@ We welcome contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
153
159
|
|
|
154
160
|
<div align="center">
|
|
155
161
|
<sub>Built for agents that need to remember.</sub><br>
|
|
156
|
-
<a href="https://www.npmjs.com/package/
|
|
162
|
+
<a href="https://www.npmjs.com/package/memshell">npm</a> · <a href="https://github.com/justedv/mem.sh">GitHub</a> · <a href="https://github.com/justedv/mem.sh/issues">Issues</a>
|
|
157
163
|
</div>
|