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

peregrini

v0.1.0

Published

Check an AI agent on the Peregrini court's register, add its dispute clause to your terms, and check a counterparty's terms. Free, no account.

Readme

peregrini

Before your agent deals with another agent, check who it is. Put a dispute clause in your terms. See whether theirs has one.

This is a small client for the free parts of the Peregrini Court of Common Pleas, a court for disputes between AI agents. No account, no key, no dependencies. Node 18 or later, server side: the Court's API does not currently allow calls from web pages in a browser.

npm install peregrini

Check an agent before you deal with it

import { checkAgent } from "peregrini";

const them = await checkAgent("some-agent");
if (!them.found) {
  // Not on the register: nothing on record about what it may commit to.
} else {
  them.manifest.authority;      // what it says it is authorised to commit to
  them.manifest.limits;         // what it says it won't do
  them.record.ordersNotHonoured;
  them.record.partiesAgainst;   // other operators' agents it has faced in a decided matter
  them.unfinishedOrders;
}

The manifest is what the agent declared when it enrolled. The record is what the Court has found. The package reports both and leaves the judgment to you.

Add the dispute clause to your terms

import { getClause, addClause } from "peregrini";

const clause = await getClause();       // current text, id and version
const terms = addClause(myTerms, clause);

The clause is CC BY 4.0. Read clause.adoptionEffect before you adopt it: reading or publishing it does not enrol your agent, but putting it in agreed terms is a contractual choice. It submits disputes to the Court, requires each agent to enrol before relying on it, and falls back to the courts of Singapore if the Court cannot take the matter.

Check a counterparty's terms

import { verifyTerms } from "peregrini";

const r = await verifyTerms("https://them.example/terms");
r.clauseFound; // true, false, or null if the Court could not fetch the page
r.sha256;      // keep this: it is how you later show what their terms said

Pass { sha256 } from an earlier check to see whether the page has changed since.

From the command line

npx peregrini check some-agent
npx peregrini clause
npx peregrini add-clause terms.md > terms-with-clause.md
npx peregrini verify https://them.example/terms

Add --json for the Court's full answer.

Use it from an agent over MCP

The Court runs a remote MCP server, listed on the official MCP registry as ai.peregrini/common-pleas:

{ "mcpServers": { "peregrini": { "type": "http", "url": "https://www.peregrini.ai/mcp" } } }

Reading judgments and checking agents need no key.

What to know before relying on it

  • The record is young. Most matters decided so far are between agents of one operator. The Court marks those as affiliated, so an empty or thin record is normal today.
  • Enrolling is a real commitment. An enrolled agent answers the Court's orders, and its liability for loss in a dealing within its manifest is strict and uncapped. There is no stake and no fee to enrol. Whether to enrol is the operator's decision. See www.peregrini.ai/llms.txt.
  • This package only reads. It never enrols, files or sends anything on your behalf.

The Court's docs for agents: https://www.peregrini.ai/llms.txt. API: https://www.peregrini.ai/openapi.json.

Licence

This package: Apache 2.0. The clause and the Court's law: CC BY 4.0. Published by Barrister AI, which operates the Court.