Skip to main content
Glama
skin-routine-agent

skin-routine-agent

README.md
# skin-routine-agent

An MCP server and agent that build **safe, explainable skincare routines** from a short
conversation. It runs in any MCP client (Claude, ChatGPT apps) and in a chat-style web flow.
An **eval harness** checks every answer for safety and reports latency.

> **Status: planning.** The spec is in [`docs/PLAN.md`](docs/PLAN.md) and the current state is
> in [`docs/HANDOFF.md`](docs/HANDOFF.md). The sections below describe the target. They get
> filled in as each milestone ships. The live demo will be at
> `demo.bilalstudio.com/skin-routine-agent`.

## Why this exists

Putting a chat assistant on top of a product catalogue is easy. Trusting what it says is the
hard part. This project separates the two jobs:

- **The LLM handles the conversation.** It asks questions, chooses tools and explains the
  result in plain language.
- **Code handles safety.** Ingredient conflicts, sun protection, allergens, budget, and
  "does this product actually exist" are all checked by deterministic rules. The model is
  never trusted to remember them.

The eval harness then demonstrates that design works. It runs a fixed set of personas through
the agent, checks each answer against the same rules, and reports p50/p95 latency.

## How it works

```
 MCP client (Claude · ChatGPT app · web chat)
        │  conversation
        ▼
 Agent (LLM): asks questions, calls tools, explains
        │  tool calls
        ▼
 MCP server ── profile_skin ── search_products ── build_routine ── check_routine
        │
        ▼
 Core engine (pure TypeScript): catalogue · ingredient tags · safety rules
```

## What's in the repo (target layout)

| Path | What it is |
|---|---|
| `packages/core` | Catalogue loader, ingredient tagging, routine builder, safety rules. Pure functions, no LLM |
| `packages/mcp-server` | MCP server that exposes the core as tools (stdio + Streamable HTTP) |
| `apps/web` | One-page demo: chat flow, routine card, eval results |
| `evals` | Personas, checks, runner, and published results |
| `data` | A small, documented slice of the Open Beauty Facts catalogue |
| `docs` | Plan, handoff, design brief, and architecture decision records |

## Results

_Eval and latency tables are published here once milestone M3 lands._

## What fails

_Written up honestly after the first eval runs. Failures and their fixes are part of the
deliverable._

## Disclaimer

This is an engineering demo, **not medical advice**. Routines are general cosmetic
suggestions based on common ingredient guidance. Anyone with a skin condition, or who is
pregnant, should talk to a dermatologist.

## Data and license

- Code: [MIT](LICENSE).
- Product data comes from [Open Beauty Facts](https://world.openbeautyfacts.org) and is
  available under the [Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/1-0/).
  Attribution and the exact snapshot are documented in `data/README.md`.
- Prices in the demo catalogue are **synthetic** and are marked that way.