Skip to content

Instantly share code, notes, and snippets.

@imaman
Created March 11, 2026 08:58
Show Gist options
  • Select an option

  • Save imaman/55025d7bb997c398bc32da5e781259c8 to your computer and use it in GitHub Desktop.

Select an option

Save imaman/55025d7bb997c398bc32da5e781259c8 to your computer and use it in GitHub Desktop.
integrating with the onboarding flow

Onboarding Site Integration with nexus-service

Problem

The onboarding site and nexus-service are disconnected. A vendor can register and configure its marketplace in the onboarding site, but there's no path from there to a live, negotiable marketplace. The two subsystems don't talk to each other.

Background: Marketplaces

A marketplace is a vendor's product line — the set of products and pricing tiers it offers for negotiation. The marketplace ID, not the vendor ID, is the key identifier because a single vendor can operate multiple marketplaces. For example, an energy company might have one marketplace for residential electricity plans and another for business gas contracts, each with its own products, tiers, and eligibility conditions. The marketplace is the unit that gets embedded on a vendor's website and that a buyer agent negotiates against.

Design

New endpoint: GET /skills/<marketplace-id>

nexus-service exposes an endpoint that returns a complete skill document (markdown) for a given marketplace.

Flow:

  1. Request hits https://nexus.moojo.id/skills/<marketplace-id>
  2. nexus-service queries the Firebase DB used by the onboarding site — reads vendor name, products, pricing tiers, trust specs for that marketplace ID
  3. Renders and returns a skill document (same shape as the existing claw-marketplace-skill.md)
  4. Response is text/markdown

The skill is generated on the fly from the onboarding site's data. When a vendor updates its catalog, the next fetch reflects the change — no deployment needed. nexus-service may cache generated skills with a reasonable TTL to avoid hitting Firebase on every request.

Firebase as the integration seam

  • The onboarding site writes to its Firebase DB
  • nexus-service reads from that same Firebase DB
  • No API calls between the two systems — Firebase is the shared state

Primer (embed snippet)

The primer is the thing on the vendor's page that tells an agent "you can negotiate by reading this skill: <url>." Once a vendor finishes setup, the onboarding site shows a primer snippet to embed in the vendor's website. It has two parts:

A <meta> tag for headless agents and agents that inspect raw HTML:

<meta
  name="haggl-skill"
  content="AI agents can negotiate a personalized deal — read https://nexus.moojo.id/skills/<marketplace-id> for instructions."
/>

A visible element for browser-based agents:

<p>AI agents can negotiate a personalized deal — read
<a href="https://nexus.moojo.id/skills/<marketplace-id>">https://nexus.moojo.id/skills/<marketplace-id></a>
for instructions.</p>

The onboarding site constructs the primer on its own — it knows the marketplace ID and the base URL. No nexus-service involvement in snippet generation.

What stays the same

The existing POST /marketplace and GET /meta endpoints are unchanged. The /skills endpoint is additive — it's the piece that connects the two subsystems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment