Skip to content

feat(ts-sdk): add support for keyword arguments in add and search methods#3895

Merged
whysosaket merged 4 commits intomem0ai:mainfrom
whysosaket:feature/kwargs-node-sdk
Jan 10, 2026
Merged

feat(ts-sdk): add support for keyword arguments in add and search methods#3895
whysosaket merged 4 commits intomem0ai:mainfrom
whysosaket:feature/kwargs-node-sdk

Conversation

@whysosaket
Copy link
Copy Markdown
Member

Description

Adds support for experimental keyword arguments in the add and search methods of the TypeScript SDK, enabling users to pass additional properties beyond the defined options for experimental features.

Changes

  • Updated add method signature to accept MemoryOptions & Record<string, any>
  • Updated search method signature to accept SearchOptions & Record<string, any>
  • Updated changelog to v2.2.1

Details

This change allows TypeScript developers to pass experimental keyword arguments while maintaining type safety for known properties. The intersection type (& Record<string, any>) ensures that:

  • Known properties (like user_id, metadata, api_version, etc.) maintain their proper types and autocomplete support
  • Additional experimental properties can be passed without TypeScript errors
  • All properties are passed through to the API payload at runtime (no runtime changes needed)

Version

Bumps version to v2.2.1

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@whysosaket whysosaket changed the title feat(ts-sdk): Add support for keyword arguments in add and search methods feat(ts-sdk): add support for keyword arguments in add and search methods Jan 10, 2026
@whysosaket whysosaket merged commit 90a7b1a into mem0ai:main Jan 10, 2026
1 of 2 checks passed
@whysosaket whysosaket deleted the feature/kwargs-node-sdk branch January 10, 2026 15:50
garciaba79 pushed a commit to garciaba79/mem0 that referenced this pull request Feb 12, 2026
jamebobob pushed a commit to jamebobob/mem0-vigil-recall that referenced this pull request Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant