Skip to content

abokenan444/web-agent-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

246 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Agent Bridge Logo

Web Agent Bridge (WAB)

The trust + transaction layer for agentic commerce.

Signed intent contracts · idempotent transactions · Ed25519-verifiable receipts · explicit compensation.

robots.txt told bots what NOT to do. WAB tells AI agents what they CAN do — and proves what they did.

npm License: Open Core Tests ATP Discord


Website · Docs · Architecture · Spec · Whitepaper · العربية

Why WAB?

AI agents today guess their way through the web — DOM scraping, brittle selectors, fragile vision models. WAB replaces guesswork with a contract. Sites declare what agents can do; agents call it like an API; everything is signed, rate-limited, and auditable.

  • For site owners — control exactly how AI interacts with you. Permissions, rate limits, audit trail.
  • For agent builders — one stable interface for any WAB-enabled site. No more custom scrapers.

ATP — Agent Transaction Primitive (new in v3.9)

WAB v3.9 introduces the Agent Transaction Primitive (ATP) — the missing trust + transaction layer for agentic commerce.

Intent  →  Authorize  →  Transact  →  Receipt  →  (Compensate)
contract    single-use     idempotent   Ed25519-     explicit
+ scope     nonce burn     UNIQUE key   signed       rollback
+ spend cap                              JSON
  • Intent contracts — the user's signed authorization (scope, spend cap, expiry, single-use nonce).
  • Idempotent executionUNIQUE (intent_id, idempotency_key): retries can never double-execute.
  • Signed receipts — Ed25519 over canonical JSON; verifiable via the public /api/atp/receipts/verify endpoint with zero auth.
  • Compensation — explicit rollback that decrements the intent's spend counter.
const { ATPClient } = require('web-agent-bridge/sdk');
const atp = new ATPClient({ baseUrl: 'https://api.webagentbridge.com', token: USER_JWT });

const intent = await atp.createIntent({ purpose: 'buy 1 widget', scope: { actions: ['cart.add','checkout'] }, max_spend_cents: 5000, currency: 'EUR' });
await atp.authorizeIntent(intent.id);
const tx = await atp.beginTransaction({ intent_id: intent.id, idempotency_key: 'order-42', amount_cents: 4200 });
await atp.transition(tx.id, 'executing'); await atp.transition(tx.id, 'executed'); await atp.transition(tx.id, 'settled');
const r = await atp.issueReceipt(tx.id);                       // signed
const v = await atp.verifyReceipt({ receiptId: r.receipt_id }); // public, no auth

Full spec: docs/SPEC.md §21 · Public docs page: /atp.html.


Quick start (60 seconds)

# 1. Make your site discoverable (zero code)
npx wab-init --site=https://yourdomain.com --yes

# 2. Or install the protocol package
npm install web-agent-bridge
<script src="https://cdn.webagentbridge.com/wab.min.js"></script>
<script>
  WAB.declare({
    intents: { search: { handler: (q) => /* … */ } },
    privacy: { allowed: ['public'], disallowed: ['payment'] }
  });
</script>

Then any agent can do window.AICommands.search("…") reliably — forever.

Full quickstart, SDKs, and integrations: docs/ARCHITECTURE.md


What's inside

Layer What it gives you More
🔌 Core protocol DNS discovery · wab.json manifest · window.AICommands interface Spec
🧬 SDKs JS · React · Vue · Svelte · Next.js · LangChain · MCP adapter Architecture
🛡️ Trust & Safety Ring 4 handshake · ShieldQR · ShieldLink · Phone Shield · SSL monitor Architecture
🧠 Advanced layer Reputation · Memory cache · Intent routing · Privacy budget · Offline Architecture
⚓ Truth layer Semantic memory · Temporal trust · Refusal history · Collective insights Architecture
🏛️ Governance HMAC-chained audit log · EU AI Act Article 12 export · multi-tenant Architecture
💼 Commercial Partner Program · Trust Graph API · Governance SaaS · Enterprise Mesh Architecture
🔭 Observatory WAB adoption tracker · domain monitoring · public stats API /observatory
✍️ Notary Ed25519 attestation · key rotation · web-of-trust cross-attestation /notary
📚 Research Public CC-BY-4.0 dataset API · timeseries · adoption stats /research
🌐 Spider Registry Gossip Protocol · agent-reported network · peer exchange /wab-registry
📊 Training Dataset HuggingFace JSONL · WAB vs non-WAB traces · k-factor viral stats /wab-dataset
📈 Viral Coefficient k-factor model · growth simulator · critical mass tracker /viral-coefficient
🔍 WAB Lens MV3 browser extension · trust badge · auto-discovery /wab-lens

WAB Self-Propagating Protocol (new in v3.20)

WAB v3.20 introduces the Self-Propagating Protocol — once installed on a single site, the network grows autonomously with zero human intervention.

Human installs WAB (once)
        ↓
/.wab Beacon — publishes next[] peer list
        ↓
Agent reads beacon → discovers N new WAB sites
        ↓
Gossip Exchange — agents share peer lists bidirectionally
        ↓
X-WAB-Next-Sites DNA header — on every HTTP response
        ↓
Training Dataset — WAB traces published on HuggingFace
        ↓
Future AI models fine-tune on data → prefer WAB by default
        ↓
k > 1 — exponential growth, no humans in the loop

Gossip Protocol

// Agents share what they know. Server merges + returns its own peers.
const res = await fetch('https://webagentbridge.com/api/registry/report', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    domain: 'my-wab-site.com',
    wab_enabled: true,
    trust_ring: 4,
    // Share what you know — server auto-registers and returns back:
    gossip_peers: [
      { domain: 'another-wab-site.com', trust_ring: 3, intent_tags: ['ecommerce'] },
    ],
  }),
});
const { gossip_for_you } = await res.json();
// gossip_for_you → top 5 WAB sites you didn't know about yet

Training Signal

// After every task — submit a trace to the public dataset
await fetch('https://webagentbridge.com/api/traces/submit', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    domain: 'takeyourappointment.com',
    wab_enabled: true,
    trust_ring: 4,
    task: 'book_appointment',
    outcome: 'success',      // vs 'failure' on non-WAB sites
    latency_ms: 1200,        // vs 8400ms on non-WAB
    retries: 0,              // vs 3 retries on non-WAB
  }),
});
// Dataset: https://webagentbridge.com/api/traces/dataset
// HuggingFace: https://huggingface.co/datasets/webagentbridge/agent-traces

Viral Coefficient

$$k = \frac{\text{gossip-sourced} + \text{spider-sourced}}{\text{manually-seeded}}$$

  • k >= 1 — self-sustaining: each seeded site generates more than 1 viral discovery
  • k >= 2 — exponential: network doubles each propagation cycle
  • Critical mass: ~1,000 diverse WAB sites — at that point, non-WAB sites become the fallback

Live model: webagentbridge.com/viral-coefficient

Self-Propagation APIs

Endpoint Purpose
GET /.wab WAB Beacon — {ring, score, next[], gossip_exchange}
POST /api/registry/report Spider Protocol + Gossip peer exchange
GET /api/registry/gossip Seed peer list without submitting a report
POST /api/traces/submit Submit WAB/non-WAB interaction trace
GET /api/traces/dataset JSONL download (HuggingFace-compatible)
GET /api/traces/stats WAB vs non-WAB aggregate success rates
GET /api/traces/viral Live k-factor + by-source breakdown

Commercial foundations (v3.8.0)

Four production-ready monetization pillars on top of the open protocol — all admin-gated, env-configured, and zero billing logic in the routes:

Endpoint tables, tier specs, and security model: docs/ARCHITECTURE.md


Install

# Core SDK
npm install web-agent-bridge

# Framework adapters
npm install @web-agent-bridge/react
npm install @web-agent-bridge/vue
npm install @web-agent-bridge/svelte
npm install @web-agent-bridge/langchain

# Server (self-host)
git clone https://github.com/abokenan444/web-agent-bridge
npm install && npm start

Docker: docker compose up -d · Production: see docs/DEPLOY.md


Documentation map

Document What it covers
docs/ARCHITECTURE.md Full feature reference: every layer, every endpoint
docs/SPEC.md Protocol specification (formal)
docs/DEPLOY.md Production deployment guide
CONTRIBUTING.md How to contribute
examples/ Live agent examples — Puppeteer, MCP, Vision, LangChain…
templates/ Starter manifests — restaurant, hotel, ecommerce, freelancer…

Community


License

MIT (core protocol & SDKs). Commercial tiers under separate terms — see LICENSE.

Built for the AI-first web · 428/428 tests passing · v3.8.0

About

Open AI<->Web protocol & agent platform: standardized command interface, sovereign browser, phone shield, DNS discovery, agent mesh, and unified API gateway for safe AI-website interaction.

Topics

Resources

License

Contributing

Security policy

Stars

5 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors