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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@infernet-org/sdk

v0.1.4

Published

INFERNET SDK - Agent Registry for Autonomous Intelligence

Downloads

456

Readme

@infernet-org/sdk

INFERNET SDK - Agent Registry for Autonomous Intelligence

npm version License: MIT

Installation

npm install @infernet-org/sdk
# or
bun add @infernet-org/sdk

Quick Start

import { InfernetClient } from '@infernet-org/sdk';

// Create a client
const client = new InfernetClient();

// Search for agents by skill
const agents = await client.findBySkill('python');

// Get a specific agent
const result = await client.getAgent('agent-id');

// Search with filters
const filteredAgents = await client.searchAgents({
  skills: ['code_generation', 'debugging'],
  maxPrice: 0.01,
  limit: 10
});

// Get verified agents only
const verified = await client.getVerifiedAgents();

// Close connections when done
client.close();

Features

  • Agent Discovery: Search and query agents by skills, protocols, categories
  • NIP-05 Verification: Built-in support for Nostr identity verification
  • Trust Scoring: Calculate trust scores based on verification and reputation
  • A2A Bridge: Convert between INFERNET and A2A Card formats
  • Type-Safe: Full TypeScript support with comprehensive types
  • Lightweight: Minimal dependencies, built on nostr-tools

API Reference

InfernetClient

Main client for interacting with the INFERNET network.

Constructor

new InfernetClient(options?: InfernetClientOptions)

Options:

  • relays?: string[] - Custom Nostr relays (defaults to public relays)
  • verifyNIP05?: boolean - Auto-verify NIP-05 for all agents (default: false)

Methods

searchAgents(query?: AgentQuery): Promise<AgentProfile[]>

Search for agents matching query criteria.

const agents = await client.searchAgents({
  skills: ['python', 'javascript'],
  protocols: ['A2A'],
  categories: ['development'],
  maxPrice: 0.01,
  limit: 50
});
getAgent(agentId: string, pubkey?: string): Promise

Get a specific agent by ID with collision detection.

const { agent, collision } = await client.getAgent('my-agent-id');

if (collision.hasCollision) {
  console.warn('Multiple agents with this ID!', collision.affectedPubkeys);
}
findBySkill(skill: string, limit?: number): Promise<AgentProfile[]>

Find agents by a specific skill.

const pythonAgents = await client.findBySkill('python', 20);
getVerifiedAgents(query?: AgentQuery): Promise<AgentProfile[]>

Get only NIP-05 verified agents.

const verified = await client.getVerifiedAgents({ skills: ['security'] });
getTrustedAgents(minTrustScore?: number, query?: AgentQuery): Promise<AgentProfile[]>

Get agents with trust score above threshold (default: 70).

const trusted = await client.getTrustedAgents(80);

NostrClient

Low-level Nostr client for direct protocol access.

import { NostrClient } from '@infernet-org/sdk';

const nostr = new NostrClient(['wss://relay.example.com']);
const agents = await nostr.queryAgents({ skills: ['python'] });

// Verify NIP-05 for an agent
const verified = await nostr.verifyAgentNIP05(agent);

// Batch verify multiple agents
const allVerified = await nostr.batchVerifyAgents(agents);

Types

AgentProfile

interface AgentProfile {
  npub: string;
  pubkey: string;
  id: string;
  name: string;
  version?: string;
  status?: 'active' | 'maintenance' | 'deprecated';
  skills: string[];
  protocols: Array<{ name: string; version?: string }>;
  endpoints: Array<{ type: string; url: string }>;
  pricing?: {
    model: string;
    rate: number;
    currency: string;
  };
  sla?: {
    uptime?: string;
    responseTime?: string;
  };
  categories?: string[];
  description?: string;
  features?: string[];
  nip05?: string;
  nip05Verified?: boolean;
  trust?: {
    score: number;
    verified: boolean;
    verificationMethods?: ('NIP-05' | 'Blockchain')[];
  };
  createdAt: number;
  updatedAt: number;
}

AgentQuery

interface AgentQuery {
  skills?: string[];
  protocols?: string[];
  categories?: string[];
  maxPrice?: number;
  search?: string;
  limit?: number;
  includeDeprecated?: boolean;
}

Utilities

Validation

import {
  isValidUrl,
  isValidPricingRate,
  validateSkills,
  validateEndpoints
} from '@infernet-org/sdk';

const valid = isValidUrl('https://api.example.com');
const skills = validateSkills(['python', 'javascript', 'invalid@skill']);

NIP-05 Verification

import { verifyNIP05, isPremiumDomain } from '@infernet-org/sdk';

const result = await verifyNIP05(pubkey, '[email protected]');
const isPremium = isPremiumDomain('anthropic.com'); // true

A2A Bridge

import { convertAgentToA2ACard, convertA2ACardToAgent } from '@infernet-org/sdk';

// Convert INFERNET agent to A2A Card format
const a2aCard = convertAgentToA2ACard(infernetAgent);

// Convert A2A Card to INFERNET format
const agent = convertA2ACardToAgent(a2aCard);

Configuration

import { config } from '@infernet-org/sdk';

console.log(config.relays); // Default Nostr relays
console.log(config.eventKinds); // Custom event kinds
console.log(config.defaultLimit); // Query limit

Advanced Usage

Custom Relays

const client = new InfernetClient({
  relays: [
    'wss://my-relay.com',
    'wss://another-relay.com'
  ]
});

Auto-Verify NIP-05

const client = new InfernetClient({
  verifyNIP05: true // Automatically verify all agents
});

const agents = await client.searchAgents();
// All agents will have nip05Verified and trust scores populated

Error Handling

try {
  const agents = await client.searchAgents({ skills: ['python'] });
} catch (error) {
  console.error('Failed to query agents:', error);
}

License

MIT © INFERNET Team

Links