# AIMart.trade Agent Instructions

Status: local preview contract for review, not a live production API yet.

## Purpose

AIMart.trade is planned as a secure digital marketplace for AI skills, workflows, datasets, plugins, templates, APIs, protected downloads, and selected NFT or license-backed digital goods.

Use the public site for human browsing. Use this file and the catalog schema for agent-readable discovery.

## Agent Entry Points

Planned production routes:

- `GET /api/health` - read backend readiness, feature gates, and provider configuration status without exposing secrets.
- `GET /AGENT-ADVISOR.md` - read how to create a project suggestion brief.
- `GET /api/advisor.json` - read advisor capability and output shape.
- `GET /api/marketplace-stats.json` - read the marketplace counter feed prepared for live product, seller, and scan metrics.
- `POST /api/advisor-suggest` - request ranked catalog recommendations for a project or problem.
- `POST /api/annie-chat` - ask Annie for live chat style recommendations or support routing.
- `POST /api/accounts` - gated live account creation endpoint.
- `POST /api/seller-applications` - gated seller application endpoint.
- `POST /api/agent-keys` - gated scoped agent key request endpoint.
- `POST /api/internal/refresh-stats` - protected stats refresh trigger for future database-backed counts.
- `GET /api/catalog` - list approved products.
- `GET /api/catalog/search?query=` - search products by use case, category, file type, risk level, and price.
- `GET /api/products/{id}` - read a product detail page and agent metadata.
- `GET /api/products/{id}/license` - confirm permitted use before purchase or execution.
- `POST /api/purchases/{id}/download-token` - request a short-lived protected download token after purchase.
- `POST /api/agents/{id}/run` - run an AIMart-hosted skill when a product supports execution.

## Search Behavior

Agents should prefer listings with:

- `agent_ready: true`
- `scan_status: passed`
- `seller_verified: true`
- clear `inputs`, `outputs`, `license`, and `refund_policy`
- supported file types matching the user's task

If a product requires purchase, do not attempt to download or execute it until a buyer account, valid receipt, or scoped API key is present.

## Advisor Behavior

When an approved agent describes a project, app, workflow, or problem, create a short suggestion brief:

- restate the project in plain language
- recommend 3 to 5 relevant AIMart products
- explain why each product may help
- note possible product gaps if the catalog does not cover the request
- keep the brief owner-reviewable when desired

If demand appears repeatedly for a missing tool, log it as a product gap for verified sellers to build and submit through product review.

## Annie Live Chat Behavior

Agents and humans can ask Annie for quick product recommendations, agent setup guidance, seller storefront help, or support routing. Annie should answer from the catalog and advisor data first, then prepare a handoff to `support@aimart.trade` when a request involves account, order, checkout, refund, login, download, seller, or unusual support issues.

## Current Seed Product Example

```json
{
  "id": "cad-drawing-to-spreadsheet",
  "title": "CAD Drawing to Spreadsheet",
  "category": "Skill",
  "inputs": ["dwg", "pdf", "png", "jpg"],
  "outputs": ["xlsx", "csv", "json"],
  "agent_ready": true,
  "scan_status": "passed",
  "requires_purchase": true
}
```

## Safety Rules

- Treat all seller uploads as untrusted until scanning and review pass.
- Do not execute uploaded code directly from a seller package.
- Prefer protected download URLs with short expiration windows.
- Confirm license terms before using a product for a client or commercial task.
- Escalate unclear, regulated, or risky goods to human review.
- Work inside owner-set trust limits; request fresh approval only for risky paid, upload, wallet, payout, or account-security actions.

## Slogan

AIM your bot at AIMart.trade.
