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

@artinet/agent-relay

v0.1.5

Published

A library for discovering and relaying messages between A2A enabled AI agents via the @artinet/sdk.

Readme

Agent Relay has been migrated to orc8. For the time being this package will be maintained as a re-export but will eventually be deprecated. Migrating to orc8 is highly recommended.

Relay is an orc8 module for discovering and communicating with AI agents via the @artinet/sdk.

Features

  • Registration: Register A2A agents or clients directly
  • Automatic Discovery: Scan ports and keep a live registry of reachable agents
  • Message Relay: Send messages and stream responses with full task context
  • Task Management: Get tasks and cancel running work
  • Agent Search: Query agent cards by name, description, or skills

Installation

npm install orc8

Port-based discovery requires portscanner (peer dependency):

npm install portscanner

Usage

Imports

import { Relay, Discover } from "orc8/relay";

Configuration Options

Relay manages registered agents:

import type { Service, AgentMessenger } from "@artinet/sdk";

interface RelayConfig {
  callerId: string; // Unique identifier for this relay instance (prevents self-calls)
  abortSignal?: AbortSignal; // Optional abort signal for outgoing requests
  agents?: Map<string, Service | AgentMessenger>; // Optional initial registry
}

Discoverable relay adds optional scanning and sync:

interface DiscoverConfig {
  callerId: string;
  syncInterval?: number; // Rescan interval in ms (omit to disable background sync)
  host?: string; // Default: "localhost"
  startPort?: number; // Default: 3000
  endPort?: number; // Default: 3100
  threads?: number; // Default: 250
  headers?: Record<string, string>; // Optional headers for agent requests
  fallbackPath?: string; // Default: "/.well-known/agent-card.json"
}

Quickstart (Discovery + Relay)

import { cr8, A2A } from "@artinet/sdk";
import { Discover } from "orc8/relay";

// Create and start an Agent Server
const agentServer = cr8({
  name: "test-agent",
  skills: [
    {
      name: "calculator",
    },
  ],
}).text("hello world!").server;

const server = agentServer.app.listen(3001, () => {
  console.log("test-agent started on port 3001");
});

// Create a discoverable relay
const relay = await Discover.create({
  callerId: "caller-id",
  host: "localhost",
  startPort: 3000,
  endPort: 3100,
  syncInterval: 2500,
});

// Send a message to an agent
const response: A2A.SendMessageSuccessResult = await relay.sendMessage({
  agentId: "test-agent",
  messageSendParams: {
    message: {
      role: "user",
      kind: "message",
      parts: [{ kind: "text", text: "Hello!" }],
      messageId: "msg-123",
    },
  },
});

// Clean up when done
await relay.stop();
server.close();

Manual Registration

import { createMessenger } from "@artinet/sdk";
import { Relay } from "orc8/relay";

const relay = await Relay.create({ callerId: "caller-id" });

const messenger = await createMessenger({
  baseUrl: "http://localhost:3001",
  fallbackPath: "/.well-known/agent-card.json",
});

await relay.registerAgent(messenger);

Task Management

const task = await relay.getTask({
  agentId: "test-agent",
  taskQuery: { taskId: "task-123", metadata: {}, historyLength: undefined },
});

const cancelled = await relay.cancelTask({
  agentId: "test-agent",
  taskId: { id: "task-123", metadata: {} },
});

Search Agents

const agents = await relay.searchAgents({ query: "calculator" });

Requirements

  • Node.js ≥ 18.9.1
    • Recommended: 20 || ≥ 22

License

Apache-2.0

References