Multi-Agent Architecture for Intelligent Advertising Media Planning
spotify · Media & Entertainment · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Advertising media planning
Spotify needed a unified decision layer for campaign planning because each buying channel had fragmented workflow logic despite shared backend infrastructure.
Constraints:
- Planning logic had drifted across Direct, Self-Serve, Programmatic, Ads Manager, Salesforce, Slack, and internal tools.
- Campaign planning combines advertiser goals, inventory, pacing, ad products, budgets, and schedule constraints.
- The replacement needed to produce data-driven plans in seconds, not minutes.
- The system had to ground recommendations in real campaign data and preserve session context.
Architecture
Ads AI uses Google ADK 0.2.0 and Vertex AI Gemini 2.5 Pro to turn natural-language campaign requirements into media plans. A RouterAgent determines which information is present, specialized resolver agents fill goal, audience, budget, and schedule fields, and a MediaPlannerAgent uses historical campaign-performance data from PostgreSQL and cache-backed tools to produce structured recommendations.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR routeragent["RouterAgent"] --> goalresolveragent["GoalResolverAgent"] routeragent --> audienceresolveragent["AudienceResolverAgent"] routeragent --> budgetagent["BudgetAgent"] routeragent --> scheduleagent["ScheduleAgent"] goalresolveragent --> mediaplanneragent["MediaPlannerAgent"] audienceresolveragent --> mediaplanneragent budgetagent --> mediaplanneragent scheduleagent --> mediaplanneragent mediaplanneragent --> historical-performance-store["Historical Performance Store"] mediaplanneragent --> structured-output-contract["Structured Output Contract"]
Components
| Component | Role | Interacts with |
|---|---|---|
RouterAgent |
Determines which campaign fields are already present and which agents need to run. | GoalResolverAgent, AudienceResolverAgent, BudgetAgent, ScheduleAgent |
GoalResolverAgent |
Maps advertiser intent to campaign objectives and ad categories. | MediaPlannerAgent |
AudienceResolverAgent |
Extracts targeting criteria from predefined taxonomies. | MediaPlannerAgent |
BudgetAgent |
Parses budget formats and converts values for internal processing. | MediaPlannerAgent |
ScheduleAgent |
Parses campaign dates and relative schedule expressions. | MediaPlannerAgent |
MediaPlannerAgent |
Scores historical campaigns and produces optimized ad-set recommendations. | Historical Performance Store, Structured Output Contract |
Historical Performance Store |
PostgreSQL plus in-memory cache containing previous campaign-performance data. | MediaPlannerAgent |
Structured Output Contract |
Constrains recommendations into parseable downstream output. | — |
Data flow
A request enters the RouterAgent, which conditionally invokes only the resolver agents needed for missing fields. Goal, audience, budget, and schedule agents resolve campaign constraints through tool calls and taxonomies. The MediaPlannerAgent then applies weighted rules over historical performance data and emits structured ad-set recommendations.
Why this architecture
Spotify selected a multi-agent decision layer because media planning is too context-dependent for duplicated channel workflows or a giant rule engine. Conditional routing reduces unnecessary LLM calls, and the planner's tool-backed access to historical data keeps outputs grounded.
Models used: Gemini 2.5 Pro
Scale
- The workflow improved from 15-30 minutes to 5-10 seconds.“The solution reduced media plan creation time from 15-30 minutes to 5-10 seconds”summary, stated
- The MediaPlannerAgent used thousands of previous campaigns.“using a heuristics-based engine backed by historical performance data from thousands of previous campaigns.”summary, stated
- Budget tiers generated 1 to 4-5 recommendations depending on spend.“dynamically scaling the number of recommendations based on budget size (€0-1,000 yields 1 recommendation, €1,000-5,000 yields 2, €5,000-15,000 yields 3”summary, stated
Alternatives considered (roads not taken)
Build deterministic workflows per advertising channel
Rejected because: Hard-coded workflows could not handle probabilistic, constantly changing advertising logic across channels.
Create a giant rules engine
Rejected because: Spotify needed shared signals, reasoning, and orchestration over existing APIs rather than another static decision tree.
Run every agent for every request
Rejected because: RouterAgent conditional execution avoided unnecessary LLM calls.
Patterns
multi-agent-orchestration (architecture)
Ads AI separates routing, field resolution, and media-planning optimization into specialized agents.
tool-use-orchestration (architecture)
Agents use Google ADK FunctionTool integrations to access Spotify advertising data and services.
structured-output-contract (reliability)
The planner emits structured media-plan outputs rather than free-form recommendations.
Tradeoffs
Adopt agentic planning
Chose A multi-agent programmable decision layer over More per-channel deterministic workflows.
Rationale: The advertising logic was probabilistic, changing, and shared across surfaces.
Trade architecture complexity for maintainability and latency
Chose Specialized agents with parallel execution over A monolithic prompt.
Rationale: The source explicitly frames this as a complexity tradeoff for latency, maintainability, and avoiding monolithic prompts.
Gotchas (what bit them)
Backend consolidation did not prevent fragmented decision logic.
Root cause: Each advertising channel implemented planning and optimization decisions separately.
Resolution: Spotify moved the decision logic into a shared programmable agent layer.
Media planning became a proving ground because complexity concentrated there.
Root cause: Sales, advertisers, inventory, pacing, and ad products all affect early decisions.
Resolution: Spotify started Ads AI with media planning before downstream booking and optimization.
Evaluation
The public case reports latency and describes individual-agent testability, but does not provide a full quantitative evaluation harness.
Metrics: 15-30 minutes reduced to 5-10 seconds · thousands of historical campaigns used for recommendations
Outcomes
- Spotify created a shared agentic media-planning layer across fragmented advertising channels.
- Planning moved from manual multi-minute forms to a seconds-long conversational experience.
- The system grounded recommendations in historical performance data rather than unsupported model output.
The source names thousands of historical campaigns and a 5-10 second planning target.