npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mtlopenyc/sdk

v0.1.2

Published

Memory Trust Layer SDK — 接入中立记忆评测榜单 / integrate with the neutral agent-memory benchmark

Readme

@mtl/sdk — 接入中立记忆评测榜单 / Integrate with the Neutral Memory Benchmark

实现 9 个原语 → 跑真实基准 → 提交上榜。同一套基准、同一套标准,公平可比。

这是什么 / What is this

中立第三方 Agent 记忆评测榜单的官方 SDK。你(记忆系统厂商/开发者)用它:

  1. 你的记忆系统对接到统一的 9 原语接口
  2. 同一套公开基准(LongMemEval 真实 500 题 / synthetic-qa)
  3. 产出标准 RunResult JSON,提交到榜单,经我们复现验证后上榜

榜单用固定的基准 + 公开的方法学 + 一致的评分算法,所有系统可比。详见 methodology。


安装 / Install

npm install @mtl/sdk

TS 适配器推荐用 tsx 直接跑:npm install -D tsx(也可编译成 JS)。


5 分钟上手 / Quick start (5 min)

# 1. 生成适配器模板
npx mtl init my-adapter
#   → 生成 my-adapter.ts(实现 9 原语的骨架)

# 2. 实现 9 个原语(把你的记忆系统接进去)—— 见下方"适配器指南"

# 3. 跑基准,产出可提交的 JSON
npx tsx --tsconfig=tsconfig.json node_modules/@mtl/sdk/dist/cli.js run \
  --adapter ./my-adapter.ts --benchmark synthetic-qa --out result.json

# 或装好后直接:npx mtl run --adapter ./my-adapter.ts --benchmark synthetic-qa --out result.json

# 4. 校验格式
npx mtl validate result.json
#   → ✓ 格式正确

# 5. 提交到榜单:把 result.json 上传到榜单网站的"接入你的系统"表单

跑出来长这样(result.json 节选):

{
  "benchmarkId": "synthetic-qa",
  "adapterId": "my-system",
  "timestamp": "2026-07-24T...",
  "metrics": {
    "recallAt5": 0.83, "precisionAt5": 0.40, "mrr": 0.91, "ndcgAt10": 0.88,
    "latencyP95Ms": 12.4, "totalTokenCost": 0
  },
  "queryResults": [ ... ]
}

综合得分 / Composite score = (recall@5 + ndcg@10) / 2,榜单按此排序。


可用基准 / Available benchmarks

| id | 说明 | 数据 | 跑法 | |---|---|---|---| | synthetic-qa | 合成基线(快速验证用) | 内置 | 累积模式 | | longmemeval | 真实长期记忆 500 题(业界标准,MIT) | 内置 | 隔离模式(每题独立) |

跑 longmemeval(真考卷):

npx mtl run --adapter ./my-adapter.ts --benchmark longmemeval --out result.json

命令参考 / CLI reference

| 命令 | 作用 | |---|---| | mtl init <name> | 生成适配器模板 | | mtl run --adapter <path> --benchmark <id> [--out <file>] [--judge f1\|exact-match\|substring] | 跑基准,出 RunResult JSON | | mtl validate <result.json> | 校验提交格式 |


下一步 / Next


许可证 / License

MIT。基准数据 LongMemEval 为 MIT(可随 SDK 分发);LoCoMo 等其它基准受各自许可约束(见各基准说明)。