Skip to content
Back to skills

Sdk Memory

ASecurity

"Use Mem0 SDKs for hosted Platform clients and local OSS memory in

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
devopstypescriptpythongodockerdebuggingapibackend

Works with

  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill sdk-memory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sdk Memory?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sdk Memory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-sdk-memory/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-sdk-memory)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sdk-memory
description: "Use Mem0 SDKs for hosted Platform clients and local OSS memory in
  Python and TypeScript, including CRUD, search, async clients, entity filters,
  metadata, categories, export, feedback, and migration-sensitive API
  differences."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Mem0 SDK Memory

Use this sub-skill when the task asks for Mem0, `mem0ai`, a memory layer, memory CRUD/search, Platform SDK calls, OSS `Memory()` usage, TypeScript `MemoryClient`, `mem0ai/oss`, async memory calls, retrieve-generate-store flows, filters, metadata, categories, exports, feedback, or SDK migration debugging.

## Route First

- Use this sub-skill for Python `MemoryClient`, `AsyncMemoryClient`, `Memory`, `AsyncMemory`, TypeScript hosted `MemoryClient`, and TypeScript OSS `Memory` from `mem0ai/oss`.
- Use [Python SDK](references/python-sdk.md) for imports, live signatures, sync/async Python examples, and Platform-vs-OSS differences.
- Use [TypeScript SDK](references/typescript-sdk.md) for hosted `MemoryClient`, OSS `Memory`, camelCase/snake_case option differences, exports, and feedback.
- Use [Memory Operations](references/memory-operations.md) for add/search/update/delete patterns, retrieve-generate-store workflows, filters, metadata, categories, export, feedback, and migration notes.
- Use [Troubleshooting](references/troubleshooting.md) for empty search results, import/install failures, API keys, optional backends, validation errors, and SDK misuse.

## Sibling Boundaries

- Route provider, vector store, embedder, LLM, reranker, graph-memory, and optional dependency selection to `provider-configuration`.
- Route terminal commands, CLI config, JSON output, stdin/file workflows, import/export through commands, and `mem0 init/add/search` behavior to `cli-memory`.
- Route REST server deployment, Docker Compose, OpenMemory, MCP server hosting, API keys for self-hosted services, migrations, and operational backups to `self-hosted-openmemory`.
- Route editor/agent plugins, framework cookbooks, Vercel AI SDK provider wrapping, MCP plugin config, hooks, OpenClaw, and Pi Agent plugin tasks to `integrations-plugins`.

## Fast Decision Tree

1. Hosted Platform SDK? Use `MemoryClient` / `AsyncMemoryClient` in Python or `MemoryClient` in TypeScript; it needs a Mem0 API key and talks to `https://api.mem0.ai` by default.
2. Local OSS memory? Use Python `Memory` / `AsyncMemory` or TypeScript `Memory` from `mem0ai/oss`; it needs provider/backend configuration, often OpenAI credentials by default.
3. Search or list memories? Put entity scope in `filters`, for example `filters={"user_id": "alice"}` in Python and `{ filters: { user_id: "alice" } }` in TypeScript.
4. Add or bulk delete by entity? Follow the SDK-specific options in [Memory Operations](references/memory-operations.md); current SDKs keep top-level entity options for add/delete-all, while search/get-all require `filters`.
5. Debug before changing code? Run `python scripts/inspect_mem0_sdk.py --json` to inspect installed Python exports/signatures without credentials, then `python scripts/mem0_sdk_smoke.py --mode plan --language both` to generate safe smoke snippets.

## Minimal Patterns

Python hosted Platform:

```python
from mem0 import MemoryClient

client = MemoryClient(api_key=os.environ["MEM0_API_KEY"])
client.add("User prefers vegetarian meals", user_id="alice", metadata={"source": "chat"})
results = client.search("dietary preferences", filters={"user_id": "alice"}, top_k=5)
```

Python OSS:

```python
from mem0 import Memory

memory = Memory()
memory.add("User prefers vegetarian meals", user_id="alice", metadata={"source": "chat"})
results = memory.search("dietary preferences", filters={"user_id": "alice"}, top_k=5)
```

TypeScript hosted Platform:

```ts
import { MemoryClient } from "mem0ai";

const client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY! });
await client.add([{ role: "user", content: "User prefers vegetarian meals" }], { userId: "alice" });
const results = await client.search("dietary preferences", { filters: { user_id: "alice" }, topK: 5 });
```

TypeScript OSS:

```ts
import { Memory } from "mem0ai/oss";

const memory = new Memory();
await memory.add("User prefers vegetarian meals", { userId: "alice", metadata: { source: "chat" } });
const results = await memory.search("dietary preferences", { filters: { user_id: "alice" }, topK: 5 });
```

## Safety Notes

- Do not print API keys, provider keys, memory contents from production users, or full environment dumps.
- Prefer read-only inspection before live API calls. The bundled scripts default to help/plan/inspection modes and do not require credentials unless explicitly requested.
- Never instruct future agents to run source-repository tests or examples; use the bundled references and scripts here.
- Treat `reset`, wildcard deletes, and scoped `delete_all` / `deleteAll` as destructive. Confirm scope and tenant before running them.

Files in this skill

  • SKILL.md4.9 KB
  • references/memory-operations.md9.4 KB
  • references/python-sdk.md8.8 KB
  • references/troubleshooting.md8.3 KB
  • references/typescript-sdk.md7.6 KB
  • scripts/inspect_mem0_sdk.py4.1 KB
  • scripts/mem0_sdk_smoke.py6.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.