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

@onemem/vercel-ai-provider

v0.1.4

Published

OneMem provider for the Vercel AI SDK — wrap any model to record verifiable on-chain action traces

Readme

@onemem/vercel-ai-provider

Wrap any Vercel AI SDK model so every model call is recorded as a verifiable on-chain OneMem TraceSession (Sui + Walrus + Seal) — Merkle-chained ActionCalls with content stored on Walrus and Seal-encrypted.

Publication note, 2026-06-18: @onemem/[email protected] is current on npm after pnpm registry:status --strict and includes createOneMemMemory(...). Re-run that command before making a fresh public install claim.

Usage

import { createOneMemMemory, withOneMem } from "@onemem/vercel-ai-provider";
import { openai } from "@ai-sdk/openai";
import { generateText, streamText } from "ai";

const model = withOneMem(openai("gpt-4o"), {
  agentId: "my-app",          // optional, stamped on the trace
  // target / signer / network are all optional — auto-provisioned on first use
});

// Use it like any AI SDK model — generate and stream both record a trace.
const { text } = await generateText({ model, prompt: "What did we decide about auth?" });

// Optional explicit memory helper — recall before a call, capture after.
const memory = createOneMemMemory();
const prompt = await memory.recallInto("What did we decide about auth?");
const result = await generateText({ model, prompt });
await memory.capture(`User asked: ${prompt}\nAssistant answered: ${result.text}`);

How it works

withOneMem wraps the model with AI SDK middleware (wrapLanguageModelwrapGenerate / wrapStream). After each call it records a 1-call TraceSession via @onemem/sdk-ts/runtime's recordSession. Recording is fire-and-forget: it never adds latency to, or breaks, your model call — a OneMem failure is logged and swallowed.

Zero-config: the namespace, ReadWrite cap, and signer are auto-provisioned on first use and persisted under ~/.onemem/ (same engine as the OpenClaw/Hermes plugins). Override via options or env (ONEMEM_NAMESPACE_ID + ONEMEM_RW_CAP_ID, ONEMEM_PRIVATE_KEY, SUI_NETWORK).

Options

| Option | Default | Notes | |---|---|---| | agentId / environment | "vercel-ai" | stamped on the trace | | network | $SUI_NETWORK or testnet | | | privateKey | sui keystore → generated wallet | signer | | target | env → auto-provisioned | { namespaceId, rwCapId } | | enableTrace | true | set false to disable | | onTrace | — | callback with the on-chain session id |

Memory helper

createOneMemMemory() exposes the Mem0-style side of OneMem for Vercel AI apps:

  • recall(query, topK?) searches configured MemWal memories.
  • recallInto(input, topK?) prepends recalled memories as a context block and returns input unchanged when memory is disabled or no memories match.
  • capture(text) stores a durable memory through MemWal and returns true on success, false when disabled or failed.

Memory is explicit so it is easy to see what prompt text changes. Configure it with the same credentials used by the SDK memory layer: delegate key, MemWalAccount id, embedding API key, MemWal package id, and relayer URL. Local onemem login credentials and env vars are both supported by the shared runtime resolver.

Scope (v0.1)

Trace capture is automatic for model.generate / model.stream. In repo-local source, memory recall/capture is shipped as the explicit createOneMemMemory() helper. Automatic memory extraction and per-tool-call interception remain tracked follow-ups.

Requires ai v6 (peer dependency). Spec: docs/05-our-architecture/04-frameworks/vercel-ai-provider.md.