---
title: "Building Synter with Amp by Sourcegraph"
description: "How we built an AI media agent for cross-platform ads using Amp agentic coding framework, frontier models, and 6 major ad platform APIs."
date: "2025-11-11"
draft: false
tags:
  - "Engineering"
  - "AI Agents"
---

## Why 'AI Media Agent'?

Traditional paid media management is broken. Agencies charge 10-15%
fees, campaigns take weeks to launch, and optimization happens
manually (if at all). We saw an opportunity to build an
AI media agent that could:

- Plan campaigns from a brief using frontier LLMs
(GPT-4o, Claude 3.5 Sonnet)
- Launch across 43 canonical ad platforms (Google, Meta,
LinkedIn, Microsoft, TikTok, Reddit, X, Pinterest, Snapchat,
DV360, and more) simultaneously
- Optimize autonomously with explainable changes
and rollback

The result: autonomous media buying that&apos;s
faster, cheaper, and more data-driven than human-only management.

## Enter Amp: Agentic Coding Framework

We chose

Amp by Sourcegraph

as our development framework because it&apos;s purpose-built for
agentic systems. Amp provides:

- Task routing: Send briefs to planning agents,
send optimization requests to analysis agents
- Tool orchestration: Agents can call Google Ads
API, LinkedIn Campaign Manager, Meta Marketing API, etc.
- Audit trail: Every agent action is logged with
rationale and metrics
- BYOK model support: Swap OpenAI for Anthropic or
Google without rewriting code

Instead of building task queues, API wrappers, and logging systems
from scratch, we used Amp&apos;s primitives and focused on
domain logic.

## Architecture: Multi-Agent System

Synter uses a multi-agent architecture where each
agent has a specialized role:


**1. Research Agent (Long-Context Models)**

Model: Claude 3.5 Sonnet (200k token context)

Responsibilities: Analyze website content,
competitor research, industry reports. Extract ICP signals, pain
points, and messaging angles.

**2. Planning Agent (Reasoning Models)**

Model: GPT-4o or o-series

Responsibilities: Take campaign brief +
research → generate channel mix, budget allocation, audience
targeting, keyword lists, ad copy variants.

**3. Creative Agent (Vision Models)**

Model: Gemini 1.5 Pro (multimodal)

Responsibilities: Generate ad copy (headlines,
body, CTAs), analyze existing creative for patterns, suggest
image/video concepts.

**4. Optimization Agent (Fast Reasoning Models)**

Model: GPT-4o or Llama 3.3 (cost-effective)

Responsibilities: Monitor performance daily,
recommend budget shifts, creative rotations, negative keywords,
audience adjustments.

## Platform Integrations: 16 Ad Platforms, 1 Unified Interface

Building native integrations with

Google Ads, Microsoft Ads, LinkedIn, Meta, Reddit, X, and more

required wiring OAuth flows, API clients, and entity normalization.

OAuth & Scopes
Each platform requires OAuth 2.0 with specific scopes. We built a
unified OAuth handler in Amp that:

- Redirects users to platform authorization pages
- Stores encrypted tokens (access + refresh) in the database
- Auto-refreshes tokens before expiry

Agent Tools for Platform Actions
Amp&apos;s tool system lets agents call platform APIs as functions.
Example tools:

- create_google_ads_campaign() → Creates campaign + ad
groups + ads
- update_linkedin_budget() → Adjusts daily budget
- add_negative_keywords() → Adds negatives at
campaign/ad group level

## Results: Faster, Cheaper, Smarter

With Amp powering Synter&apos;s agentic architecture, we&apos;ve
achieved:

## What's Next: Agentic Ad Buying at Scale

We&apos;re continuing to expand Synter&apos;s capabilities with Amp:

- TikTok and Snapchat integrations (Q1 2026)
- Multi-touch attribution models (time-decay,
position-based)
- Advanced creative testing (image generation,
video analysis)
- Custom model fine-tuning on customer-specific
conversion data

If you&apos;re building agentic systems or exploring
autonomous media buying, we&apos;d love to hear
from you.
