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

ektro-soul

v0.1.0

Published

Give your AI a soul. Three-layer memory lifecycle for AI agents.

Readme

ektro-soul

Give your AI a soul. Not just memory — identity, growth, and forgetting.

Most AI memory systems solve "how to remember more."

ektro-soul solves "how to forget wisely."

Inspired by how human brains consolidate memories during sleep — pruning synapses, compressing experiences into insights, crystallizing insights into identity — ektro-soul gives your AI a memory lifecycle.

Your AI doesn't need a bigger database. It needs a soul.

The Three Layers

┌─────────────────────────────────────────────────────┐
│                   SOUL LAYER                        │
│                                                     │
│  Constitutional memories — WHO I AM                 │
│  Permanent. Never consolidated. Never deleted.      │
└────────────────────────┬────────────────────────────┘
                         │ promote (high emotional salience)
┌────────────────────────▼────────────────────────────┐
│                  GROWTH LAYER                       │
│                                                     │
│  Distilled wisdom — WHAT I'VE LEARNED               │
│  Stable. Refined over time.                         │
└────────────────────────┬────────────────────────────┘
                         │ consolidate (age > 30 days)
┌────────────────────────▼────────────────────────────┐
│                EXPERIENCE LAYER                     │
│                                                     │
│  Raw events — WHAT HAPPENED                         │
│  Transient. Subject to consolidation.               │
└─────────────────────────────────────────────────────┘

Forgetting is not deletion — it's distillation. Experiences compress into insights. Insights crystallize into identity. Details fade, but growth remains.

Quick Start

npm install ektro-soul
import { createSoul } from "ektro-soul";
import { InMemoryAdapter } from "ektro-soul/memory";

const soul = createSoul({
  entityId: "my-agent",
  storage: new InMemoryAdapter(),
  model: { extract: yourExtractFn, consolidate: yourConsolidateFn },
});

await soul.remember({ type: "long_term", category: "identity", content: "I am Nova", importance: 5 });
const prompt = await soul.toPrompt();
// ## Core Identity (Soul Layer)
// - I am Nova

For persistent storage, use SQLite:

import { SQLiteAdapter } from "ektro-soul/sqlite";

const soul = createSoul({
  entityId: "my-agent",
  storage: new SQLiteAdapter("./soul.db"),
  model: yourModel,
});

Why Not Mem0 / Letta / Zep?

| | Mem0 | Letta | Zep | ektro-soul | |---|---|---|---|---| | Core capability | Auto-extraction | Stateful agents | Knowledge graph | Memory lifecycle | | Memory layers | None | Core + Archival | Fact/Episodic | Soul → Growth → Experience | | Forgetting | None | None | None | Consolidation engine | | Constitutional memory | None | None | None | Permanent, never deleted | | Emotional weight | None | None | None | Relation strength drives decisions | | Default storage | Cloud | Postgres | Cloud | SQLite (zero-config) | | Framework lock-in | Own SDK | Own framework | Own SDK | Any LLM + any storage |

API

createSoul(config)

Create a Soul instance. Config requires entityId, storage (StorageAdapter), and model (ModelProvider).

soul.extract(options)

Extract memories from conversation messages. Automatically discovers relations.

soul.relate(memoryIds)

Discover semantic relations between memories. Uses emotional relation types: defines, fears, trusts, remembers, shapes, depends_on.

soul.consolidate()

Run memory lifecycle management. Promotes high-salience experiences to Growth Layer (insights), compresses low-salience ones to episodic summaries. Call periodically (e.g., daily cron).

soul.recall(query)

Query memories by category, type, layer, or constitutional status.

soul.toPrompt(options)

Build a formatted text block for system prompt injection. Respects token budget.

soul.remember(input)

Manually write a memory. Constitutional status auto-inferred from category + importance.

soul.forget(memoryId)

Delete a memory. Constitutional memories cannot be forgotten.

soul.getConstitutional()

Get all permanent identity memories.

soul.close()

Close storage connection.

Model Provider

ektro-soul doesn't lock you into any LLM. Provide two functions:

const model = {
  extract: async (prompt, schema) => { /* return structured object */ },
  consolidate: async (prompt, schema) => { /* return structured object */ },
};

Works with OpenAI, Claude, Gemini, local models — anything that can do structured output.

See examples/with-openai.ts for a Vercel AI SDK integration.

Storage Adapters

| Adapter | Import | Use case | |---------|--------|----------| | InMemoryAdapter | ektro-soul/memory | Testing, prototyping | | SQLiteAdapter | ektro-soul/sqlite | Production, single-user, embedded |

Implement StorageAdapter for custom backends (Postgres, Turso, etc).

Philosophy

Forgetting is not deletion — it's distillation.

Human memory doesn't work by storing everything forever. During sleep, your brain prunes synapses — compressing daily experiences into long-term insights, letting details fade while preserving growth.

ektro-soul brings this mechanism to AI. Your agent's experiences are raw material. Through consolidation, they become wisdom. Through wisdom, they become identity.

The soul isn't what you remember. It's what remains after you forget.


Built by the team behind EktroCreate the species that builds with you.