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

@knowl/ai-sdk

v0.1.0

Published

Project memory for AI SDK agents. Local-first, no API key: Knowl's tools over MCP, scoped per project.

Readme

@knowl/ai-sdk

Project memory for AI SDK agents.

Every other memory integration for the AI SDK is a hosted service behind an API key. This one is not. Knowl is a local-first engine that stores typed knowledge atoms in SQLite under your project, speaks MCP, and retires superseded facts at write time so a stale decision stops being a retrieval candidate instead of competing with its replacement.

No account, no key, nothing leaves the machine.

Install

pnpm add @knowl/ai-sdk ai

The Knowl server itself is fetched on demand through npx, so there is nothing else to install.

Setup

Knowl scopes memory to a project, so initialize one first:

npx -y @dat999zx/knowl init

That creates .knowl/ in the directory. Agents pointed at that directory read and write its memory; agents pointed elsewhere see nothing from it.

Usage

import { knowlTools } from '@knowl/ai-sdk';
import { ToolLoopAgent } from 'ai';

const memory = await knowlTools({ projectRoot: '/srv/app' });

try {
  const agent = new ToolLoopAgent({
    model: 'anthropic/claude-haiku-4.5',
    tools: memory.tools,
  });

  const result = await agent.generate({
    prompt: 'What did we decide about retry backoff, and why?',
  });
} finally {
  await memory.close();
}

memory.tools is the full Knowl tool surface, 27 tools covering query, store, decisions, conflicts, timeline and session handoff. Spread it into tools and the model uses what it needs.

Options

| Option | Default | Notes | | --- | --- | --- | | projectRoot | process.cwd() | The directory whose memory this agent uses. Pass it explicitly in a request handler; the default is right for a single-project server and wrong for a multi-tenant one. | | command / args | npx -y @dat999zx/knowl serve | Point at a global install or a local build to skip npx resolution on cold start. | | env | inherited | Extra environment for the server process. |

Closing

knowlTools spawns the Knowl server as a child process. Create it once at module scope for a single-project server:

const memory = await knowlTools({ projectRoot: process.cwd() });

If you create one per request instead, always await memory.close(), or you leak a process per request.

Windows

Handled. npx on Windows is npx.cmd, and since the fix for CVE-2024-27980 Node will not spawn .cmd files unless shell: true — which the AI SDK's stdio transport hardcodes to false with no way to override. Wiring createMCPClient to npx directly therefore fails with EINVAL on Windows. This package routes through cmd.exe /c so it works the same everywhere.

Relationship to createMCPClient

This is a thin, typed wrapper over the AI SDK's own MCP client. If you would rather wire it yourself, you can: point Experimental_StdioMCPTransport at @dat999zx/knowl serve and call .tools(). What this package adds is the project scoping, the Windows launcher fix, and lifecycle handling you would otherwise write yourself.

License

Apache-2.0