Skip to content

athens

This is opencompact, a web based agent that checks the ingredients of cosmetics products for regulatory compliance by multiple countries and juridictions.

Core trick

Runs pasted INCI ingredient lists through a deterministic jurisdiction rulebook, with Argon adding cited explanations per FDA, California, and EU rule.

Tags

Description

This is opencompact, a web based agent that checks the ingredients of cosmetics products for regulatory compliance by multiple countries and juridictions. The problem is that influencers and brands want to follow trends and launch new products, but often they may use non compliant ingredients, or they may only be considered compliant in one country (safe enough to use probably, but not legal). Creators/brand developers such as alexis have discussed this https://medium.com/authority-magazine/alexis-eizinas-of-silvering-five-things-you-need-to-know-to-succeed-in-the-modern-beauty-industry-9e1aa4f7ad93 There are also internal compliance regulators at the companies that review before the governments do https://www.linkedin.com/in/clairebing/ This is a good use case for argon because ultimately, the regulatory documents are quite large, and a full ingredient and regulation review benefits from the huge context capability in one shot. One more thing, I included a 3d dupe maker, so creators can envision new products based on others they already admire.
ziadgit/opencompact★ 00 forksTypeScriptCreated Oct 25, 2026 · last push Oct 25, 2026

README excerpt

# OpenCompact

Paste a beauty product (link, ingredient list, or question). An AI agent tells you whether it can be sold in the **US (FDA)**, **California** and the **EU**, explains why with citations, and designs a **compliant dupe** you can inspect in 3D next to the original. Every result is a draft, not legal advice.

Live: [opencompact.vercel.app](https://opencompact.vercel.app) · What it is, explained: [opencompact.vercel.app/about](https://opencompact.vercel.app/about)

## Setup
1. `npm install`
2. `cp .env.example .env.local` and set `GEMINI_API_KEY` (model: `gemini-4-argon`).
3. `npm run dev` → http://localhost:3000 (and `/about`).
4. No key? The app runs in **rules-only mode**: presets and pasted INCI lists are checked by the deterministic rulebook.
5. Check the rulebook: `npx tsx scripts/check-presets.ts`. Note: a `GEMINI_API_KEY` exported in your shell overrides `.env.local` (`unset GEMINI_API_KEY` if it is a different key).

## Architecture
- **Agent**: CopilotKit v2 `BuiltInAgent` (`google/gemini-4-argon`) served by `createCopilotRuntimeHandler` at `app/api/copilotkit/[[...slug]]`; five server tools in `lib/agent/tools.ts` (`read_product_url`, `audit_formulation`, `lint_label`, `design_dupe`, `draft_mocra_report`).
- **Structured AI**: tools call Argon directly via `@google/genai` (`lib/agent/argon.ts`) with JSON schemas from zod 4, plus URL context for product pages.
- **Trust layer**: `lib/rules/` is a hard-coded rulebook (ingredients, label, MoCRA). `crosschec

Team