mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-18 06:03:49 +00:00
adds withSupermemory wrapper and input/output processors for
mastra agents:
- input processor fetches and injects memories into system prompt
before llm calls
- output processor saves conversations to supermemory after
responses
- supports profile, query, and full memory search modes
- includes custom prompt templates and requestcontext support
const agent = new Agent(withSupermemory(
{ id: "my-assistant", model: openai("gpt-4o"), instructions:
"..." },
"user-123",
{ mode: "full", addMemory: "always", threadId: "conv-456" }
))
includes docs as well
this pr also reworks how the tools package works into shared modules
64 lines
1.6 KiB
JSON
64 lines
1.6 KiB
JSON
{
|
|
"name": "@supermemory/tools",
|
|
"type": "module",
|
|
"version": "1.4.00",
|
|
"description": "Memory tools for AI SDK and OpenAI function calling with supermemory",
|
|
"scripts": {
|
|
"build": "tsdown",
|
|
"dev": "tsdown --watch --ignore-watch .turbo",
|
|
"check-types": "tsc --noEmit",
|
|
"test": "vitest --testTimeout 100000",
|
|
"test:watch": "vitest --watch --testTimeout 100000"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/anthropic": "^2.0.25",
|
|
"@ai-sdk/openai": "^2.0.23",
|
|
"ai": "^5.0.29",
|
|
"openai": "^4.104.0",
|
|
"supermemory": "^3.0.0-alpha.26",
|
|
"zod": "^4.1.5"
|
|
},
|
|
"devDependencies": {
|
|
"@ai-sdk/provider": "^3.0.0",
|
|
"@anthropic-ai/sdk": "^0.65.0",
|
|
"@mastra/core": "^1.0.0",
|
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
"@types/bun": "^1.2.21",
|
|
"dotenv": "^16.6.1",
|
|
"tsdown": "^0.14.2",
|
|
"typescript": "^5.9.2",
|
|
"vitest": "^3.2.4"
|
|
},
|
|
"peerDependencies": {
|
|
"@ai-sdk/provider": "^2.0.0 || ^3.0.0"
|
|
},
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./ai-sdk": "./dist/ai-sdk.js",
|
|
"./claude-memory": "./dist/claude-memory.js",
|
|
"./mastra": "./dist/mastra.js",
|
|
"./openai": "./dist/openai/index.js",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"repository": {
|
|
"url": "https://github.com/supermemoryai/supermemory",
|
|
"directory": "packages/tools"
|
|
},
|
|
"keywords": [
|
|
"ai",
|
|
"sdk",
|
|
"openai",
|
|
"typescript",
|
|
"supermemory",
|
|
"memory",
|
|
"context",
|
|
"tools"
|
|
],
|
|
"license": "MIT"
|
|
}
|