Commit graph

1143 commits

Author SHA1 Message Date
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
MaheshtheDev
c534008001 feat: delete connection without removing the documents (#778)
- Deleting Connection without removing documents
- Updating the Docs with new param
2026-03-17 23:21:36 +00:00
MaheshtheDev
6ce7357ffb docs: clarify metadata-only PATCH does not reindex (#784)
Updates docs to match the new behavior where metadata-only PATCH updates do not trigger reindexing:

- **update-delete-memories/overview.mdx** — Distinguishes content changes (reindex) vs metadata-only (no reindex), adds a note about `accepted`-style updates
- **document-operations.mdx** — Clarifies that only content changes trigger reprocessing
- **add-memories.mdx** and **add-memories/overview.mdx** — Add notes on metadata-only behavior
- **memory-api/ingesting.mdx** — Splits update behavior into content vs metadata-only
- **memory-api/creation/adding-memories.mdx** — Adds note for the “Adding Additional Metadata to Files” flow
2026-03-17 20:48:52 +00:00
MaheshtheDev
93bc74883a chore: modal fixes and space selectors issue (#782)
This PR fixes

- modal popup trigger fixes
- space selector ux weird behaviour when selected
2026-03-16 14:05:58 +00:00
Mahesh Sanikommu
962fb85cd3
feat: empty state action for new spaces (#780)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-15 11:02:14 -07:00
Dhravya Shah
ba56b3699b
Fix Google Docs/Sheets/Slides source URL generation in document modal (#781)
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-14 15:21:03 -07:00
MaheshtheDev
84d0fb802a feat: bulk delete documents in nova app (#777)
![image.png](https://app.graphite.com/user-attachments/assets/aacbb007-cb5e-400c-a21e-f08a54320154.png)
2026-03-10 15:29:25 +00:00
Dhravya
984297b62d
Add Supermemory integration for Microsoft Agent Framework (#775)
## Summary

This PR introduces comprehensive Supermemory integration for the Microsoft Agent Framework, providing three complementary approaches to add persistent memory capabilities to agents: middleware for automatic memory injection, context providers for session-based memory management, and tools for explicit memory operations.

## Key Changes

- **SupermemoryChatMiddleware**: Automatic memory injection middleware that fetches relevant memories from Supermemory before LLM calls and optionally saves conversations. Supports three modes:
  - `"profile"`: Injects all static and dynamic profile memories
  - `"query"`: Searches for memories relevant to the current user message
  - `"full"`: Combines both profile and query modes

- **SupermemoryContextProvider**: Idiomatic context provider following the Agent Framework pattern (similar to built-in Mem0 integration). Integrates with the session pipeline via `before_run()` and `after_run()` hooks for automatic memory retrieval and storage.

- **SupermemoryTools**: FunctionTool-compatible tools that agents can use for explicit memory operations:
  - `search_memories()`: Search for specific memories
  - `add_memory()`: Add new memories
  - `get_profile()`: Retrieve user profile

- **Utility Functions**: Helper functions for:
  - Memory deduplication across static, dynamic, and search result sources
  - Profile-to-markdown conversion for LLM consumption
  - Message extraction and conversation formatting
  - Logging with configurable verbosity

- **Exception Hierarchy**: Custom exceptions for better error handling:
  - `SupermemoryConfigurationError`: Missing/invalid configuration
  - `SupermemoryAPIError`: API request failures
  - `SupermemoryNetworkError`: Network connectivity issues
  - `SupermemoryMemoryOperationError`: Memory operation failures

- **Comprehensive Documentation**: README with quick start examples, configuration options, and API reference for all three integration approaches.

- **Test Suite**: Unit tests covering middleware, context provider, tools, and utility functions with proper mocking and error scenarios.

## Implementation Details

- Supports both async (aiohttp) and sync (requests) HTTP clients with automatic fallback
- Handles multiple message formats (dict, objects with attributes, content arrays)
- Configurable memory storage with optional conversation grouping via `conversation_id`
- Environment variable fallback for API key configuration (`SUPERMEMORY_API_KEY`)
- Background task management for non-blocking memory operations in middleware
- Proper async/sync compatibility for the Supermemory SDK

https://claude.ai/code/session_012idB5y6UGK3zmeFULgTc4z
2026-03-10 01:49:45 +00:00
sohamd22
07875ad1a1 update forget implementation in mcp (#773)
### TL;DR

Enhanced the `forgetMemory` method to try exact content matching first, then fall back to semantic search with a high similarity threshold for more precise memory deletion.

### What changed?

The `forgetMemory` method now uses a two-step approach: first attempting exact content matching via the API, and if that fails with a 404, falling back to semantic search with a similarity threshold of 0.85. The search method also accepts an optional threshold parameter. Error messages now distinguish between exact matches and semantic matches, including similarity scores in the response.

### How to test?

1. Call `forgetMemory` with the exact content of an existing memory to verify direct deletion
2. Call `forgetMemory` with similar but not identical content to test the semantic search fallback
3. Call `forgetMemory` with completely unrelated content to verify the "no matching memory found" response
4. Verify that success messages indicate whether deletion used exact matching or semantic matching with similarity scores

### Why make this change?

This approach provides more precise memory deletion by prioritizing exact matches while still offering a fallback for similar content. The high similarity threshold (0.85) ensures that only very similar memories are deleted when exact matches aren't found, reducing the risk of accidentally deleting unrelated memories.
2026-03-09 18:59:08 +00:00
Vedant Mahajan
9f7f415dd5
perf: Optimize array traversal for empty memory-graph documents (#770) 2026-03-07 19:34:25 -08:00
sreedharsreeram
d0d90e9359 fix: use correct space context when sending messages (#772) 2026-03-07 21:11:10 +00:00
MaheshtheDev
3d916d038f chore: chrome extension url fixes (#759) 2026-03-07 04:59:37 +00:00
Hardik Vora
5d12a59bc1
fix: added chat history button on mobile view (#736) 2026-03-06 08:56:59 -08:00
Dhravya Shah
1afb90145d
😭 fixing builds (#767) 2026-03-05 19:26:05 -08:00
Dhravya Shah
bdd1f36f1d one more try 2026-03-05 14:30:57 -08:00
Dhravya Shah
b1d545c4ba fix: 2026-03-05 14:24:50 -08:00
Prasanna721
6883a68c06 feat: add plugin auth connect page (#764)
feat: add plugin auth connect page

Add /auth/connect page for plugin OAuth flow with callback origin validation, user consent step, and upgrade gate.
2026-03-05 21:34:27 +00:00
Dhravya Shah
80a75f73ba fix: forget api 2026-03-05 10:11:34 -08:00
Prasanna721
2bbc7fc7a5 feat(mcp): add interactive memory graph MCP App visualization (#763)
### feat(mcp): add memory graph visualization MCP App

#### Summary
  - Add interactive force-directed graph visualization as an MCP App using `force-graph` + `d3-force-3d`
  - Register `memory-graph` and `fetch-graph-data` tools with MCP Apps SDK UI resources
  - Add graph API client methods (`getGraphBounds`, `getGraphViewport`) to `SupermemoryClient`
  - Set up Vite + `vite-plugin-singlefile` build pipeline to produce a self-contained HTML bundle
  - Support light/dark theme, zoom controls, node popups, and legend

  #### Files changed
  - `apps/mcp/src/server.ts` — register app tools + HTML resource
  - `apps/mcp/src/client.ts` — add graph API types and methods
  - `apps/mcp/src/ui/mcp-app.ts` — force-graph visualization app
  - `apps/mcp/src/ui/global.css`, `mcp-app.css` — styling
  - `apps/mcp/mcp-app.html` — entry HTML for Vite
  - `apps/mcp/vite.config.ts` — Vite single-file build config
  - `apps/mcp/package.json` — add UI deps and build scripts
  - `apps/mcp/wrangler.jsonc` — add HTML text import rule
2026-03-05 16:28:34 +00:00
Soumya Snigdha Kundu
5e5d446659
fix: remove dead IS_DEV constant and no-op ternary in memories-grid (#760) 2026-03-03 19:02:58 -08:00
Viasocket Interns
48845bb072
feat: adding viaSocket integration page (#757)
Co-authored-by: vishalparmarr <vishalbusiness3108@gmail.com>
2026-03-02 11:37:42 -08:00
Dhravya
bd69e2f061
docs: add scoped key deletion endpoint to auth docs (#756)
Documents the new DELETE /v3/auth/scoped-key/:keyId endpoint
for disabling container-scoped API keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 01:06:12 +00:00
Dhravya Shah
0c46362505 fix: properly attribute revenue with posthog 2026-02-25 18:28:13 -08:00
Prasanna721
c82dcdc30a fix(mcp): hide containerTag from tool schemas when x-sm-project header is set (#749)
### fix(mcp): prevent LLM from overriding x-sm-project container tag

- When `x-sm-project` header is configured, the `containerTag` field is now
    excluded from memory/recall/context tool schemas
 - This prevents LLMs from overriding the configured project by picking a
    different containerTag from the available projects list
  - When no header is set, behavior is unchanged — containerTag remains visible
    in schemas for manual project selection via listProjects
2026-02-20 04:34:57 +00:00
Dhravya Shah
7030c8bdb0 fix: effective tag 2026-02-19 20:12:19 -08:00
Prasanna721
7339822997 fix: space deletion state cleanup and single-select for add document (#748)
fix: space deletion + new space not reflecting in selector

Deleting a space wasn't switching back to Nova Spaces because we were reading stale cache data

  New spaces created from the add-document modal weren't showing up in the dropdown

  Added single-select mode to the space selector in the add-document flow since you're picking one space, not multiple.
2026-02-19 07:09:47 +00:00
Prasanna721
cc2dcaa306 fix: space deletion not switching to Nova Spaces and new space not appearing in dropdown (#747)
### fix: space selector state bugs on create and delete

Two related bugs in the space selector caused by query cache key mismatches in `use-project-mutations.ts`:

1. New spaces not appearing in dropdown until refresh — wrong query cache was being invalidated after creation.
 2. App stuck on deleted space instead of switching to Nova Spaces — delete handler was reading from an empty cache, so the selection never updated.
2026-02-19 06:54:32 +00:00
Prasanna721
cda3bca0d0 docs: add FAQ section to OpenClaw integration page (#746)
docs: add FAQ section to OpenClaw integration page

 Added FAQ section below Manual Configuration with 5 questions covering installation, custom container tags for Twitter
  bookmarks, work/personal memory separation, non-technical setup via agent, and per-channel session memory separation with
  feature request CTA.
2026-02-18 06:02:41 +00:00
Prasanna721
e40176088a docs: update OpenClaw integration docs v2 (#743)
### docs: OpenClaw integration v2 documentation

Restructure OpenClaw docs for Openclaw v2
2026-02-17 06:20:48 +00:00
Dhravya Shah
236216adef chore: bump versino 2026-02-16 14:38:59 -07:00
Coldaine
1328c2ac3a
fix(mcp): change memories.delete to documents.delete for forget action (#737) 2026-02-16 14:32:04 -07:00
Om Shah
8287141bba
Feat/remove selection fab context menu (#735) 2026-02-16 14:31:14 -07:00
Mahesh Sanikommu
1b1b34fb66
chore: remove the new folder and fix imports (#740) 2026-02-16 14:30:29 -07:00
Prasanna721
15613c2421 feat: change "All Spaces" to "Nova Spaces" with multi-select support (#731)
### Implemented nova spaces multi-select

  ##### Summary
  - Renamed "All Spaces" to "Nova Spaces" - now filters to only nova content (sm_project_*)
  - Added multi-select spaces support via "Select Spaces" modal
  - Projects API now returns `{ nova, developer }` instead of `{ projects }`

  ##### Changes
  - `selectedProject` → `selectedProjects[]` (array-based selection)
  - New `SelectSpacesModal` component for picking multiple spaces
  - Selected spaces appear at top in modal
  - Search works by containerTag
  - Graphs filter by selected spaces
2026-02-13 21:34:58 +00:00
Dhravya Shah
d7a1ef7240 error boundaries 2026-02-12 16:41:12 -08:00
Dhravya Shah
405bff4d9f merge 2026-02-12 16:20:03 -08:00
Dhravya Shah
971f203bf0 fix: chat id 2026-02-12 16:18:01 -08:00
Prasanna721
b439e7ea01 fix: chat messages saving broken (#730)
1. New chat messages saving to old thread (race condition)
2. Feedback modal null handling issue (boolean | null not coerced to boolean)
3. Wrong icon on Integrations tab (was Cable, now Sun)
4. Wrong icon on Graph tab (was LayoutGridIcon, now GraphIcon)
  5. Missing cursor pointer on header tabs
  6. Default view was "graph" instead of "list"
2026-02-11 00:25:35 +00:00
Dhravya Shah
727f177953 fix: build 2026-02-10 14:03:23 -08:00
Dhravya Shah
f50e6234fe fix: integrations page 2026-02-10 09:44:42 -08:00
Dhravya Shah
a9e26bb8f9 add redirect routes 2026-02-10 08:47:55 -08:00
Dhravya Shah
a843edde5e minor fixes 2026-02-10 08:36:48 -08:00
Dhravya Shah
e1af1d0b59 fix build 2026-02-09 22:11:34 -08:00
Dhravya Shah
0f7130deae fix 2026-02-09 22:07:09 -08:00
Prasanna721
11a0abd5c0 feat: migrate to api_pro billing and add credits-based usage display (#729)
Summary

  - Migrate from consumer_pro to api_pro billing product across the app
  - Enable Nova app for all users (remove feature flag)
  - Add credits-based usage tracking with tokens abstraction
2026-02-10 05:53:47 +00:00
Dhravya Shah
c15308c503 Merge branch 'main' of https://github.com/supermemoryai/supermemory 2026-02-09 18:32:32 -08:00
Dhravya Shah
8b976015b6 direct add memory support 2026-02-09 18:32:24 -08:00
MaheshtheDev
bee8b12e66 feat: allow api orgs to nova app (#728) 2026-02-09 23:36:52 +00:00
nexxeln
5dd358a939 graph frontend (#713) 2026-02-09 07:02:20 +00:00
Dhravya Shah
7b6793ecf8
Update authentication docs with code examples and API endpoint 2026-02-08 10:37:50 -08:00