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/tool-forge

v1.0.1

Published

Runtime tool creation for AI agents. Define new tools from natural language descriptions at runtime — no restart needed. The agent builds its own tools.

Readme

@kernel.chat/tool-forge

Runtime tool creation for AI agents. Define new tools from natural language descriptions at runtime — no restart needed. The agent builds its own tools.

Part of the kernel.chat open-source stack. Used by @kernel.chat/kbot to let agents extend their own capability set during a session.

Why this exists

Most agent toolkits ship a fixed tool registry compiled into the binary. Extending the registry means a new release. That's the wrong granularity for an agent that should be able to say "I need a tool that does X" and make it exist three seconds later.

This package lets you create, replace, and remove tool definitions at runtime. Every tool tracks its own metrics (success rate, latency, error counts) so the agent can decide which of its self-built tools are worth keeping and which to retire.

Install

npm install @kernel.chat/tool-forge

Usage

import { ToolForge, TEMPLATES } from '@kernel.chat/tool-forge'

const forge = new ToolForge()

// Create a new tool at runtime.
forge.create({
  name: 'count_words',
  description: 'Count the words in a string',
  tags: ['text', 'utility'],
  parameters: [
    { name: 'text', type: 'string', required: true, description: 'Text to count' },
  ],
  handler: async (args) => {
    const text = args['text'] as string
    return { result: text.trim().split(/\s+/).filter(Boolean).length }
  },
})

// Execute it.
const result = await forge.execute('count_words', { text: 'hello world' })
console.log(result) // { ok: true, result: 2, durationMs: ... }

// Inspect what's available.
const all = forge.list()
const utilities = forge.listByTag('utility')

// Replace, remove, query.
forge.replace({ ...newDef })
forge.remove('count_words')
forge.has('count_words')
forge.get('count_words')

// Read metrics to decide which tools are paying their keep.
const metrics = forge.getMetrics('count_words')
// → { calls: N, errors: N, avgDurationMs: ..., lastUsed: ... }

// Persist the tool registry.
forge.save('./forge-state.json')

Templates

The exported TEMPLATES object includes a small set of starter tool shapes (HTTP fetch, JSON parse, regex extract, math eval). Use them as starting points when scaffolding new tools.

Public API

| Export | Shape | |---|---| | ToolForge | Main class — create, replace, remove, has, get, list, listByTag, execute, getMetrics, toJSON, save | | TEMPLATES | Pre-built starter tool definitions | | ToolDefinition | What create() accepts | | ToolParameter | Parameter spec inside a definition | | ToolResult | What execute() returns | | ToolMetrics | Per-tool usage telemetry | | ToolManifest | List-view shape (no handler) |

Status

v1.0.x — production use inside @kernel.chat/kbot; light external test coverage. The runtime-tool pattern has been driving kbot's self-extension loop since early 2026. The public API is stable. External test suite expanded in v1.1.

File issues at github.com/isaacsight/kernel.

Related packages

| Package | Discipline | |---|---| | @kernel.chat/kbot | The agent itself | | @kernel.chat/agent-os | System primitives (permissions, namespaces, quotas) | | @kernel.chat/prompt-evolver | Prompt self-optimization from traces | | @kernel.chat/skill-router | Bayesian routing across specialists |

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

License

MIT.