Case Study · Personal Project
Xpanse.ai
A multi-agent marketing intelligence platform, engineered like production software: seven specialized agents across two checkpointed pipelines, grounded retrieval, and human-in-the-loop control at every strategic decision.
Overview
Most “AI agent” projects work in a demo and fall apart on real inputs: state drifts between steps, one bad tool call derails the run, and there’s no safe place for a human to step in. Xpanse.ai is my answer to that gap — a marketing intelligence platform that treats an autonomous agent as software to be engineered, with the same rigor I’d apply to any backend.
It runs two orchestrated pipelines: one that generates data-driven campaign strategy, and one that produces culturally-adapted content transcreation. Across both, seven specialized agents share a typed state, ground their output in retrieval, and defer to human judgment before committing — staying predictable, recoverable, and on-brand under conditions that break naive chains.
System Architecture
One request, two orchestrated pipelines, seven agents — coordinated over a single checkpointed state graph and a shared grounding layer.
The StateGraph fans work out to the strategy and transcreation pipelines, each agent grounded in Bedrock Nova Pro reasoning, dual Knowledge Bases, and live web search — with a human-in-the-loop feedback path that resumes the graph from its last checkpoint.
Agent Pipelines
Two orchestrated flows, seven agents — each with one clearly-scoped job.
Campaign Strategy Engine
Turns historical performance data into a validated, budgeted campaign strategy.
Content Transcreation Pipeline
Adapts messaging for regional markets behind an authenticity quality gate.
How It Works
Checkpointed StateGraph
The system is a LangGraph StateGraph with checkpointing rather than a linear chain. Every node reads and writes a shared, typed state object, so control flow — loops, branches, and revisions — is explicit, inspectable, and resumable from any point.
Bedrock Nova Pro reasoning
All seven agents reason through Amazon Bedrock's Nova Pro model via the Converse API — a single, governed inference path instead of scattered SDK calls, which keeps behavior consistent and costs observable across the graph.
Dual Knowledge Bases + live search
Two specialized Knowledge Bases separate campaign archives from brand information, keeping retrieval both grounded and on-brand. Tavily web search closes the freshness gap so strategy reflects current market conditions, not just the corpus.
Human-in-the-loop control
The graph pauses at strategic checkpoints, accepts free-text feedback, auto-classifies the user's intent, and routes the revision to the relevant agent — resuming from the checkpoint instead of restarting the run.
Engineering Decisions
The choices that separate a reliable system from a fragile one.
State synchronization & checkpointing
A single typed state is the source of truth across every agent, and LangGraph checkpointing persists progress. Together they eliminate the context drift that breaks naive multi-agent chains — and make any run resumable.
Human-in-the-loop routing
Instead of running autonomously, the graph interrupts at decision points and classifies free-text feedback to route revisions precisely. That turns the LLM into a supervised collaborator — the line between a demo and a business tool.
Grounded, on-brand retrieval
Separating campaign-archive and brand Knowledge Bases keeps answers factual and on-voice, while Tavily adds current context. Grounding is a first-class node in the graph, not a bolt-on, which keeps hallucination in check.
Quality gates over hope
The Cultural Critic assigns a numeric authenticity score that drives an iteration loop until output clears a threshold. Quality is enforced by the architecture rather than assumed — a deterministic gate around a probabilistic model.
Stack
Orchestration
AI & Retrieval
Interface & Runtime
Deployment