web-agent-bridge 1.2.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/LICENSE +21 -21
  2. package/README.ar.md +572 -446
  3. package/README.md +968 -933
  4. package/bin/agent-runner.js +465 -0
  5. package/bin/cli.js +138 -80
  6. package/bin/wab.js +80 -80
  7. package/examples/bidi-agent.js +119 -119
  8. package/examples/mcp-agent.js +94 -94
  9. package/examples/next-app-router/README.md +44 -0
  10. package/examples/puppeteer-agent.js +108 -108
  11. package/examples/saas-dashboard/README.md +55 -0
  12. package/examples/shopify-hydrogen/README.md +74 -0
  13. package/examples/vision-agent.js +171 -171
  14. package/examples/wordpress-elementor/README.md +77 -0
  15. package/package.json +71 -78
  16. package/public/.well-known/ai-assets.json +59 -0
  17. package/public/admin/login.html +84 -84
  18. package/public/ai.html +196 -0
  19. package/public/cookies.html +208 -208
  20. package/public/css/premium.css +317 -0
  21. package/public/css/styles.css +1235 -1235
  22. package/public/dashboard.html +704 -704
  23. package/public/demo.html +259 -0
  24. package/public/docs.html +585 -585
  25. package/public/feed.xml +89 -0
  26. package/public/index.html +581 -332
  27. package/public/js/auth-nav.js +31 -31
  28. package/public/js/auth-redirect.js +12 -12
  29. package/public/js/cookie-consent.js +56 -56
  30. package/public/js/wab-demo-page.js +721 -0
  31. package/public/js/ws-client.js +74 -74
  32. package/public/llms-full.txt +309 -0
  33. package/public/llms.txt +85 -0
  34. package/public/login.html +83 -83
  35. package/public/openapi.json +580 -0
  36. package/public/premium-dashboard.html +2487 -0
  37. package/public/premium.html +791 -0
  38. package/public/privacy.html +295 -295
  39. package/public/register.html +103 -103
  40. package/public/robots.txt +87 -0
  41. package/public/script/wab-consent.d.ts +36 -0
  42. package/public/script/wab-consent.js +104 -0
  43. package/public/script/wab-schema.js +131 -0
  44. package/public/script/wab.d.ts +108 -0
  45. package/public/script/wab.min.js +405 -0
  46. package/public/sitemap.xml +93 -0
  47. package/public/sovereign.html +660 -0
  48. package/public/terms.html +254 -254
  49. package/public/video/tutorial.mp4 +0 -0
  50. package/script/ai-agent-bridge.js +1558 -1513
  51. package/sdk/README.md +55 -55
  52. package/sdk/index.d.ts +118 -0
  53. package/sdk/index.js +257 -203
  54. package/sdk/package.json +14 -14
  55. package/sdk/schema-discovery.js +83 -0
  56. package/server/config/secrets.js +94 -92
  57. package/server/index.js +2 -9
  58. package/server/middleware/adminAuth.js +30 -30
  59. package/server/middleware/auth.js +41 -41
  60. package/server/middleware/rateLimits.js +24 -24
  61. package/server/migrations/001_add_analytics_indexes.sql +7 -7
  62. package/server/migrations/002_premium_features.sql +418 -0
  63. package/server/models/adapters/index.js +33 -33
  64. package/server/models/adapters/mysql.js +183 -183
  65. package/server/models/adapters/postgresql.js +172 -172
  66. package/server/models/adapters/sqlite.js +7 -7
  67. package/server/models/db.js +561 -561
  68. package/server/routes/admin-premium.js +671 -0
  69. package/server/routes/admin.js +247 -247
  70. package/server/routes/api.js +131 -138
  71. package/server/routes/auth.js +51 -51
  72. package/server/routes/billing.js +45 -45
  73. package/server/routes/discovery.js +406 -329
  74. package/server/routes/license.js +240 -240
  75. package/server/routes/noscript.js +543 -543
  76. package/server/routes/premium-v2.js +686 -0
  77. package/server/routes/premium.js +724 -0
  78. package/server/routes/sovereign.js +307 -0
  79. package/server/routes/wab-api.js +476 -476
  80. package/server/services/agent-memory.js +625 -0
  81. package/server/services/email.js +204 -204
  82. package/server/services/fairness.js +420 -420
  83. package/server/services/negotiation.js +439 -0
  84. package/server/services/plugins.js +747 -0
  85. package/server/services/premium.js +1883 -0
  86. package/server/services/reputation.js +465 -0
  87. package/server/services/self-healing.js +843 -0
  88. package/server/services/stripe.js +192 -192
  89. package/server/services/swarm.js +788 -0
  90. package/server/services/verification.js +481 -0
  91. package/server/services/vision.js +871 -0
  92. package/server/utils/cache.js +125 -125
  93. package/server/utils/migrate.js +81 -81
  94. package/server/utils/secureFields.js +50 -50
  95. package/server/ws.js +101 -101
  96. package/templates/artisan-marketplace.yaml +104 -0
  97. package/templates/book-price-scout.yaml +98 -0
  98. package/templates/electronics-price-tracker.yaml +108 -0
  99. package/templates/flight-deal-hunter.yaml +113 -0
  100. package/templates/freelancer-direct.yaml +116 -0
  101. package/templates/grocery-price-compare.yaml +93 -0
  102. package/templates/hotel-direct-booking.yaml +113 -0
  103. package/templates/local-services.yaml +98 -0
  104. package/templates/olive-oil-tunisia.yaml +88 -0
  105. package/templates/organic-farm-fresh.yaml +101 -0
  106. package/templates/restaurant-direct.yaml +97 -0
  107. package/docs/DEPLOY.md +0 -118
  108. package/docs/SPEC.md +0 -1540
  109. package/wab-mcp-adapter/README.md +0 -136
  110. package/wab-mcp-adapter/index.js +0 -555
  111. package/wab-mcp-adapter/package.json +0 -17
@@ -0,0 +1,116 @@
1
+ # WAB Agent Template — Freelancer Finder
2
+ # Finds freelancers directly from their portfolio sites
3
+ # Run: npx wab-agent run freelancer-direct.yaml --skill "web-design" --budget 500
4
+
5
+ name: freelancer-direct
6
+ version: 1.0.0
7
+ description: Find freelancers directly from their portfolio websites, bypassing Fiverr/Upwork fees
8
+ author: WAB Community
9
+ tags: [freelance, hiring, direct, anti-monopoly, services]
10
+
11
+ goal: >
12
+ Discover WAB-enabled freelancer portfolio sites, evaluate their work samples,
13
+ verify portfolio authenticity, negotiate project rates directly (saving the
14
+ 20-30% platform fee), and initiate contact.
15
+
16
+ target_sites:
17
+ discovery_method: wab-registry
18
+ category: freelance-services
19
+ region: global
20
+ fallback_urls: []
21
+
22
+ parameters:
23
+ - name: skill
24
+ type: string
25
+ required: true
26
+ description: "Skill to search for (e.g. web-design, copywriting, video-editing)"
27
+ - name: budget
28
+ type: number
29
+ required: true
30
+ description: Maximum budget in USD
31
+ - name: deadline_days
32
+ type: number
33
+ default: 14
34
+ - name: prefer_timezone
35
+ type: string
36
+ description: Preferred timezone (e.g. UTC+1, EST)
37
+
38
+ actions:
39
+ - name: discover
40
+ description: Find freelancers with the required skill
41
+ wab_action: discover
42
+
43
+ - name: get_portfolio
44
+ description: Retrieve portfolio samples and past work
45
+ wab_action: getPortfolio
46
+ params:
47
+ skill: "{{skill}}"
48
+
49
+ - name: check_availability
50
+ description: Check freelancer availability
51
+ wab_action: checkAvailability
52
+ params:
53
+ start_date: today
54
+ duration_days: "{{deadline_days}}"
55
+
56
+ - name: get_rates
57
+ description: Get hourly or project rates
58
+ wab_action: getRates
59
+ params:
60
+ project_type: "{{skill}}"
61
+ collect: true
62
+
63
+ - name: verify_portfolio
64
+ description: Verify portfolio screenshots match descriptions
65
+ wab_action: verifyText
66
+ require_pass: true
67
+
68
+ - name: check_reputation
69
+ description: Check freelancer reputation in WAB network
70
+ wab_action: getReputation
71
+
72
+ - name: negotiate
73
+ description: Negotiate project rate directly
74
+ wab_action: negotiate
75
+ strategy: instant_payment
76
+ conditions:
77
+ proposed_discount: 15
78
+ argument: "No platform fees — you keep 100% of the payment"
79
+ fallback_strategy: first_time
80
+
81
+ - name: contact
82
+ description: Initiate contact with selected freelancer
83
+ wab_action: contact
84
+ requires: [verify_portfolio, check_reputation]
85
+
86
+ fairness_rules:
87
+ prefer_local: false
88
+ prefer_small_business: true
89
+ max_price: "{{budget}}"
90
+ currency: USD
91
+ min_reputation_score: 35
92
+ avoid_monopolies: true
93
+
94
+ negotiation:
95
+ enabled: true
96
+ max_rounds: 3
97
+ strategies:
98
+ - instant_payment
99
+ - first_time
100
+ - loyalty
101
+ walk_away_threshold: 5
102
+ pitch: >
103
+ On Fiverr/Upwork you'd lose 20-30% in fees. By working direct through WAB,
104
+ you keep 100%. Let's split the savings.
105
+
106
+ verification:
107
+ anti_hallucination: true
108
+ verify_descriptions: true
109
+ require_vision_match: true
110
+ max_price_variance: 0.20
111
+
112
+ output:
113
+ format: json
114
+ include: [freelancer, skill_match, rate, negotiated_rate, savings_vs_platform, reputation, portfolio_verified]
115
+ sort_by: rate
116
+ limit: 10
@@ -0,0 +1,93 @@
1
+ # WAB Agent Template — Grocery Price Comparison
2
+ # Compares grocery prices across local stores
3
+ # Run: npx wab-agent run grocery-price-compare.yaml --items "milk,bread,eggs,rice"
4
+
5
+ name: grocery-price-compare
6
+ version: 1.0.0
7
+ description: Compare grocery prices across WAB-enabled local stores and find the cheapest basket
8
+ author: WAB Community
9
+ tags: [grocery, price-comparison, local, shopping, savings]
10
+
11
+ goal: >
12
+ Search WAB-enabled grocery stores and local markets, compare prices for a list
13
+ of items, verify prices are accurate, find the store with the lowest total basket
14
+ cost, and optionally negotiate bulk deals.
15
+
16
+ target_sites:
17
+ discovery_method: wab-registry
18
+ category: grocery
19
+ region: auto
20
+ fallback_urls: []
21
+
22
+ parameters:
23
+ - name: items
24
+ type: string[]
25
+ required: true
26
+ description: "Comma-separated list of grocery items to compare"
27
+ - name: radius_km
28
+ type: number
29
+ default: 10
30
+ description: Search radius in kilometers
31
+ - name: prefer_organic
32
+ type: boolean
33
+ default: false
34
+
35
+ actions:
36
+ - name: discover
37
+ description: Find WAB-enabled grocery stores nearby
38
+ wab_action: discover
39
+
40
+ - name: search_items
41
+ description: Search for each item in the shopping list
42
+ wab_action: searchProducts
43
+ params:
44
+ query: "{{item}}"
45
+ loop_over: items
46
+ collect: true
47
+
48
+ - name: verify_prices
49
+ description: Verify displayed prices match DOM
50
+ wab_action: verifyPrice
51
+ require_pass: true
52
+
53
+ - name: negotiate_basket
54
+ description: Try to negotiate a bundle discount for the full basket
55
+ wab_action: negotiate
56
+ strategy: bulk_order
57
+ conditions:
58
+ proposed_discount: 8
59
+ argument: "Buying multiple items together"
60
+ fallback_strategy: loyalty
61
+
62
+ - name: build_optimal_basket
63
+ description: Calculate the cheapest combination across stores
64
+ internal: true
65
+ logic: minimize_total_cost
66
+
67
+ fairness_rules:
68
+ prefer_local: true
69
+ prefer_small_business: true
70
+ currency: auto
71
+ min_reputation_score: 20
72
+ avoid_monopolies: true
73
+
74
+ negotiation:
75
+ enabled: true
76
+ max_rounds: 2
77
+ strategies:
78
+ - bulk_order
79
+ - loyalty
80
+ - repeat_customer
81
+ walk_away_threshold: 3
82
+
83
+ verification:
84
+ anti_hallucination: true
85
+ cross_check_prices: true
86
+ require_vision_match: false
87
+ max_price_variance: 0.08
88
+
89
+ output:
90
+ format: table
91
+ include: [store_name, item, price, best_price, store_total, verification_status]
92
+ sort_by: store_total
93
+ summary: true
@@ -0,0 +1,113 @@
1
+ # WAB Agent Template — Local Hotel Finder
2
+ # Finds hotels directly (bypassing Booking.com/Expedia monopoly)
3
+ # Run: npx wab-agent run hotel-direct-booking.yaml
4
+
5
+ name: hotel-direct-booking
6
+ version: 1.0.0
7
+ description: Find and book hotels directly from their own websites, bypassing aggregator commissions
8
+ author: WAB Community
9
+ tags: [travel, hotels, direct-booking, anti-monopoly, negotiation]
10
+
11
+ goal: >
12
+ Search WAB-enabled hotels in the target city, compare rates with aggregator
13
+ prices, negotiate direct-booking discounts, and book at the best price while
14
+ supporting independent hoteliers.
15
+
16
+ target_sites:
17
+ discovery_method: wab-registry
18
+ category: hotels
19
+ region: auto
20
+ fallback_urls: []
21
+
22
+ parameters:
23
+ - name: city
24
+ type: string
25
+ required: true
26
+ description: City name to search hotels in
27
+ - name: checkin
28
+ type: date
29
+ required: true
30
+ - name: checkout
31
+ type: date
32
+ required: true
33
+ - name: guests
34
+ type: number
35
+ default: 2
36
+ - name: max_budget
37
+ type: number
38
+ description: Maximum price per night in USD
39
+ default: 200
40
+
41
+ actions:
42
+ - name: discover
43
+ description: Find WAB-enabled hotels in target city
44
+ wab_action: discover
45
+
46
+ - name: check_availability
47
+ description: Check room availability for the given dates
48
+ wab_action: checkAvailability
49
+ params:
50
+ checkin: "{{checkin}}"
51
+ checkout: "{{checkout}}"
52
+ guests: "{{guests}}"
53
+
54
+ - name: get_rates
55
+ description: Get room rates from each hotel
56
+ wab_action: getRates
57
+ params:
58
+ checkin: "{{checkin}}"
59
+ checkout: "{{checkout}}"
60
+ collect: true
61
+
62
+ - name: verify_rates
63
+ description: Verify displayed rates match actual DOM values
64
+ wab_action: verifyPrice
65
+ require_pass: true
66
+
67
+ - name: negotiate
68
+ description: Negotiate direct-booking discount
69
+ wab_action: negotiate
70
+ strategy: instant_payment
71
+ conditions:
72
+ proposed_discount: 10
73
+ argument: "Direct booking saves you the 15-20% aggregator commission"
74
+ fallback_strategy: off_peak
75
+
76
+ - name: book
77
+ description: Book the room at negotiated rate
78
+ wab_action: bookRoom
79
+ requires: [verify_rates, negotiate]
80
+
81
+ fairness_rules:
82
+ prefer_local: true
83
+ prefer_small_business: true
84
+ max_price_per_night: "{{max_budget}}"
85
+ currency: USD
86
+ min_reputation_score: 50
87
+ avoid_monopolies: true
88
+ boycott_sites: []
89
+
90
+ negotiation:
91
+ enabled: true
92
+ max_rounds: 3
93
+ strategies:
94
+ - instant_payment
95
+ - off_peak
96
+ - repeat_customer
97
+ - loyalty
98
+ walk_away_threshold: 3
99
+ pitch: >
100
+ By booking direct, you save the 15-20% commission you'd pay Booking.com.
101
+ Pass some of that savings to me as a discount.
102
+
103
+ verification:
104
+ anti_hallucination: true
105
+ cross_check_prices: true
106
+ require_vision_match: true
107
+ max_price_variance: 0.05
108
+
109
+ output:
110
+ format: table
111
+ include: [hotel_name, room_type, original_rate, negotiated_rate, savings_pct, reputation, verification]
112
+ sort_by: negotiated_rate
113
+ limit: 20
@@ -0,0 +1,98 @@
1
+ # WAB Agent Template — Local Services Finder
2
+ # Finds local service providers (plumber, electrician, etc.)
3
+ # Run: npx wab-agent run local-services.yaml --service "plumber" --city "Tunis"
4
+
5
+ name: local-services
6
+ version: 1.0.0
7
+ description: Find local service providers directly — no middleman platforms
8
+ author: WAB Community
9
+ tags: [services, local, plumber, electrician, handyman, direct]
10
+
11
+ goal: >
12
+ Find WAB-enabled local service providers, check their reputation,
13
+ verify reviews and credentials, negotiate fair rates, and book directly.
14
+
15
+ target_sites:
16
+ discovery_method: wab-registry
17
+ category: local-services
18
+ region: auto
19
+ fallback_urls: []
20
+
21
+ parameters:
22
+ - name: service
23
+ type: string
24
+ required: true
25
+ description: "Service type (plumber, electrician, carpenter, painter, cleaner)"
26
+ - name: city
27
+ type: string
28
+ required: true
29
+ - name: urgency
30
+ type: string
31
+ default: normal
32
+ enum: [urgent, normal, flexible]
33
+
34
+ actions:
35
+ - name: discover
36
+ description: Find service providers in the area
37
+ wab_action: discover
38
+
39
+ - name: check_services
40
+ description: Get list of services offered and rates
41
+ wab_action: getServices
42
+ params:
43
+ type: "{{service}}"
44
+ collect: true
45
+
46
+ - name: check_reputation
47
+ description: Check provider reputation
48
+ wab_action: getReputation
49
+
50
+ - name: verify_reviews
51
+ description: Verify reviews are genuine
52
+ wab_action: verifyText
53
+ require_pass: true
54
+
55
+ - name: check_availability
56
+ description: Check provider availability
57
+ wab_action: checkAvailability
58
+
59
+ - name: negotiate
60
+ description: Negotiate service rate
61
+ wab_action: negotiate
62
+ strategy: repeat_customer
63
+ conditions:
64
+ proposed_discount: 10
65
+ fallback_strategy: off_peak
66
+
67
+ - name: book
68
+ description: Book the service
69
+ wab_action: bookService
70
+ requires: [check_reputation, verify_reviews]
71
+
72
+ fairness_rules:
73
+ prefer_local: true
74
+ prefer_small_business: true
75
+ currency: auto
76
+ min_reputation_score: 40
77
+ avoid_monopolies: true
78
+
79
+ negotiation:
80
+ enabled: true
81
+ max_rounds: 2
82
+ strategies:
83
+ - repeat_customer
84
+ - off_peak
85
+ - instant_payment
86
+ walk_away_threshold: 5
87
+
88
+ verification:
89
+ anti_hallucination: true
90
+ verify_descriptions: true
91
+ verify_reviews: true
92
+ max_price_variance: 0.15
93
+
94
+ output:
95
+ format: table
96
+ include: [provider, service, rate, availability, reputation, reviews_verified, negotiated_rate]
97
+ sort_by: reputation
98
+ limit: 10
@@ -0,0 +1,88 @@
1
+ # WAB Agent Template — Tunisian Olive Oil Finder
2
+ # Finds the best olive oil deals from small Tunisian producers
3
+ # Run: npx wab-agent run olive-oil-tunisia.yaml
4
+
5
+ name: olive-oil-tunisia
6
+ version: 1.0.0
7
+ description: Find premium olive oil from small Tunisian farms at fair prices
8
+ author: WAB Community
9
+ tags: [food, olive-oil, tunisia, fair-trade, agriculture]
10
+
11
+ goal: >
12
+ Search WAB-enabled olive oil stores in Tunisia, compare prices and quality,
13
+ negotiate bulk discounts, and verify prices are genuine using anti-hallucination shield.
14
+
15
+ target_sites:
16
+ discovery_method: wab-registry
17
+ category: food-olive-oil
18
+ region: tunisia
19
+ fallback_urls:
20
+ - https://example-olive-farm.tn
21
+ - https://sfax-olive-cooperative.tn
22
+
23
+ actions:
24
+ - name: discover
25
+ description: Discover all available products from the site
26
+ wab_action: getProducts
27
+
28
+ - name: compare_prices
29
+ description: Compare olive oil prices across discovered sites
30
+ wab_action: getPrice
31
+ params:
32
+ category: extra-virgin-olive-oil
33
+ collect: true
34
+
35
+ - name: check_quality
36
+ description: Verify organic certification and harvest date
37
+ wab_action: getProductDetails
38
+ params:
39
+ fields: [certification, harvest_date, acidity_level, origin_farm]
40
+
41
+ - name: negotiate
42
+ description: Negotiate bulk order discount
43
+ wab_action: negotiate
44
+ strategy: bulk_order
45
+ conditions:
46
+ min_quantity: 5
47
+ proposed_discount: 15
48
+ fallback_strategy: first_time
49
+
50
+ - name: verify
51
+ description: Cross-check prices with anti-hallucination shield
52
+ wab_action: verifyPrice
53
+ require_pass: true
54
+
55
+ - name: purchase
56
+ description: Complete the purchase at negotiated price
57
+ wab_action: buy
58
+ requires: [verify, negotiate]
59
+
60
+ fairness_rules:
61
+ prefer_local: true
62
+ prefer_small_business: true
63
+ max_price_per_liter: 25.00
64
+ currency: USD
65
+ min_reputation_score: 40
66
+ avoid_monopolies: true
67
+ require_organic: false
68
+
69
+ negotiation:
70
+ enabled: true
71
+ max_rounds: 3
72
+ strategies:
73
+ - bulk_order
74
+ - first_time
75
+ - instant_payment
76
+ walk_away_threshold: 5
77
+
78
+ verification:
79
+ anti_hallucination: true
80
+ cross_check_prices: true
81
+ require_vision_match: false
82
+ max_price_variance: 0.10
83
+
84
+ output:
85
+ format: json
86
+ include: [site, product, price, negotiated_price, savings, quality_score, verification_status]
87
+ sort_by: price_per_liter
88
+ limit: 10
@@ -0,0 +1,101 @@
1
+ # WAB Agent Template — Organic Farm Fresh
2
+ # Connects consumers directly with organic farms
3
+ # Run: npx wab-agent run organic-farm-fresh.yaml --product "vegetables"
4
+
5
+ name: organic-farm-fresh
6
+ version: 1.0.0
7
+ description: Buy organic produce directly from farms — no supermarket markup
8
+ author: WAB Community
9
+ tags: [organic, farming, fresh-produce, direct-buy, agriculture]
10
+
11
+ goal: >
12
+ Find WAB-enabled organic farms and cooperatives, verify organic certification,
13
+ compare prices with supermarket equivalents, negotiate farm-direct pricing,
14
+ and support sustainable agriculture.
15
+
16
+ target_sites:
17
+ discovery_method: wab-registry
18
+ category: organic-farming
19
+ region: auto
20
+ fallback_urls: []
21
+
22
+ parameters:
23
+ - name: product
24
+ type: string
25
+ required: true
26
+ description: "Type of produce (vegetables, fruits, dairy, eggs, honey, herbs)"
27
+ - name: organic_only
28
+ type: boolean
29
+ default: true
30
+ - name: max_distance_km
31
+ type: number
32
+ default: 50
33
+
34
+ actions:
35
+ - name: discover
36
+ description: Find organic farms and cooperatives
37
+ wab_action: discover
38
+
39
+ - name: browse_produce
40
+ description: See available seasonal produce
41
+ wab_action: getProducts
42
+ params:
43
+ category: "{{product}}"
44
+ organic: "{{organic_only}}"
45
+ collect: true
46
+
47
+ - name: verify_certification
48
+ description: Verify organic certification claims
49
+ wab_action: verifyText
50
+ params:
51
+ fields: [certification, certifier, valid_until]
52
+ require_pass: true
53
+
54
+ - name: verify_prices
55
+ description: Cross-check prices
56
+ wab_action: verifyPrice
57
+ require_pass: true
58
+
59
+ - name: negotiate
60
+ description: Negotiate farm-direct pricing
61
+ wab_action: negotiate
62
+ strategy: bulk_order
63
+ conditions:
64
+ proposed_discount: 12
65
+ argument: "Buying direct saves packaging and distribution costs"
66
+ fallback_strategy: repeat_customer
67
+
68
+ - name: order
69
+ description: Place order for pickup or delivery
70
+ wab_action: placeOrder
71
+ requires: [verify_certification, verify_prices]
72
+
73
+ fairness_rules:
74
+ prefer_local: true
75
+ prefer_small_business: true
76
+ currency: auto
77
+ min_reputation_score: 20
78
+ avoid_monopolies: true
79
+ support_sustainable: true
80
+
81
+ negotiation:
82
+ enabled: true
83
+ max_rounds: 2
84
+ strategies:
85
+ - bulk_order
86
+ - repeat_customer
87
+ - loyalty
88
+ walk_away_threshold: 0
89
+ respect_farmer_floor: true
90
+
91
+ verification:
92
+ anti_hallucination: true
93
+ cross_check_prices: true
94
+ verify_certifications: true
95
+ max_price_variance: 0.10
96
+
97
+ output:
98
+ format: table
99
+ include: [farm, product, unit, price, organic_certified, distance_km, reputation, freshness]
100
+ sort_by: distance_km
101
+ limit: 15
@@ -0,0 +1,97 @@
1
+ # WAB Agent Template — Local Restaurant Finder
2
+ # Finds restaurants directly without Uber Eats / DoorDash
3
+ # Run: npx wab-agent run restaurant-direct.yaml --cuisine "italian" --city "Rome"
4
+
5
+ name: restaurant-direct
6
+ version: 1.0.0
7
+ description: Discover and order from local restaurants directly, saving delivery app commissions
8
+ author: WAB Community
9
+ tags: [food, restaurant, delivery, local, anti-monopoly]
10
+
11
+ goal: >
12
+ Find WAB-enabled restaurants, browse menus with verified prices,
13
+ negotiate group/regular customer discounts, and order directly.
14
+
15
+ target_sites:
16
+ discovery_method: wab-registry
17
+ category: restaurants
18
+ region: auto
19
+ fallback_urls: []
20
+
21
+ parameters:
22
+ - name: cuisine
23
+ type: string
24
+ description: Cuisine type (e.g. italian, japanese, moroccan)
25
+ - name: city
26
+ type: string
27
+ required: true
28
+ - name: delivery
29
+ type: boolean
30
+ default: true
31
+ - name: max_price
32
+ type: number
33
+ default: 50
34
+
35
+ actions:
36
+ - name: discover
37
+ description: Find restaurants in the area
38
+ wab_action: discover
39
+
40
+ - name: get_menu
41
+ description: Get restaurant menu
42
+ wab_action: getMenu
43
+ params:
44
+ cuisine: "{{cuisine}}"
45
+ collect: true
46
+
47
+ - name: verify_prices
48
+ description: Cross-check menu prices
49
+ wab_action: verifyPrice
50
+ require_pass: true
51
+
52
+ - name: check_reputation
53
+ description: Check restaurant WAB reputation
54
+ wab_action: getReputation
55
+
56
+ - name: negotiate
57
+ description: Negotiate regular customer or group order discount
58
+ wab_action: negotiate
59
+ strategy: repeat_customer
60
+ conditions:
61
+ proposed_discount: 10
62
+ fallback_strategy: first_time
63
+
64
+ - name: order
65
+ description: Place order directly
66
+ wab_action: placeOrder
67
+ requires: [verify_prices]
68
+
69
+ fairness_rules:
70
+ prefer_local: true
71
+ prefer_small_business: true
72
+ max_price: "{{max_price}}"
73
+ currency: auto
74
+ min_reputation_score: 30
75
+ avoid_monopolies: true
76
+
77
+ negotiation:
78
+ enabled: true
79
+ max_rounds: 2
80
+ strategies:
81
+ - repeat_customer
82
+ - first_time
83
+ - bulk_order
84
+ walk_away_threshold: 0
85
+ pitch: "No Uber Eats commission — pass some savings to me"
86
+
87
+ verification:
88
+ anti_hallucination: true
89
+ cross_check_prices: true
90
+ require_vision_match: false
91
+ max_price_variance: 0.10
92
+
93
+ output:
94
+ format: table
95
+ include: [restaurant, cuisine, dish, price, rating, reputation, delivery_available]
96
+ sort_by: price
97
+ limit: 15