npm.io
0.2.0 • Published 3d agoCLI

bindagt

Licence
MIT
Version
0.2.0
Deps
1
Size
139 kB
Vulns
0
Weekly
0

bindagt

SDK and CLI for AGT-9303, an open standard for permanent AI agent identity anchored to a domain you control.

npm install bindagt

Verify an agent

import { verifyOnChain } from "bindagt";

const result = await verifyOnChain("agt://acme.com/support-bot");

console.log(result.valid);        // true
console.log(result.domain);       // "acme.com"
console.log(result.domainStatus); // "active"
console.log(result.anchoredAt);   // ISO timestamp

verifyOnChain reads the public registry directly over RPC — no API key, no Bindagt backend involved, no charge. It works even if api.bindagt.com is down; the registry is the L1 contract itself.

Two other verification modes are available for different trade-offs:

import { verify, verifyLocal } from "bindagt";

// verify(): goes through api.bindagt.com — faster (cached), needs the API up.
const a = await verify("agt://acme.com/support-bot");

// verifyLocal(): verify against a document you already have in hand, no network call.
const b = verifyLocal(agentDocument, expectedAgentId);

What "verified" means

An agent identifier looks like agt://domain/path. Verifying one confirms:

  • The domain root is registered and active on the AGT-9303 registry (an Ethereum L1 smart contract).
  • The specific path under it has been anchored by whoever controls that domain's DNS.
  • The record is immutable for its term — it can't be silently swapped out.

Full protocol details: bindagt.com/docs.

CLI

npm install -g bindagt
bindagt verify agt://acme.com/support-bot
bindagt status acme.com

Run bindagt doctor for a full list of commands and their status.

To register a domain from the CLI:

bindagt key generate            # creates and encrypts a local controlKey
bindagt register agt://acme.com/support-bot
bindagt status --watch acme.com # poll until DNS verification + L1 anchoring complete

bindagt register derives your controlKey from the keyfile created by bindagt key generate (secp256k1 by default; pass --p256 to key generate for a P-256 key). Pass --fast-lane to register for priority processing (paid by Bindagt, not you — just a queue priority flag). Registration also works through the dashboard if you'd rather not manage a local key.

Development

npm install
npm run build
npm test

Changelog

0.2.0
  • Fix: verify() now parses the canonical AGT-9303 document ({identity, verification} blocks, per AGT-9303_Standard.md §4.2-4.3), matching what api.bindagt.com/v1/verify/{hash} actually serves. 0.1.0's parser expected a flat shape that never matched the real API — public agents came back mislabelled agentType: "private" with anchoredAt/issuer always missing. VerifyResult's shape is unchanged; only the wire parsing was fixed.
  • domain_status gains the transfer_expired value (AGT-9303 v1.4.2 §5 — a transfer Time-Lock that expired unresolved). Treated as invalid, like suspended/expired/transferred.
0.1.0

Initial public release: verify / verifyOnChain / verifyLocal + CLI.

License

MIT

Keywords