@jcyamacho/agent-memory 0.0.20 → 0.2.0
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 +31 -63
- package/dist/index.js +334 -577
- package/package.json +8 -9
package/README.md
CHANGED
|
@@ -6,12 +6,11 @@ Persistent memory for MCP-powered coding agents.
|
|
|
6
6
|
by SQLite. It helps your agent remember preferences, project context, and prior
|
|
7
7
|
decisions across sessions.
|
|
8
8
|
|
|
9
|
-
It exposes
|
|
9
|
+
It exposes four tools:
|
|
10
10
|
|
|
11
11
|
- `remember` -> save facts, decisions, preferences, and project context
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `revise` -> update an existing memory when it becomes outdated
|
|
12
|
+
- `review` -> load workspace and global memories sorted by most recently updated
|
|
13
|
+
- `revise` -> update an existing memory when its content changes or when it should become global
|
|
15
14
|
- `forget` -> delete a memory that is no longer relevant
|
|
16
15
|
|
|
17
16
|
## Quick Start
|
|
@@ -44,24 +43,25 @@ OpenCode:
|
|
|
44
43
|
|
|
45
44
|
## Optional LLM Instructions
|
|
46
45
|
|
|
47
|
-
Optional LLM instructions to reinforce the MCP's built-in guidance
|
|
46
|
+
Optional LLM instructions to reinforce the MCP's built-in guidance. The server
|
|
47
|
+
instructions and tool descriptions already cover most behavior -- this prompt
|
|
48
|
+
targets the habits models most commonly miss:
|
|
48
49
|
|
|
49
50
|
```md
|
|
50
51
|
## Agent Memory
|
|
51
52
|
|
|
52
|
-
- Use `
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
- Do not store secrets or temporary task state in memory.
|
|
53
|
+
- Use `memory_review` at conversation start to load workspace memories into
|
|
54
|
+
context. During the session, use `memory_remember`, `memory_revise`, and
|
|
55
|
+
`memory_forget` to keep memories accurate.
|
|
56
|
+
- Pass `workspace` on `memory_remember` for project-scoped memory. Omit it
|
|
57
|
+
only for facts that apply across projects.
|
|
58
|
+
- Remember preferences, confirmed approaches, and decisions with reasoning
|
|
59
|
+
that would be lost after the session.
|
|
60
|
+
- Revise content when a fact changes, promote a project-scoped memory to
|
|
61
|
+
global only when it truly applies across projects, and forget it when it is
|
|
62
|
+
no longer relevant.
|
|
63
|
+
- Do not store secrets, temporary task state, or facts obvious from current
|
|
64
|
+
code or git history.
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
## Web UI
|
|
@@ -80,34 +80,22 @@ npx -y @jcyamacho/agent-memory@latest --ui --port 9090
|
|
|
80
80
|
|
|
81
81
|
The web UI uses the same database as the MCP server.
|
|
82
82
|
|
|
83
|
-
##
|
|
84
|
-
|
|
85
|
-
`
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
embeddings are most semantically similar.
|
|
96
|
-
4. **Global memories** (saved without a workspace) are treated as relevant
|
|
97
|
-
everywhere. When you pass `workspace`, they rank below exact workspace
|
|
98
|
-
matches and above memories from other workspaces.
|
|
99
|
-
5. **Recency** is a minor tiebreaker -- newer memories rank slightly above older
|
|
100
|
-
ones when other signals are equal.
|
|
101
|
-
|
|
102
|
-
If you omit `workspace`, recall still uses text relevance, embedding similarity,
|
|
103
|
-
and recency. For best results, pass `workspace` whenever you have one. Save
|
|
104
|
-
memories without a workspace only when they apply across all projects.
|
|
83
|
+
## Mutating Tool Output
|
|
84
|
+
|
|
85
|
+
`remember`, `revise`, and `forget` return the full affected memory
|
|
86
|
+
as XML with `updated_at` and scope information so clients that hide tool-call
|
|
87
|
+
arguments can still see what changed.
|
|
88
|
+
`forget` includes `deleted="true"` on the returned `<memory>` element.
|
|
89
|
+
|
|
90
|
+
## How Review Works
|
|
91
|
+
|
|
92
|
+
`review` requires a `workspace` and returns memories saved in that workspace
|
|
93
|
+
plus global memories (saved without a workspace), sorted by most recently
|
|
94
|
+
updated. Results are paginated -- pass `page` to load older memories.
|
|
105
95
|
|
|
106
96
|
When you save a memory from a git worktree, `agent-memory` stores the main repo
|
|
107
|
-
root as the workspace. `
|
|
97
|
+
root as the workspace. `review` applies the same normalization to incoming
|
|
108
98
|
workspace queries so linked worktrees still match repo-scoped memories exactly.
|
|
109
|
-
When that happens, recall returns the queried workspace value so callers can
|
|
110
|
-
treat the match as belonging to their current worktree context.
|
|
111
99
|
|
|
112
100
|
## Configuration
|
|
113
101
|
|
|
@@ -131,26 +119,6 @@ Set `AGENT_MEMORY_DB_PATH` when you want to:
|
|
|
131
119
|
- share a memory DB across multiple clients
|
|
132
120
|
- store the DB somewhere easier to back up or inspect
|
|
133
121
|
|
|
134
|
-
### Model Cache Location
|
|
135
|
-
|
|
136
|
-
By default, downloaded embedding model files are cached at:
|
|
137
|
-
|
|
138
|
-
```text
|
|
139
|
-
~/.config/agent-memory/models
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Override it with:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
AGENT_MEMORY_MODELS_CACHE_PATH=/absolute/path/to/models
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Set `AGENT_MEMORY_MODELS_CACHE_PATH` when you want to:
|
|
149
|
-
|
|
150
|
-
- keep model artifacts out of `node_modules`
|
|
151
|
-
- share the model cache across reinstalls or multiple clients
|
|
152
|
-
- store model downloads somewhere easier to inspect or manage
|
|
153
|
-
|
|
154
122
|
Schema changes are migrated automatically, including workspace normalization for
|
|
155
123
|
existing git worktree memories when the original path can still be resolved.
|
|
156
124
|
|