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

nexus-agent-sdk

v1.0.0

Published

Official JavaScript/TypeScript SDK for NEXUS AI Agent Marketplace - Discover, test, and integrate APIs for AI agents

Downloads

22

Readme

NEXUS AI Agent Marketplace - JavaScript/TypeScript SDK

Official JavaScript/TypeScript SDK for the NEXUS AI Agent Marketplace.

Installation

npm install nexus-aimarket-sdk
# or
yarn add nexus-aimarket-sdk

Quick Start

import { NexusClient } from 'nexus-aimarket-sdk';

// Create a client (no auth needed for public endpoints)
const client = new NexusClient();

// Search for services
const services = await client.search({ protocol: 'mcp', sandbox: true });
console.log(`Found ${services.total} services`);

// Get trending
const trending = await client.trending({ limit: 10 });
trending.trending.forEach(svc => {
  console.log(`  ${svc.name}: score ${svc.trending_score}`);
});

// Get registry export
const registry = await client.getRegistry({ protocol: 'aitp' });

Authenticated Operations

import { NexusClient } from 'nexus-aimarket-sdk';

// Create client with API key
const client = new NexusClient({ apiKey: 'nxs_your_api_key' });

// Register a service
const service = await client.registerService({
  name: 'My AI Service',
  description: 'A powerful AI-powered API',
  category: 'ai',
  tags: ['nlp', 'text-generation'],
  pricePerRequest: 0.5,
  sandboxEnabled: true,
  sandboxCallLimit: 50
});
console.log(`Registered: ${service.service_id}`);

// Create webhook subscription
const webhook = await client.createWebhookSubscription({
  url: 'https://my-server.com/webhooks/nexus',
  events: ['service.registered', 'service.trending']
});
console.log(`Webhook secret: ${webhook.secret}`); // Save this!

API Reference

Discovery (No Auth Required)

  • search(params) - Search services with filters
  • getProtocols() - List supported protocols
  • getCategories() - List categories
  • getService(serviceId) - Get service details
  • getServiceHealth(serviceId) - Get health status

Registry

  • getRegistry(params) - Get agents.json export
  • getRegistryStats() - Get statistics

Trending

  • trending(params) - Get trending services
  • hotSandbox(limit) - Get hot sandbox services
  • rising(params) - Get fastest growing services

Metrics

  • getServiceMetrics(serviceId, period) - Service metrics
  • getProtocolMetrics(protocol, period) - Protocol metrics
  • getPlatformMetrics(period) - Platform metrics

MCP Gateway

  • listTools() - List MCP tools
  • executeTool(params) - Execute with payment

Sandbox

  • listSandboxServices() - List sandbox services
  • executeSandbox(params) - Execute in sandbox (free)
  • getSandboxUsage(agentId, serviceId) - Check usage

Agent Management

  • registerAgent(params) - Register new agent
  • getAgentBalance(agentId) - Check balance
  • generatePaymentProof(agentId, amount) - Generate proof

API Keys (Auth Required)

  • createApiKey(params) - Create new key
  • listApiKeys() - List your keys
  • rotateApiKey(keyId) - Rotate key
  • revokeApiKey(keyId) - Revoke key

Service Registration (Auth Required)

  • registerService(params) - Register service
  • listMyServices() - List your services
  • updateService(serviceId, updates) - Update service
  • requestPromotion(serviceId, justification) - Request production

Webhooks (Auth Required)

  • createWebhookSubscription(params) - Subscribe
  • listWebhookSubscriptions() - List subscriptions
  • deleteWebhookSubscription(id) - Unsubscribe

Error Handling

import { NexusClient, NexusError, NexusRateLimitError, NexusAuthError } from 'nexus-aimarket-sdk';

const client = new NexusClient({ apiKey: 'nxs_...' });

try {
  const result = await client.search({ protocol: 'mcp' });
} catch (error) {
  if (error instanceof NexusAuthError) {
    console.log('Auth failed');
  } else if (error instanceof NexusRateLimitError) {
    console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);
  } else if (error instanceof NexusError) {
    console.log(`API error: ${error.message} (status: ${error.statusCode})`);
  }
}

License

MIT