AI-Powered Marketing Campaign Platform with 5-Agent Orchestration
Intelligent customer segmentation, content generation, and compliance validation for personalized marketing at scale.
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.
- π― 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
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 | 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 |
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
- 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
git clone https://github.com/nermeennasim/chainreach-ai.git
cd chainreach-ai# 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>cd segmentation-agent-node
npm install
npm run dev
# Server runs on http://localhost:3000cd person4-compliance-azfn
func start
# Azure Function runs on http://localhost:7071cd person5-orchestrator-dashboard
npm install
npm run dev
# Dashboard runs on http://localhost:3001- Open dashboard: http://localhost:3001
- Navigate to Campaign β Create Campaign
- Click "Run Demo Campaign"
- 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)
// 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// 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
}
]
}- Campaign performance metrics
- Compliance approval rates
- Segment distribution charts
- Message validation history
- Next.js 14 - App Router, Server Components
- React 18 - UI components
- Tailwind CSS - Styling
- Recharts - Analytics visualization
- Lucide React - Icons
- Node.js + Express - Segmentation API
- Azure Functions - Compliance validation
- TypeScript - Type safety
- Azure OpenAI - GPT-4o for segmentation
- Azure AI Content Safety - Compliance validation
- RAG Architecture - Content retrieval (planned)
- PostgreSQL - Customer & segment data
- Azure Blob Storage - File storage (planned)
- Azure App Service - Node.js hosting
- Azure Functions - Serverless compute
- GitHub Actions - CI/CD (planned)
- β 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.
- Segment customers by purchase behavior
- Generate personalized product recommendations
- Validate promotional messages for compliance
- Risk-based customer segmentation
- Compliance-validated financial advice
- Regulatory adherence (GDPR, CCPA)
- Patient engagement segmentation
- HIPAA-compliant messaging
- Personalized health tips
- User engagement analysis
- Feature adoption campaigns
- Churn prevention messaging
- 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
- Agent 2: RAG content retrieval (currently mocked)
- Agent 3: GPT-4 message generation (currently mocked)
- End-to-end integration testing
- Production deployment automation
- Multi-channel campaign support (Email, SMS, Push)
- A/B testing framework
- Advanced analytics dashboard
- Campaign scheduling and automation
- Webhook integrations
- Multi-tenant support
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
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
- π§ Email: support@chainreach.ai
- π Issues: GitHub Issues
- π Docs: Documentation Index
- 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
β Star this repo if you find it useful! β
Made with β€οΈ for the Microsoft AI Hackathon 2025
Website β’ Documentation β’ API Reference