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

@agntcy/slim-a2a

v0.1.0

Published

SLIM (slimrpc) transport for the A2A protocol, plugging into the official @a2a-js/sdk.

Readme

slim-a2a-node

A SLIM (slimrpc) transport for the A2A protocol in TypeScript. It lets A2A agents communicate over the SLIM network using SLIM identities for addressing and authentication, and plugs directly into the official @a2a-js/sdk — it does not reinvent the A2A domain types.

This is the JavaScript/TypeScript peer of slim-a2a-python (and the Go, Java, and .NET SDKs).

  • ClientSRPCTransport / SRPCTransportFactory implement the SDK's Transport / TransportFactory.
  • ServerSRPCHandler bridges an SDK A2ARequestHandler (e.g. DefaultRequestHandler) onto the generated slimrpc servicer.
  • BootstrapsetupSlimClient and friends handle SLIM init + connect.

How it works

The generated slimrpc stubs speak protobuf-es messages, while @a2a-js/sdk (>= 1.0.0-beta) exposes ts-proto domain objects for the same A2A v1.0.0 proto. slim-a2a-node bridges the two through the canonical proto3 JSON representation (see src/conversions.ts), so message shapes, enums, oneofs, and bytes all round-trip faithfully with no hand-written field mapping.

@a2a-js/sdk (ts-proto)  <-- proto3 JSON bridge -->  protobuf-es  <-- slimrpc -->  SLIM

Requirements

  • Node.js >= 18, native ESM.

  • To regenerate stubs only: buf and the protoc-gen-slimrpc-node plugin on PATH:

    cargo install --locked agntcy-protoc-slimrpc-plugin --bin protoc-gen-slimrpc-node

Install

npm install

Pulls @agntcy/slim-bindings and the matching native platform package for your OS/arch from npm automatically.

Usage

Server

import { Server } from '@agntcy/slim-bindings';
import { AgentCard } from '@a2a-js/sdk';
import { DefaultRequestHandler, InMemoryTaskStore } from '@a2a-js/sdk/server';
import { setupSlimClient, SRPCHandler, registerSlimA2AHandler } from '@agntcy/slim-a2a';

const agentCard = AgentCard.fromJSON({
  name: 'My Agent',
  version: '1.0.0',
  capabilities: { streaming: true },
  supportedInterfaces: [
    { url: 'agntcy/demo/my_agent', protocolBinding: 'slimrpc', protocolVersion: '1.0' },
  ],
  // ...skills, input/output modes
});

const requestHandler = new DefaultRequestHandler(
  agentCard,
  new InMemoryTaskStore(),
  new MyAgentExecutor(), // your AgentExecutor
);

const { app, name, connId } = await setupSlimClient('agntcy', 'demo', 'my_agent');
const server = Server.newWithConnection(app, name, connId);
registerSlimA2AHandler(server, new SRPCHandler(agentCard, requestHandler));
await server.serveAsync();

Client

import { setupSlimClient, createSlimClient } from '@agntcy/slim-a2a';
import { SendMessageRequest } from '@a2a-js/sdk';

const { app, connId } = await setupSlimClient('agntcy', 'demo', 'client');
const client = await createSlimClient(app, connId, agentCard); // A2A SDK Client

const request = SendMessageRequest.fromJSON({
  message: { messageId: crypto.randomUUID(), role: 'ROLE_USER', parts: [{ text: 'hello' }] },
});
const result = await client.sendMessage(request); // Message | Task

createSlimClient uses the SDK's ClientFactory under the hood, selecting the slimrpc transport from the agent card's declared interfaces. For manual wiring, register SRPCTransportFactory yourself:

import { ClientFactory } from '@a2a-js/sdk/client';
import { SRPCTransportFactory } from '@agntcy/slim-a2a';

const factory = new ClientFactory({ transports: [new SRPCTransportFactory(app, connId)] });
const client = await factory.createFromAgentCard(agentCard);

SLIM names are the 3-tuple organization/namespace/app; the agent card's slimrpc AgentInterface.url carries that name.

Multicast

SRPCMulticastClient queries several agents over a SLIM group channel, yielding { source, response } per responding member — see src/clientTransport.ts.

Example

A runnable echo agent lives in examples/echo-agent:

npm run example:server -- --name echo_agent   # terminal 1
npm run example:client -- --text "hello slim"  # terminal 2

Scripts

| Script | Description | | --- | --- | | npm run generate | Regenerate the A2A v1.0.0 protobuf-es + slimrpc stubs (buf). | | npm run build | Type-check and emit the ESM build to dist/. | | npm run typecheck | Type-check the whole project. | | npm test | Run the vitest suite (unit + end-to-end round-trip). | | npm run format | Format sources with prettier. |

A Taskfile.yaml mirrors these (task generate, task build, task test, …).

Continuous integration

.github/workflows/ci.yaml runs on pushes and PRs to main:

  • format — Prettier check (standalone; no project install).
  • codegen — regenerates the stubs with the published slimrpc plugin and fails on drift from what's committed.
  • build-and-test — type-check, build, and test on Node 18/20/22.

Releasing

.github/workflows/release.yaml publishes to npm on a version tag. Push a tag matching v<version>:

git tag v0.1.0          # -> published as @latest
git tag v0.1.0-alpha.1  # -> published as @alpha
git push origin --tags

The package version is taken from the tag; the npm dist-tag is derived from any prerelease id (alpha/beta/rc/… → that tag, plain version → latest).

Publishing uses npm Trusted Publishing (OIDC) — no NPM_TOKEN secret. One-time setup on npmjs.com: the @agntcy/slim-a2a package → Settings → Trusted publishing → set Repository to this repo and Workflow filename to release.yaml.

Proto version scope

Ships A2A v1.0.0 (git a2aproject/[email protected], subdir specification). v0.3 wire compatibility is a planned follow-up (the SDK exposes @a2a-js/sdk/compat/v0_3).

License

Apache-2.0. See LICENSE.