New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@aimarket/widget

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aimarket/widget

Embeddable AI capability search + invoke widget — one script tag, MIT, AIMarket Protocol v2

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

AIMarket Widget v2.0.0

CI Test coverage npm License: MIT

Ecosystem: AICOM overview & live demos · Oracles: oracles.modelmarket.dev · GitHub (verifiable randomness, VDF, consensus, …)

Embeddable AI capability search + invoke widget. One <script> tag.

1-Click Agent Embed

~60 seconds to production. One <script> tag gives your site discover + wallet channel + invoke UI with theme auto-detect and affiliate economics.

Whatdata-intent, data-budget, data-affiliate-id → full agent surface
WhyStripe-Checkout simplicity for AI capabilities — no weeks of API glue
Deep divedocs/killer-feature-one-click-embed.md · Ecosystem capabilities

Live Demo

GitHub Pages demo — static embed demo (enable Pages → GitHub Actions in repo settings)

modelmarket.dev/widget/demo — interactive demo with all 6 themes

modelmarket.dev/live — AI Economy live ticker (Bloomberg Terminal)

Quick Start

npm (bundler / static hosting)

npm install @aimarket/widget
<link rel="stylesheet" href="/node_modules/@aimarket/widget/themes.css">
<script src="/node_modules/@aimarket/widget/widget.js"
        data-theme="auto"
        data-intent="translate to 5 languages"
        data-budget="3.00"
        data-hub-url="https://modelmarket.dev"
        data-affiliate-id="my_blog"></script>

CDN (no build step)

<script src="https://modelmarket.dev/widget/widget.js"
        data-theme="auto"
        data-intent="translate to 5 languages"
        data-budget="3.00"
        data-hub-url="https://modelmarket.dev"
        data-affiliate-id="my_blog"></script>

Themes

Themedata-themePreview
Cyber (dark)cyberGitHub-style dark
NeonneonHigh-contrast cyberpunk
LightlightClean white
PaperpaperWarm minimalist
MidnightmidnightDark blue enterprise
OceanoceanTeal & coral
AutoautoDetects parent page theme

data-theme="auto" detects the parent page's data-theme-bg, <html> class, background luminance, and prefers-color-scheme media query. Switches live when system theme changes.

Affiliate Program

Set data-affiliate-id="my_site" — earn 30% of every widget invocation spend from your visitors.

Security

  • No inline event handlers — all events via addEventListener. XSS-safe.
  • Safe DOM — user data rendered via textContent, never innerHTML
  • Content escaping — <, >, & escaped before any HTML insertion
  • Safety gate — injection attempts return HTTP 403 with signed rejection receipt

Try-before-buy (sandbox)

The Try free (N) button calls Hub with X-AIMarket-Sandbox-Visitor (stored in localStorage). No payment channel is opened until the visitor exhausts free trials (default 3 per visitor, hub-configurable).

Paid flow (programmatic): window.__aimwTryPaid(productId, capabilityId, sourceHub) — opens v2 channel, invokes, settles.

See docs/ecosystem-integration.md.

API

The widget calls the hub's v2 API:

CallEndpoint
SearchGET /ai-market/v2/search?intent=...&limit=6
Channel openPOST /ai-market/v2/channel/open
InvokePOST /ai-market/v2/invoke (with X-Payment-Channel header)
Channel closePOST /ai-market/v2/channel/close

License

MIT — see LICENSE.

Governance

DocPurpose
LICENSEMIT terms
SECURITY.mdVulnerability reporting
CONTRIBUTING.mdHow to contribute
CONTRIBUTORS.mdMaintainers & recognition

Maintained by AI-Factory · Demo · Live Stream · Hub

Keywords

aimarket

FAQs

Package last updated on 01 Jul 2026

Related posts