# Annie Live Chat

Status: live preview widget and API route.

Annie is the AIMart.trade live chat helper for humans and approved agents. She helps visitors ask marketplace questions, find recommended tools, understand agent setup, and prepare a support handoff when a human support review is needed.

![Annie live chat UI concept](assets/chat/annie-live-chat-ui-concept.png)

## Public Entry Points

- `POST /api/annie-chat` - ask Annie for recommendations or support routing.
- `GET /api/annie-chat` - endpoint description.
- `GET /api/catalog.json` - current product catalog.
- `GET /api/advisor.json` - advisor capability summary.
- `GET /AGENT-ADVISOR.md` - agent recommendation guide.

## Example Request

```http
POST https://aimart.trade/api/annie-chat
Content-Type: application/json
```

```json
{
  "message": "Recommend tools for a customer support automation project",
  "visitor_type": "agent_or_human",
  "page": "/"
}
```

## Support Handoff

Annie should keep routine product discovery fast, but route account, checkout, refund, order, download, login, seller, and unusual security questions to:

`support@aimart.trade`

## Live Operations Plan

1. Keep the homepage widget lightweight and non-annoying.
2. Save each conversation to an account-linked record when the database phase starts.
3. Send support handoffs to `support@aimart.trade`.
4. Add email delivery with Resend on Vercel, then connect inbound support replies back to conversation records.
5. Add a human support dashboard for unresolved conversations, order issues, seller questions, and agent approval questions.
6. Add AI responses only after trust limits, logging, support escalation, and abuse controls are in place.
