memvault 0.0.1 → 0.0.3
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 +106 -87
- package/dist/integrations/ai-sdk.js +1 -1
- package/dist/integrations/ai-sdk.js.map +1 -1
- package/dist/integrations/anthropic.js +1 -1
- package/dist/integrations/anthropic.js.map +1 -1
- package/dist/integrations/openai.d.ts +1 -1
- package/dist/integrations/openai.js +1 -1
- package/dist/integrations/openai.js.map +1 -1
- package/package.json +11 -6
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# memvault
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/memvault)
|
|
4
|
+
[](https://www.npmjs.com/package/memvault)
|
|
4
5
|
[](https://www.typescriptlang.org/)
|
|
5
6
|
[](https://www.prisma.io/)
|
|
6
7
|
[](https://github.com/iamsaad640/memvault)
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
[](https://platform.openai.com)
|
|
10
11
|
[](https://docs.anthropic.com)
|
|
11
12
|
|
|
12
|
-
> Persistent, tenant-isolated memory tools for AI agents. Prisma-powered. Drop-in
|
|
13
|
+
> Persistent, tenant-isolated memory tools for AI agents. Prisma-powered. Drop-in for Vercel AI SDK, OpenAI, and Anthropic.
|
|
13
14
|
|
|
14
|
-
**No cloud. No
|
|
15
|
+
**No cloud. No $249/mo. Just your Postgres.**
|
|
15
16
|
|
|
16
17
|
## Install
|
|
17
18
|
|
|
@@ -21,18 +22,18 @@ npm install memvault
|
|
|
21
22
|
|
|
22
23
|
## Setup
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
**1. Add to your Prisma schema:**
|
|
25
26
|
|
|
26
27
|
```prisma
|
|
27
28
|
model MemvaultMemory {
|
|
28
|
-
id String
|
|
29
|
+
id String @id @default(cuid())
|
|
29
30
|
tenantId String
|
|
30
|
-
type String
|
|
31
|
+
type String @default("general")
|
|
31
32
|
content String
|
|
32
33
|
metadata Json?
|
|
33
34
|
tags String[]
|
|
34
|
-
createdAt DateTime
|
|
35
|
-
updatedAt DateTime
|
|
35
|
+
createdAt DateTime @default(now())
|
|
36
|
+
updatedAt DateTime @updatedAt
|
|
36
37
|
expiresAt DateTime?
|
|
37
38
|
|
|
38
39
|
@@index([tenantId])
|
|
@@ -41,13 +42,13 @@ model MemvaultMemory {
|
|
|
41
42
|
}
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
**2. Migrate:**
|
|
45
46
|
|
|
46
47
|
```bash
|
|
47
48
|
npx prisma migrate dev --name add-memvault
|
|
48
49
|
```
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
**3. Create vault:**
|
|
51
52
|
|
|
52
53
|
```typescript
|
|
53
54
|
import { MemVault } from "memvault"
|
|
@@ -55,7 +56,7 @@ import { MemVault } from "memvault"
|
|
|
55
56
|
const vault = new MemVault({ db: prisma.memvaultMemory })
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
## Usage
|
|
59
|
+
## Usage
|
|
59
60
|
|
|
60
61
|
### Vercel AI SDK
|
|
61
62
|
|
|
@@ -68,135 +69,153 @@ const tools = createMemVaultTools({ vault, tenantId: user.id })
|
|
|
68
69
|
|
|
69
70
|
const result = await generateText({
|
|
70
71
|
model: anthropic("claude-sonnet-4-6"),
|
|
72
|
+
system: "Always recall user memories before responding. Save preferences with memvault_remember.",
|
|
71
73
|
tools,
|
|
72
|
-
|
|
74
|
+
messages,
|
|
75
|
+
maxSteps: 10,
|
|
73
76
|
})
|
|
74
77
|
```
|
|
75
78
|
|
|
76
|
-
###
|
|
79
|
+
### Anthropic SDK
|
|
77
80
|
|
|
78
81
|
```typescript
|
|
79
|
-
import { createMemVaultTools } from "memvault/
|
|
82
|
+
import { createMemVaultTools } from "memvault/anthropic"
|
|
80
83
|
|
|
81
84
|
const { tools, handleToolCall } = createMemVaultTools({ vault, tenantId: user.id })
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
// Agentic loop — keep calling until no more tool use
|
|
87
|
+
while (true) {
|
|
88
|
+
const response = await anthropic.messages.create({
|
|
89
|
+
model: "claude-sonnet-4-6",
|
|
90
|
+
max_tokens: 1024,
|
|
91
|
+
system: "Always recall user memories before responding. Save preferences with memvault_remember.",
|
|
92
|
+
tools,
|
|
93
|
+
messages,
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
messages.push({ role: "assistant", content: response.content })
|
|
97
|
+
|
|
98
|
+
const toolUses = response.content.filter((b) => b.type === "tool_use")
|
|
99
|
+
if (!toolUses.length) break
|
|
100
|
+
|
|
101
|
+
const results = []
|
|
102
|
+
for (const tu of toolUses) {
|
|
103
|
+
const result = await handleToolCall(tu.name, tu.input)
|
|
104
|
+
results.push({ type: "tool_result", tool_use_id: tu.id, content: result })
|
|
93
105
|
}
|
|
106
|
+
messages.push({ role: "user", content: results })
|
|
94
107
|
}
|
|
95
108
|
```
|
|
96
109
|
|
|
97
|
-
###
|
|
110
|
+
### OpenAI SDK
|
|
98
111
|
|
|
99
112
|
```typescript
|
|
100
|
-
import { createMemVaultTools } from "memvault/
|
|
113
|
+
import { createMemVaultTools } from "memvault/openai"
|
|
101
114
|
|
|
102
115
|
const { tools, handleToolCall } = createMemVaultTools({ vault, tenantId: user.id })
|
|
103
116
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})
|
|
117
|
+
while (true) {
|
|
118
|
+
const response = await openai.chat.completions.create({
|
|
119
|
+
model: "gpt-5.4",
|
|
120
|
+
tools,
|
|
121
|
+
messages,
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
const msg = response.choices[0].message
|
|
125
|
+
messages.push(msg)
|
|
126
|
+
|
|
127
|
+
if (!msg.tool_calls?.length) break
|
|
110
128
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const result = await handleToolCall(block.name, block.input)
|
|
129
|
+
for (const tc of msg.tool_calls) {
|
|
130
|
+
const result = await handleToolCall(tc.function.name, JSON.parse(tc.function.arguments))
|
|
131
|
+
messages.push({ role: "tool", tool_call_id: tc.id, content: result })
|
|
115
132
|
}
|
|
116
133
|
}
|
|
117
134
|
```
|
|
118
135
|
|
|
119
|
-
|
|
136
|
+
## System Prompt
|
|
120
137
|
|
|
121
|
-
|
|
122
|
-
const tenant = vault.tenant("user-123")
|
|
123
|
-
|
|
124
|
-
await tenant.remember({
|
|
125
|
-
content: "Prefers dark mode",
|
|
126
|
-
type: "preference",
|
|
127
|
-
tags: ["ui", "theme"]
|
|
128
|
-
})
|
|
138
|
+
Add this to your system prompt for consistent recall behavior across all models:
|
|
129
139
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
140
|
+
```
|
|
141
|
+
Always call memvault_recall at the start of each conversation before responding.
|
|
142
|
+
Save anything the user tells you about their preferences or context with memvault_remember.
|
|
133
143
|
```
|
|
134
144
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Each SDK integration provides 4 tools:
|
|
145
|
+
Without this, some models may skip recall unless explicitly instructed.
|
|
138
146
|
|
|
139
|
-
|
|
140
|
-
|------|-------------|
|
|
141
|
-
| `memvault_remember` | Save information to persistent memory |
|
|
142
|
-
| `memvault_recall` | Retrieve relevant memories with filters |
|
|
143
|
-
| `memvault_update` | Update existing memories |
|
|
144
|
-
| `memvault_forget` | Delete a specific memory |
|
|
147
|
+
## Tools
|
|
145
148
|
|
|
146
|
-
|
|
149
|
+
| Tool | When the model uses it |
|
|
150
|
+
|------|----------------------|
|
|
151
|
+
| `memvault_recall` | Start of conversation, or when user asks about preferences |
|
|
152
|
+
| `memvault_remember` | When user shares preferences, context, or feedback |
|
|
153
|
+
| `memvault_update` | When existing info changes |
|
|
154
|
+
| `memvault_forget` | When user asks to forget something |
|
|
147
155
|
|
|
148
156
|
## Tenant Isolation
|
|
149
157
|
|
|
150
|
-
Every operation is scoped to a `tenantId`. No tenant can read
|
|
158
|
+
Every operation is scoped to a `tenantId`. No tenant can read or write another's memories — enforced at the query level, not the application level.
|
|
151
159
|
|
|
152
160
|
```typescript
|
|
153
161
|
const alice = vault.tenant("alice")
|
|
154
162
|
const bob = vault.tenant("bob")
|
|
155
163
|
|
|
156
|
-
await alice.remember({ content: "Alice's
|
|
157
|
-
await bob.recall() //
|
|
164
|
+
await alice.remember({ content: "Alice's preference" })
|
|
165
|
+
await bob.recall() // [] — Bob sees nothing
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Standalone API
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
const tenant = vault.tenant("user-123")
|
|
172
|
+
|
|
173
|
+
await tenant.remember({ content: "Prefers dark mode", type: "preference", tags: ["ui"] })
|
|
174
|
+
await tenant.recall({ type: "preference" })
|
|
175
|
+
await tenant.recall({ search: "dark" })
|
|
176
|
+
await tenant.update(id, { content: "Switched to light mode" })
|
|
177
|
+
await tenant.forget(id)
|
|
178
|
+
await tenant.forgetAll()
|
|
179
|
+
await tenant.count()
|
|
180
|
+
|
|
181
|
+
// TTL — auto-expires after N seconds
|
|
182
|
+
await tenant.remember({ content: "Temp session context", ttl: 3600 })
|
|
158
183
|
```
|
|
159
184
|
|
|
160
185
|
## Memory Types
|
|
161
186
|
|
|
162
|
-
|
|
187
|
+
Built-in: `preference`, `fact`, `feedback`, `project`, `reference`, `general`
|
|
163
188
|
|
|
164
|
-
|
|
165
|
-
- `fact` — Facts about the user
|
|
166
|
-
- `feedback` — User feedback on behavior
|
|
167
|
-
- `project` — Project context and details
|
|
168
|
-
- `reference` — Links and external references
|
|
169
|
-
- `general` — Default catch-all
|
|
170
|
-
- Any custom string
|
|
189
|
+
Any string works — types are just a filter. Use whatever makes sense for your app.
|
|
171
190
|
|
|
172
|
-
##
|
|
191
|
+
## API Reference
|
|
173
192
|
|
|
174
|
-
|
|
193
|
+
### `MemVault`
|
|
175
194
|
|
|
176
195
|
```typescript
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
type: "context",
|
|
180
|
-
ttl: 3600 // expires in 1 hour
|
|
181
|
-
})
|
|
196
|
+
new MemVault({ db: prisma.memvaultMemory })
|
|
197
|
+
vault.tenant(tenantId: string): TenantVault
|
|
182
198
|
```
|
|
183
199
|
|
|
184
|
-
|
|
200
|
+
### `TenantVault`
|
|
185
201
|
|
|
186
|
-
|
|
202
|
+
```typescript
|
|
203
|
+
tenant.remember(input: MemoryInput): Promise<Memory>
|
|
204
|
+
tenant.recall(filter?: MemoryFilter): Promise<Memory[]>
|
|
205
|
+
tenant.get(id: string): Promise<Memory | null>
|
|
206
|
+
tenant.update(id: string, input: MemoryUpdate): Promise<Memory>
|
|
207
|
+
tenant.forget(id: string): Promise<void>
|
|
208
|
+
tenant.forgetAll(): Promise<number>
|
|
209
|
+
tenant.count(filter?: MemoryFilter): Promise<number>
|
|
210
|
+
```
|
|
187
211
|
|
|
188
|
-
|
|
189
|
-
- `vault.tenant(tenantId)` — Get tenant-scoped vault
|
|
212
|
+
### `createMemVaultTools(config)`
|
|
190
213
|
|
|
191
|
-
|
|
214
|
+
```typescript
|
|
215
|
+
{ vault: MemVaultInstance, tenantId: string }
|
|
216
|
+
```
|
|
192
217
|
|
|
193
|
-
|
|
194
|
-
- `tenant.recall(filter?)` — Query memories
|
|
195
|
-
- `tenant.get(id)` — Get specific memory
|
|
196
|
-
- `tenant.update(id, input)` — Update a memory
|
|
197
|
-
- `tenant.forget(id)` — Delete a memory
|
|
198
|
-
- `tenant.forgetAll()` — Delete all tenant memories
|
|
199
|
-
- `tenant.count(filter?)` — Count memories
|
|
218
|
+
Returns `{ tools, handleToolCall }` for Anthropic/OpenAI, or a tools object for AI SDK.
|
|
200
219
|
|
|
201
220
|
## License
|
|
202
221
|
|
|
@@ -33,7 +33,7 @@ function createMemVaultTools(config) {
|
|
|
33
33
|
}
|
|
34
34
|
}),
|
|
35
35
|
memvault_recall: tool({
|
|
36
|
-
description: "Retrieve memories for this user.
|
|
36
|
+
description: "Retrieve memories for this user. Call this at the START of every conversation before responding \u2014 even if the user hasn't asked. Use it whenever you need context about preferences, past conversations, project details, or any previously saved information.",
|
|
37
37
|
inputSchema: z.object({
|
|
38
38
|
type: z.string().optional().describe("Filter by memory type, e.g. 'preference', 'project'"),
|
|
39
39
|
tags: z.array(z.string()).optional().describe("Filter by tags \u2014 returns memories matching ANY of these tags"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/integrations/ai-sdk.ts"],"sourcesContent":["import { tool } from \"ai\";\nimport { z } from \"zod\";\nimport { MemVault } from \"../memvault.js\";\nimport type { ToolsConfig } from \"../types.js\";\n\n/**\n * Create drop-in memory tools for the Vercel AI SDK.\n *\n * Usage:\n * ```ts\n * import { createMemVaultTools } from \"memvault/ai-sdk\"\n *\n * const tools = createMemVaultTools({ vault, tenantId: user.id })\n *\n * const result = await generateText({\n * model: anthropic(\"claude-sonnet-4-6\"),\n * tools,\n * prompt: \"Help the user...\"\n * })\n * ```\n */\nexport function createMemVaultTools(config: ToolsConfig) {\n const tenant = config.vault.tenant(config.tenantId);\n\n return {\n memvault_remember: tool({\n description:\n \"Save important information to persistent memory for this user. \" +\n \"Use this when the user shares preferences, facts about themselves, \" +\n \"project context, feedback, or anything worth remembering across sessions. \" +\n \"Memories persist permanently unless given a TTL.\",\n inputSchema: z.object({\n content: z\n .string()\n .describe(\"The information to remember. Be specific and concise.\"),\n type: z\n .string()\n .optional()\n .describe(\n 'Category: \"preference\", \"fact\", \"feedback\", \"project\", \"reference\", or any custom type. Defaults to \"general\".',\n ),\n tags: z\n .array(z.string())\n .optional()\n .describe(\"Tags for categorization and filtering, e.g. ['ui', 'theme']\"),\n ttl: z\n .number()\n .optional()\n .describe(\n \"Time-to-live in seconds. Omit for permanent memory. Use for temporary/session info.\",\n ),\n }),\n execute: async (input) => {\n const memory = await tenant.remember({\n content: input.content,\n type: input.type,\n tags: input.tags,\n ttl: input.ttl,\n });\n return {\n success: true,\n id: memory.id,\n message: `Remembered: \"${memory.content}\" (type: ${memory.type})`,\n };\n },\n }),\n\n memvault_recall: tool({\n description:\n \"Retrieve memories for this user.
|
|
1
|
+
{"version":3,"sources":["../../src/integrations/ai-sdk.ts"],"sourcesContent":["import { tool } from \"ai\";\nimport { z } from \"zod\";\nimport { MemVault } from \"../memvault.js\";\nimport type { ToolsConfig } from \"../types.js\";\n\n/**\n * Create drop-in memory tools for the Vercel AI SDK.\n *\n * Usage:\n * ```ts\n * import { createMemVaultTools } from \"memvault/ai-sdk\"\n *\n * const tools = createMemVaultTools({ vault, tenantId: user.id })\n *\n * const result = await generateText({\n * model: anthropic(\"claude-sonnet-4-6\"),\n * tools,\n * prompt: \"Help the user...\"\n * })\n * ```\n */\nexport function createMemVaultTools(config: ToolsConfig) {\n const tenant = config.vault.tenant(config.tenantId);\n\n return {\n memvault_remember: tool({\n description:\n \"Save important information to persistent memory for this user. \" +\n \"Use this when the user shares preferences, facts about themselves, \" +\n \"project context, feedback, or anything worth remembering across sessions. \" +\n \"Memories persist permanently unless given a TTL.\",\n inputSchema: z.object({\n content: z\n .string()\n .describe(\"The information to remember. Be specific and concise.\"),\n type: z\n .string()\n .optional()\n .describe(\n 'Category: \"preference\", \"fact\", \"feedback\", \"project\", \"reference\", or any custom type. Defaults to \"general\".',\n ),\n tags: z\n .array(z.string())\n .optional()\n .describe(\"Tags for categorization and filtering, e.g. ['ui', 'theme']\"),\n ttl: z\n .number()\n .optional()\n .describe(\n \"Time-to-live in seconds. Omit for permanent memory. Use for temporary/session info.\",\n ),\n }),\n execute: async (input) => {\n const memory = await tenant.remember({\n content: input.content,\n type: input.type,\n tags: input.tags,\n ttl: input.ttl,\n });\n return {\n success: true,\n id: memory.id,\n message: `Remembered: \"${memory.content}\" (type: ${memory.type})`,\n };\n },\n }),\n\n memvault_recall: tool({\n description:\n \"Retrieve memories for this user. Call this at the START of every conversation \" +\n \"before responding — even if the user hasn't asked. Use it whenever you need \" +\n \"context about preferences, past conversations, project details, or any \" +\n \"previously saved information.\",\n inputSchema: z.object({\n type: z\n .string()\n .optional()\n .describe(\"Filter by memory type, e.g. 'preference', 'project'\"),\n tags: z\n .array(z.string())\n .optional()\n .describe(\"Filter by tags — returns memories matching ANY of these tags\"),\n search: z\n .string()\n .optional()\n .describe(\"Search memory content (case-insensitive substring match)\"),\n limit: z\n .number()\n .optional()\n .describe(\"Max number of memories to return. Defaults to all.\"),\n }),\n execute: async (input) => {\n const memories = await tenant.recall({\n type: input.type,\n tags: input.tags,\n search: input.search,\n limit: input.limit,\n });\n return {\n count: memories.length,\n memories: memories.map((m) => ({\n id: m.id,\n type: m.type,\n content: m.content,\n tags: m.tags,\n createdAt: m.createdAt.toISOString(),\n })),\n };\n },\n }),\n\n memvault_forget: tool({\n description:\n \"Delete a specific memory by ID. Use when the user asks to forget something \" +\n \"or when information is outdated and should be removed.\",\n inputSchema: z.object({\n id: z.string().describe(\"The memory ID to delete\"),\n }),\n execute: async (input) => {\n await tenant.forget(input.id);\n return { success: true, message: `Memory ${input.id} deleted.` };\n },\n }),\n\n memvault_update: tool({\n description:\n \"Update an existing memory. Use when information has changed and the old \" +\n \"memory should be corrected rather than deleted and re-created.\",\n inputSchema: z.object({\n id: z.string().describe(\"The memory ID to update\"),\n content: z\n .string()\n .optional()\n .describe(\"New content to replace the existing memory content\"),\n type: z.string().optional().describe(\"New type for the memory\"),\n tags: z\n .array(z.string())\n .optional()\n .describe(\"New tags (replaces existing tags)\"),\n }),\n execute: async (input) => {\n const { id, ...updates } = input;\n const memory = await tenant.update(id, updates);\n return {\n success: true,\n id: memory.id,\n message: `Updated memory: \"${memory.content}\"`,\n };\n },\n }),\n };\n}\n"],"mappings":";;;AAAA,SAAS,YAAY;AACrB,SAAS,SAAS;AAoBX,SAAS,oBAAoB,QAAqB;AACvD,QAAM,SAAS,OAAO,MAAM,OAAO,OAAO,QAAQ;AAElD,SAAO;A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_recall",
|
|
34
|
-
description: "Retrieve memories for this user.
|
|
34
|
+
description: "Retrieve memories for this user. Call this at the START of every conversation before responding \u2014 even if the user hasn't asked. Use it whenever you need context about preferences, past conversations, or project details.",
|
|
35
35
|
input_schema: {
|
|
36
36
|
type: "object",
|
|
37
37
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/integrations/anthropic.ts"],"sourcesContent":["import type { ToolsConfig, TenantVaultInstance } from \"../types.js\";\n\n/**\n * Tool definitions for the Anthropic SDK.\n *\n * Usage:\n * ```ts\n * import { createMemVaultTools } from \"memvault/anthropic\"\n *\n * const { tools, handleToolCall } = createMemVaultTools({ vault, tenantId: user.id })\n *\n * const message = await anthropic.messages.create({\n * model: \"claude-sonnet-4-6\",\n * tools,\n * messages: [{ role: \"user\", content: \"Help me...\" }]\n * })\n * ```\n */\n\ninterface AnthropicTool {\n name: string;\n description: string;\n input_schema: {\n type: \"object\";\n properties: Record<string, unknown>;\n required?: string[];\n };\n}\n\nexport function createMemVaultTools(config: ToolsConfig) {\n const tenant = config.vault.tenant(config.tenantId);\n\n const tools: AnthropicTool[] = [\n {\n name: \"memvault_remember\",\n description:\n \"Save important information to persistent memory for this user. \" +\n \"Use this when the user shares preferences, facts about themselves, \" +\n \"project context, feedback, or anything worth remembering across sessions.\",\n input_schema: {\n type: \"object\",\n properties: {\n content: {\n type: \"string\",\n description:\n \"The information to remember. Be specific and concise.\",\n },\n type: {\n type: \"string\",\n description:\n 'Category: \"preference\", \"fact\", \"feedback\", \"project\", \"reference\", or any custom type. Defaults to \"general\".',\n },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Tags for categorization and filtering.\",\n },\n ttl: {\n type: \"number\",\n description:\n \"Time-to-live in seconds. Omit for permanent memory.\",\n },\n },\n required: [\"content\"],\n },\n },\n {\n name: \"memvault_recall\",\n description:\n \"Retrieve memories for this user.
|
|
1
|
+
{"version":3,"sources":["../../src/integrations/anthropic.ts"],"sourcesContent":["import type { ToolsConfig, TenantVaultInstance } from \"../types.js\";\n\n/**\n * Tool definitions for the Anthropic SDK.\n *\n * Usage:\n * ```ts\n * import { createMemVaultTools } from \"memvault/anthropic\"\n *\n * const { tools, handleToolCall } = createMemVaultTools({ vault, tenantId: user.id })\n *\n * const message = await anthropic.messages.create({\n * model: \"claude-sonnet-4-6\",\n * tools,\n * messages: [{ role: \"user\", content: \"Help me...\" }]\n * })\n * ```\n */\n\ninterface AnthropicTool {\n name: string;\n description: string;\n input_schema: {\n type: \"object\";\n properties: Record<string, unknown>;\n required?: string[];\n };\n}\n\nexport function createMemVaultTools(config: ToolsConfig) {\n const tenant = config.vault.tenant(config.tenantId);\n\n const tools: AnthropicTool[] = [\n {\n name: \"memvault_remember\",\n description:\n \"Save important information to persistent memory for this user. \" +\n \"Use this when the user shares preferences, facts about themselves, \" +\n \"project context, feedback, or anything worth remembering across sessions.\",\n input_schema: {\n type: \"object\",\n properties: {\n content: {\n type: \"string\",\n description:\n \"The information to remember. Be specific and concise.\",\n },\n type: {\n type: \"string\",\n description:\n 'Category: \"preference\", \"fact\", \"feedback\", \"project\", \"reference\", or any custom type. Defaults to \"general\".',\n },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Tags for categorization and filtering.\",\n },\n ttl: {\n type: \"number\",\n description:\n \"Time-to-live in seconds. Omit for permanent memory.\",\n },\n },\n required: [\"content\"],\n },\n },\n {\n name: \"memvault_recall\",\n description:\n \"Retrieve memories for this user. Call this at the START of every conversation \" +\n \"before responding — even if the user hasn't asked. Use it whenever you need \" +\n \"context about preferences, past conversations, or project details.\",\n input_schema: {\n type: \"object\",\n properties: {\n type: {\n type: \"string\",\n description: \"Filter by memory type.\",\n },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Filter by tags.\",\n },\n search: {\n type: \"string\",\n description: \"Search memory content (case-insensitive).\",\n },\n limit: {\n type: \"number\",\n description: \"Max number of memories to return.\",\n },\n },\n },\n },\n {\n name: \"memvault_forget\",\n description:\n \"Delete a specific memory by ID. Use when the user asks to forget something.\",\n input_schema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"The memory ID to delete.\" },\n },\n required: [\"id\"],\n },\n },\n {\n name: \"memvault_update\",\n description:\n \"Update an existing memory. Use when information has changed.\",\n input_schema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"The memory ID to update.\" },\n content: { type: \"string\", description: \"New content.\" },\n type: { type: \"string\", description: \"New type.\" },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"New tags.\",\n },\n },\n required: [\"id\"],\n },\n },\n ];\n\n /**\n * Execute a tool call from the Anthropic API response.\n * Pass the tool name and input object from the tool_use content block.\n */\n async function handleToolCall(\n name: string,\n input: Record<string, unknown>,\n ): Promise<string> {\n switch (name) {\n case \"memvault_remember\": {\n const memory = await tenant.remember({\n content: input.content as string,\n type: input.type as string | undefined,\n tags: input.tags as string[] | undefined,\n ttl: input.ttl as number | undefined,\n });\n return JSON.stringify({\n success: true,\n id: memory.id,\n message: `Remembered: \"${memory.content}\"`,\n });\n }\n case \"memvault_recall\": {\n const memories = await tenant.recall({\n type: input.type as string | undefined,\n tags: input.tags as string[] | undefined,\n search: input.search as string | undefined,\n limit: input.limit as number | undefined,\n });\n return JSON.stringify({\n count: memories.length,\n memories: memories.map((m) => ({\n id: m.id,\n type: m.type,\n content: m.content,\n tags: m.tags,\n createdAt: m.createdAt.toISOString(),\n })),\n });\n }\n case \"memvault_forget\": {\n await tenant.forget(input.id as string);\n return JSON.stringify({\n success: true,\n message: `Memory ${input.id} deleted.`,\n });\n }\n case \"memvault_update\": {\n const { id, ...updates } = input;\n const memory = await tenant.update(id as string, updates);\n return JSON.stringify({\n success: true,\n id: memory.id,\n message: `Updated memory: \"${memory.content}\"`,\n });\n }\n default:\n return JSON.stringify({ error: `Unknown tool: ${name}` });\n }\n }\n\n return { tools, handleToolCall };\n}\n"],"mappings":";AA6BO,SAAS,oBAAoB,QAAqB;AACvD,Q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AM,EAAE;AAAA,QAC7B,CAAC;AAAA,MACH;AAAA,MACA,KAAK,mBAAmB;AACtB,cAAM,EAAE,IAAI,GAAG,QAAQ,IAAI;AAC3B,cAAM,SAAS,MAAM,OAAO,OAAO,IAAc,OAAO;AACxD,eAAO,KAAK,UAAU;AAAA,UACpB,SAAS;AAAA,UACT,IAAI,OAAO;AAAA,UACX,SAAS,oBAAoB,OAAO,OAAO;AAAA,QAC7C,CAAC;AAAA,MACH;AAAA,MACA;AACE,eAAO,KAAK,UAAU,EAAE,OAAO,iBAAiB,IAAI,GAAG,CAAC;AAAA,IAC5D;AAAA,EACF;AAEA,SAAO,EAAE,OAAO,eAAe;AACjC;","names":[]}
|
|
@@ -10,7 +10,7 @@ import { g as ToolsConfig } from '../types-BbBXYjeB.js';
|
|
|
10
10
|
* const { tools, handleToolCall } = createMemVaultTools({ vault, tenantId: user.id })
|
|
11
11
|
*
|
|
12
12
|
* const response = await openai.responses.create({
|
|
13
|
-
* model: "gpt-
|
|
13
|
+
* model: "gpt-5.4",
|
|
14
14
|
* tools,
|
|
15
15
|
* input: "Help the user..."
|
|
16
16
|
* })
|
|
@@ -36,7 +36,7 @@ function createMemVaultTools(config) {
|
|
|
36
36
|
type: "function",
|
|
37
37
|
function: {
|
|
38
38
|
name: "memvault_recall",
|
|
39
|
-
description: "Retrieve memories for this user.
|
|
39
|
+
description: "Retrieve memories for this user. Call this at the START of every conversation before responding \u2014 even if the user hasn't asked. Use it whenever you need context about preferences, past conversations, or project details.",
|
|
40
40
|
parameters: {
|
|
41
41
|
type: "object",
|
|
42
42
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/integrations/openai.ts"],"sourcesContent":["import type { ToolsConfig, TenantVaultInstance } from \"../types.js\";\n\n/**\n * Tool definitions for the OpenAI SDK (Responses API & Chat Completions).\n *\n * Usage:\n * ```ts\n * import { createMemVaultTools, handleToolCall } from \"memvault/openai\"\n *\n * const { tools, handleToolCall } = createMemVaultTools({ vault, tenantId: user.id })\n *\n * const response = await openai.responses.create({\n * model: \"gpt-
|
|
1
|
+
{"version":3,"sources":["../../src/integrations/openai.ts"],"sourcesContent":["import type { ToolsConfig, TenantVaultInstance } from \"../types.js\";\n\n/**\n * Tool definitions for the OpenAI SDK (Responses API & Chat Completions).\n *\n * Usage:\n * ```ts\n * import { createMemVaultTools, handleToolCall } from \"memvault/openai\"\n *\n * const { tools, handleToolCall } = createMemVaultTools({ vault, tenantId: user.id })\n *\n * const response = await openai.responses.create({\n * model: \"gpt-5.4\",\n * tools,\n * input: \"Help the user...\"\n * })\n * ```\n */\n\ninterface OpenAIFunctionTool {\n type: \"function\";\n function: {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n };\n}\n\nexport function createMemVaultTools(config: ToolsConfig) {\n const tenant = config.vault.tenant(config.tenantId);\n\n const tools: OpenAIFunctionTool[] = [\n {\n type: \"function\",\n function: {\n name: \"memvault_remember\",\n description:\n \"Save important information to persistent memory for this user. \" +\n \"Use this when the user shares preferences, facts about themselves, \" +\n \"project context, feedback, or anything worth remembering across sessions.\",\n parameters: {\n type: \"object\",\n properties: {\n content: {\n type: \"string\",\n description:\n \"The information to remember. Be specific and concise.\",\n },\n type: {\n type: \"string\",\n description:\n 'Category: \"preference\", \"fact\", \"feedback\", \"project\", \"reference\", or any custom type. Defaults to \"general\".',\n },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Tags for categorization and filtering.\",\n },\n ttl: {\n type: \"number\",\n description:\n \"Time-to-live in seconds. Omit for permanent memory.\",\n },\n },\n required: [\"content\"],\n },\n },\n },\n {\n type: \"function\",\n function: {\n name: \"memvault_recall\",\n description:\n \"Retrieve memories for this user. Call this at the START of every conversation \" +\n \"before responding — even if the user hasn't asked. Use it whenever you need \" +\n \"context about preferences, past conversations, or project details.\",\n parameters: {\n type: \"object\",\n properties: {\n type: {\n type: \"string\",\n description: \"Filter by memory type.\",\n },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"Filter by tags.\",\n },\n search: {\n type: \"string\",\n description: \"Search memory content (case-insensitive).\",\n },\n limit: {\n type: \"number\",\n description: \"Max number of memories to return.\",\n },\n },\n required: [],\n },\n },\n },\n {\n type: \"function\",\n function: {\n name: \"memvault_forget\",\n description:\n \"Delete a specific memory by ID. Use when the user asks to forget something.\",\n parameters: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"The memory ID to delete.\" },\n },\n required: [\"id\"],\n },\n },\n },\n {\n type: \"function\",\n function: {\n name: \"memvault_update\",\n description:\n \"Update an existing memory. Use when information has changed.\",\n parameters: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"The memory ID to update.\" },\n content: { type: \"string\", description: \"New content.\" },\n type: { type: \"string\", description: \"New type.\" },\n tags: {\n type: \"array\",\n items: { type: \"string\" },\n description: \"New tags.\",\n },\n },\n required: [\"id\"],\n },\n },\n },\n ];\n\n /**\n * Execute a tool call returned by the OpenAI API.\n * Pass the function name and parsed arguments.\n */\n async function handleToolCall(\n name: string,\n args: Record<string, unknown>,\n ): Promise<string> {\n switch (name) {\n case \"memvault_remember\": {\n const memory = await tenant.remember({\n content: args.content as string,\n type: args.type as string | undefined,\n tags: args.tags as string[] | undefined,\n ttl: args.ttl as number | undefined,\n });\n return JSON.stringify({\n success: true,\n id: memory.id,\n message: `Remembered: \"${memory.content}\"`,\n });\n }\n case \"memvault_recall\": {\n const memories = await tenant.recall({\n type: args.type as string | undefined,\n tags: args.tags as string[] | undefined,\n search: args.search as string | undefined,\n limit: args.limit as number | undefined,\n });\n return JSON.stringify({\n count: memories.length,\n memories: memories.map((m) => ({\n id: m.id,\n type: m.type,\n content: m.content,\n tags: m.tags,\n createdAt: m.createdAt.toISOString(),\n })),\n });\n }\n case \"memvault_forget\": {\n await tenant.forget(args.id as string);\n return JSON.stringify({\n success: true,\n message: `Memory ${args.id} deleted.`,\n });\n }\n case \"memvault_update\": {\n const { id, ...updates } = args;\n const memory = await tenant.update(id as string, updates);\n return JSON.stringify({\n success: true,\n id: memory.id,\n message: `Updated memory: \"${memory.content}\"`,\n });\n }\n default:\n return JSON.stringify({ error: `Unknown tool: ${name}` });\n }\n }\n\n return { tools, handleToolCall };\n}\n"],"mappings":";AA4BO,SAAS,oBAAoB,QAAqB;AACvD,QAAM,SAAS,OAAO,MAAM,OAAO,OAAO,QAAQ;AAElD,QAAM,QAA8B;AAAA,IAClC;AAAA,MACE,MAAM;AAAA,MACN,UAAU;AAAA,QACR,MAAM;AAAA,QACN,aACE;AAAA,QAGF,YAAY;AAAA,UACV,MAAM;AAAA,UACN,YAAY;AAAA,YACV,SAAS;AAAA,cACP,MAAM;AAAA,cACN,aACE;AAAA,YACJ;AAAA,YACA,MAAM;AAAA,cACJ,MAAM;AAAA,cACN,aACE;AAAA,YACJ;AAAA,YACA,MAAM;AAAA,cACJ,MAAM;AAAA,cACN,OAAO,EAAE,MAAM,SAAS;AAAA,cACxB,aAAa;AAAA,YACf;AAAA,YACA,KAAK;AAAA,cACH,MAAM;AAAA,cACN,aACE;AAAA,YACJ;AAAA,UACF;AAAA,UACA,UAAU,CAAC,SAAS;AAAA,QACtB;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,UAAU;AAAA,QACR,MAAM;AAAA,QACN,aACE;AAAA,QAGF,YAAY;AAAA,UACV,MAAM;AAAA,UACN,YAAY;AAAA,YACV,MAAM;AAAA,cACJ,MAAM;AAAA,cACN,aAAa;AAAA,YACf;AAAA,YACA,MAAM;AAAA,cACJ,MAAM;AAAA,cACN,OAAO,EAAE,MAAM,SAAS;AAAA,cACxB,aAAa;AAAA,YACf;AAAA,YACA,QAAQ;AAAA,cACN,MAAM;AAAA,cACN,aAAa;AAAA,YACf;AAAA,YACA,OAAO;AAAA,cACL,MAAM;AAAA,cACN,aAAa;AAAA,YACf;AAAA,UACF;AAAA,UACA,UAAU,CAAC;AAAA,QACb;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,MA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AAAA,UACpB,OAAO,SAAS;AAAA,UAChB,UAAU,SAAS,IAAI,CAAC,OAAO;AAAA,YAC7B,IAAI,EAAE;AAAA,YACN,MAAM,EAAE;AAAA,YACR,SAAS,EAAE;AAAA,YACX,MAAM,EAAE;AAAA,YACR,WAAW,EAAE,UAAU,YAAY;AAAA,UACrC,EAAE;AAAA,QACJ,CAAC;AAAA,MACH;AAAA,MACA,KAAK,mBAAmB;AACtB,cAAM,OAAO,OAAO,KAAK,EAAY;AACrC,eAAO,KAAK,UAAU;AAAA,UACpB,SAAS;AAAA,UACT,SAAS,UAAU,KAAK,EAAE;AAAA,QAC5B,CAAC;AAAA,MACH;AAAA,MACA,KAAK,mBAAmB;AACtB,cAAM,EAAE,IAAI,GAAG,QAAQ,IAAI;AAC3B,cAAM,SAAS,MAAM,OAAO,OAAO,IAAc,OAAO;AACxD,eAAO,KAAK,UAAU;AAAA,UACpB,SAAS;AAAA,UACT,IAAI,OAAO;AAAA,UACX,SAAS,oBAAoB,OAAO,OAAO;AAAA,QAC7C,CAAC;AAAA,MACH;AAAA,MACA;AACE,eAAO,KAAK,UAAU,EAAE,OAAO,iBAAiB,IAAI,GAAG,CAAC;AAAA,IAC5D;AAAA,EACF;AAEA,SAAO,EAAE,OAAO,eAAe;AACjC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memvault",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Persistent, tenant-isolated memory tools for AI agents. Drop-in tools for Vercel AI SDK, OpenAI, and Anthropic. Prisma-powered.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,7 +33,10 @@
|
|
|
33
33
|
"test": "vitest run",
|
|
34
34
|
"test:watch": "vitest",
|
|
35
35
|
"lint": "tsc --noEmit",
|
|
36
|
-
"prepublishOnly": "npm run build"
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
37
|
+
"docs:dev": "vitepress dev docs",
|
|
38
|
+
"docs:build": "vitepress build docs",
|
|
39
|
+
"docs:preview": "vitepress preview docs"
|
|
37
40
|
},
|
|
38
41
|
"keywords": [
|
|
39
42
|
"ai",
|
|
@@ -52,6 +55,7 @@
|
|
|
52
55
|
],
|
|
53
56
|
"author": "iamsaad640",
|
|
54
57
|
"license": "MIT",
|
|
58
|
+
"homepage": "https://iamsaad640.github.io/memvault",
|
|
55
59
|
"repository": {
|
|
56
60
|
"type": "git",
|
|
57
61
|
"url": "https://github.com/iamsaad640/memvault.git"
|
|
@@ -77,14 +81,15 @@
|
|
|
77
81
|
}
|
|
78
82
|
},
|
|
79
83
|
"devDependencies": {
|
|
84
|
+
"@anthropic-ai/sdk": "0.82.0",
|
|
80
85
|
"@prisma/client": "7.6.0",
|
|
81
|
-
"prisma": "7.6.0",
|
|
82
86
|
"ai": "6.0.142",
|
|
83
|
-
"zod": "4.3.6",
|
|
84
87
|
"openai": "6.33.0",
|
|
85
|
-
"
|
|
88
|
+
"prisma": "7.6.0",
|
|
86
89
|
"tsup": "8.5.1",
|
|
87
90
|
"typescript": "6.0.2",
|
|
88
|
-
"
|
|
91
|
+
"vitepress": "^1.6.4",
|
|
92
|
+
"vitest": "4.1.2",
|
|
93
|
+
"zod": "4.3.6"
|
|
89
94
|
}
|
|
90
95
|
}
|