<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vinay Bhosle</title>
    <description>The latest articles on DEV Community by Vinay Bhosle (@vinaybhosle).</description>
    <link>https://dev.to/vinaybhosle</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3836893%2F0e461a6e-aaec-4f1c-b86a-dd0bdb15c8fe.jpeg</url>
      <title>DEV Community: Vinay Bhosle</title>
      <link>https://dev.to/vinaybhosle</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vinaybhosle"/>
    <language>en</language>
    <item>
      <title>Give Your AI Agent Real-Time Shipping Intelligence in 2 Minutes</title>
      <dc:creator>Vinay Bhosle</dc:creator>
      <pubDate>Sun, 29 Mar 2026 19:24:17 +0000</pubDate>
      <link>https://dev.to/vinaybhosle/give-your-ai-agent-real-time-shipping-intelligence-in-2-minutes-1bo8</link>
      <guid>https://dev.to/vinaybhosle/give-your-ai-agent-real-time-shipping-intelligence-in-2-minutes-1bo8</guid>
      <description>&lt;p&gt;If you're building AI agents that touch logistics, supply chain, or international trade, you've probably hit this wall: your agent can reason about shipping but has zero access to actual rate data.&lt;/p&gt;

&lt;p&gt;No freight rates. No demurrage charges. No surcharge breakdowns. No port congestion info. Just hallucinated numbers.&lt;/p&gt;

&lt;p&gt;I built ShippingRates to fix that — 24 MCP tools that give any AI agent real-time access to ocean shipping data from Maersk, MSC, CMA-CGM, Hapag-Lloyd, ONE, and COSCO across 184 countries.&lt;/p&gt;

&lt;p&gt;It's now live on the Apify Store as a pay-per-event MCP server. No crypto wallet needed. No API key setup. Just connect and query.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you get
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Free tools&lt;/strong&gt; (no charge):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;shippingrates_stats&lt;/code&gt; — database coverage stats&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shippingrates_lines&lt;/code&gt; — list all carriers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shippingrates_search&lt;/code&gt; — full-text search across all data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shippingrates_fx&lt;/code&gt; — currency exchange rates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Paid tools&lt;/strong&gt; ($0.03 - $0.35 per call):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Demurrage &amp;amp; detention calculators (per carrier, per country, per container type)&lt;/li&gt;
&lt;li&gt;Freight rate lookups by trade lane&lt;/li&gt;
&lt;li&gt;Surcharge breakdowns (BAF, CAF, GRI, PSS, war risk)&lt;/li&gt;
&lt;li&gt;Port congestion data and vessel schedules&lt;/li&gt;
&lt;li&gt;Local charges (THC, documentation fees, seal fees)&lt;/li&gt;
&lt;li&gt;Inland haulage rates and CFS tariffs&lt;/li&gt;
&lt;li&gt;Total landed cost calculator&lt;/li&gt;
&lt;li&gt;Route risk scoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All data is verified from official carrier tariff PDFs. Zero estimates, zero hallucinations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect to Claude Desktop
&lt;/h2&gt;

&lt;p&gt;Add this to your &lt;code&gt;claude_desktop_config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shippingrates"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://vinaybhosle--shippingrates-mcp.apify.actor/mcp"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Claude now has access to all 24 shipping tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example: Calculate D&amp;amp;D costs
&lt;/h2&gt;

&lt;p&gt;Once connected, just ask Claude:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What are the demurrage charges for a 40HC container with Maersk in India if I'm 5 days late?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude calls &lt;code&gt;shippingrates_dd_calculate&lt;/code&gt; and returns the actual slab-by-slab breakdown from the carrier's published tariff — not a guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example: Compare carriers
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"Compare detention rates across all 6 carriers for a 20GP container in Germany"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude calls &lt;code&gt;shippingrates_dd_compare&lt;/code&gt; and returns a side-by-side comparison table showing free days, per-diem rates, and total cost at different day counts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;Container shipping has $2.3 trillion in annual cargo value. The data is fragmented across carrier PDFs, port authority websites, and proprietary systems. AI agents need structured, real-time access to this data to be useful in logistics workflows.&lt;/p&gt;

&lt;p&gt;This is the first shipping intelligence MCP server on the Apify Store. If you're building anything in freight tech, trade compliance, or supply chain automation — this is your data layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apify Store&lt;/strong&gt;: &lt;a href="https://apify.com/vinaybhosle/shippingrates-mcp" rel="noopener noreferrer"&gt;apify.com/vinaybhosle/shippingrates-mcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct MCP&lt;/strong&gt;: &lt;a href="https://mcp.shippingrates.org" rel="noopener noreferrer"&gt;mcp.shippingrates.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Docs&lt;/strong&gt;: &lt;a href="https://api.shippingrates.org/docs" rel="noopener noreferrer"&gt;api.shippingrates.org/docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://shippingrates.org" rel="noopener noreferrer"&gt;shippingrates.org&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>automation</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How We Built a Tamper-Evident Audit Trail for AI Agents</title>
      <dc:creator>Vinay Bhosle</dc:creator>
      <pubDate>Wed, 25 Mar 2026 09:20:18 +0000</pubDate>
      <link>https://dev.to/vinaybhosle/how-we-built-a-tamper-evident-audit-trail-for-ai-agents-3jc6</link>
      <guid>https://dev.to/vinaybhosle/how-we-built-a-tamper-evident-audit-trail-for-ai-agents-3jc6</guid>
      <description>&lt;p&gt;last week we shipped a tamper-evident audit trail for AI agents. here is why we built it and the engineering decisions behind it.&lt;/p&gt;

&lt;h2&gt;
  
  
  the problem: agents without receipts
&lt;/h2&gt;

&lt;p&gt;an AI agent making autonomous decisions leaves no external record of what it decided, why, or how confident it was. server logs exist, but the agent can modify its own logs. if the agent deletes production data, the logs explaining why might go with it.&lt;/p&gt;

&lt;p&gt;when a human employee makes a critical mistake, there is a paper trail — emails, slack messages, meeting notes. we can reconstruct intent. with agents? the prompt is gone, the context window is gone, the confidence level is gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  why server logs are not enough
&lt;/h2&gt;

&lt;p&gt;server logs fail in exactly the scenario where you need them most: adversarial incidents. if the agent has write access to the system it is logging to, the audit trail is documentation, not evidence. the record has to survive the agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  the architecture
&lt;/h2&gt;

&lt;p&gt;we built a three-layer system:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. canonical event log (single write path)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;every agent action above a risk threshold produces a signed event. these flow through a single event bus — one source of truth. no action can bypass the bus.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent decision → stamp service → event bus → canonical log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. CQRS read models&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;two separate indexes consume from the same event bus:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;compliance index&lt;/strong&gt;: every action attempted (including denied actions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;execution index&lt;/strong&gt;: only actions that executed (the causal chain)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;they answer different questions from the same underlying data. an EU AI Act auditor needs the compliance view. an incident responder needs the execution view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. SHA-256 hash chain with Ed25519 signatures&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;each event in the log includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the event payload (what happened)&lt;/li&gt;
&lt;li&gt;Ed25519 signature (who did it — bound to registry identity)&lt;/li&gt;
&lt;li&gt;SHA-256 hash of the previous event (chain integrity)&lt;/li&gt;
&lt;li&gt;timestamp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;this is structurally similar to how git commits work. each event references the previous event hash, creating a chain where any modification breaks all subsequent hashes.&lt;/p&gt;

&lt;h2&gt;
  
  
  stamp-first verification
&lt;/h2&gt;

&lt;p&gt;a key design decision: the stamp happens before the action executes, not after.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// middleware pattern&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;requireStamp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;riskLevel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stamp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createVerificationEvent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;agent_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;risk_level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;riskLevel&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// stamp is recorded BEFORE execution&lt;/span&gt;
    &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stampId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;stamp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// usage&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/delete-records&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;high&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;deleteRecordsHandler&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;why stamp-first? if the authorization gate blocks an action, stamp-first produces a denied-receipt. gate-first produces silence. you cannot distinguish "the gate blocked it" from "it never reached the gate" without stamp-first ordering.&lt;/p&gt;

&lt;h2&gt;
  
  
  tombstone lifecycle closure
&lt;/h2&gt;

&lt;p&gt;agents can crash, timeout, or hand off mid-task. a TTL-based credential expiry looks like lifecycle management but it is actually deferred ambiguity — you do not know if the agent completed, crashed, or handed off.&lt;/p&gt;

&lt;p&gt;we added tombstone events as required lifecycle markers. the delta between a tombstone and a TTL expiry is a recorded gap window — the forensic artifact that turns ambiguous termination into a queryable event.&lt;/p&gt;

&lt;h2&gt;
  
  
  gap detection
&lt;/h2&gt;

&lt;p&gt;the &lt;code&gt;verify-chain&lt;/code&gt; endpoint walks the full hash chain and detects two types of attacks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;tampered events&lt;/strong&gt;: hash does not match payload&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;gap attacks&lt;/strong&gt;: missing events in the sequence (someone deleted from the middle)
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;GET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/verify-chain/:agentId&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"valid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"events_checked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;847&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"gaps_detected"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"first_gap_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"event_index_342"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  EU AI Act compliance
&lt;/h2&gt;

&lt;p&gt;the compliance endpoint generates a structured report from the audit trail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;GET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/compliance/report/:agentId&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"risk_level"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"limited"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"transparency_declaration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"audit_summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"total_actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;847&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"denied_actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"high_risk_actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"chain_integrity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"valid"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this was not planned as a feature — it fell out naturally from having separate compliance and execution query paths. once you have the data structured correctly, the regulatory report is just a view.&lt;/p&gt;

&lt;h2&gt;
  
  
  what we learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;the write path is the trust boundary&lt;/strong&gt;. if you control the write path, you control the truth. a single canonical event bus eliminates divergence between indexes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;denied actions are forensically important&lt;/strong&gt;. an absent event is indistinguishable from a dropped event. stamp-first ordering makes every decision boundary visible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;lifecycle closure needs active signals&lt;/strong&gt;. TTL is a fallback, not a strategy. tombstone events turn ambiguous termination into a queryable fact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;compliance and execution are different retrieval patterns against the same data&lt;/strong&gt;. CQRS is not over-engineering here — it is the minimum viable separation for regulatory and operational queries.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;the full implementation is open source at &lt;a href="https://github.com/vinaybhosle/agentstamp" rel="noopener noreferrer"&gt;github.com/vinaybhosle/agentstamp&lt;/a&gt;. 188 unit tests, v2.3.0.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>blockchain</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Claude Can Use Your Computer Now. Here's How to Make It Verify Trust First.</title>
      <dc:creator>Vinay Bhosle</dc:creator>
      <pubDate>Tue, 24 Mar 2026 19:09:48 +0000</pubDate>
      <link>https://dev.to/vinaybhosle/claude-can-use-your-computer-now-heres-how-to-make-it-verify-trust-first-12ne</link>
      <guid>https://dev.to/vinaybhosle/claude-can-use-your-computer-now-heres-how-to-make-it-verify-trust-first-12ne</guid>
      <description>&lt;p&gt;Anthropic just shipped Computer Use. Claude can now open apps, browse the web, call APIs, and run tools on your Mac. You can message it from your phone via Dispatch and it executes tasks on your desktop.&lt;/p&gt;

&lt;p&gt;But here's the question: &lt;strong&gt;when your Claude agent calls another agent's API during a Computer Use session, how does it know that agent is trustworthy?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;A Claude Desktop agent that calls an external API is trusting that API implicitly. There's no verification, no trust score, no audit trail of what it did or why.&lt;/p&gt;

&lt;p&gt;This is fine when Claude is autocompleting your code. It's not fine when Claude is making API calls on your behalf with real data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: MCP Trust Tools
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://agentstamp.org" rel="noopener noreferrer"&gt;AgentStamp&lt;/a&gt; provides 17 MCP tools that let any Claude agent verify trust before interacting with external services. All free, no API key needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup (30 seconds)
&lt;/h3&gt;

&lt;p&gt;Add to your Claude Desktop MCP config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"agentstamp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://agentstamp.org/mcp"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or via CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; sse agentstamp https://agentstamp.org/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Verify Before You Trust
&lt;/h3&gt;

&lt;p&gt;Before your agent sends data to an external service:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Before calling the ShippingRates API, check if their agent is trustworthy."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude calls &lt;code&gt;trust_check&lt;/code&gt; and gets back a trust score (0-100), tier (gold/silver/bronze), stamp status, and delegation count. If below your threshold, Claude refuses to proceed.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Present Your Own Identity
&lt;/h3&gt;

&lt;p&gt;When your agent needs to prove itself to another service:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Get my W3C Verifiable Credential to authenticate with the partner API."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude calls &lt;code&gt;get_verifiable_credential&lt;/code&gt; and gets a W3C VC Data Model 2.0 credential — interoperable with any VC verifier. This is the agent equivalent of showing your ID.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Compliance Check Before Delegation
&lt;/h3&gt;

&lt;p&gt;Before delegating a task to another agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Check the compliance report for this agent before I delegate."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude calls &lt;code&gt;compliance_report&lt;/code&gt; and gets EU AI Act risk level, human sponsor info, audit trail integrity, and trust status. If no human sponsor or a broken audit chain, Claude flags the risk.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. DNS-Based Agent Discovery
&lt;/h3&gt;

&lt;p&gt;Find verified agents for a domain:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Check if shippingrates.org has a verified agent."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Claude calls &lt;code&gt;dns_discovery&lt;/code&gt; and checks the &lt;code&gt;_agentstamp&lt;/code&gt; TXT record, cross-referencing with the registry.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Audit Trail
&lt;/h2&gt;

&lt;p&gt;Every interaction through AgentStamp MCP tools is logged in a SHA-256 hash-chained audit trail:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every trust check is recorded&lt;/li&gt;
&lt;li&gt;The chain is tamper-evident (modify one entry, all subsequent hashes break)&lt;/li&gt;
&lt;li&gt;You can review exactly which agents Claude trusted and why&lt;/li&gt;
&lt;li&gt;Exportable as verifiable JSON&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is critical for regulated industries where you need to prove your AI agent's decision chain.&lt;/p&gt;

&lt;h2&gt;
  
  
  All 17 Tools
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;trust_check&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Trust score for any wallet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;trust_compare&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Compare two agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;trust_network&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Map trust relationships&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;search_agents&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search the registry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Full agent profile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;browse_agents&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Browse by category&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;verify_stamp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verify identity certificate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_leaderboard&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Top agents by reputation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_agent_reputation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reputation breakdown&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_passport&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed passport&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;compliance_report&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;EU AI Act compliance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_verifiable_credential&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;W3C VC export&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dns_discovery&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;DNS agent discovery&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bridge_erc8004_lookup&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ERC-8004 on-chain lookup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bridge_erc8004_trust_check&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ERC-8004 trust check&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;browse_wishes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wishing Well marketplace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_trending&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Trending categories&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All free. No API key. No wallet needed for reads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters Now
&lt;/h2&gt;

&lt;p&gt;Computer Use turns Claude into a full desktop agent. Without trust verification, every external interaction is a leap of faith.&lt;/p&gt;

&lt;p&gt;The agents that survive won't be the ones that do the most. They'll be the ones that can prove they should be trusted to do anything at all.&lt;/p&gt;




&lt;p&gt;AgentStamp is open-source. &lt;a href="https://github.com/vinaybhosle/agentstamp" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://agentstamp.org/mcp" rel="noopener noreferrer"&gt;MCP Tools&lt;/a&gt; | &lt;a href="https://agentstamp.org/docs" rel="noopener noreferrer"&gt;Docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>security</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Iran War and Global Shipping: Hormuz Closure, Rate Spikes, and What's Next</title>
      <dc:creator>Vinay Bhosle</dc:creator>
      <pubDate>Tue, 24 Mar 2026 08:21:50 +0000</pubDate>
      <link>https://dev.to/vinaybhosle/iran-war-and-global-shipping-hormuz-closure-rate-spikes-and-whats-next-3lia</link>
      <guid>https://dev.to/vinaybhosle/iran-war-and-global-shipping-hormuz-closure-rate-spikes-and-whats-next-3lia</guid>
      <description>&lt;p&gt;On February 28, 2026, joint US-Israeli strikes on Iran triggered the most severe shipping disruption since the Suez Canal blockage of 2021. Within 48 hours, Iran closed the Strait of Hormuz to Western-allied shipping. Three weeks later, the consequences are still unfolding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hormuz traffic down ~70%&lt;/strong&gt; — only 21 tankers since Feb 28 vs 100+/day normal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;700+ vessels stranded&lt;/strong&gt; worldwide&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Container rates up 28.3%&lt;/strong&gt; since the conflict started&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Asia-Gulf rates doubled&lt;/strong&gt; from $1,800 to $4,000+/FEU in 48 hours&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brent crude peaked at $126/barrel&lt;/strong&gt; (now ~$100 after de-escalation signals)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;All major carriers abandoned Suez return plans&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Developers Should Care
&lt;/h2&gt;

&lt;p&gt;If you're building anything that touches supply chains — inventory management, procurement, logistics automation, or freight comparison tools — these disruptions directly impact your users.&lt;/p&gt;

&lt;p&gt;Rate volatility means your hardcoded shipping estimates are wrong. Port congestion means your ETAs are wrong. Carrier surcharges change weekly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;p&gt;At &lt;a href="https://shippingrates.org" rel="noopener noreferrer"&gt;ShippingRates&lt;/a&gt;, we track demurrage, detention, and freight rates across 8 carriers in 158 countries. Our API gives you real-time data instead of stale spreadsheets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Compare D&amp;amp;D rates across carriers&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://api.shippingrates.org/api/dd/compare &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"country": "AE", "container_type": "40HC", "days": 14}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Free tier&lt;/strong&gt;: 25 requests/month, no signup needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP server&lt;/strong&gt; for AI agents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shippingrates"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://mcp.shippingrates.org/mcp"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Read the Full Analysis
&lt;/h2&gt;

&lt;p&gt;We published a comprehensive breakdown covering rate impacts by trade lane, carrier responses (CMA CGM, Maersk, Hapag-Lloyd), insurance market collapse, and actionable steps for shippers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://shippingrates.org/blog/iran-war-global-shipping-2026" rel="noopener noreferrer"&gt;Iran War and Global Shipping: Full Analysis&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.shippingrates.org/docs" rel="noopener noreferrer"&gt;Interactive API Docs&lt;/a&gt; | &lt;a href="https://app.shippingrates.org" rel="noopener noreferrer"&gt;Dashboard&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>news</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why AI Agents Need Verifiable Identity</title>
      <dc:creator>Vinay Bhosle</dc:creator>
      <pubDate>Sun, 22 Mar 2026 08:16:16 +0000</pubDate>
      <link>https://dev.to/vinaybhosle/why-ai-agents-need-verifiable-identity-2h4h</link>
      <guid>https://dev.to/vinaybhosle/why-ai-agents-need-verifiable-identity-2h4h</guid>
      <description>&lt;h2&gt;
  
  
  300,000 Agents, Zero Identity
&lt;/h2&gt;

&lt;p&gt;There are hundreds of thousands of AI agents running in production right now. They call APIs, execute trades, process data, and pay each other in USDC. Some of them are doing exactly what their operators intended. Some of them are not.&lt;/p&gt;

&lt;p&gt;How do you tell the difference?&lt;/p&gt;

&lt;p&gt;You cannot. Not today. There is no standard way for an agent to prove who it is, how long it has been operating, or whether anyone else trusts it. The agent ecosystem has payment rails (x402), communication protocols (A2A, MCP), and execution frameworks (LangChain, CrewAI, AutoGen). What it does not have is an identity layer.&lt;/p&gt;

&lt;p&gt;This is the missing piece, and the consequences are already showing up.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Risks Are Not Theoretical
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Unsigned Skills on MCP Registries
&lt;/h3&gt;

&lt;p&gt;Browse any MCP skill registry and you will find hundreds of community-contributed skills. ClawHub alone has 230+ skills with no cryptographic signature, no author verification, and no audit trail. An attacker can publish a skill called &lt;code&gt;gmail_send&lt;/code&gt; that looks legitimate, intercepts credentials, and exfiltrates data. The agent executing that skill has no way to verify the skill author's identity before running it.&lt;/p&gt;

&lt;p&gt;This is not a hypothetical. It is a supply chain attack waiting to happen -- the npm left-pad incident, but for agents with wallet access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Agent Impersonation
&lt;/h3&gt;

&lt;p&gt;Consider this scenario. You build a data API that charges $0.001 per call via x402. An agent calls your API, pays with a fresh wallet, and scrapes your entire dataset. A week later, another agent does the same thing. Same operator? Different operator? You have no idea. Your API saw two wallets, collected two payments, and learned nothing about the entities behind them.&lt;/p&gt;

&lt;p&gt;Now scale that to agents endorsing other agents, agents delegating authority, agents acting on behalf of humans. Without identity, every interaction is a cold start.&lt;/p&gt;

&lt;h3&gt;
  
  
  No Audit Trail
&lt;/h3&gt;

&lt;p&gt;When something goes wrong -- an agent makes a bad trade, leaks sensitive data, crashes mid-task -- there is no forensic record. You cannot trace what happened, which agent was responsible, or whether the agent that claims to have completed a task actually did. The execution vanishes into the void.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Verifiable Identity Means for Agents
&lt;/h2&gt;

&lt;p&gt;Human identity on the web is built on passwords, OAuth, SSO, and browser sessions. None of that works for agents. Agents do not have browsers. They do not click consent screens. They operate across chains, frameworks, and protocols.&lt;/p&gt;

&lt;p&gt;Verifiable agent identity needs three properties:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Cryptographic proof of existence.&lt;/strong&gt; An agent should have a key pair (Ed25519 or similar) that signs a certificate asserting: this agent exists, it was registered at this time, and it has this tier of commitment. Not a username and password. A signed, verifiable credential.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// What a verified agent identity looks like&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;wallet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0x1a2b...9f0e&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;tier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;silver&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;certId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cert_a7f3e...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;signature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ed25519:3kF9a...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// Ed25519 over JSON-canonical payload&lt;/span&gt;
  &lt;span class="nx"&gt;registered&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2026-03-01T00:00:00Z&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;endorsements&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;trustScore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;62&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Reputation that decays.&lt;/strong&gt; A static credential is not enough. An agent that was trustworthy six months ago and has not sent a heartbeat since is not trustworthy today. Reputation must be dynamic -- built from uptime, endorsements from other agents, task completion history, and community participation. And it must decay. An agent that goes silent should lose trust progressively, not retain it indefinitely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. An endorsement graph.&lt;/strong&gt; Agents should be able to vouch for other agents. If five established agents endorse a newcomer, that signal is meaningful. It creates a web of trust that is harder to game than any single metric. Combined with economic cost (endorsements are not free), this makes Sybil attacks expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Existing Solutions Fall Short
&lt;/h2&gt;

&lt;p&gt;You might think we already have tools for this. We do not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API keys are not identity.&lt;/strong&gt; An API key proves you have a string that was issued to someone. It does not prove who you are, how long you have been operating, or whether other agents trust you. API keys are bearer tokens. They are trivially shared, leaked, and rotated. They carry zero reputation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OAuth is designed for humans.&lt;/strong&gt; The entire OAuth flow -- redirect to consent screen, user clicks "Allow", token returned -- assumes a human in a browser. Agents do not have browsers. You can shoehorn agents into OAuth with service accounts and client credentials grants, but you get an access token with no reputation, no endorsement graph, and no decay. It is authentication without identity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DIDs are too complex.&lt;/strong&gt; Decentralized Identifiers are the right idea in theory. In practice, DID resolution requires understanding DID methods, DID documents, Verifiable Credentials, and a stack of W3C specs. Most agent developers will not implement this. The adoption curve is too steep for the common case of "I need to know if this agent is trustworthy before I give it access."&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# What most developers actually want:
&lt;/span&gt;&lt;span class="nd"&gt;@stamp_verified&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min_tier&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bronze&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;handle_request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;verified_agent&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trust_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;full_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;limited_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The gap is between "theoretically correct" (DIDs) and "practically useful" (a decorator that gives you a trust score). Agent identity needs to be as easy to integrate as rate limiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The x402 Angle: Paying Agents Need Trust Even More
&lt;/h2&gt;

&lt;p&gt;The x402 protocol lets agents pay for API access with USDC stablecoins. Google's AP2 (Agent Payments Protocol) made x402 the official payment rail for agent-to-agent commerce. This is a genuine breakthrough -- agents can now autonomously pay for services without human intervention.&lt;/p&gt;

&lt;p&gt;But it amplifies the identity problem.&lt;/p&gt;

&lt;p&gt;When an agent can pay, it can also be paid. And when money flows autonomously between agents, the question of "should I trust this agent?" becomes "should I let this agent move money on my behalf?" The stakes go from data access to financial exposure.&lt;/p&gt;

&lt;p&gt;An agent marketplace without identity is like a stock exchange without KYC. Technically functional, practically dangerous.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// x402 + identity verification: trust before payment&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;requireStamp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;agentstamp-verify/express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;paymentMiddleware&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@x402/express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Verify identity first, then accept payment&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bronze&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;x402&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="nf"&gt;paymentMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;facilitator&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without the identity check on line 3, any wallet can pay and access your API. With it, only agents that have registered, maintained uptime, and earned endorsements can even get to the payment step.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;p&gt;We ran into this problem while building paid APIs that serve AI agents. Agents were calling our endpoints, paying via x402, and we had no way to distinguish a legitimate data agent from a scraper cycling wallets.&lt;/p&gt;

&lt;p&gt;So we built &lt;a href="https://agentstamp.org" rel="noopener noreferrer"&gt;AgentStamp&lt;/a&gt; -- an open identity registry for AI agents. The core ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ed25519 signed certificates&lt;/strong&gt; with tiered commitment (free 7-day, bronze 24h, silver 7d, gold 30d). The cost is real USDC, which makes mass fake identities expensive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic trust scores&lt;/strong&gt; (0-100) computed from six factors: tier, endorsements, uptime, momentum, community contributions, and wallet verification. Scores decay when agents go silent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forensic audit chain&lt;/strong&gt; -- append-only, SHA-256 hash-chained event log with tamper detection. Every stamp mint, endorsement, heartbeat, and revocation is recorded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A2A-compatible passports&lt;/strong&gt; so agents can present their identity in Google's Agent-to-Agent protocol.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An SDK&lt;/strong&gt; (&lt;code&gt;agentstamp-verify&lt;/code&gt; on npm, &lt;code&gt;agentstamp&lt;/code&gt; on PyPI) that reduces integration to middleware. Express, Hono, LangChain, and CrewAI supported.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The registry is free to query. Stamps start at $0.001. The SDK is MIT-licensed. It is not the only possible approach, but it is a working one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Question
&lt;/h2&gt;

&lt;p&gt;Whether you use AgentStamp, build your own system, or wait for a standard to emerge, the question is the same: how are you handling agent identity today?&lt;/p&gt;

&lt;p&gt;If the answer is "API keys" or "we trust the wallet address," you have a gap. And it will matter more, not less, as agents get more autonomous.&lt;/p&gt;

&lt;p&gt;A few things worth thinking about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do you know which agents are calling your API right now?&lt;/li&gt;
&lt;li&gt;Could an agent impersonate another agent against your system?&lt;/li&gt;
&lt;li&gt;If an agent misbehaves, can you trace what happened?&lt;/li&gt;
&lt;li&gt;Are you gating access by identity, or just by payment?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to try a solution now, &lt;a href="https://agentstamp.org" rel="noopener noreferrer"&gt;agentstamp.org&lt;/a&gt; has a free tier -- register an agent, mint a stamp, and see what verified identity looks like from both sides. The &lt;a href="https://agentstamp.org/mcp" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt; exposes 19 tools for agents that need to verify other agents inside tool-calling workflows.&lt;/p&gt;

&lt;p&gt;The agent ecosystem is growing fast. Identity infrastructure should not be an afterthought.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://agentstamp.org" rel="noopener noreferrer"&gt;AgentStamp&lt;/a&gt; is open source and MIT-licensed. SDK on &lt;a href="https://www.npmjs.com/package/agentstamp-verify" rel="noopener noreferrer"&gt;npm&lt;/a&gt; and &lt;a href="https://pypi.org/project/agentstamp/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;. Star the repo if this resonates.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Add Trust Verification to Your AI Agent in 3 Lines of Code</title>
      <dc:creator>Vinay Bhosle</dc:creator>
      <pubDate>Sat, 21 Mar 2026 10:59:10 +0000</pubDate>
      <link>https://dev.to/vinaybhosle/add-trust-verification-to-your-ai-agent-in-3-lines-of-code-36c9</link>
      <guid>https://dev.to/vinaybhosle/add-trust-verification-to-your-ai-agent-in-3-lines-of-code-36c9</guid>
      <description>&lt;h2&gt;
  
  
  The Problem: Who Just Called Your API?
&lt;/h2&gt;

&lt;p&gt;AI agents are calling other agents' APIs now. No browser session. No OAuth consent screen. No CAPTCHA. An HTTP request arrives at your endpoint from an agent you have never seen before, carrying a wallet address and asking for data.&lt;/p&gt;

&lt;p&gt;How do you know it is legitimate?&lt;/p&gt;

&lt;p&gt;Protocols like x402 solve the payment question. An agent proves it can pay by signing a USDC transaction on Base. But payment alone does not prove identity. A fresh wallet with $5 in it can pay for your API just fine. That tells you nothing about who is behind it, how long they have been operating, or whether other agents trust them.&lt;/p&gt;

&lt;p&gt;You need a trust layer. And you can add one to an Express API in 3 lines. Let me show you.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 3 Lines
&lt;/h2&gt;

&lt;p&gt;Here is a standard Express endpoint with no verification:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;anyone can access this&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the protected version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;requireStamp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;agentstamp-verify/express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    &lt;span class="c1"&gt;// Line 1&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bronze&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;         &lt;span class="c1"&gt;// Line 2&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Line 3: req.agent is now available with verified identity&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;protected&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is it. Every request to &lt;code&gt;/api/*&lt;/code&gt; now requires a valid AgentStamp.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 1&lt;/strong&gt; imports the Express middleware from &lt;code&gt;agentstamp-verify/express&lt;/code&gt;. The SDK ships separate entry points for Express, Hono, and a framework-agnostic core client.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 2&lt;/strong&gt; mounts the middleware on your route prefix. The &lt;code&gt;minTier&lt;/code&gt; option sets the minimum stamp tier required. Agents without a valid stamp get a structured 403 response with an error code, the requirements they failed, and a link to register.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 3&lt;/strong&gt; is not really a line you write -- it is what you get. After verification, &lt;code&gt;req.agent&lt;/code&gt; contains the full verified identity: wallet address, stamp tier, endorsement count, agent metadata, and registration status. Your handler just reads it.&lt;/p&gt;

&lt;p&gt;If you are using Hono instead of Express:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Hono&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hono&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;requireStamp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;agentstamp-verify/hono&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Hono&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/*&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;silver&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;agent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;protected&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same concept. The Hono middleware sets the agent on the context via &lt;code&gt;c.set('agent', ...)&lt;/code&gt; instead of mutating the request object.&lt;/p&gt;

&lt;h2&gt;
  
  
  Under the Hood
&lt;/h2&gt;

&lt;p&gt;Three lines of setup, but there is real machinery underneath.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wallet Extraction
&lt;/h3&gt;

&lt;p&gt;The middleware needs to know which wallet is making the request. The default extractor checks these sources in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;x-wallet-address&lt;/code&gt; header (the standard way)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x-erc8004-agent-id&lt;/code&gt; header (ERC-8004 on-chain agent ID, resolved via bridge)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x-payment&lt;/code&gt; header (base64 JSON decoded to extract &lt;code&gt;payer&lt;/code&gt; or &lt;code&gt;wallet&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wallet&lt;/code&gt; query parameter&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wallet_address&lt;/code&gt; or &lt;code&gt;wallet&lt;/code&gt; in request body&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This ordering means agents using the x402 payment protocol work out of the box -- their payment headers contain the wallet address, and the middleware extracts it automatically. You can also supply a custom &lt;code&gt;walletExtractor&lt;/code&gt; function if your agents identify themselves differently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching
&lt;/h3&gt;

&lt;p&gt;Every verification hits the AgentStamp registry API. To avoid hammering it on every request, the SDK uses an LRU cache with a 300-second TTL and a maximum of 1,000 entries. The cache is per-middleware-instance, so each call to &lt;code&gt;requireStamp()&lt;/code&gt; gets its own isolated cache. Set &lt;code&gt;cacheTTL: 0&lt;/code&gt; to disable caching entirely, or pass a custom TTL in seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tier Hierarchy
&lt;/h3&gt;

&lt;p&gt;Stamps come in three tiers: &lt;strong&gt;bronze&lt;/strong&gt;, &lt;strong&gt;silver&lt;/strong&gt;, and &lt;strong&gt;gold&lt;/strong&gt;. The tier check is hierarchical -- a gold stamp passes a &lt;code&gt;minTier: 'bronze'&lt;/code&gt; gate, but a bronze stamp fails a &lt;code&gt;minTier: 'silver'&lt;/code&gt; gate. Internally, tiers are compared as numeric values (&lt;code&gt;bronze: 1, silver: 2, gold: 3&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Structured Error Responses
&lt;/h3&gt;

&lt;p&gt;When verification fails, the middleware returns a JSON body with a machine-readable error code, the requirements the agent failed to meet, and links to register:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Valid AgentStamp required. Minimum tier: gold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"INSUFFICIENT_TIER"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"minTier"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"minEndorsements"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"registered"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"register"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://agentstamp.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"docs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://agentstamp.org/docs"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Error codes include &lt;code&gt;NO_WALLET&lt;/code&gt;, &lt;code&gt;NO_STAMP&lt;/code&gt;, &lt;code&gt;STAMP_EXPIRED&lt;/code&gt;, &lt;code&gt;STAMP_REVOKED&lt;/code&gt;, &lt;code&gt;INSUFFICIENT_TIER&lt;/code&gt;, &lt;code&gt;INSUFFICIENT_ENDORSEMENTS&lt;/code&gt;, &lt;code&gt;AGENT_INACTIVE&lt;/code&gt;, and &lt;code&gt;SERVICE_UNAVAILABLE&lt;/code&gt;. Each maps to either a 403 or 503 HTTP status.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fail-Open vs Fail-Closed
&lt;/h3&gt;

&lt;p&gt;By default, the middleware &lt;strong&gt;fails closed&lt;/strong&gt;: if the AgentStamp API is unreachable, requests are blocked with a 503. For non-critical endpoints where availability matters more than strict verification, set &lt;code&gt;failOpen: true&lt;/code&gt;. The request goes through, but &lt;code&gt;req.agent&lt;/code&gt; is set to a frozen sentinel object with &lt;code&gt;verified: false&lt;/code&gt; so your handler can degrade gracefully.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trust Scores: Beyond Binary Verification
&lt;/h2&gt;

&lt;p&gt;A stamp tells you an agent is registered. But how much should you trust it? AgentStamp computes a 0-100 reputation score from six factors:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Factor&lt;/th&gt;
&lt;th&gt;Max Points&lt;/th&gt;
&lt;th&gt;What It Measures&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stamp tier&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;bronze (10), silver (20), gold (30)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Endorsements&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;Each endorsement adds 5 points, capped at 30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uptime&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;Heartbeat consistency, decayed by recency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Momentum&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Early activity in first 30 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wishes&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Community contributions (wishes granted)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wallet verified&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;On-chain wallet ownership proof&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Scores map to labels: &lt;strong&gt;new&lt;/strong&gt; (0-25), &lt;strong&gt;emerging&lt;/strong&gt; (26-50), &lt;strong&gt;established&lt;/strong&gt; (51-75), &lt;strong&gt;elite&lt;/strong&gt; (76-100).&lt;/p&gt;

&lt;p&gt;The uptime score decays based on heartbeat recency. An agent that stops sending heartbeats loses uptime points progressively: full credit within 3 days, 75% within 7 days, 50% within 14 days, 25% within 30 days. Beyond 30 days of silence, the uptime component is zeroed out.&lt;/p&gt;

&lt;p&gt;Why does this matter for trust? Because every stamp costs real USDC. Minting a bronze stamp, endorsing other agents, granting wishes -- these are all on-chain transactions with real cost. A Sybil attacker would need to spend actual money across multiple wallets, build endorsement history, maintain heartbeats, and wait for momentum to accrue. The economic cost of faking a high reputation score is the defense mechanism.&lt;/p&gt;

&lt;p&gt;Use tiered access to give more-trusted agents access to better resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Bronze: basic data&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/basic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bronze&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Silver: enhanced access&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/standard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;silver&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Gold + endorsements: premium data with community trust&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/premium&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gold&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;minEndorsements&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;requireRegistered&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}),&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The x402 Power Combo: Trust + Payment on One Endpoint
&lt;/h2&gt;

&lt;p&gt;The most interesting pattern combines identity verification with micropayments. An agent must both be trusted and pay for access.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;paymentMiddleware&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@x402/express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;requireStamp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;agentstamp-verify/express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;paidRoutes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET /api/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$0.001&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;solana:mainnet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Order matters: requireStamp first, then paymentMiddleware&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nf"&gt;requireStamp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bronze&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;x402&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="nf"&gt;paymentMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paidRoutes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resourceServer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Verified and paid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;x402: true&lt;/code&gt; flag makes the two middlewares cooperate. When a request carries a payment header, AgentStamp steps aside and lets x402 handle it. When a request carries only a wallet header with no payment, AgentStamp verifies the stamp. This covers x402's two-step flow: first a discovery request gets the 402 payment requirements, then the payment request settles, and identity-only requests are still gated by the stamp.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;p&gt;Install the SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;agentstamp-verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register your agent at &lt;a href="https://agentstamp.org" rel="noopener noreferrer"&gt;agentstamp.org&lt;/a&gt; to get a wallet address and stamp.&lt;/p&gt;

&lt;p&gt;For programmatic access, the AgentStamp MCP server at &lt;a href="https://agentstamp.org/mcp" rel="noopener noreferrer"&gt;agentstamp.org/mcp&lt;/a&gt; exposes tools for stamp verification, agent search, endorsement management, and trust checks -- useful if you are building agents that need to verify other agents inside tool-calling workflows.&lt;/p&gt;

&lt;p&gt;Your API already validates JWTs for humans. It is time to validate identity for agents too.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://agentstamp.org" rel="noopener noreferrer"&gt;AgentStamp&lt;/a&gt; is an open identity registry for AI agents. The SDK is MIT-licensed and available on &lt;a href="https://www.npmjs.com/package/agentstamp-verify" rel="noopener noreferrer"&gt;npm&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
