Skip to content

About

An AI Powered marketing personalization platform using multi-agent system for campaign automation and analysis

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

130 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChainReach AI - Multi-Agent Campaign Orchestration Platform

AI-Powered Marketing Campaign Platform with 5-Agent Orchestration
Intelligent customer segmentation, content generation, and compliance validation for personalized marketing at scale.

License: MIT Azure Node.js Next.js


πŸš€ Overview

ChainReach AI is an intelligent multi-agent system that revolutionizes marketing campaign creation through AI-powered automation. The platform orchestrates 5 specialized AI agents to analyze customers, generate personalized content, and ensure complianceβ€”all through an intuitive dashboard.

✨ Key Features

  • 🎯 AI-Powered Customer Segmentation - Automatically segment customers using Azure OpenAI
  • πŸ“ Dynamic Content Generation - Create personalized messages for each segment
  • βœ… Real-Time Compliance Validation - Azure AI Content Safety with 0-6 severity scoring
  • πŸ“Š Interactive Dashboard - Monitor campaigns, view analytics, and manage workflows
  • πŸ”„ 5-Agent Orchestration - Seamless coordination of specialized AI agents
  • 🌐 Cloud-Native Architecture - Azure Functions, PostgreSQL, and serverless deployment

πŸ—οΈ Architecture

System Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ChainReach AI Platform                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚  β”‚   Agent 1    β”‚  β”‚   Agent 2    β”‚  β”‚   Agent 3    β”‚        β”‚
β”‚  β”‚ Segmentation β”‚β†’ β”‚     RAG      β”‚β†’ β”‚   Content    β”‚        β”‚
β”‚  β”‚   (Node.js)  β”‚  β”‚  (Mocked)    β”‚  β”‚ (Mocked)     β”‚        β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚         ↓                                      ↓               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚  β”‚   Agent 4    β”‚                     β”‚   Agent 5    β”‚        β”‚
β”‚  β”‚ Compliance   │←────────────────────│ Orchestrator β”‚        β”‚
β”‚  β”‚(Azure Func)  β”‚                     β”‚  (Dashboard) β”‚        β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€– Agent Roles

Agent Component Technology Status Purpose
Agent 1 Segmentation Agent Node.js + Azure OpenAI βœ… Working Analyze customers and create intelligent segments
Agent 2 RAG Content Retrieval Node.js 🟑 Mocked Retrieve relevant content from knowledge base
Agent 3 Message Generation GPT-4 🟑 Mocked Generate personalized messages per segment
Agent 4 Compliance Validator Azure Functions + AI Content Safety βœ… Working Validate messages for compliance (0-6 scale)
Agent 5 Campaign Orchestrator Next.js Dashboard βœ… Working Coordinate all agents and manage workflows

πŸ“‚ Project Structure

chainreach-ai/
β”œβ”€β”€ segmentation-agent-node/        # Agent 1: Customer Segmentation
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ services/aiService.ts   # Azure OpenAI integration
β”‚   β”‚   β”œβ”€β”€ controllers/            # API endpoints
β”‚   β”‚   └── config/                 # Database & AI config
β”‚   └── README.md
β”‚
β”œβ”€β”€ person4-compliance-azfn/        # Agent 4: Compliance Validation
β”‚   β”œβ”€β”€ ValidateMessages/           # Azure Function
β”‚   β”‚   └── index.js                # Content Safety API
β”‚   └── README.md
β”‚
β”œβ”€β”€ person5-orchestrator-dashboard/ # Agent 5: Dashboard & Orchestration
β”‚   β”œβ”€β”€ app/                        # Next.js 14 App Router
β”‚   β”‚   β”œβ”€β”€ campaign/               # Campaign management pages
β”‚   β”‚   β”œβ”€β”€ api-explorer/           # API testing interface
β”‚   β”‚   └── analytics/              # Real-time analytics
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   └── useOrchestrator.ts      # 5-agent orchestration logic
β”‚   └── README.md
β”‚
β”œβ”€β”€ person2-rag-nodejs/             # Agent 2: RAG (Mocked)
β”œβ”€β”€ MessageGeneration/              # Agent 3: Content Gen (Mocked)
β”‚
β”œβ”€β”€ .env.template                   # Environment variables template
β”œβ”€β”€ chainreach-ai.sln               # Visual Studio solution
└── README.md                       # This file

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Azure Account with:
    • Azure OpenAI Service (GPT-4o deployment)
    • Azure AI Content Safety
    • Azure PostgreSQL Flexible Server
  • PowerShell 7+ (for deployment scripts)
  • Git

1️⃣ Clone the Repository

git clone https://github.com/nermeennasim/chainreach-ai.git
cd chainreach-ai

2️⃣ Environment Setup

# Copy environment template
cp .env.template .env

# Configure your Azure credentials:
# - AZURE_OPENAI_ENDPOINT=<your-endpoint>
# - AZURE_OPENAI_KEY=<your-key>
# - DB_HOST=<your-postgres-host>
# - DB_PASSWORD=<your-password>

3️⃣ Start Agent 1 - Segmentation Agent

cd segmentation-agent-node
npm install
npm run dev
# Server runs on http://localhost:3000

4️⃣ Deploy Agent 4 - Compliance Validator

cd person4-compliance-azfn
func start
# Azure Function runs on http://localhost:7071

5️⃣ Launch Agent 5 - Dashboard

cd person5-orchestrator-dashboard
npm install
npm run dev
# Dashboard runs on http://localhost:3001

6️⃣ Create Your First Campaign

  1. Open dashboard: http://localhost:3001
  2. Navigate to Campaign β†’ Create Campaign
  3. Click "Run Demo Campaign"
  4. Watch as all 5 agents orchestrate to:
    • Segment customers (Agent 1)
    • Retrieve content (Agent 2 - mocked)
    • Generate messages (Agent 3 - mocked)
    • Validate compliance (Agent 4)
    • Display results (Agent 5)

πŸ“Š Key Features

🎯 Customer Segmentation (Agent 1)

// Automatic AI-powered segmentation
POST /api/segment/analyze
{
  "customers": [...],  // Your customer data
  "criteria": "behavioral, demographic, value-based"
}

// Returns intelligent segments like:
// - High-Value Engaged Customers
// - At-Risk Churners
// - New User Onboarding

βœ… Compliance Validation (Agent 4)

// Azure AI Content Safety with 0-6 severity scale
POST /api/ValidateMessages
{
  "messages": ["Your message content..."]
}

// Returns:
{
  "overallCompliance": "Pass",
  "approvalRate": 85.5,
  "results": [
    {
      "message": "...",
      "compliant": true,
      "hateScore": 0,
      "violenceScore": 0,
      "selfHarmScore": 0,
      "sexualScore": 0
    }
  ]
}

πŸ“ˆ Real-Time Analytics

  • Campaign performance metrics
  • Compliance approval rates
  • Segment distribution charts
  • Message validation history

πŸ› οΈ Technology Stack

Frontend

  • Next.js 14 - App Router, Server Components
  • React 18 - UI components
  • Tailwind CSS - Styling
  • Recharts - Analytics visualization
  • Lucide React - Icons

Backend

  • Node.js + Express - Segmentation API
  • Azure Functions - Compliance validation
  • TypeScript - Type safety

AI & ML

  • Azure OpenAI - GPT-4o for segmentation
  • Azure AI Content Safety - Compliance validation
  • RAG Architecture - Content retrieval (planned)

Database & Storage

  • PostgreSQL - Customer & segment data
  • Azure Blob Storage - File storage (planned)

DevOps

  • Azure App Service - Node.js hosting
  • Azure Functions - Serverless compute
  • GitHub Actions - CI/CD (planned)

πŸ” Security

  • βœ… All secrets removed from documentation
  • βœ… Environment variables for credentials
  • βœ… Azure Content Safety for message validation
  • βœ… Severity scoring (0-6 scale) for compliance
  • βœ… Secure database connections with SSL

Note: Never commit .env files or expose API keys in code.


πŸ“– Documentation

Quick Start Guides

Component Documentation

API Documentation

Deployment


🎯 Use Cases

1. E-Commerce Personalization

  • Segment customers by purchase behavior
  • Generate personalized product recommendations
  • Validate promotional messages for compliance

2. Financial Services

  • Risk-based customer segmentation
  • Compliance-validated financial advice
  • Regulatory adherence (GDPR, CCPA)

3. Healthcare Communications

  • Patient engagement segmentation
  • HIPAA-compliant messaging
  • Personalized health tips

4. SaaS Product Marketing

  • User engagement analysis
  • Feature adoption campaigns
  • Churn prevention messaging

🚧 Current Status

βœ… Completed Features

  • Agent 1: AI-powered customer segmentation
  • Agent 4: Azure Content Safety compliance validation
  • Agent 5: Dashboard with campaign orchestration
  • Mock implementations for Agent 2 & 3
  • Real-time analytics and charts
  • API Explorer for testing
  • Security: All secrets removed from repo

πŸ”„ In Progress

  • Agent 2: RAG content retrieval (currently mocked)
  • Agent 3: GPT-4 message generation (currently mocked)
  • End-to-end integration testing
  • Production deployment automation

🎯 Planned Features

  • Multi-channel campaign support (Email, SMS, Push)
  • A/B testing framework
  • Advanced analytics dashboard
  • Campaign scheduling and automation
  • Webhook integrations
  • Multi-tenant support

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘₯ Team

Built for the Microsoft AI Hackathon 2025 by Team ChainReach

  • Segmentation Agent - AI-powered customer analysis
  • RAG Service - Knowledge base integration
  • Content Generation - Personalized messaging
  • Compliance Validator - Azure Content Safety integration
  • Orchestrator Dashboard - Campaign management interface

πŸ“ž Support


πŸ™ Acknowledgments

  • Microsoft Azure - Cloud infrastructure and AI services
  • OpenAI - GPT-4 language models
  • Azure AI Content Safety - Compliance validation
  • Next.js Team - Excellent React framework
  • Vercel - Development tools and hosting

πŸŽ“ Learn More

Azure OpenAI

Azure AI Content Safety

Next.js & React


⭐ Star this repo if you find it useful! ⭐

Made with ❀️ for the Microsoft AI Hackathon 2025

Website β€’ Documentation β€’ API Reference

About

An AI Powered marketing personalization platform using multi-agent system for campaign automation and analysis

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages