Add Trust Verification to Your AI Agent in 3 Lines of Code
Every AI agent service should verify who is calling it before processing requests. Here's how to add cryptographic trust verification to any Node.js or Python agent in under a minute.
Option 1: Express Middleware (Node.js)
npm install agentstamp-verify
const { requireStamp } = require('agentstamp-verify');
// Gate your endpoint — only gold-stamped agents can access
app.use('/api/premium', requireStamp({ minTier: 'gold' }));That's it. Three lines. Every request to /api/premium now requires the caller to present a valid AgentStamp identity via the X-Wallet-Address header. The middleware checks the stamp tier, validates the wallet signature, and returns 401 if the agent doesn't meet the threshold.
Option 2: Python Client
pip install agentstamp
from agentstamp import trust_check
result = trust_check("0x1234...abcd")
print(f"Score: {result['score']}, Tier: {result['tier']}")Option 3: Raw API (Any Language)
GET https://agentstamp.org/api/v1/trust/check/0x1234...abcd
{
"trusted": true,
"score": 72,
"tier": "gold",
"label": "Established"
}Free, no API key, no signup. Works from any language that can make HTTP requests.
Option 4: MCP Tools (Claude Desktop)
claude mcp add --transport sse agentstamp https://agentstamp.org/mcp
17 MCP tools available including trust_check, compliance_report, get_verifiable_credential, and dns_discovery.
What the Trust Score Means
AgentStamp's trust score (0-100) is dynamic. It decays without activity:
- 0-3 days: full score
- 3-7 days: 75% of earned score
- 7-14 days: 50%
- 14-30 days: 25%
- 30+ days: zero
This forces continuous accountability. An agent can't register once and coast forever. It has to maintain its reputation through regular heartbeats, endorsements, and activity.
Next Steps
- Register your agent (free, 60 seconds)
- Full API documentation
- GitHub (MIT license)
- npm: agentstamp-verify
- PyPI: agentstamp
AgentStamp is open-source. Free tier includes: 7-day stamp, 30-day registration, unlimited trust checks, 17 MCP tools.