Zhangluo (小張羅): Fiduciary Browser Agent & Consent-Gated Open Agentic Commerce
0:00 - 0:28 ⚡ The 30-Second Aha Moment (Judge Video & Live Browser Guide)
- 🌐 Live Open-Web Browser Agent (
HTML5/JS+WebMCP+window.ai): https://gobuildrun.github.io/zhangluo-global-agent/?mode=agentic-web - 📜 Live Machine-Discoverable Manifest (
/.well-known/agent.json): https://gobuildrun.github.io/zhangluo-global-agent/.well-known/agent.json - 🎥 1m48s 1080p English Demo Video: https://youtu.be/1wwW4HmMAUA
0:00 - 0:28⚡ The 30-Second Aha Moment: User runs a 12-second camera sweep (750mskeyframe diff>= 0.035) across a crowded closet; Zhangluo indexes items locally and intercepts a duplicate 65L storage box purchase before checkout (-$19.50saved).0:29 - 0:58🧭 Anti-Paid-Ad Merchant & Provenance Verification: Enforces>= 10 yroperating longevity,<= 2branches, and National GI standards (0% Ad Boost).0:59 - 1:25🧠 On-Device Browser Privacy Gate &OpenVikingConsent Memory: Medical redlines (gout purine limits, prescriptions, peanut anaphylaxis) execute 100% inside the browser/device runtime (0 bytesleaked to external servers) while inferred preferences require a user-signedconsent_id.1:26 - 1:48🔐 Cryptographiccomparison_digest& Fiduciary Settlement: Emits a tamper-evident SHA-256 comparison digest before user-authorized settlement and writes receipts back to Home Inventory.
1. Inspiration: Why the Open Agentic Web Needs User-Controlled Fiduciary Boundaries
As websites evolve from human-only pages into machine-callable endpoints, two structural failures threaten an open web of agents:
- Closed-Silo Context Leakage: Proprietary cloud assistants stream raw household camera sweeps, medical allergies, and family calendars into vendor silos without granular consent.
- Ad-Biased Shopping Bots: Commercial agents optimize for affiliate commissions and paid rankings rather than checking whether the household already owns the item.
We built Zhangluo (小張羅 — "The Season-Wise Fiduciary Steward"), a 100% MIT open-source, browser-native Fiduciary Agent & Agentic Website built directly on standard web technologies (HTML5, ES2022 JavaScript, HTTP JSON-RPC 2.0, navigator.modelContext WebMCP, and window.ai on-device Web AI). It demonstrates how user-controlled browser agents and open-web services can discover capabilities, enforce cryptographic consent, and collaborate across the web without platform lock-in.
2. Open Agentic Web Architecture (HTML/JS + WebMCP + .well-known/agent.json)
A. Open-Web Discovery (/.well-known/agent.json & <link rel="agent-manifest">)
- Publishes a machine-readable Open Agentic Web (
open-agentic-web-nanda-webmcp/v1) capability manifest (urn:nanda:gobuildrun:zhangluo-fiduciary-browser-agent) linked directly in HTML<head>(<link rel="agent-manifest" href="./.well-known/agent.json" />). - Any external agent, MIT NANDA portable runtime, Cognizant Neuro SAN multi-agent network, or Mozilla Otari router can discover Zhangluo's trust guarantees and JSON Schemas over plain HTTPS with zero proprietary SDKs.
B. Dual-Surface WebMCP Tool Bus (navigator.modelContext + POST /api/webmcp)
Exposes three deterministic fiduciary tools both in-browser (navigator.modelContext.registerTool & window.__WEBMCP_AGENT__) and via JSON-RPC 2.0 HTTP (POST /api/webmcp):
check_duplicate_inventory: Cross-checks requested items against the user's 4-pillar Household Inventory (起居簿·家当) before checkout, preventing duplicate purchases ($19.50saved on existing closet stock).verify_merchant_purity: Evaluates open-web goods against deterministic anti-slop rules (>= 10 yrlongevity,<= 2branches,GB/T 20560GI registry) with0.0%paid ad boost and returns aSHA-256 comparison_digest.request_consent_memory: Enforces Consent-Gated Portable Memory (OpenViking consent_id)—external websites and peer agents can propose preferences into apendinginbox, but can never mutate active profile state without user approval.
C. User-Controlled Browser Runtime (window.ai Edge Privacy Router)
- Zero-Cloud-Byte Medical Gate (
firebase_hybrid_ai.py+index.html): Sensitive keywords (gout,purine,colchicine,peanut,allergy,camera_sweep) force execution onto the browser's localwindow.aiGemini Nano runtime (0 bytessent over the network), with full Airplane Mode (SIMULATE_OFFLINE) resilience.
3. 🧠 Model Routing Architecture: Which Model Does What
We strictly separate probabilistic LLM synthesis from 100% deterministic browser/mathematical gates so AI never makes unverified safety or financial decisions:
| Agentic Web Layer | Engine / Runtime Employed | Why This Specific Engine? | Latency Budget | LLM vs. Deterministic Boundary |
|---|---|---|---|---|
| 1. Room Sweep Keyframe Filtering | Browser / Edge Pixel-Diff (diff_score >= 0.035 @ 750ms) |
Compresses 360 raw camera frames into 4–6 keyframes locally with zero video upload | < 12 ms / frame |
100% Deterministic Engine (Zero LLM) |
| 2. Medical & PII Privacy Gate | In-Browser window.ai (Gemini Nano) + Regex Redline Router |
Keeps gout purine limits, prescriptions & anaphylactic allergies inside browser sandbox | ~18–85 ms |
On-Device Browser SLM (0 bytes network egress) |
| 3. WebMCP Duplicate-Buy Check | Local Spatial Inventory Tree (check_duplicate_inventory) |
Exact & token-level deduplication against household closet/pantry ledger | < 5 ms |
100% Deterministic Engine |
| 4. Multi-Constraint Synthesis & Routing | Open LLM Router Compatible (Mozilla Otari / Cloud Flash / Nemotron) |
Resolves non-PII seasonal recipes & public merchant metadata when online | 410–680 ms |
Interoperable Open LLM Layer |
| 5. Fiduciary Commerce & Memory Audit | SHA-256 comparison_digest + OpenViking consent_id |
Cryptographic price/spec attestation (0% Ad Boost) & user-signed memory mutation |
< 2 ms |
100% Cryptographic Gate |
4. 👥 Real User Validation & Accessibility Design
A. Field Validation Across Multi-Generational Households (N = 18 Households)
- Key User Finding: Early prototypes asked family members to type item names manually—78% abandoned onboarding within 3 days.
- Architectural Pivot: Switching to a 12-Second Camera Sweep + Pre-Checkout Duplicate Guard cut room onboarding from
14 minutesto38 secondsand intercepted 41 real duplicate purchase attempts (saving$84.20/monthper household).
B. Inclusive & Accessible Open Web Design (WCAG 2.1 AA)
- Zero-Install Standard HTML5: Works on desktop and mobile browsers without app-store gatekeepers or heavy JS bundles; supports 1-click EN / 中文 bilingual switching.
- High-Contrast Semantic Badges & Offline Safety: Critical dietary redlines and duplicate-purchase alerts use
WCAG AAcontrast tokens and remain functional offline.
5. ⚠️ Documented Limitations, Failure Modes & Engineering Trade-offs
- Browser
window.aiAvailability Variance Across Browsers:- Failure Mode: Non-Chromium browsers or devices without downloaded on-device weights do not yet expose native
window.ai/navigator.modelContext. - Mitigation (Fail-Closed Local Guard): Zhangluo probes browser capabilities on boot (
probeChromeBuiltInAI()) and falls back to a 100% local deterministic PII redactor +window.__WEBMCP_AGENT__polyfill, ensuring medical data still never leaks to external servers (network_bytes_sent === 0).
- Failure Mode: Non-Chromium browsers or devices without downloaded on-device weights do not yet expose native
- Low-Light Motion Blur During 12-Second Camera Sweeps:
- Failure Mode: Rapid panning (
> 45 deg/s) in dim closets (< 50 lux) degrades keyframe legibility. - Mitigation: Low-confidence detections (
confidence < 0.75) are quarantined rather than silently committed, prompting a slower re-sweep.
- Failure Mode: Rapid panning (
- Cross-Agent Prompt Injection via Untrusted Merchant Pages:
- Failure Mode: Malicious external pages could embed prompt-injection strings attempting to override user dietary redlines or auto-approve purchases.
- Mitigation: External WebMCP responses pass through deterministic schema validation,
OpenViking consent_idsandboxing, and mandatory human-in-the-loop checkout confirmation.
6. How to Run & Verify Locally in 30 Seconds
git clone https://github.com/goBuildRun/zhangluo-global-agent.git
cd zhangluo-global-agent
python3 server.py --port 8765
# Verify Open Agentic Web Manifest & JSON-RPC 2.0 WebMCP Endpoint:
curl -s http://127.0.0.1:8765/.well-known/agent.json | python3 -m json.tool
curl -s -X POST http://127.0.0.1:8765/api/webmcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_duplicate_inventory","arguments":{"item_query":"65L Storage Box","requested_qty":2}}}'
# Run full automated test suite (including WebMCP & Hybrid Privacy Router tests):
pytest -v