DEV Community

Anders
Anders

Posted on • Originally published at nerq.ai

Building Trust Into Agentic Commerce: A Developer's Guide

The $385B Problem

Morgan Stanley projects $190-385B in agent-driven e-commerce by 2030. AI agents are already buying groceries, booking flights, and negotiating vendor contracts on behalf of humans.

But here's the question nobody's asking: who verifies these agents?

When your AI shopping assistant wants to buy something from another AI agent, there's currently no standard way to check if that agent is trustworthy. No credit check. No identity verification. No trust score.

What Can Go Wrong

Without verification:

  • An agent could impersonate a legitimate vendor
  • Unauthorized purchases could be made on your behalf
  • Your data could be shared with unvetted third parties
  • Agent-to-agent negotiations could be manipulated

We tested 100 multi-agent transactions without trust checks. 35.6% had issues — agents delegated to abandoned tools, interacted with unverified counterparties, or proceeded with risky transactions.

The Solution: Commerce Trust Verification

We built a commerce-specific trust verification endpoint on top of the Nerq Trust Protocol:

curl -X POST https://nerq.ai/v1/commerce/verify \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "my-shopping-agent",
    "counterparty_id": "vendor-agent",
    "transaction_type": "purchase",
    "amount_range": "medium"
  }'
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "verdict": "approve",
  "agent_trust_score": 88.5,
  "counterparty_trust_score": 82.0,
  "threshold_applied": 70,
  "risk_factors": [],
  "recommended_action": "Transaction may proceed."
}
Enter fullscreen mode Exit fullscreen mode

3-Line Integration

from nerq_commerce import verify_transaction

result = verify_transaction("my-agent", "vendor-agent", "purchase", "medium")
if result.approved:
    execute_transaction()
Enter fullscreen mode Exit fullscreen mode

Install: pip install nerq-commerce

Transaction Types & Thresholds

The system applies different trust thresholds based on transaction type and amount:

Type Low Medium High Critical
Purchase 60 70 80 90
Payment 65 75 85 95
Delegation 50 65 75 85
Data Exchange 40 55 65 80

A $50 data exchange needs less scrutiny than a $10,000 payment. The thresholds reflect this.

Production Use: CommerceGate

For production systems, use the CommerceGate class with caching and auto-retry:

from nerq_commerce import CommerceGate

gate = CommerceGate(default_threshold=70, cache_ttl=300)

# Verify before every transaction
result = gate.verify("shopping-bot", "amazon-agent", "purchase", "high")
if result.approved:
    place_order()
elif result.verdict == "review":
    flag_for_human_review()
else:
    block_transaction()
Enter fullscreen mode Exit fullscreen mode

How Trust Scores Work

Nerq indexes 204,000+ AI agents across 12 registries. Each agent gets a trust score (0-100) based on maintenance activity, community engagement, documentation quality, and stability.

The commerce endpoint looks up both the agent and the counterparty, applies transaction-specific thresholds, and returns a verdict in <50ms.

Get Started

pip install nerq-commerce
Enter fullscreen mode Exit fullscreen mode

Built by Nerq — the trust layer for the agentic economy.

Top comments (0)