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

kimi25-opensource

v1.0.0

Published

Agent swarm orchestrator inspired by Moonshot AI's Kimi K2.5 model. Lightweight toolkit for coordinating autonomous agent swarms with 256K context window support.

Downloads

93

Readme

AgentSwarm Orchestrator - Node.js Implementation

This Node.js implementation of AgentSwarm Orchestrator was inspired by https://kimik25.com. It provides an async-first, event-driven approach to agent management with EventEmitter-based messaging.

Features

  • Promise-based API: Seamless async/await integration
  • EventEmitter architecture: Reactive message passing between agents
  • 256K context support: Inspired by Kimi K2.5's extended context window
  • Multiple topologies: Hierarchical, mesh, and hybrid patterns
  • Type-safe: JSDoc annotations for better IDE support

Installation

npm install kimi25-opensource

Usage

const { AgentSwarm } = require('kimi25-opensource');

// Initialize swarm with 256K context window
const swarm = new AgentSwarm({
    maxAgents: 100,
    contextWindow: 256000,
    topology: 'mesh'
});

// Spawn specialized agents
const agent = swarm.spawnAgent('data-processor', 'analysis', 'transform');

// Dispatch messages
await agent.dispatchMessage({
    type: 'process',
    payload: { data: 'example' }
});

// Get swarm statistics
console.log(swarm.getStats());

// Clean shutdown
await swarm.shutdown();

API Reference

Classes

AgentSwarm

Main swarm coordinator class.

Constructor Options:

  • maxAgents (number): Maximum number of agents (default: 100)
  • contextWindow (number): Token context limit (default: 256000)
  • topology (string): Swarm topology - 'hierarchical', 'mesh', 'hybrid' (default: 'mesh')

Methods:

  • spawnAgent(id, ...capabilities) - Create and register a new agent
  • broadcastMessage(from, type, payload) - Send message to all agents
  • getAgent(id) - Retrieve agent by ID
  • getStats() - Get current swarm statistics
  • shutdown() - Gracefully shutdown the swarm

Events:

  • agent-spawned - Emitted when a new agent is created
  • agent-message - Emitted when any agent dispatches a message
  • broadcast - Emitted on broadcast messages
  • context-warning - Emitted when context window is nearly full
  • shutdown - Emitted when swarm is shut down

Agent

Individual agent class extending EventEmitter.

Methods:

  • dispatchMessage(msg) - Send a message from this agent
  • processMessages(handler) - Process queued messages asynchronously

Functions

createSwarm(config)

Factory function to create a new AgentSwarm instance.

Examples

Event-Driven Architecture

const swarm = new AgentSwarm();

swarm.on('agent-spawned', ({ id, capabilities }) => {
    console.log(`New agent: ${id} with ${capabilities.join(', ')}`);
});

swarm.on('context-warning', ({ used, limit }) => {
    console.warn(`Context at ${used}/${limit} tokens`);
});

const agent = swarm.spawnAgent('worker', 'processing');

Async Message Processing

const agent = swarm.spawnAgent('processor');

await agent.processMessages(async (msg) => {
    console.log(`Processing ${msg.type}`);
    // Handle message
    return { result: 'processed' };
});

Performance

The Node.js implementation is optimized for:

  • Non-blocking I/O: Async operations don't block the event loop
  • Memory efficiency: Minimal memory overhead per agent
  • Scalability: Handles 100+ concurrent agents efficiently

Links

  • Source: https://kimik25.com
  • Repository: https://onedao/wddaily/kimi25-opensource
  • Documentation: https://onedao/wddaily/kimi25-opensource#readme
  • NPM Package: https://www.npmjs.com/package/kimi25-opensource

License

MIT License - See LICENSE file for details.