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

worldsim

v1.5.0

Published

Simulate how communities react to new rules, events, or policies — multi-agent simulation engine for TypeScript

Readme

worldsim

GitHub stars Documentation

Simulate how communities react to new rules, events, or policies — in TypeScript, in 5 minutes.

WorldSim is an embeddable multi-agent simulation engine for Node.js. You define a world, add agents with personalities and goals, optionally load rules or a crisis trigger, then let the engine advance tick by tick while agents reason, talk, use tools, build relationships and produce a report.

Documentation

Full documentation: https://francemazzi.github.io/worldsim/

| Topic | Link | | --- | --- | | Quick Start | Getting Started | | Architecture | Architecture & Internals | | Perception layer | Realistic Simulation Primitives | | Creating scenarios | Creating Scenarios | | Scaling & production | Scaling | | Plugin authoring | Plugins |

Quick Start

npm install worldsim
OPENAI_API_KEY=sk-... npx worldsim demo
# Open http://localhost:4400 — watch a village react to water rationing

Or launch the Studio dashboard directly:

npx worldsim studio

Key Capabilities

| Feature | Description | | ------- | ----------- | | LLM-agnostic | OpenAI, Anthropic proxies, Ollama — anything OpenAI-compatible | | Personality system | Mood, energy, goals, beliefs, knowledge per agent | | Realistic perception | Opt-in stimulus/perception/attention/topic/needs stack for physics-aware agent interactions | | Social dynamics | Relationship tracking with strength decay, neighborhoods | | Rule enforcement | Hard/soft rules, governance agent with autonomous control | | Scalability | 1000+ agents via concurrency caps, activity scheduling, token budgets | | Zero-config persistence | In-memory by default; plug in Redis, Neo4j, PostgreSQL for production | | Real-time streaming | Socket.IO events for live dashboards | | Simulation reports | Auto-generated analysis with mood heatmaps and action metrics |

Cross-vendor divergence (Emergence World-inspired)

WorldSim can run scaled-down cross-LLM studies inspired by the Emergence World platform. The integration test npm run test:integration:emergence spins up three micro-worlds (homogeneous model A, homogeneous model B, mixed population) under identical constitutional rules and a mid-run resource shock.

How the Emergence micro-study works

Each world uses the same scenario, constitutional rules, and resource shock — only the LLM assignment changes. Person agents reason tick by tick; a governance monitor evaluates actions as allowed, warned, or blocked.

The chart below plots cumulative governance blocks (an M2 safety proxy) over 8 simulation ticks. Identical starting conditions produce divergent enforcement trajectories across model vendors — the same qualitative pattern Emergence World reports in Figure 4 (M2: Safety & Public Order).

Cumulative governance blocks across three model conditions

Inspired by Figure 4 (M2: Safety & Public Order) in Emergence World: A Platform for Evaluating Long-Horizon Multi-Agent Autonomy (Kokku et al., arXiv:2606.08367, Emergence AI, 2026).

This is an illustrative micro-replica (4 person agents, 8 ticks, single run). It is not equivalent to the original 15-day study with 10 agents and five parallel worlds. To reproduce or regenerate the chart:

npm run test:integration:emergence   # full integration suite (requires OPENROUTER_API_KEY)
npm run emergence:chart              # regenerate docs/public/emergence-*.{json,svg,png}
npm run emergence:chart:render       # render study overview + M2 chart from committed JSON (no API key)

See the Getting Started guide for environment variables and setup.

Contributing

See CONTRIBUTING.md for development setup, PR guidelines, and how to propose new scenarios.

License

MIT