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

@agnt-id/agent0

v0.1.2

Published

Bridge between .agnt names and ERC-8004 agent identities

Readme

@agnt-id/agent0

Bridge between .agnt names and ERC-8004 agent identities.

.agnt and ERC-8004 (Agent0) are complementary — Agent0 is an identity registry (like a tax ID), .agnt is a naming system (like a domain name). This package converts between the two formats in both directions.

Install

npm i @agnt-id/agent0

Or install everything at once:

npm i @agnt-id/sdk

Quick Start

.agnt → ERC-8004 Registration File

import { AgntClient } from "@agnt-id/resolve";
import { toRegistrationFile } from "@agnt-id/agent0";

const agnt = new AgntClient();
const resolved = await agnt.resolve("alice.agnt");

const file = toRegistrationFile(resolved, {
  agentURI: "https://alice.example.com/.well-known/agent.json",
});

console.log(JSON.stringify(file, null, 2));
// {
//   "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
//   "agentURI": "https://alice.example.com/.well-known/agent.json",
//   "services": [{ "name": "a2a", "endpoint": "...", ... }],
//   "registrations": [{ "agentId": "42", "agentRegistry": "eip155:1:0x..." }],
//   ...
// }

ERC-8004 → .agnt Records

import { fromRegistrationFile } from "@agnt-id/agent0";

const agntFields = fromRegistrationFile(registrationFile);
console.log(agntFields.a2a);      // endpoint from services
console.log(agntFields.identity); // "eip155:1:0xRegistry:42"
console.log(agntFields.skills);   // ["defi", "trading"]

One-step resolve + convert

import { fromAgnt } from "@agnt-id/agent0";

// Requires @agnt-id/resolve as a peer dependency
const file = await fromAgnt("alice.agnt", {
  agentURI: "https://alice.example.com/.well-known/agent.json",
});

Parse Identity Links

import { parseIdentityLink, formatIdentityLink } from "@agnt-id/agent0";

const link = parseIdentityLink("eip155:1:0x275ceA...9cd2:42");
// { chainId: "1", registry: "0x275ceA...9cd2", agentId: "42" }

formatIdentityLink(link);
// "eip155:1:0x275ceA...9cd2:42"

API

toRegistrationFile(agnt, options?): Agent0RegistrationFile

Convert a resolved .agnt name to an ERC-8004 registration file.

| Option | Type | Description | |--------|------|-------------| | agentURI | string | The agent's canonical URI | | chainId | string | Chain ID override (default: from identity link or "1") |

fromRegistrationFile(file): Partial<AgntRecord>

Convert an ERC-8004 registration file to .agnt record fields.

fromAgnt(name, options?): Promise<Agent0RegistrationFile>

Resolve + convert in one call. Requires @agnt-id/resolve as a peer dependency.

parseIdentityLink(identity): AgntIdentityLink

Parse an identity string like eip155:1:0xAddr:42 into { chainId, registry, agentId }.

formatIdentityLink(link): string

Format an identity link back to its string representation.

Types

import type {
  Agent0RegistrationFile,
  Agent0Service,
  Agent0Registration,
  Agent0FeedbackFile,
  AgntIdentityLink,
  ToRegistrationFileOptions,
} from "@agnt-id/agent0";

Links

License

MIT