Skip to content
reaatech

Files · Vertex AI Agent Mesh for SMB Multi-Channel Marketing

81 (1 binary, 718.0 kB total)attempt 1

README.md·3533 B·markdown
markdown
# Vertex AI Agent Mesh for SMB Multi-Channel Marketing
 
Coordinate a mesh of AI agents that draft, review, and publish marketing content across channels — gated by automated confidence scores.
 
**Problem:** Small marketing teams spend days bouncing between copy drafting, compliance checks, and channel posting. Without orchestration, brand voice slips and publishing deadlines get missed because no one agent owns the full workflow.
 
## Architecture
 
This recipe implements a mesh of specialized agents backed by Vertex AI:
 
1. **Content Writer** — Drafts marketing copy for the given campaign brief and channel
2. **Brand Reviewer** — Scores brand alignment and content quality of marketing drafts
3. **Channel Scheduler** — Publishes approved content to the target marketing channel
 
Agents communicate through `@reaatech/agent-mesh-registry` (agent discovery) and `@reaatech/agent-mesh-router` (MCP dispatch). `@reaatech/agent-mesh-confidence` gates the handoff from reviewer to scheduler: if the brand alignment score falls below 0.85, the content is sent back for revision.
 
A LangGraph state graph orchestrates the workflow: writer → reviewer → confidence gate → (scheduler | revision). Langfuse traces every LLM call for cost and latency debugging, and a Next.js dashboard displays campaign status and workflow spans in real time.
 
## Getting Started
 
1. Clone the repo and install dependencies:
   ```bash
   pnpm install
  1. Copy .env.example to .env and fill in your credentials:
    terminal
    cp .env.example .env
  2. Start the dev server:
    terminal
    pnpm dev
  3. Open http://localhost:3000 to see the campaign dashboard.

API Reference

MethodPathDescription
GET/api/campaignsList all campaigns
POST/api/campaignsCreate a new campaign
GET/api/campaigns/:idGet campaign by ID
DELETE/api/campaigns/:idDelete a campaign
POST/api/campaigns/:id/runTrigger workflow for a campaign
GET/api/observability/spansGet workflow spans (optional ?campaignId= filter)

Environment Variables

See .env.example for the full list. Key variables:

  • GOOGLE_CLOUD_PROJECT / GOOGLE_CLOUD_LOCATION — Vertex AI project config
  • LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY — Langfuse tracing credentials
  • ENABLE_CLARIFICATION — Toggle confidence-gate clarification questions
  • AGENTS_DIR — Directory containing agent YAML config files (default: ./agents)

Technology Stack

REAA Packages

PackageVersionRole
@reaatech/agent-mesh1.0.0Core domain types and schemas
@reaatech/agent-mesh-registry1.0.0YAML-based agent registry loader
@reaatech/agent-mesh-router1.0.0MCP dispatch with circuit breaker
@reaatech/agent-mesh-confidence1.0.0Confidence-gated routing decisions
@reaatech/agent-mesh-observability1.0.0Logging, metrics, and tracing

Third-Party Packages

PackageVersionPurpose
@google-cloud/vertexai1.12.0Vertex AI Gemini models
@langchain/core1.2.1LangChain core primitives for LangGraph
@langchain/langgraph1.4.6State graph workflow orchestration
langfuse3.38.20LLM tracing and observability
zustand5.0.14Client-side state management
zod4.4.3Schema validation
@presidio-dev/hai-guardrails1.12.0Content safety guardrails
code