by langchain-ai
Open-source paid media agent for Google Ads, Meta Ads, Reddit, LinkedIn, X, and OpenAI Ads: analysis, reports, and reviewed changes, built on Deep Agents.
# Add to your Claude Code skills
git clone https://github.com/langchain-ai/paid-media-agentGuides for using ai agents skills like paid-media-agent.
See how paid-media-agent compares with popular alternatives.
paid-media-agent is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by langchain-ai. Open-source paid media agent for Google Ads, Meta Ads, Reddit, LinkedIn, X, and OpenAI Ads: analysis, reports, and reviewed changes, built on Deep Agents. It has 52 GitHub stars.
paid-media-agent's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/langchain-ai/paid-media-agent" and add it to your Claude Code skills directory (see the Installation section above).
paid-media-agent is primarily written in Python. It is open-source under langchain-ai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh paid-media-agent against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Paid Media Agent helps you understand what changed across your ad accounts and decide what to do next. Ask questions in Slack or the terminal, generate performance reports, and prepare campaign changes for review.
It comes with ad platform integrations, analysis and reporting skills, and a paid-media wiki. Connect your accounts, add your company context, and deploy with Managed Deep Agents or on your own infrastructure. You choose the model.
The model decides what to investigate. Code calculates the metrics and checks report figures against the source data. Large responses stay in files; the model receives summaries with the source, date window, and data-quality flags.
Live ad account changes are off by default. Enabling them requires a configured write policy, release checks, and approval from an authorized reviewer. Approval applies to the exact proposal reviewed; editing it requires a new approval.
Requires Python 3.11+ and uv.
git clone https://github.com/langchain-ai/paid-media-agent.git
cd paid-media-agent
uv sync
uv run paid-media-agent setup
The setup command opens a local console for choosing a model, connecting ad accounts, and deploying. No frontend build is needed. The CLI exposes the same connection actions with JSON output if you prefer the terminal.
You can also ask your coding agent to guide setup:
Read AGENTS.md and .agents/skills/paid-media-onboarding/SKILL.md. Help me connect a model, connect my ad accounts, add my business context, and choose a deployment path.
Try it without model keys or ad accounts:
uv run paid-media-agent demo --with-proposal
The offline demo runs a scripted analysis and a simulated budget change against synthetic accounts. It doesn't call a model or touch live campaigns.
Once configured, ask a question or generate a report:
uv run paid-media-agent ask "Which campaigns had the largest increase in cost per lead last week?"
uv run paid-media-agent report --cadence weekly
Questions use your configured model. The report command runs without one, using supported
campaign-performance adapters.
Connect the platforms you use:
| Connection | Platforms |
|---|---|
| Pipeboard MCP | Google Ads, Meta Ads, TikTok Ads, Pinterest Ads, Snap Ads, Reddit Ads, LinkedIn Ads, Google Analytics |
| Direct adapters | X Ads, OpenAI Ads |
Connect any subset. Available tools and metrics depend on platform permissions and API access.
Direct adapters are read-only. Provider data without a supported report mapping can still be
explored through ask.
The included paid-media wiki covers attribution, platform differences, and budget decisions. Your company context gives the agent the goals, conversion definitions, and campaign briefs it needs to interpret your performance.
Ask your coding agent to follow the
business-context skill, or create
workspace/skills/company-context/ yourself using the
template. Add this context before the first real analysis.
Settings live in .env, account mappings in config/accounts.toml, and company context in
workspace/skills/company-context/. All three are Git-ignored.
Choose who operates the infrastructure:
| Managed Deep Agents · recommended | Self-hosted | |
|---|---|---|
| Hosting | LangSmith manages the runtime and sandbox | You run the API and Postgres |
| Slack | Authorize the managed Slack app | Connect your own Slack app |
| Scheduled reports | Managed weekly and monthly schedules | Run the report command with your scheduler |
| Guide | Managed deployment | Self-hosting |
For Managed Deep Agents, choose Deploy agent in setup, or validate and deploy from the terminal:
uv run paid-media-agent mda check
uv run mda deploy .
You'll need a LangSmith organization with MDA access, an API key with deployment permissions, and a model key. Deployment syncs the instructions and skills, provisions the sandbox, and configures Slack. Authorize your workspace when prompted. The sandbox snapshot is reused until its recipe changes. After deployment, open the printed LangSmith URL to inspect your agent.
To self-host, install Docker, configure your model and accounts, then generate API credentials and start the services:
uv run paid-media-agent config generate PAID_MEDIA_API_TOKENS PAID_MEDIA_APPROVAL_SIGNING_KEY
docker compose up -d --build
Compose starts the API and Postgres. Follow the self-hosting guide to connect Slack through Socket Mode or signed HTTP. The Docker image includes PDF libraries.
Managed schedules can post text to Slack once you configure a delivery channel. Report files are available locally and through the self-hosted API. Automatic PDF attachments to Slack are not included.
Managed hosting is paid; model and connector charges depend
on your providers. For local development, uv run mda dev . opens the managed runtime in LangSmith
Studio so you can inspect model calls, tool results, and approval requests.
Both deployment paths use the same agent assembly, built on Deep Agents. It defines the model, tools, middleware, and approval policy. Extend it without maintaining a separate agent for each interface.
Tools are selected from the connected catalog as needed, limiting how many tool definitions the
model reads on each call. Skills guide the investigation and reporting process; edit them as
Markdown in workspace/skills/.
To apply your company's report style, ask your coding agent to update DESIGN.md and the renderer tokens together. The report-design workflow keeps colors, fonts, and components aligned across HTML, charts, and PDFs.
Warehouse connections are optional extensions. To bring in pipeline or revenue data, add a connector and metric mappings to the shared tools. The project doesn't assume a BigQuery, dbt, or CRM schema. See optional data sources.
| Change or explore | Start here |
|---|---|
| Business context, memory, and optional data sources | Customization |
| Agent instructions and paid-media knowledge | instructions.md · workspace/skills/ |
| Report colors, typography, and layout | Report design |
| Tools and runtime | src/paid_media_agent/ · Architecture |
| Managed channels and schedules | channels/ · schedules/ · sandbox/ |
| Configuration and troubleshooting | Operations |
| Development and tests | Contributing · Agent instructions · Coding-agent skills |
Use synthetic data for development. Run make check before submitting a change; see
Contributing for the development dependencies and checks.