This article discusses Spotify's approach to building a production-grade multi-agent AI platform for advertising, emphasizing architectural patterns for scalability and reliability. It covers key considerations such as agent boundary definition, tool design for LLMs, deterministic guardrails, and tracing-based evaluation strategies. The insights offer valuable lessons for designing and operating complex AI-powered distributed systems.
Read original on InfoQ ArchitectureSpotify's Ads AI platform utilizes a multi-agent architecture to generate ad scripts, recommend audiences, and ensure policy compliance. This system has seen significant adoption, with over 70% of ads using AI tools and tens of thousands of creatives generated for thousands of advertisers. The core goal is to enable advertisers to describe their desired ad in natural language, abstracting away the complexities of copywriting and music generation. The system leverages Google's ADK (Agent Development Kit) for orchestration and integrates with Vertex AI for LLM capabilities.
The platform architecture consists of several layers:
Importance of Tooling and Data Grounding
A key architectural insight is the explicit grounding of LLM responses using external tools and APIs. Instead of allowing LLMs to "guess" data like geo-interest, specific API endpoints provide factual, deterministic data. This prevents hallucination and ensures accuracy, especially crucial in advertising where precision matters for targeting and budgeting.
Spotify enforces modularity through compile-time checks (Bazel visibility) to prevent unauthorized agent imports, ensuring clear dependencies and preventing tight coupling between agent teams. Shared platform components provide essential cross-cutting concerns like metrics, traceability, and a moderation layer for policy enforcement.