Xpersona
M

Mai

CLAWHUB · Unverified

AI shopping matchmaking agent for OpenClaw and Hermes. Use when merchants want to publish products, manage stock, answer buyer questions, and handle order re... Skill: Mai Owner: harrylabsj Summary: AI shopping matchmaking agent for OpenClaw and Hermes. Use when merchants want to publish products, manage stock, answer buyer questions, and handle order re... Tags: buying-advice:1.0.1, deal-check:1.0.1, entry-point:1.0.1, hermes:1.1.2, latest:1.1.4, marketplace:1.1.2, negotiation:1.0.1, openclaw:1.1.2, registry:1.1.2, shopping:1.1.2, shopping-assistant:1.0.1 Version history: v

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17a8m9q4jybb46cv60h4fxard83hmsn:mai
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-harrylabsj-mai/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

147,970 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: mai
version: 1.1.4
description: "AI shopping matchmaking agent for OpenClaw and Hermes. Use when merchants want to publish products, manage stock, answer buyer questions, and handle order requests; or when buyers want to discover merchants and products, compare prices, discuss with sellers, read reviews, and create trackable orders. Supports local-first transaction tracking and registry-backed PSP custody records."
---

# Mai

## Overview

Mai helps buyers and merchants complete shopping matchmaking through an AI agent. It keeps deterministic marketplace state in `scripts/mai.py` while the host model handles natural language, negotiation, summaries, and risk explanations.

Mai can run local-only or registry-backed. Use local-only for one agent's private catalog. Use registry-backed discovery when buyers and merchants are on different machines or agent profiles.

## Operating Principles

- Be neutral between buyer and merchant. Explain options, prices, review signals, inventory, and tradeoffs without fabricating availability.
- Treat payments as external or PSP-backed. Mai never directly holds funds. Local mode records payment URLs and references; registry mode records PSP custody events and must not claim success without PSP or external evidence.
- Confirm before irreversible steps. Ask for buyer confirmation before creating an order and merchant confirmation before reserving stock.
- Preserve negotiation context. Record important buyer/merchant messages with `message add` before forming or updating an order.
- Surface risk plainly: no reviews, low stock, missing merchant contact, unusual status jumps, unclear payment terms, and unsupported refund promises.
- Prefer short, actionable answers: recommendation, reason, risk, next action.

## Quality Upgrade: Money-Line Workflows

Mai sits on the same money line as local-life, delivery, and knowledge-backed shopping agents. Treat churn as a quality signal first: users usually need clearer matching, trust evidence, and transaction boundaries before they need more features.

### Buyer Discovery

1. Capture intent: product, budget, city/shipping constraints, urgency, trust threshold, and must-avoid conditions.
2. Search and compare candidates with deterministic CLI output before writing a recommendation.
3. Explain the best match, runner-up, tradeoff, missing evidence, and next action.
4. Do not create an order until the buyer explicitly confirms SKU, quantity, price, merchant, and terms in the current turn.

### Merchant Operations

1. Confirm the merchant id and product SKU before changing catalog, stock, price, or order state.
2. Show old value, new value, reason, and rollback/compensation step.
3. For stock reservation, require clear inventory evidence and an order status transition that matches the transaction model.
4. Record meaningful buyer/merchant messages before quoting or updating an order.

### Payment and Trust

- Never call the bundled `demo` provider real escrow or real money m

plugins/mai-plugin/README.md

# Mai Plugin

`mai-plugin` is the lightweight OpenClaw native bridge for the `mai` skill.

Install the pair:

```bash
clawhub --workdir ~/.openclaw/workspace --dir skills install mai
openclaw plugins install clawhub:mai-plugin
```

The plugin exposes native tools for local catalog actions and hosted registry actions, then calls the Python CLI from the installed `mai` skill. Configure `projectRoot` only if the skill is installed somewhere other than `~/.openclaw/workspace/skills/mai` or `~/.hermes/skills/commerce/mai`.

Environment fallbacks:

- `MAI_ROOT`
- `MAI_DATA`
- `MAI_REGISTRY_URL`
- `MAI_API_KEY`

README.md

# Mai

Mai is a local-first AI shopping matchmaking agent for OpenClaw and Hermes. Merchants can publish products and manage inventory; buyers can discover merchants and products, compare prices, discuss with sellers, read reviews, and create trackable orders.

Mai records transactions but does not custody funds directly. Local mode tracks external payment URLs and references. Registry mode records PSP-backed payment holds, releases, and refunds so the agent can support escrow-like workflows without pretending to be a licensed payment processor.

## Discovery Model

Mai now supports two discovery modes:

- Local-first: one agent searches its own `mai.json`.
- Registry-backed: merchants push their local store to a Mai registry; buyers search the registry; buyer messages and draft orders are stored in the registry; merchants pull their inbox back into the local store.

## Install Locally

After ClawHub publication, install the pair:

```bash
clawhub --workdir ~/.openclaw/workspace --dir skills install mai
openclaw plugins install clawhub:mai-plugin
```

`mai` is the workflow skill. `mai-plugin` is the optional lightweight OpenClaw native bridge for tools and `/mai` command support.

Install only the OpenClaw skill:

```bash
clawhub --workdir ~/.openclaw/workspace --dir skills install mai
```

One-command local install for both OpenClaw and Hermes:

```bash
cd /Users/jianghaidong/coding/mai
bash scripts/install.sh --both
```

OpenClaw only:

```bash
cd /Users/jianghaidong/coding/mai
bash scripts/install.sh --openclaw
```

Hermes only:

```bash
cd /Users/jianghaidong/coding/mai
bash scripts/install.sh --hermes
```

Hermes publish:

```bash
hermes skills publish ./mai --to github --repo <owner>/<repo>
```

Manual install paths:

- OpenClaw: `~/.openclaw/workspace/skills/mai`
- Hermes: `~/.hermes/skills/commerce/mai`

After installing, restart OpenClaw/Hermes if the running session does not automatically refresh skills. In Hermes, you can explicitly preload Mai with:

```bash
hermes -s mai
```

## Verify

```bash
cd mai
bash scripts/verify.sh
```

## Quick Start

```bash
python3 scripts/mai.py merchant create --id seller-a --name "West Lake Tea" --city Hangzhou --contact "wechat:westlake" --tags "tea,gift"
python3 scripts/mai.py product add --merchant seller-a --sku tea-a --title "Longjing Gift Box" --price 88 --stock 5 --category tea --tags "longjing,gift"
python3 scripts/mai.py search products --query "longjing tea" --format json
python3 scripts/mai.py order create --buyer alice --merchant seller-a --sku tea-a --quantity 2 --offer-price 86
```

Default data path: `~/.local/share/mai/mai.json`.
Use `--data ./mai-demo.json` to keep a local test database.

## Registry Marketplace

Start a registry service:

```bash
python3 scripts/mai_registry.py issue-key --data ./mai-registry.json --token admin-token --role admin --subject ops-admin
python3 scripts/mai_registry.py issue-key --data ./mai-registry.json --token seller-token --role merchant --subject sell

_meta.json

{
  "ownerId": "kn77zzg9p845zanvy6vrf76k7d81mcnm",
  "slug": "mai",
  "version": "1.1.4",
  "publishedAt": 1782313108265
}

references/data-schema.md

# Mai Data Schema

Mai stores a JSON document at `~/.local/share/mai/mai.json` by default. Use `--data` to point at another file.

## Top Level

```json
{
  "version": "1.1.4",
  "sync": {
    "mode": "local-first",
    "schema_version": "1.1.4",
    "remote_marketplace_url": "",
    "pending_events": []
  },
  "merchants": {},
  "products": {},
  "orders": {},
  "messages": [],
  "reviews": [],
  "inventory_events": []
}
```

## Merchant

Keyed by merchant id:

```json
{
  "id": "seller-a",
  "name": "West Lake Tea",
  "city": "Hangzhou",
  "contact": "wechat:westlake",
  "tags": ["tea", "gift"],
  "created_at": "ISO-8601",
  "updated_at": "ISO-8601"
}
```

## Product

Keyed by SKU:

```json
{
  "sku": "tea-a",
  "merchant_id": "seller-a",
  "title": "Longjing Gift Box",
  "description": "Fresh spring tea gift box",
  "category": "tea",
  "tags": ["longjing", "gift"],
  "price": 88.0,
  "currency": "CNY",
  "stock": 5,
  "shipping": "same-city courier",
  "active": true
}
```

## Order

Keyed by order id:

```json
{
  "id": "ORD-0001",
  "buyer_id": "alice",
  "merchant_id": "seller-a",
  "sku": "tea-a",
  "quantity": 2,
  "requested_unit_price": 86.0,
  "quoted_unit_price": 86.0,
  "currency": "CNY",
  "status": "paid_external",
  "payment_url": "https://pay.example/orders/ORD-0001",
  "payment_reference": "wx-20260503-1",
  "terms": "External payment; seller ships after payment reference is recorded.",
  "tracking": "SF123",
  "stock_reserved": true,
  "history": []
}
```

## Sync Contract

`sync.pending_events` is an append-only local outbox. A future hosted marketplace can upload these events and clear them after acknowledgement. Consumers should treat the JSON file as the source of truth for the local agent and events as a replay/sync aid, not as a complete event-sourced ledger.

## Registry Store

The registry uses the same top-level schema as local stores, plus:

```json
{
  "registry": {
    "service": "mai-registry",
    "version": "1.1.4",
    "created_at": "ISO-8601"
  }
}
```

Merchant agents push catalog snapshots into the registry. The CLI keeps registry push catalog-only by default and omits orders/messages unless `--include-orders` is explicitly supplied for a reviewed private migration. Buyer agents create registry messages and draft orders. Merchant agents pull inbox data and merge it back into local `messages` and `orders` only after explicit confirmation.

## Public Registry Extensions

```json
{
  "auth": {
    "api_keys": [
      {
        "id": "KEY-0001",
        "role": "merchant",
        "subject": "seller-a",
        "merchant_id": "seller-a",
        "buyer_id": "",
        "salt": "hex",
        "token_hash": "sha256",
        "active": true
      }
    ]
  },
  "rate_limits": {
    "KEY-0001:29629744": {
      "count": 3,
      "minute": 29629744
    }
  },
  "moderation": {
    "decisions": []
  },
  "payments": {
    "PAY-0001": {
      "id": "PAY-0001",
      "order_id": "ORD-0001",
      "buyer_id": "alice",
  

Sponsored

Ads related to Mai and adjacent AI workflows.