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

@artinet/agent-relay

v0.0.8

Published

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

Downloads

416

Readme

Website npm version npm downloads Apache License Known Vulnerabilities GitHub stars Discord

Agent Relay

A library that enables AI agents to discover and communicate with other A2A (Agent-to-Agent) enabled AI agents via the @artinet/sdk.

Features

  • Automatic Agent Discovery: Scans network ports to discover available agents
  • Multi-Agent Orchestration: Coordinate tasks across multiple specialized agents
  • Message Relay: Send messages to agents and receive responses with full task context
  • Task Management: Query task status and cancel running tasks
  • Agent Discovery: View and search agents by name, description, or skills

Installation

npm install @artinet/agent-relay

Usage

*We recommend allocating a small port range because port scanning is resource intensive.

Configuration Options

interface AgentRelayConfig {
  callerId: string; // Unique identifier for this relay instance (ensures the agent cannot call itself)
  syncInterval?: number; // Sync interval in ms (default: 2500)
  scanConfig?: {
    host?: string; // Host to scan (default: "localhost")
    startPort?: number; // Starting port (default: 3000)
    endPort?: number; // Ending port (default: 3100)
    threads?: number; // Concurrent scan threads (default: 10)
    fallbackPath?: string; // Agent card fallback path (default: "/.well-known/agent-card.json")
  };
}

Quickstart

import { AgentBuilder, createAgentServer, SendMessageSuccessResult } from "@artinet/sdk";
import { AgentRelay } from "@artinet/agent-relay";

// create and start an Agent Server
const agentServer = createAgentServer({
    agent: AgentBuilder()
      .text(() => "hello world!")
      .createAgent({
        agentCard: {
          name: "test-agent",
          skills: [{
              name: "calculator",
              ...
            }],
          ...
        },
      }),
  });

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

// Create a relay instance
const relay: AgentRelay = await AgentRelay.create({
  callerId: "caller-id", // The callers unique ID
  scanConfig: {
    host: "localhost",
    startPort: 3000,
    endPort: 3100,
  },
  syncInterval: 2500, // Rescan every 2.5 seconds
});

// Send a message to an agent
const response: 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.close();

List the available agents

const agentIds: string[] = await relay.getAgentIds();
console.log("Available agents:", agentIds);

Search for agents by name, description, or skills

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

Build

npm run build

Test

npm test

Requirements

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

License

Apache-2.0

References