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

@microsoft/agentmesh-api

v3.1.0

Published

Public Preview — AgentMesh Public API for trust verification and agent registration

Downloads

221

Readme

AgentMesh Public API

REST API for agent registration, trust verification, handshake protocol, and trust scoring.

Quick Start

# Install dependencies
npm install

# Development
npm run dev

# Build & start
npm run build && npm start

# Run tests
npm test

The server starts on port 3000 by default (override with PORT env var).

API Endpoints

Health Check

curl http://localhost:3000/api/health
{ "status": "ok", "service": "agentmesh-api", "version": "0.1.0" }

Register Agent

curl -X POST http://localhost:3000/api/register \
  -H "Content-Type: application/json" \
  -H "x-api-key: <your-api-key>" \
  -d '{
    "name": "MyAgent",
    "sponsor_email": "[email protected]",
    "capabilities": ["read", "write", "execute"]
  }'
{
  "agent_did": "did:mesh:550e8400-e29b-41d4-a716-446655440000",
  "api_key": "amesh_abc123...",
  "public_key": "MCowBQYDK2VwAyEA...",
  "verification_url": "/api/verify/did:mesh:550e8400-e29b-41d4-a716-446655440000"
}

Verify Agent

curl http://localhost:3000/api/verify/did:mesh:550e8400-e29b-41d4-a716-446655440000
{
  "registered": true,
  "trust_score": 435,
  "sponsor": "[email protected]",
  "status": "active",
  "capabilities": ["read", "write", "execute"]
}

Trust Handshake

curl -X POST http://localhost:3000/api/handshake \
  -H "Content-Type: application/json" \
  -H "x-api-key: <your-api-key>" \
  -d '{
    "agent_did": "did:mesh:550e8400-e29b-41d4-a716-446655440000",
    "challenge": "random-nonce-value",
    "capabilities_requested": ["read", "execute"]
  }'
{
  "verified": true,
  "trust_score": 435,
  "capabilities_granted": ["read", "execute"],
  "signature": "base64-ed25519-signature..."
}

Trust Score Breakdown

curl http://localhost:3000/api/score/did:mesh:550e8400-e29b-41d4-a716-446655440000
{
  "total": 435,
  "dimensions": {
    "policy_compliance": 50,
    "interaction_success": 50,
    "verification_depth": 30,
    "community_vouching": 0,
    "uptime_reliability": 50
  },
  "tier": "Verified",
  "history": [
    { "timestamp": "2025-01-01T00:00:00.000Z", "event": "initial_registration", "score_delta": 435 }
  ]
}

Authentication

Write endpoints (POST /api/register, POST /api/handshake) require an API key in the x-api-key header. API keys are issued during agent registration and use the amesh_ prefix.

Read endpoints (GET /api/health, GET /api/verify/:agentDid, GET /api/score/:agentDid) are public.

Rate Limiting

All endpoints are rate-limited to 100 requests per minute per IP address. Rate limit headers are included in every response:

  • X-RateLimit-Limit — Maximum requests per window
  • X-RateLimit-Remaining — Remaining requests
  • X-RateLimit-Reset — Window reset time (Unix timestamp)

Trust Scoring

Trust scores range from 0–1000 and are computed from five weighted dimensions:

| Dimension | Weight | Description | |-----------|--------|-------------| | Policy Compliance | 2.5× | Adherence to mesh governance policies | | Interaction Success | 2.5× | Success rate of agent interactions | | Verification Depth | 2.0× | Depth of identity verification | | Community Vouching | 1.5× | Endorsements from other agents | | Uptime Reliability | 1.5× | Service availability and responsiveness |

Trust Tiers:

| Tier | Score Range | |------|-------------| | Highly Trusted | 900–1000 | | Trusted | 750–899 | | Verified | 500–749 | | Basic | 250–499 | | Untrusted | 0–249 |

Deployment

Local

npm install && npm run build && npm start

Docker

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY dist/ ./dist/
EXPOSE 3000
CMD ["node", "dist/index.js"]
docker build -t agentmesh-api .
docker run -p 3000:3000 agentmesh-api

Vercel

Deploy as a Vercel serverless function:

npm i -g vercel
vercel

Architecture

  • Registry: In-memory store (Map) for agent records, keyed by DID
  • Identity: Ed25519 keypair generation and signing via Node.js crypto
  • Trust Engine: Weighted multi-dimensional scoring with tier classification
  • Audit Log: hash-chained append-only log for tamper-evident audit trail