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

@synthonyai/comind

v0.1.0

Published

A portable cognitive layer for AI agents — intention-driven memory recall, a typed meaning layer (artifacts), provenance, and an inspectable agent runtime. Bring your own store, embeddings, and LLM.

Readme

CoMind

CI License: MPL 2.0

A portable cognitive layer for AI agents. Most "agent memory" is a vector store: it embeds text and hands back the nearest neighbours. CoMind is the layer above that — it selects by intent, distills raw observations into typed conclusions, keeps a paper trail, and reorganizes itself by use — and it does all of this behind an inspectable runtime you can open up and watch.

It is backend-agnostic by construction: you bring a store, an embedder, and an LLM by implementing three small interfaces. There is no built-in database — the reference demo runs the real runtime against a pure in-memory store with no Postgres and no API keys.

Status: v0.1. The cognitive core and the boundary are done and proven; the personal journaling app that seeded this project is parked. This repo is the library + a reference demo + the design docs.


See it first

The demo is a robot detective working a case across "dispatches." Between dispatches its conversation window is wiped — so anything it still knows had to live in CoMind, not in the prompt. The right-hand panel renders the mind each turn: the standing identity lens, the ranked recalled memories with intention scores, the typed conclusions it forms, and the provenance behind each one.

npm install

npm run demo:play -- --offline   # scripted transcript, deterministic, no keys
npm run demo:tui  -- --offline   # the live split-pane mind panel
npm run demo:repl -- --offline   # drive the case yourself (recall-only offline)

npm run demo:prove               # the boundary proof (see below)

Drop --offline to run against real providers (HuggingFace embeddings + OpenAI) — set the keys in .env (see .env.example). Offline swaps in deterministic stubs and needs nothing.


What it actually does (v0.1)

  • Selection by intent, not just similarity — recall is re-ranked by a standing identity (directives, values, watch-words) plus weighted goals, so the same memory pile surfaces different memories as focus shifts.
  • A typed meaning layer — a memory critic distills raw observations into typed artifacts (FACT, DECISION, CONSTRAINT, QUESTION, TASK, INSIGHT, …), embedded on creation and recalled alongside raw entries, with the source collapsing under the conclusion (prefer-artifact).
  • Provenance — every conclusion points back at the exact observations that produced it.
  • A living loop — recalled memory is reinforced and rises; ignored memory decays — a ranking that moves, not a flat pile.
  • An inspectable runtimerunAgent returns { response, trace }; the DecisionTrace is the whole decision, openable.
  • A token budget — a handful of selected memories per turn, not the whole history re-dumped.

The boundary: three interfaces

You embed CoMind by implementing three providers and passing them to createComind:

| Interface | Responsibility | |---|---| | MemoryStore | where memories live + how to find them (similarity search, goals, context) | | EmbeddingProvider | text → vector | | LLMProvider | fill a CoMind-owned schema from a prompt |

import { createComind } from "@synthonyai/comind";

const comind = createComind({
  userId: "tenant-1",
  store,        // your MemoryStore
  embeddings,   // your EmbeddingProvider
  llm,          // your LLMProvider
});

const { response, trace } = await comind.runAgent(contextId, "who do we suspect?");

Default adapters for HuggingFace embeddings and OpenAI structured output ship in lib/comind/adapters/ — import and inject them, or write your own.

The proof it holds

npm run demo:prove   # runs the REAL runAgent against a non-Prisma in-memory store,
                     # with no DB and no API keys, and asserts nothing heavy loaded.
npm run demo:check   # asserts importing + constructing the barrel loads no Prisma/OpenAI.
npm run typecheck    # tsc --noEmit

demo/inMemoryStore.ts is a pure-TypeScript MemoryStore (cosine similarity, no SQL) — the existence proof that a non-default backend satisfies the contract.


Layout

lib/comind/          the library (the product)
  providers.ts       the three interfaces + their IO types
  index.ts           the frozen public barrel
  agentRuntime/      the CAMA loop: recall → prompt → LLM → memory critic
  adapters/          default HuggingFace + OpenAI providers
demo/                the reference demo (in-memory store + the robot-detective case)
docs/                PRD, build map, design notes, schema reference

docs/schema-reference.prisma is the full data model the core types map to — kept as a design reference; the library itself ships no database.


License

MPL-2.0 — file-level copyleft with a patent grant. You can embed CoMind in a closed product; improvements to CoMind's own source files flow back.