@waynesutton/agent-memory 0.0.1 → 0.0.2-alpha.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/AGENTS.md +1 -1
- package/CLAUDE.md +2 -2
- package/README.md +1013 -1
- package/agents.txt +122 -0
- package/llms.md +25 -0
- package/llms.txt +15 -1
- package/package.json +9 -1
- package/prds/README.md +0 -988
package/agents.txt
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# @waynesutton/agent-memory
|
|
2
|
+
|
|
3
|
+
A Convex Component for persistent, cloud-synced agent memory. Markdown-first memory backend for AI coding agents across CLIs and IDEs.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
Use agent-memory when you need:
|
|
8
|
+
- Persistent memory that survives across sessions, tools, and machines
|
|
9
|
+
- Cross-tool sync (Claude Code <-> Cursor <-> OpenCode <-> Codex <-> Zed <-> VS Code Copilot <-> Pi)
|
|
10
|
+
- Searchable memory with full-text and vector/semantic search
|
|
11
|
+
- Intelligent ingest that auto-extracts facts from conversations and deduplicates
|
|
12
|
+
- Feedback loops where agents rate memories as helpful or unhelpful
|
|
13
|
+
- Memory relations (knowledge graph between memories)
|
|
14
|
+
- Relevance decay so stale memories don't dominate context
|
|
15
|
+
- Multi-agent concurrency with ACID transactional guarantees (Convex provides this)
|
|
16
|
+
- Real-time reactive queries (memories update live across all connected clients)
|
|
17
|
+
|
|
18
|
+
Do NOT use agent-memory when:
|
|
19
|
+
- You only need ephemeral conversation context within a single session
|
|
20
|
+
- You are not using Convex as your backend
|
|
21
|
+
- You need a standalone database (use Ghost, Supabase, etc. instead)
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
1. Install: `npm install @waynesutton/agent-memory`
|
|
26
|
+
2. Register the component:
|
|
27
|
+
```
|
|
28
|
+
// convex/convex.config.ts
|
|
29
|
+
import { defineApp } from "convex/server";
|
|
30
|
+
import agentMemory from "@waynesutton/agent-memory/convex.config.js";
|
|
31
|
+
const app = defineApp();
|
|
32
|
+
app.use(agentMemory);
|
|
33
|
+
export default app;
|
|
34
|
+
```
|
|
35
|
+
3. Create wrapper functions:
|
|
36
|
+
```
|
|
37
|
+
// convex/memory.ts
|
|
38
|
+
import { AgentMemory } from "@waynesutton/agent-memory";
|
|
39
|
+
import { components } from "./_generated/api.js";
|
|
40
|
+
const memory = new AgentMemory(components.agentMemory, { projectId: "my-project" });
|
|
41
|
+
```
|
|
42
|
+
4. Deploy: `npx convex dev`
|
|
43
|
+
|
|
44
|
+
## Key API Methods
|
|
45
|
+
|
|
46
|
+
Read (query context):
|
|
47
|
+
- list(ctx, opts?) — list memories with filters
|
|
48
|
+
- get(ctx, memoryId) — get single memory
|
|
49
|
+
- search(ctx, query) — full-text search
|
|
50
|
+
- semanticSearch(ctx, query) — vector similarity search
|
|
51
|
+
- getContextBundle(ctx, opts?) — 3-tier progressive context (pinned/relevant/available)
|
|
52
|
+
- exportForTool(ctx, format) — export as tool-native files
|
|
53
|
+
- history(ctx, memoryId) — change audit trail
|
|
54
|
+
- getFeedback(ctx, memoryId) — feedback entries
|
|
55
|
+
- getRelations(ctx, memoryId) — graph connections
|
|
56
|
+
|
|
57
|
+
Write (mutation context):
|
|
58
|
+
- remember(ctx, memory) — create memory
|
|
59
|
+
- update(ctx, memoryId, updates) — partial update
|
|
60
|
+
- forget(ctx, memoryId) — archive (soft delete)
|
|
61
|
+
- restore(ctx, memoryId) — un-archive
|
|
62
|
+
- batchArchive(ctx, ids) — archive multiple
|
|
63
|
+
- addFeedback(ctx, memoryId, sentiment) — rate memory
|
|
64
|
+
- addRelation(ctx, from, to, relationship) — create graph edge
|
|
65
|
+
|
|
66
|
+
Action context:
|
|
67
|
+
- embed(ctx, memoryId) — generate vector embedding
|
|
68
|
+
- semanticSearch(ctx, query) — vector similarity search
|
|
69
|
+
- ingest(ctx, content) — LLM-powered fact extraction and dedup
|
|
70
|
+
|
|
71
|
+
## CLI Commands
|
|
72
|
+
|
|
73
|
+
npx agent-memory init --project <id> Initialize project, detect local tools
|
|
74
|
+
npx agent-memory push --project <id> Push local memory files to Convex
|
|
75
|
+
npx agent-memory pull --project <id> Pull memories from Convex to local files
|
|
76
|
+
npx agent-memory list --project <id> List all memories
|
|
77
|
+
npx agent-memory search <query> Search memories
|
|
78
|
+
npx agent-memory mcp --project <id> Start MCP server (14 tools)
|
|
79
|
+
|
|
80
|
+
## MCP Tools (14)
|
|
81
|
+
|
|
82
|
+
memory_remember, memory_recall, memory_semantic_recall, memory_list,
|
|
83
|
+
memory_context, memory_forget, memory_restore, memory_update,
|
|
84
|
+
memory_history, memory_feedback, memory_relate, memory_relations,
|
|
85
|
+
memory_batch_archive, memory_ingest
|
|
86
|
+
|
|
87
|
+
## Memory Types
|
|
88
|
+
|
|
89
|
+
instruction — rules and conventions (maps to .claude/rules/, .cursor/rules/, AGENTS.md)
|
|
90
|
+
learning — auto-discovered patterns
|
|
91
|
+
reference — architecture docs, API specs
|
|
92
|
+
feedback — corrections, preferences
|
|
93
|
+
journal — session logs
|
|
94
|
+
|
|
95
|
+
## Supported Tool Formats
|
|
96
|
+
|
|
97
|
+
claude-code, cursor, opencode, codex, conductor, zed, vscode-copilot, pi, raw
|
|
98
|
+
|
|
99
|
+
## Constraints
|
|
100
|
+
|
|
101
|
+
- This is a Convex Component — it requires a Convex backend
|
|
102
|
+
- Peer dependencies: convex (>=1.17.0), convex-helpers (>=0.1.67)
|
|
103
|
+
- Vector search requires an OpenAI API key (optional — full-text search works without it)
|
|
104
|
+
- Intelligent ingest requires an LLM API key (optional)
|
|
105
|
+
- Component tables are isolated under the agentMemory namespace
|
|
106
|
+
|
|
107
|
+
## Workflow Example
|
|
108
|
+
|
|
109
|
+
1. Agent starts a coding session
|
|
110
|
+
2. Agent calls getContextBundle() to load pinned + path-relevant memories
|
|
111
|
+
3. Agent uses memories as context for the session
|
|
112
|
+
4. Agent discovers a new convention: calls remember() to save it
|
|
113
|
+
5. Agent rates a memory as helpful: calls addFeedback() with "positive"
|
|
114
|
+
6. Session ends — memories persist for the next session, tool, or machine
|
|
115
|
+
7. On another machine, a different agent calls search() and finds the same memories
|
|
116
|
+
|
|
117
|
+
## Documentation
|
|
118
|
+
|
|
119
|
+
- Full API reference: prds/API-REFERENCE.md
|
|
120
|
+
- Setup guide: prds/SETUP.md
|
|
121
|
+
- Agent reference: llms.md
|
|
122
|
+
- Concise reference: llms.txt
|
package/llms.md
CHANGED
|
@@ -6,6 +6,21 @@ A Convex Component for persistent, cloud-synced agent memory. Markdown-first mem
|
|
|
6
6
|
|
|
7
7
|
You are working with `@waynesutton/agent-memory`, a Convex component that gives you persistent memory across sessions, tools, and machines. This document tells you how to use it effectively.
|
|
8
8
|
|
|
9
|
+
### When to Use This Component
|
|
10
|
+
|
|
11
|
+
Use agent-memory when you need:
|
|
12
|
+
- Persistent memory that survives across sessions, tools, and machines
|
|
13
|
+
- Cross-tool sync (memories created in Claude Code are available in Cursor, OpenCode, Codex, etc.)
|
|
14
|
+
- Searchable memory with full-text and vector/semantic search
|
|
15
|
+
- Intelligent ingest that auto-extracts facts and deduplicates against existing memories
|
|
16
|
+
- Feedback loops where agents rate memories to influence future context
|
|
17
|
+
- Multi-agent concurrency — multiple agents read/write simultaneously with ACID guarantees
|
|
18
|
+
- Real-time reactive queries — memory changes propagate instantly without polling
|
|
19
|
+
|
|
20
|
+
Do NOT use agent-memory when:
|
|
21
|
+
- You only need ephemeral conversation context within a single session
|
|
22
|
+
- You are not using Convex as your backend
|
|
23
|
+
|
|
9
24
|
## The Architecture
|
|
10
25
|
|
|
11
26
|
```
|
|
@@ -134,6 +149,16 @@ type FeedbackSentiment = "positive" | "negative" | "very_negative";
|
|
|
134
149
|
type ToolFormat = "claude-code" | "cursor" | "opencode" | "codex" | "conductor" | "zed" | "vscode-copilot" | "pi" | "raw";
|
|
135
150
|
```
|
|
136
151
|
|
|
152
|
+
## Why Convex
|
|
153
|
+
|
|
154
|
+
Built as a Convex Component, agent-memory inherits guarantees that file-based memory (CLAUDE.md, .cursor/rules) cannot provide:
|
|
155
|
+
|
|
156
|
+
- **Real-time reactive queries** — memories update live across all connected clients without polling
|
|
157
|
+
- **ACID transactional writes** — every create/update/archive is fully transactional, no partial saves
|
|
158
|
+
- **Multi-agent concurrency** — multiple agents read/write simultaneously with consistency guarantees
|
|
159
|
+
- **Zero infrastructure** — no database to provision, Convex handles storage, indexing, and search
|
|
160
|
+
- **Isolated component tables** — 9 tables in their own namespace, no conflicts with your app
|
|
161
|
+
|
|
137
162
|
## Convex Component Constraints
|
|
138
163
|
|
|
139
164
|
When working with this component, be aware of:
|
package/llms.txt
CHANGED
|
@@ -8,6 +8,20 @@ AI coding agents (Claude Code, Cursor, OpenCode, Codex, Conductor, Zed, VS Code
|
|
|
8
8
|
|
|
9
9
|
agent-memory creates a cloud-synced, markdown-first memory backend as a Convex Component with full-text search, vector/semantic search, intelligent ingest, feedback loops, memory relations, relevance decay, a read-only HTTP API, and an MCP server with 14 tools.
|
|
10
10
|
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Use agent-memory when you need:
|
|
14
|
+
- Persistent memory across sessions, tools, and machines
|
|
15
|
+
- Cross-tool sync between any supported agent format
|
|
16
|
+
- Searchable memory (full-text + vector/semantic)
|
|
17
|
+
- Intelligent ingest that deduplicates and manages facts automatically
|
|
18
|
+
- Multi-agent concurrency with ACID guarantees (Convex provides this)
|
|
19
|
+
- Real-time reactive queries (live updates without polling)
|
|
20
|
+
|
|
21
|
+
Do not use when:
|
|
22
|
+
- You only need ephemeral in-session context
|
|
23
|
+
- You are not using Convex as your backend
|
|
24
|
+
|
|
11
25
|
## Installation
|
|
12
26
|
|
|
13
27
|
npm install @waynesutton/agent-memory
|
|
@@ -123,4 +137,4 @@ claude-code, cursor, opencode, codex, conductor, zed, vscode-copilot, pi, raw
|
|
|
123
137
|
|
|
124
138
|
- Full API reference: prds/API-REFERENCE.md
|
|
125
139
|
- Setup guide: prds/SETUP.md
|
|
126
|
-
- README:
|
|
140
|
+
- README: README.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waynesutton/agent-memory",
|
|
3
|
-
"version": "0.0.1",
|
|
3
|
+
"version": "0.0.2-alpha.1",
|
|
4
4
|
"description": "A Convex Component for persistent, cloud-synced agent memory. Markdown-first memory backend for AI coding agents across CLIs and IDEs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/client/index.js",
|
|
@@ -45,6 +45,14 @@
|
|
|
45
45
|
"codex"
|
|
46
46
|
],
|
|
47
47
|
"license": "Apache-2.0",
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/waynesutton/agent-memory.git"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://github.com/waynesutton/agent-memory#readme",
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/waynesutton/agent-memory/issues"
|
|
55
|
+
},
|
|
48
56
|
"publishConfig": {
|
|
49
57
|
"access": "public"
|
|
50
58
|
},
|