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

@aivm/brain

v0.3.4

Published

AIVM Brain — one-command install for the governed MCP brain (npx @aivm/brain init).

Readme

@aivm/brain

One-command install for the governed MCP brain. Registers the AIVM Brain MCP server with your agent host (Claude Desktop / Claude Code / Cursor) so any MCP-speaking agent reaches your company brain only through AIVM's governed tools — identity is server-derived, every call is policy-checked and recorded.

Make every agent work through Brain — in 3 lines

withBrainMemory wraps any async agent handler so it recalls governed, ACL-filtered context before the call and records the turn to the tamper-evident ledger after — zero memory code in your function body.

import { AivmBrainClient, withBrainMemory } from "@aivm/brain";

const client = new AivmBrainClient({ baseUrl: "https://brain.aivm.io", machineToken: process.env.AIVM_KEY });
const agent = withBrainMemory(async ({ question }) => callYourLLM(question), { client });

const out = await agent({ question: "What's our refund policy?" });
// out.__brain.recall.recallEntry.seq + out.__brain.traceEntry.seq — every turn proven in the ledger.

A denied recall never throws (empty context, the deny is still recorded); a trace-write failure never breaks the agent (surfaced on __brain.traceError). Toggle with withMemory / saveTraces / memoryQueryFixed / session.

Install

npx @aivm/brain init

init:

  1. detects your installed MCP host(s) and idempotently patches the host's MCP config to register the aivm-brain server (a re-run never duplicates the entry, and never touches your other servers);
  2. opens the SSO sign-in in your browser (no raw token to paste — the short-lived session is bound server-side);
  3. writes a resumable install state to ~/.aivm/brain-install.json.
npx @aivm/brain init --host claude-code            # target a specific host
npx @aivm/brain init --agent-id erc8004:84532:0x…  # headless / agent path (no SSO)
npx @aivm/brain init --brain-url https://brain.acme.com
npx @aivm/brain init --remove                      # unregister the server
npx @aivm/brain status                             # print the install state

The config the installer writes carries only public references (the brain URL, your public agent/tenant id) — never a signing key or session token, so the config is safe to share or commit.

SDK (thin client)

import { AivmBrainClient } from "@aivm/brain";
const brain = new AivmBrainClient({ baseUrl: "https://brain.acme.com", sessionCookie });
const answer = await brain.search("What's our Q3 logistics SLA?");

The SDK never re-implements auth or policy — it carries your session/agent credential and the server runs the full governed spine.

What this is / isn't

This package owns the install + config + thin SDK. The onboarding state machine, progress streaming, and the Living-Brain visualization are the broader SUR-02 / SUR-03 surfaces. The governed stdio server it registers lives in the Brain repo (scripts/mcp-server.ts).