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- Copy
.env.exampleto.envand fill in your credentials:terminalcp .env.example .env - Start the dev server:
terminal
pnpm dev - Open http://localhost:3000 to see the campaign dashboard.
API Reference
| Method | Path | Description |
|---|---|---|
| GET | /api/campaigns | List all campaigns |
| POST | /api/campaigns | Create a new campaign |
| GET | /api/campaigns/:id | Get campaign by ID |
| DELETE | /api/campaigns/:id | Delete a campaign |
| POST | /api/campaigns/:id/run | Trigger workflow for a campaign |
| GET | /api/observability/spans | Get 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 configLANGFUSE_PUBLIC_KEY/LANGFUSE_SECRET_KEY— Langfuse tracing credentialsENABLE_CLARIFICATION— Toggle confidence-gate clarification questionsAGENTS_DIR— Directory containing agent YAML config files (default:./agents)
Technology Stack
REAA Packages
| Package | Version | Role |
|---|---|---|
| @reaatech/agent-mesh | 1.0.0 | Core domain types and schemas |
| @reaatech/agent-mesh-registry | 1.0.0 | YAML-based agent registry loader |
| @reaatech/agent-mesh-router | 1.0.0 | MCP dispatch with circuit breaker |
| @reaatech/agent-mesh-confidence | 1.0.0 | Confidence-gated routing decisions |
| @reaatech/agent-mesh-observability | 1.0.0 | Logging, metrics, and tracing |
Third-Party Packages
| Package | Version | Purpose |
|---|---|---|
| @google-cloud/vertexai | 1.12.0 | Vertex AI Gemini models |
| @langchain/core | 1.2.1 | LangChain core primitives for LangGraph |
| @langchain/langgraph | 1.4.6 | State graph workflow orchestration |
| langfuse | 3.38.20 | LLM tracing and observability |
| zustand | 5.0.14 | Client-side state management |
| zod | 4.4.3 | Schema validation |
| @presidio-dev/hai-guardrails | 1.12.0 | Content safety guardrails |
code