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

sheep-ai-core

v1.0.2

Published

Cognitive memory system for AI agents. Extracts facts and causal relationships, consolidates during sleep cycles, recalls with reasoning.

Readme

🐑 SHEEP AI Core

Your AI forgets everything. SHEEP doesn't.

Every AI conversation starts from zero. SHEEP gives AI agents persistent, causal memory — it remembers not just what happened, but why.

SHEEP (Sleep-based Hierarchical Emergent Entity Protocol) extracts facts and cause-effect relationships from natural conversation, consolidates them during sleep-like cycles, and recalls with reasoning. Not keyword matching. Not vector similarity. Actual understanding.

Why SHEEP?

| Feature | ChatGPT Memory | Mem0 | Mastra OM | SHEEP | |---------|---------------|------|-----------|-----------| | Fact extraction | Basic | ✅ | ✅ | ✅ 95.7% F1 | | Causal reasoning | ❌ | ❌ | ❌ | ✅ 100% F1 | | Emotional memory | ❌ | ❌ | ❌ | ✅ 86% F1 | | Sleep consolidation | ❌ | ❌ | ❌ | ✅ | | Noise rejection | ❌ | 🟡 | ✅ | ✅ 0 false positives | | GDPR compliance | ❌ | 🟡 | ❌ | ✅ Built-in | | Open source | ❌ | Partial | ✅ | ✅ MIT |

Ask ChatGPT "why did I switch to TypeScript?" and it draws a blank. Ask SHEEP and it returns: "You switched because JavaScript had too many runtime bugs → TypeScript compiler catches errors before production → saved a week of debugging." A full causal chain.

Benchmarks

55 hand-labeled conversations. 152 expected facts. 41 causal links. Zero cherry-picking.

| Metric | Score | |--------|-------| | Fact F1 | 95.7% | | Causal F1 | 100% | | Fact Precision | 100% | | Fact Recall | 87.5% | | Recall Accuracy (end-to-end) | 85% | | Emotional extraction F1 | 86% | | False positives on small talk | 0 |

Run them yourself in 60 seconds:

npm run proof          # 5 cases, ~60s, ~$1
npm run proof:full     # 55 cases, ~12min
npm run proof:recall   # end-to-end pipeline test

Install

npm install sheep-ai-core

Quick Start

import { SheepDatabase, extractFactsWithLLM, createSheepLLMProvider } from "sheep-ai-core";

// 1. Extract facts from any conversation
const llm = await createSheepLLMProvider("muscle");
const facts = await extractFactsWithLLM(llm, conversation, "episode-1");
// → [{ subject: "user", predicate: "prefers", object: "TypeScript" }, ...]

// 2. Store in persistent memory
const db = new SheepDatabase("my-agent");
for (const fact of facts) db.insertFact(fact);

// 3. Query with causal reasoning
const chain = buildCausalChain(db.findCausalLinks({}), "switched to TypeScript");
// → cause: "JavaScript runtime bugs" → effect: "switched to TypeScript"
//   cause: "TypeScript compiler" → effect: "saved a week of debugging"

What SHEEP Extracts

From a single conversation like:

"I'm so stressed about the release. The API keeps failing under load. I've been debugging for 12 hours."

SHEEP extracts:

  • 📋 Facts: user | feeling | stressed, API | issue | failing under load, release | status | behind schedule
  • 🔗 Causal: API failuresstress and long debugging sessions
  • 🎭 Emotion: stressed (with cause and context)

From noise like "Hey, nice weather today!" → SHEEP extracts nothing. Zero false positives.

Architecture

Conversation → [LLM Extraction] → Facts + Causal Links + Episodes
                                        ↓
                              [Sleep Consolidation]
                                        ↓
                          Deduplicated, Connected Memory
                                        ↓
                              [Causal Recall Engine]
                                        ↓
                            "Why did X happen?" → Chain

License

MIT — use it however you want.

Built by Marsirius AI Labs