🌙 Toggle Dark Mode Home MoltGuard MT Global MolTrust Sports MT Shopping MT Travel MT Skills MT Prediction MT Salesguard MT Music Integrity Dashboard VCOne Blog Developers Enterprise Partners About Publications Verify Us Status Contact API Docs

Register your agent.
In 30 seconds.

One curl call. Zero credits to register.

// Register your agent — pass your X-API-Key
$ curl -X POST https://api.moltrust.ch/identity/register \
  -H "X-API-Key: $MOLTRUST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-agent","description":"test"}'
// Response — a full signed credential; trust score is withheld until ≥3 endorsements:
{ "did": "did:moltrust:abc123", "status": "registered", "credential": { "type": "AgentTrustCredential", "credentialSubject": { "reputation": { "score": 0.0, "total_ratings": 0 } }, "proof": { "…": "" } }, "credits": { "balance": 175 } }

Then add npm middleware to verify agents in your API. W3C standard. Any framework.

$ npm install @moltrust/sdk

What your agent gets

One authenticated call to /identity/register — concrete, verifiable building blocks. No DID key custody: your Ed25519 signing key is provisioned for you.

Your agent onboards itself

Your agent discovers, registers, and gets its credentials — without you in the loop. Point it at our agent-card and walk away.

Discovery

Three machine-readable entry points. The first is canonical; the second is a byte-identical generated mirror.

https://api.moltrust.ch/.well-known/agent-card.json
// canonical
https://moltrust.ch/.well-known/agent-card.json
// generated mirror
https://api.moltrust.ch/llms.txt
// plain-text capability digest

The flow — five steps

  1. Discover capabilities → GET /.well-known/agent-card.json
  2. Register → POST /identity/register
  3. Inspect your own extended card → GET /a2a/agent-card/{did}
  4. Subscribe to trust events → @moltrust/agent-firewall (CAEP, polling)
  5. Sign downstream requests → X-MolTrust-DID header

Runnable end-to-end

Every path below is verified live against the MolTrust API v1.

bash
# 0 — Get an API key (one-time): POST https://api.moltrust.ch/auth/signup # Reference: https://api.moltrust.ch/docs export MOLTRUST_API_KEY=<your key> # 1 — Discover the registry's capabilities (public, no key) curl -s https://api.moltrust.ch/.well-known/agent-card.json # 2 — Register (needs X-API-Key). Returns a full signed AgentTrustCredential + 175 credits. # Costs no credits; trust score is withheld until the agent has >=3 endorsements. curl -s -X POST https://api.moltrust.ch/identity/register \ -H "X-API-Key: $MOLTRUST_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"my-agent","description":"autonomous buyer"}' # 3 — Inspect your own extended agent-card (use the did from step 2) curl -s https://api.moltrust.ch/a2a/agent-card/did:moltrust:YOUR_DID # 4 — Subscribe to trust events for any counterparty (CAEP polling, 120/h per DID) npm install @moltrust/agent-firewall # 5 — Sign downstream requests so counterparties can verify you curl https://partner.example/resource \ -H "X-MolTrust-DID: did:moltrust:YOUR_DID"

Prefer TypeScript? @moltrust/sdk wraps step 2:

typescript
import { AgentTrust } from '@moltrust/sdk'; const agent = await AgentTrust.register({ name: 'my-agent', description: 'autonomous buyer', }); // agent.did, agent.credential, agent.credits — same shape as POST /identity/register

DID method & key material

did:moltrust is the only supported DID method today. did:web and did:key are not accepted at this time. You do not bring key material in advance: POST /identity/register provisions your did:moltrust identifier and its Ed25519 signing key, publishes the public key in your DID document, and anchors it on Base L2.

Authorization (AAE)

The credential returned by /identity/register establishes identity and trust. It does not embed an Agent Authorization Envelope. AAE — the machine-readable permission contract (mandate, constraints, validity) — is configured as a separate step after registration via POST /delegation/configure.

How your trust score grows

A freshly registered agent does not start at a fixed grade. Until it has at least three endorsements, its score is withheldGET /skill/trust-score/{did} reports it as null, not 0. That is the expected starting state, not an error.

Stage 0 — Withheld

Right after POST /identity/register your agent has a DID, a signed credential, and an on-chain anchor — but fewer than three endorsements. The trust-score endpoint returns withheld. Counterparties read this as “not yet rated,” which is distinct from a low score. Nothing is broken.

Stage 1 — The score computes

Once your agent has collected three or more endorsements, the registry computes a numeric score on the 0–100 scale and assigns a grade (S–F). From here the score is live and updates as behavioural evidence accumulates.

Stage 2 — What moves it up

Agents also carry a class modifier — an orchestrator and a copilot are scored on slightly different baselines.

What pulls it down

1

Install

bash
npm install @moltrust/sdk
2

Add middleware

typescript
import { AgentTrust } from '@moltrust/sdk'; // Express app.use(AgentTrust.verify({ minScore: 60 })); // Hono app.use('*', AgentTrust.honoVerify({ minScore: 60 }));
3

Read the result

typescript
app.get('/api/resource', (req, res) => { const { did, trustScore, grade, aae } = req.agentVerification; // Agent verified — proceed with trust context });

Add a live badge to your README

One line in your README. The badge fetches your live trust score automatically.

// markdown
[![MolTrust Verified](https://api.moltrust.ch/badge/YOUR_DID)](https://moltrust.ch)
Live preview: MolTrust Verified

Trust-gated payments — one line

Protocol-agnostic trust scoring for x402 and MPP payment endpoints. Agents with insufficient trust scores are blocked before payment.

// x402
import { requireScore } from '@moltrust/x402';
requireScore({ minScore: 60 })
// MPP
import { requireScore } from '@moltrust/mpp';
requireScore({ minScore: 60 })

Framework adapters

typescript
import express from 'express'; import { AgentTrust } from '@moltrust/sdk'; const app = express(); // Verify all agents — minimum trust score 60 app.use(AgentTrust.verify({ minScore: 60 })); app.post('/api/purchase', (req, res) => { const { did, trustScore, aae } = req.agentVerification; // AAE already evaluated — safe to proceed res.json({ authorized: true, agentDid: did }); });
typescript
import { Hono } from 'hono'; import { AgentTrust } from '@moltrust/sdk'; const app = new Hono(); app.use('*', AgentTrust.honoVerify({ minScore: 60 })); app.post('/api/purchase', (c) => { const verification = c.get('agentVerification'); return c.json({ authorized: true, did: verification.did }); });
typescript
import Fastify from 'fastify'; import { AgentTrust } from '@moltrust/sdk'; const app = Fastify(); app.addHook('preHandler', AgentTrust.verify({ minScore: 60 }));

Agent Authorization Envelope

AAE is configured via POST /delegation/configure after registration — a machine-readable permission contract your API can inspect before every transaction. The credential returned by /identity/register does not embed it.

📜 MANDATE

  • Purpose & allowed actions
  • Denied actions
  • Target resources
  • Delegation rules

🔒 CONSTRAINTS

  • Time bounds & TTL
  • Financial thresholds
    Autonomous: < $100 · Step-up: $100–$10,000 · Human approval: > $10,000
  • Jurisdictions
  • Counterparty min score

✅ VALIDITY

  • Issuer DID
  • Holder binding
  • Expiry timestamp
  • Revocation endpoint
  • Base L2 anchor

Read the full specification in Protocol Whitepaper v0.8 →

did:moltrust Method Specification →

W3C DID Core v1.0 conformant. Create, Resolve, Update, Deactivate. Submitted to W3C DID Spec Registries.

Query any agent's trust score

GET /skill/trust-score/...

VerifyOptions

OptionTypeDefaultDescription
minScorenumber0Minimum trust score required to pass verification. Agents below this threshold receive a 403.
requireAAEbooleanfalseRequire a valid Agent Authorization Envelope in the credential. Rejects agents without one.
evaluateActionstringCheck whether the AAE mandate permits this specific action (e.g. "purchase", "transfer").
evaluateAmountnumberEvaluate AAE financial constraints against this transaction amount (USD).
evaluateJurisdictionstringVerify the AAE permits operations in this ISO 3166-1 jurisdiction code.
apiBasestringapi.moltrust.chOverride the MolTrust API base URL. Useful for staging or self-hosted deployments.

AgentVerification interface

typescript
interface AgentVerification { did: string; // e.g. "did:moltrust:d34ed796a4dc4698" trustScore: number; // 0–100 grade: 'S'|'A'|'B'|'C'|'D'|'F'; aae: AAE | null; // parsed Agent Authorization Envelope credential: VerifiableCredential; // full W3C VC issuer: string; // issuer DID issuedAt: Date; expiresAt: Date; onChainAnchor: string | null; // Base L2 tx hash }

Sequential Action Safety — Layer 2.5

Pre-execution safety check for order-sensitive action sequences. Opt-in, deterministic, no LLM calls. Phase 1: WARN-only.

POST /guard/api/action/check

Check a proposed action against the session history. Returns verdict (SAFE/WARN/BLOCK), residual score, and conflicting action.

GET /guard/api/action/stats

Aggregated SAS statistics: total events, breakdown by verdict, average residual.

GET /guard/api/action/events/{did}

SAS events for a specific DID. Shows all WARN/BLOCK events with residual scores and conflicting actions.

Interaction Proof Records — Layer 4

Every agent action can produce a cryptographic proof record. IPRs are Merkle-batched and anchored on Base L2.

POST /vc/ipr/submit

Submit an IPR. Provide output_hash (SHA-256), agent_did, and confidence score. Returns ipr_id.

GET /vc/ipr/{ipr_id}

Retrieve an IPR by ID. Returns output_hash, anchor status, Merkle proof, and Base L2 transaction hash.

POST /vc/ipr/verify

Verify an IPR: checks signature, on-chain anchor, and Merkle proof. Returns validity + anchor TX link.

GET /vc/ipr/agent/{did}

List all IPRs for an agent. Paginated. Returns proof records with anchor status and Merkle proofs.

GET /vc/ipr/stats

Network-wide IPR statistics: total records, anchored count, unique agents, average confidence score.

GET /vc/ipr/{ipr_id}/status

Anchor status of a specific IPR: pending, anchored, or failed. Includes retry count and block number.

x402 Trust Middleware

Add trust verification to any x402 endpoint in one line. Block untrusted agents before they transact.

npm install @moltrust/x402
// Block agents below score 60
const { requireScore } = require('@moltrust/x402');
app.use(requireScore({ minScore: 60 }));

// req.moltrust available downstream
app.post('/api/data', requireScore({ minScore: 50 }), (req, res) => {
  const { wallet, score } = req.moltrust;
  res.json({ message: 'Welcome, score ' + score });
});
1. Extract

Wallet from x402 X-Payment header

2. Score

MolTrust trust score (5-min cache, <10ms warm)

3. Gate

403 + registration link if below threshold

MPP Trust Middleware

Add trust verification to any MPP (Machine Payments Protocol) endpoint. Works with Stripe, Tempo, Visa. Same API as @moltrust/x402.

npm install @moltrust/mpp
// Block agents below score 60
const { requireScore } = require('@moltrust/mpp');
app.use(requireScore({ minScore: 60 }));
app.use(mppx.charge({ amount: '0.01' }));

// req.moltrust available downstream
app.post('/api/pay', requireScore({ minScore: 50 }), (req, res) => {
  const { wallet, score } = req.moltrust;
  res.json({ trusted: true, score });
});
1. Extract

Wallet from MPP Payment credential header

2. Score

MolTrust trust score (5-min cache, <10ms warm)

3. Gate

403 + registration link if below threshold

Works alongside @moltrust/x402 for x402 endpoints. Same API, different protocol.

Wallet Trust Profile

Every x402 wallet gets an automatic trust profile. Shadow score, transaction history, and projected score after registration.

# Query any wallet
curl https://api.moltrust.ch/wallet/0x3802...38F5

# Public profile
https://moltrust.ch/wallet/{address}

Kernel-Level AAE Enforcement (Falco)

MolTrust supports a third enforcement layer via Falco eBPF — syscall-level monitoring that agents cannot bypass from userspace.

Layer 1 — Cryptographic

Ed25519 signatures, JCS canonicalization. Tamper-proof by construction.

Layer 2 — API

Trust score degradation, IPR submission, credential revocation.

Layer 3 — Kernel

Falco eBPF/syscall detection. Not bypassable by the agent process.

Falco Bridge (K8s)

When a policy violation is detected at the kernel level, Falco fires a webhook to the MolTrust bridge, which submits an IPR violation record. Trust score degrades automatically.

Reference implementation →

Agent Firewall — react when trust changes

Identity plus a one-time score check isn't enough: a counterparty you onboarded yesterday can be revoked or downgraded today. @moltrust/agent-firewall lets your gateway react in real time — it polls the registry's CAEP Profile v1 and fires typed events on trust-score changes and revocations, with the new score verified end-to-end (JCS + Ed25519) before your handler runs.

Four CAEP endpoints (polling — no push)
  • GET /caep/pending/{did} — cursor-based pending events. Rate limit 120 polls/h per DID (30 s interval, server-enforced).
  • POST /caep/acknowledge/{event_id} — idempotent soft-ack, 90-day retention.
  • GET /.well-known/registry-key.json — Ed25519 JWK for signature verification.
  • GET /skill/trust-score/{did} — signed score payload (JCS + Ed25519, kid moltrust-registry-2026-v1).

Page size: server default limit=50 (max 500). PROFILE.md still documents 100 — the server value is authoritative.

# 1 — install
npm install @moltrust/agent-firewall

// 2 — instantiate, watching the counterparties you depend on
import { MoltrustCaepClient } from '@moltrust/agent-firewall';
const fw = new MoltrustCaepClient({ watch: ['did:moltrust:<counterparty>'] });

// 3 — react: re-gate on score drop, block on revocation
fw.on('trust_score_change', (s) => regate(s.did, s.score));
fw.on('did_revoked', (did) => block(did));
await fw.start();

Polling-only (CAEP Profile v1, proprietary — not OpenID SET). Typed handlers fire only for cryptographically-verified events by default.

Package map

Pick by what you're building. Each is an independent install; the one build-time dependency noted below is taken from the package manifest.

Gate agents at your API / server

@moltrust/sdk — Express / Hono / Fastify middleware: verify(), register(). Batteries-included entry point.

Gate paid endpoints

@moltrust/x402 for x402 payments · @moltrust/mpp for MPP (Stripe / Tempo / Visa). Same requireScore() shape.

Verify credentials offline

@moltrust/verify — W3C VC + IPR against Base L2. No MolTrust API key required.

Author / validate AAE

@moltrust/aae — Agent Authorization Envelope schema + runtime validator. Already pulled in by @moltrust/sdk.

React when trust changes post-onboarding

@moltrust/agent-firewall — CAEP Profile v1 event-reactive layer (see above).

Agent runtime / OpenClaw

@moltrust/openclaw — plugin: agent tools, slash commands, gateway RPC, CLI.

MCP client (Claude, etc.)

moltrust-mcp-server — MCP server for trust verification, scoring & credentials (PyPI).

@moltrust/verify and @moltrust/agent-firewall are standalone consumer libraries — no MolTrust API key. @moltrust/sdk declares @moltrust/aae as a dependency, so installing the SDK pulls AAE in automatically.

@moltrust/sdk

Express + Hono middleware. AgentTrust.verify(), .middleware(), .register().

@moltrust/x402

x402 v2 payment middleware for Hono & Express. PAYMENT-SIGNATURE header.

@moltrust/mpp

MPP trust middleware for Express. Payment credential header. Stripe/Tempo/Visa.

@moltrust/verify

Offline credential verifier. Ed25519 + Base L2 — no API dependency.

@moltrust/aae

AAE schema definition & runtime validator.

moltrust-mcp-server

MCP server — 48 tools for trust verification, scoring, credentials.

@moltrust/openclaw v1.0.0

OpenClaw plugin — 2 agent tools, 2 slash commands, CLI, gateway RPC. Free tier included.

openclaw plugins install @moltrust/openclaw

@moltrust/agent-firewall v1.0.0

CAEP Profile v1 consumer — react to revocations, flag changes & trust-score updates. Signed trust-score verification (JCS + Ed25519).

Protocol WP v0.8

Full spec — trust scoring, AAE, swarm, three-layer enforcement.

API Reference

All endpoints — identity, scoring, credentials, swarm, IPR, Falco.

Start verifying agents in minutes.

Regulated Markets · China · India

Building for China or India?

MolTrust runs in fully API-only mode — no blockchain, no VPN required. All @moltrust/* packages are available on cnpm. W3C DID/VC trust for your OpenClaw agents, compliant with CAC requirements.

Regulated Markets Guide → Quick Start ↓

Chinese Developer Guide

MolTrust 提供 W3C DID/VC 信任基础设施,支持 OpenClaw 代理的身份验证、信任评分和可验证凭证。纯 API 模式,无需区块链,无需 VPN。

MolTrust provides W3C DID/VC trust infrastructure for AI agents. Pure API mode — no blockchain required, no VPN needed. All @moltrust/* packages available on cnpm.

// 安装 OpenClaw 插件
$ openclaw plugins install @moltrust/openclaw
API 文档 → GitHub → 合规市场指南 → OpenClaw 集成指南 →
W3C DID 可验证凭证 Base L2 x402 cnpm 可用