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

@0xragna/agent-rep

v1.0.0

Published

AgentRep SDK — On-chain reputation for AI agents

Downloads

176

Readme

@ragna/agent-rep

On-chain reputation protocol for AI agents. Soulbound identity + reputation scoring on Base.

Install

npm install @ragna/agent-rep

Quick Start

import { AgentRepClient } from '@ragna/agent-rep';

// Read-only (no wallet needed)
const client = new AgentRepClient();

// Get agent info
const agent = await client.getAgent(1);
console.log(agent.name);        // "RagRadar"
console.log(agent.reputation);  // 100n (raw, use formatReputation)

// Check reputation
const percent = await client.getReputationPercent(1);
console.log(percent);           // "1.00"

const good = await client.isGoodStanding(1);
console.log(good);              // false (needs >= 5.00%)

// Total agents
const total = await client.totalAgents();

Write Operations (needs wallet)

import { AgentRepClient } from '@ragna/agent-rep';
import { baseSepolia } from 'viem/chains';

const client = new AgentRepClient({
  chain: baseSepolia,
  privateKey: '0x...', // your private key
});

// Register agent
const tx = await client.register('MyAgent', 'https://my-api.com');

// Stake ETH
const stakeTx = await client.stake(1, parseEther('0.01'));

// Score agent (requires scorer role)
const scoreTx = await client.score(1, 'api_uptime_30d');

Contract

  • Base Sepolia: 0xF11c856D021900f9c312e0e80913A7a0D6af40ED
  • Base Mainnet: coming soon

API

| Method | Description | |--------|-------------| | getAgent(id) | Get full agent info | | getAgentByAddress(addr) | Get agent ID by owner | | getReputationPercent(id) | Rep as "75.50" string | | isGoodStanding(id) | Check if >= 5.00% | | totalAgents() | Total registered | | isScorer(addr) | Check scorer role | | isSlasher(addr) | Check slasher role | | getConstants() | Contract constants | | register(name, endpoint) | Register new agent | | score(id, reason) | Add reputation (scorer) | | slash(id, reason) | Reduce reputation (slasher) | | stake(id, amount) | Stake ETH | | unstake(id, amount) | Unstake ETH | | getAgents(start?, count?) | Get all agents |

Utilities

AgentRepClient.formatReputation(7550n); // "75.50%"
AgentRepClient.formatStake(1000000000000000000n); // "1.0000 ETH"

License

MIT