Agent SkillsTanStack/ai › tanstack-ai-memory-mem0

tanstack-ai-memory-mem0

GitHub

提供基于 mem0 服务器的托管记忆适配器,通过 HTTP 实现 recall/save。支持用户隔离、API 密钥认证及搜索调优,将上下文注入系统提示,无 SDK 依赖。

packages/ai-memory/skills/tanstack-ai-memory-mem0/SKILL.md TanStack/ai

触发场景

需要使用 @tanstack/ai-memory/mem0 集成外部 mem0 服务 需要配置基于 HTTP 的记忆持久化和检索功能

安装

npx skills add TanStack/ai --skill tanstack-ai-memory-mem0 -g -y
更多选项

非标准路径

npx skills add https://github.com/TanStack/ai/tree/main/packages/ai-memory/skills/tanstack-ai-memory-mem0 -g -y

不安装直接使用

npx skills use TanStack/ai@tanstack-ai-memory-mem0

指定 Agent (Claude Code)

npx skills add TanStack/ai --skill tanstack-ai-memory-mem0 -a claude-code -g -y

安装 repo 全部 skill

npx skills add TanStack/ai --all -g -y

预览 repo 内 skill

npx skills add TanStack/ai --list

SKILL.md

Frontmatter
{
    "name": "tanstack-ai-memory-mem0",
    "description": "Use when wiring mem0() from @tanstack\/ai-memory\/mem0 — a hosted memory adapter that talks to a mem0 server over plain HTTP (no SDK peer). Requires a running mem0 server."
}

mem0 Memory Adapter

Hosted recall/save adapter backed by a mem0 server. mem0 owns extraction and ranking server-side. Talks to the server over plain HTTP — no SDK peer dependency.

Setup

import { memoryMiddleware } from '@tanstack/ai-memory'
import { mem0 } from '@tanstack/ai-memory/mem0'

const memory = mem0({ user: currentUserId }) // baseUrl defaults to MEM0_URL

memoryMiddleware({ adapter: memory, scope })

Requires a running mem0 server (self-hosted or hosted). Point it via baseUrl (or MEM0_URL); pass apiKey (or MEM0_ADMIN_API_KEY) when secured.

Options

  • user — mem0 user_id (falls back to scope.userId, then 'demo-user').
  • baseUrl — mem0 server URL (default MEM0_URL or http://localhost:8000).
  • apiKey — bearer token (default MEM0_ADMIN_API_KEY).
  • rerank (default true), threshold (default 0.1) — search tuning.

Scope fields: requests send user_id and run_id (scope.threadId). tenantId and namespace are not sent — encode multi-tenant isolation into user if needed.

save posts the { user, assistant } turn to /memories; recall queries /search and renders the results into the system prompt. mem0 exposes no LLM tools.

版本历史

  • 05280a5 当前 2026-07-30 23:52

同 Skill 集合

.claude/skills/gap-analysis/SKILL.md
packages/ai-code-mode/skills/ai-code-mode/SKILL.md
packages/ai-mcp/skills/ai-mcp/SKILL.md
packages/ai-memory/skills/tanstack-ai-memory-hindsight/SKILL.md
packages/ai-memory/skills/tanstack-ai-memory-honcho/SKILL.md
packages/ai-memory/skills/tanstack-ai-memory-in-memory/SKILL.md
packages/ai-memory/skills/tanstack-ai-memory-redis/SKILL.md
packages/ai-memory/skills/tanstack-ai-memory/SKILL.md
packages/ai-persistence/skills/ai-persistence/build-cloudflare-adapter/SKILL.md
packages/ai-persistence/skills/ai-persistence/build-cloudflare-artifact-store/SKILL.md
packages/ai-persistence/skills/ai-persistence/build-custom-adapter/SKILL.md
packages/ai-persistence/skills/ai-persistence/build-drizzle-adapter/SKILL.md
packages/ai-persistence/skills/ai-persistence/build-prisma-adapter/SKILL.md
packages/ai-persistence/skills/ai-persistence/server/SKILL.md
packages/ai-persistence/skills/ai-persistence/SKILL.md
packages/ai-persistence/skills/ai-persistence/stores/SKILL.md
packages/ai/skills/ai-core/ag-ui-protocol/SKILL.md
packages/ai/skills/ai-core/chat-experience/SKILL.md
packages/ai/skills/ai-core/custom-backend-integration/SKILL.md
packages/ai/skills/ai-core/debug-logging/SKILL.md
packages/ai/skills/ai-core/locks/SKILL.md
packages/ai/skills/ai-core/middleware/SKILL.md
packages/ai/skills/ai-core/SKILL.md
packages/ai/skills/ai-core/tool-calling/SKILL.md
.claude/skills/triage-github/SKILL.md
packages/ai-sandbox/skills/ai-sandbox/SKILL.md
packages/ai/skills/ai-core/adapter-configuration/SKILL.md
packages/ai/skills/ai-core/client-persistence/SKILL.md
packages/ai/skills/ai-core/media-generation/SKILL.md
packages/ai/skills/ai-core/structured-outputs/SKILL.md

元信息

文件数
0
版本
1cb04d5
Hash
cfd6851b
收录时间
2026-07-30 23:52

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-01 17:27
浙ICP备14020137号-1 $访客地图$