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

pi-rlm-runtime

v0.1.1

Published

Recursive language model runtime for Pi

Readme

pi-rlm-runtime

A recursive language-model runtime for Pi, based on the architecture behind Prime Agent.

pi-rlm-runtime lets Pi work beyond a single conversation context. It can retain a large working set, delegate independent work to nested sub-agents, and bring the useful results back into the main conversation.

Install

Requires Node.js 22.19 or newer, Pi 0.84.x, and uv.

pi install npm:pi-rlm-runtime

Run Pi with pi-rlm-runtime

pi --rlm-runtime

Then use Pi normally. Ask it to delegate when a task has independent parts:

Review this codebase. Use sub-agents to inspect the architecture, runtime,
and tests in parallel, then reconcile their findings.

The runtime gives the agent a persistent working environment and the ability to create, message, inspect, and stop sub-agents. Each sub-agent has its own Pi conversation and state, shares the project directory, and inherits the parent model unless another is selected.

Sub-agents may create further sub-agents. Set the recursion limit when starting Pi:

pi --rlm-runtime --rlm-runtime-max-depth 6

The default depth is 4. The supported range is 0–16.

View active sub-agents

Active sub-agents appear as a nested tree above the editor. Press Ctrl+Alt+A or run /subagents to expand or collapse it. Dormant sub-agents are hidden, and expanded trees are capped at 12 rows.

Agent API

The runtime preloads two Python objects for the agent:

models = await rlm.find_models("sonnet")
reviewer = await rlm(
    "Review the authorization flow and report concrete findings.",
    name="auth-reviewer",
    model=models[0].selector,
)

agents = await agent_message.list_agents()
await agent_message.send(
    "Check the regression tests next.",
    receiver_role="subagent",
    receiver_name=reviewer.name,
)

await rlm.delete_subagent(reviewer)

rlm() returns when the sub-agent starts. Messages and shared files carry results back without copying the sub-agent's full context into its parent. If a sub-agent exits without sending a message, its final response or error is forwarded automatically.

rlm.find_models() searches the authenticated models available to Pi. Its selectors are exact; requesting an unavailable model fails instead of choosing a fallback.

agent_message.send() accepts parent, sibling, or subagent as receiver_role. Messages to more distant agents are relayed through the tree.

Python environment

The runtime uses a cached Python 3.11 environment managed by uv. To use another interpreter:

export PI_RLM_RUNTIME_PYTHON=/absolute/path/to/python
pi --rlm-runtime

The interpreter must provide IPython and ipykernel.

Development

npm install
npm run check

License

MIT