Commit graph

21 commits

Author SHA1 Message Date
sreedharsreeram
589edd3437 updated typescript and python sdk (#878) 2026-04-25 01:43:13 +00:00
sreedharsreeram
d7ee078ae9 mastra object structure udpates (#881) 2026-04-24 23:47:46 +00:00
sreedharsreeram
c76d27f284 custom id implementation (#877) 2026-04-24 23:43:16 +00:00
MaheshtheDev
23a60f90f6 tools: timeout and default option on error to skip (#875)
Some checks failed
Publish Tools / publish (push) Has been cancelled
**`withSupermemory`** **(AI SDK)**

- **`skipMemoryOnError`** **defaults to** **`true`**. memory errors/timeouts log and the model runs on the **original** prompt unless you set `skipMemoryOnError: false`.
- **Pre-LLM** **`/v4/profile`** **is aborted after 5s** via `AbortSigna`

**Docs**

- `packages/tools/README.md`, **`apps/docs/integrations/ai-sdk.md`**
2026-04-23 00:11:20 +00:00
MaheshtheDev
a00a751e10 pkg(tools): Expose raw search results in MemoryPromptData for prompt templates (#787)
Expose raw search results in `MemoryPromptData` so prompt templates can traverse, filter, and selectively include results based on metadata (e.g. score, source).

##### Usage example

```typescript
const promptTemplate = (data: MemoryPromptData) => {
  const relevant = data.searchResults.filter(
    (r) => (r.metadata?.score as number) > 0.7
  )
  return `${data.userMemories}\n${relevant.map(r => r.memory).join('\n')}`
}
```
2026-03-19 00:38:53 +00:00
nexxeln
9553434c9a mastra integration (#717)
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
2026-02-03 00:43:08 +00:00
MaheshtheDev
0853bc86cb feat: tools package strict mode for openai models (#699) 2026-01-23 03:15:39 +00:00
MaheshtheDev
32a7eff3af fix(tools): multi step agent prompt caching (#685) 2026-01-20 01:30:43 +00:00
MaheshtheDev
68d4d95c1d feat: allow prompt template for @supermemory/tools package (#655)
## Add customizable prompt templates for memory injection

**Changes:**

- Add `promptTemplate` option to `withSupermemory()` for full control over injected memory format (XML, custom branding, etc.)
- New `MemoryPromptData` interface with `userMemories` and `generalSearchMemories` fields
- Exclude `system` messages from persistence to avoid storing injected prompts
- Add JSDoc comments to all public interfaces for better DevEx

**Usage:**

```typescript
const customPrompt = (data: MemoryPromptData) => `
<user_memories>
${data.userMemories}
${data.generalSearchMemories}
</user_memories>
`.trim()

const model = withSupermemory(openai("gpt-4"), "user-123", {
  promptTemplate: customPrompt,
})
```
2026-01-07 03:48:16 +00:00
MaheshtheDev
fae0afa7da chore: fix tsdown defaults in withsupermemory package (#623) 2025-12-21 19:49:49 +00:00
Arnab Mondal
f9d304ec3e
feat(tools): allow passing apiKey via options for browser support (#599)
Co-authored-by: Mahesh Sanikommmu <mahesh.svmr@gmail.com>
2025-12-05 00:34:44 +05:30
MaheshtheDev
97071502a7 feat(@supermemory/tools): capture assitant responses with filtered memory (#539)
### Added streaming support to the Supermemory middleware and improved memory handling in the AI SDK integration.

### What changed?

- Refactored the middleware architecture to support both streaming and non-streaming responses
- Extracted memory prompt functionality into a separate module (`memory-prompt.ts`)
- Added memory saving capability for streaming responses
- Improved the formatting of memory content with a "User Supermemories:" prefix
- Added utility function to filter out supermemories from content
- Created a new streaming example in the test app with a dedicated route and page
- Updated version from 1.3.0 to 1.3.1 in package.json
- Simplified installation instructions in [README.m](http://README.md)d
2025-10-28 22:28:22 +00:00
MaheshtheDev
b3aab91489 feat: withSupermemory for openai sdk (#531)
### TL;DR

Added OpenAI SDK middleware support for SuperMemory integration, allowing direct memory injection without AI SDK dependency.

### What changed?

- Added `withSupermemory` middleware for OpenAI SDK that automatically injects relevant memories into chat completions
- Implemented memory search and injection functionality for OpenAI clients
- Restructured the OpenAI module to separate tools and middleware functionality
- Updated README with comprehensive documentation and examples for the new OpenAI middleware
- Added test implementation with a Next.js API route example
- Reorganized package exports to support the new structure
2025-10-27 20:08:11 +00:00
Mahesh Sanikommmu
de6a1aef9c fix(tools): update the docs for conversational 2025-10-19 18:21:48 -07:00
Mahesh Sanikommmu
d8874e8c17 fix: add memory code params and documentation in readme 2025-10-10 21:06:52 -07:00
MaheshtheDev
35ac9e086b feat: ai sdk language model withSupermemory (#446) 2025-10-10 05:10:03 +00:00
Dhravya Shah
4d6fd37c99 fix: model names 2025-10-03 02:41:49 -07:00
Dhravya Shah
c65f4e97ac fix: docs 2025-10-03 02:37:30 -07:00
Dhravya Shah
53bc296155 feat: Claude memory integration 2025-09-29 13:40:56 -07:00
Dhravya Shah
90fd19f215 update: Readme 2025-09-13 22:09:40 -07:00
CodeWithShreyans
cae7051d1a
feat: new tools package (#407)
Some checks failed
Publish AI SDK / publish (push) Has been cancelled
2025-09-02 23:11:19 +00:00