File size: 2,713 Bytes
94c6874
 
 
 
 
 
 
 
 
0f2d1cb
842ca78
 
 
0f2d1cb
 
842ca78
0f2d1cb
842ca78
0f2d1cb
842ca78
0f2d1cb
842ca78
0f2d1cb
 
 
 
842ca78
0f2d1cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
title: MerchFlow AI
emoji: πŸ‘Ÿ
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
---

# MerchFlow AI

![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
![Python](https://img.shields.io/badge/Made%20with-Python-blue.svg)
![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=flat&logo=fastapi)
![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat&logo=docker&logoColor=white)

MerchFlow AI is a high-performance, multi-agent orchestration system designed to automate the generation of premium e-commerce product listings. By synergizing Computer Vision, Retrieval Augmented Generation (RAG), and Large Language Models (LLMs), it transforms raw product images into SEO-optimized market-ready content.

## πŸ—οΈ Architecture Flow

The system employs a sophisticated event-driven architecture orchestrated by **FastAPI**:

1.  **πŸ‘οΈ Visual Agent (Gemini 1.5)**
    *   **Function**: Zero-shot image analysis.
    *   **Process**: Extracts high-fidelity visual attributes including dominant color palettes, stylistic classifications, and granular item types.
    *   **Engine**: Google Gemini 1.5 Flash (Vision).

2.  **🧠 Memory Agent (Pinecone)**
    *   **Function**: Semantic Search & RAG.
    *   **Process**: Vectorizes visual tags to query a high-dimensional index, retrieving historically high-performing SEO keywords and market trends relevant to the product.
    *   **Engine**: Pinecone Vector Database.

3.  **✍️ Writer Agent (Llama 3)**
    *   **Function**: Creative Synthesis.
    *   **Process**: Fuses visual data with retrieved market intelligence to generate persuasive, conversion-focused title, description, and feature bullets.
    *   **Engine**: Meta Llama 3 (via Groq Cloud).

4.  **βš™οΈ Orchestrator (FastAPI)**
    *   **Function**: Async Pipeline Management.
    *   **Process**: Handles non-blocking agent execution, error propagation, and API lifecycle management.

5.  **πŸ”— Post-Processing (n8n)**
    *   **Function**: Automation Webhook.
    *   **Process**: Triggers downstream workflows (database storage, Shopify API integration) via secure webhooks upon successful generation.

## πŸš€ Complete Setup

To run this system locally, ensure you have the following environment variables configured in your `.env` file:

```env
GEMINI_API_KEY=your_gemini_key
GROQ_API_KEY=your_groq_key
PINECONE_API_KEY=your_pinecone_key
N8N_WEBHOOK_URL=your_n8n_webhook_url
```

## ⚑ Quick Start

### 1. Installation
Install the required dependencies using pip:

```bash
pip install -r requirements.txt
```

### 2. Execution
Launch the FastAPI server:

```bash
python main.py
```

The API will be available at `http://localhost:7860`.