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

@kernel.chat/prompt-evolver

v1.0.1

Published

GEPA-style prompt self-optimization for AI agents. Prompts evolve from execution traces — auto-mutate, measure, rollback bad changes. Zero LLM calls.

Readme

@kernel.chat/prompt-evolver

GEPA-style prompt self-optimization for AI agents. Prompts evolve from execution traces — auto-mutate, measure, rollback bad changes. Zero LLM calls.

Part of the kernel.chat open-source stack. Used by @kernel.chat/kbot to let specialist prompts improve in place without a human in the loop.

Why this exists

Prompt iteration is usually a human-in-the-loop process: read failures, hypothesize a fix, edit the prompt, retest. That loop is slow and doesn't scale across dozens of specialists.

This package codifies an alternative: feed execution traces in, let the evolver propose small mutations, measure them in production, and roll back any mutation whose success rate regresses past a threshold. The whole loop is deterministic — no model call ever — so it costs nothing per evolution step.

The pattern is loosely modeled on GEPA (Genetic-Evolutionary Prompt Augmentation) but simplified for production use.

Install

npm install @kernel.chat/prompt-evolver

Usage

import { PromptEvolver } from '@kernel.chat/prompt-evolver'

const evolver = new PromptEvolver({
  // Optional: see EvolverConfig type for thresholds, rollback windows, etc.
})

// Feed in execution traces — successes and failures both.
evolver.recordTrace({
  agent: 'researcher',
  promptHash: 'sha256:...',
  outcome: 'success',
  // ...additional fields per Trace interface
})

// Ask the evolver to propose a mutation for an agent's prompt.
const mutation = evolver.evolve('researcher')
if (mutation) {
  // Apply mutation.amendment to the live prompt and start measuring.
}

// Periodically check whether any mutation should be rolled back.
const rollback = evolver.checkRollback('researcher')
if (rollback) {
  // Revert and record the failure.
}

// Get the current prompt amendment for an agent (the active set of mutations).
const amendment = evolver.getAmendment('researcher')

// Persist state across runs.
evolver.save('./evolver-state.json')
evolver.load('./evolver-state.json')

// Inspect what's happening.
console.log(evolver.summary())

Public API

| Export | Shape | |---|---| | PromptEvolver | Main class — recordTrace, evolve, checkRollback, getActiveMutations, getAmendment, getGeneration, toJSON/fromJSON, save/load, summary | | Trace | Interface — what you feed into recordTrace | | Mutation | Interface — what evolve() and checkRollback() return | | EvolverConfig | Interface — constructor config | | EvolverState | Interface — serialized state shape |

Status

v1.0.x — production use inside @kernel.chat/kbot; light external test coverage. The core algorithm has been running in production behind kbot since early 2026. The public API is stable. External test suite is being expanded in v1.1.

If you're using this outside kernel.chat and hit edge cases, file an issue at github.com/isaacsight/kernel.

Related packages

| Package | Discipline | |---|---| | @kernel.chat/kbot | The agent itself | | @kernel.chat/memory-tiers | Three-tier memory (observations → reflections → identity) | | @kernel.chat/skill-router | Bayesian routing across specialists | | @kernel.chat/tool-forge | Runtime tool creation |

See docs/agentic-engineering.md for the field map this package sits inside.

License

MIT.