sasha volkov

Building Custom AI Agents for Marketing Automation

september 22, 2025

The word "agent" has become the most overused term in AI marketing. Every chatbot is suddenly an "agent." Every automation is "agentic." Every tool that makes two API calls in a row claims to be an "autonomous AI agent." It's exhausting.

So let me start with what an AI agent actually is, in practical terms, and then I'll show you the four agents I've built that are actually running in production on my marketing workflows right now. Real architectures, real costs, real results.

What an AI Agent Actually Is (and Isn't)

A chatbot takes your input, sends it to an LLM, and returns the response. That's it. One step.

An automation (Zapier, Make) takes a trigger, runs a sequence of predefined steps, and produces an output. The steps are fixed. If step 3 fails, the whole thing fails.

An agent is different. An agent:

  1. Receives a goal (not just an input)
  2. Decides what steps to take to achieve that goal
  3. Executes those steps, which may include calling tools, querying APIs, or searching for information
  4. Evaluates the results and decides whether to continue, try a different approach, or stop
  5. Can handle unexpected situations without breaking

The key difference is decision-making. A chatbot responds. An automation executes. An agent reasons about what to do next. This is why agents are genuinely useful for marketing — marketing work is full of judgment calls, not just mechanical execution.

That said, most marketing tasks don't need agents. If you can define every step in advance, use an automation. Agents are for tasks where the path isn't predictable, where you need the system to make decisions based on context. I'll be specific about which use cases actually benefit.

The Tools for Building Marketing Agents

There are four tiers of complexity here, and you should pick the simplest one that solves your problem.

Tier 1: No-Code Agent Builders

Gumloop

$29/mo (Starter) | no code required

Gumloop is the most accessible way to build AI agents if you don't write code. It has a visual flow builder where you drag and drop nodes — LLM calls, web scrapers, data transformations, API calls — and connect them into workflows. What makes it an agent builder and not just another automation tool is that it supports conditional branching based on LLM output. The model can decide which path to take.

I built a content repurposing agent in Gumloop in about two hours. It takes a blog post URL, reads the content, and decides the best formats to repurpose it into (LinkedIn post, Twitter thread, email snippet, or short-form video script) based on the content type. Then it generates each format. The "decides" part is what makes it agentic — it doesn't always produce the same outputs for every input.

Limitations: Gumloop gets unwieldy for complex agents with many decision points. The visual builder becomes spaghetti after about 15 nodes. And the debugging experience is mediocre. When something fails in the middle of a 10-step flow, figuring out why is painful.

Make (formerly Integromat) with AI Modules

$29/mo (Pro) | low code

Make added AI modules in 2024, and they've gotten surprisingly capable. You can add an OpenAI or Claude node to any Make scenario and use the LLM output to route the workflow. It's not a purpose-built agent framework, but for marketing automations that need a judgment step, it works well.

I use Make for my social media monitoring agent (more on that below). The LLM step analyzes incoming mentions and decides the response category, which determines the rest of the workflow. It's a hybrid approach — mostly traditional automation with an agentic decision layer.

Tier 2: API-Based (Light Code)

OpenAI Assistants API

Pay per token | Python/JS required

OpenAI's Assistants API gives you a managed agent runtime. You define the assistant's instructions, give it tools (code interpreter, file search, function calling), and it handles the agent loop — deciding when to use which tool, iterating until it has an answer. You don't have to build the reasoning loop yourself.

The code interpreter is particularly useful for marketing analytics agents. I built a reporting agent that takes raw CSV exports from Google Analytics and ad platforms, writes Python code to analyze them, generates charts, and produces a summary report. The agent decides what analyses to run based on the data it sees. I feed it the same data every Monday morning and get different insights each time because the agent adapts to what's interesting in that week's data.

Cost: roughly $0.50-2.00 per agent run, depending on complexity and token usage. At 20 runs per month, that's $10-40.

Claude API with Tool Use

Pay per token | Python/JS required

Claude's tool use feature lets you define functions that Claude can call during a conversation. You give it a set of tools (search the web, query a database, send an email, update a spreadsheet) and Claude decides when and how to use them. This is my preferred approach for building custom agents because Claude's reasoning is better than GPT-4o for multi-step tasks, in my testing.

The architecture is straightforward: you define your tools as JSON schemas, send the initial prompt, and then run a loop where Claude either responds with text (done) or requests a tool call (execute the tool, send the result back, repeat). It's maybe 50 lines of Python for the core loop.

Tier 3: Agent Frameworks (More Code)

LangChain / LangGraph

Free (open source) | Python required

LangChain is the most popular framework for building AI agents. LangGraph, its newer component, is specifically designed for agent workflows with complex state management and branching logic. If you need an agent that maintains state across many steps, uses multiple tools, and has sophisticated error handling, LangGraph is the right choice.

I won't sugarcoat it: LangChain has a steep learning curve and the documentation is... a journey. But for production agents that need to be reliable, the abstractions it provides for retry logic, state management, and tool orchestration save significant time. My lead qualification agent is built on LangGraph because it needs to maintain conversation state across multiple interactions with the same lead.

Tier 4: Just Zapier with an LLM Step

Honestly? For a lot of marketing teams, this is the right answer. Zapier's "AI by Zapier" action lets you add a GPT step to any Zap. It's not technically an agent — it's an automation with one AI-powered decision point. But for many use cases, that's enough. A Zapier workflow that triages incoming support tickets using an LLM and routes them to the right team solves a real problem without any of the complexity above.

Don't build an agent when an automation with one smart step will do. Agents are for when you genuinely need multi-step reasoning, not just one classification or generation step.

Four Agents I'm Actually Running

Agent 1: Content Repurposing Agent

Built with: Gumloop
Monthly cost: ~$35 (Gumloop plan + API calls)
Time saved: ~3 hours per blog post

This agent takes a published blog post URL and produces a distribution kit: a LinkedIn post, a Twitter thread (3-5 tweets), an email newsletter snippet, and optionally a short-form video script. The "optionally" is the agentic part — it evaluates whether the content is visual enough to work as a video script, and only produces one if it is.

The flow:

  1. Scrape the blog post content
  2. LLM analyzes the content type, key points, and best distribution formats
  3. Based on the analysis, branches into the appropriate generation paths
  4. Each path generates content with format-specific instructions (LinkedIn: professional, 150-200 words, hook in first line; Twitter: punchy, each tweet standalone, thread coherence)
  5. Final LLM pass reviews all outputs for consistency and quality

The quality review step at the end catches about 15% of outputs that need revision. Without it, the agent occasionally produces a LinkedIn post that contradicts the Twitter thread, or an email snippet that misses the main point. Adding an LLM-as-judge step at the end was the single biggest quality improvement.

Agent 2: Social Media Monitoring Agent

Built with: Make + Claude API
Monthly cost: ~$55 (Make Pro + API tokens)
Time saved: ~5 hours per week

This one monitors brand mentions across Twitter and LinkedIn, classifies them by intent (praise, complaint, question, feature request, irrelevant), and takes different actions based on the classification:

The classification accuracy is about 88%. That means roughly 1 in 8 mentions gets miscategorized. I review the misses weekly and use them to update the classification prompt. Three months in, the accuracy started at 78% and has improved steadily as I've added edge cases to the prompt.

Important: this agent never posts replies automatically. It drafts them and queues them for human review. Letting an AI auto-reply to customer complaints on social media is a disaster waiting to happen. The agent saves time by doing the analysis and drafting — a human still clicks "send."

Agent 3: Lead Qualification Agent

Built with: LangGraph + Claude API
Monthly cost: ~$80 (API tokens only)
Time saved: ~8 hours per week

This is the most complex agent I run. It processes inbound leads from our website forms and enriches them with publicly available information to produce a qualification score and routing recommendation.

The flow:

  1. New lead comes in via webhook from our form
  2. Agent searches for the company on LinkedIn, Crunchbase, and the company website
  3. Extracts: company size, industry, funding stage, tech stack (if visible), recent news
  4. Compares lead profile against our ICP (ideal customer profile) criteria
  5. Scores the lead 1-100 and assigns a tier (hot/warm/cold)
  6. For hot leads: immediately notifies the sales team in Slack with the full enrichment report
  7. For warm leads: adds to nurture sequence in our CRM with personalized talking points
  8. For cold leads: logs and deprioritizes

The architecture uses LangGraph because the research step (step 2) requires the agent to make decisions about which sources to query based on what it finds. If the company has a Crunchbase profile, it pulls funding data. If not, it looks for other signals. If the company website has a careers page, it estimates company size from job postings. Each research path is different, which is exactly the kind of dynamic execution that justifies using an agent over a static automation.

Cost per lead: roughly $0.15-0.40 depending on how many sources the agent queries. At 200 leads per month, that's $30-80. Compared to a BDR spending 15 minutes per lead doing the same research manually, it's a no-brainer.

Agent 4: Weekly Reporting Agent

Built with: OpenAI Assistants API (code interpreter)
Monthly cost: ~$25 (API tokens)
Time saved: ~4 hours per week

Every Monday at 7 AM, a cron job triggers this agent. It pulls the previous week's data from Google Analytics (via API), Google Ads, LinkedIn Ads, and our email platform. Then it:

  1. Calculates week-over-week changes for all key metrics
  2. Identifies statistically significant changes (not just noise)
  3. Generates charts for the top 5 most noteworthy changes
  4. Writes a narrative summary: what happened, likely causes, recommended actions
  5. Posts the report to our #marketing-analytics Slack channel

The "likely causes" section is the most interesting part. The agent looks for correlations — did traffic spike because we published a post that went viral? Did conversion rate drop because we changed the landing page? It's not always right, but it surfaces hypotheses that would take a human analyst 30 minutes to identify and articulate.

I use OpenAI's Assistants API here specifically because the code interpreter lets the agent write and execute Python code for the statistical analysis and chart generation. Claude is better at reasoning, but for code-heavy analytical tasks, the OpenAI code interpreter integration is more mature.

Cost Summary

Agent Platform Monthly Cost Time Saved
Content Repurposing Gumloop ~$35 12 hrs/mo
Social Monitoring Make + Claude ~$55 20 hrs/mo
Lead Qualification LangGraph + Claude ~$80 32 hrs/mo
Weekly Reporting OpenAI Assistants ~$25 16 hrs/mo
Total ~$195/mo 80 hrs/mo

80 hours per month at an average marketing salary works out to roughly $3,200-4,000 in labor value. For $195 in tool costs. That's 16-20x ROI, which sounds too good to be true. And honestly, the real number is lower because not every saved hour translates directly to productive output — some of it is just time that wasn't being used efficiently anyway. But even at a conservative 5x ROI, the math works.

Practical Advice for Getting Started

If you're new to building agents, here's my recommended path:

  1. Start with Gumloop or Zapier + AI. Build one agent that solves one specific, well-defined problem. Don't try to build a "marketing automation agent" that does everything. Build a "content repurposing agent" that takes a blog post and produces a LinkedIn post. That's it.
  2. Get the prompt right before building the pipeline. Test your agent's core LLM prompts manually in ChatGPT or Claude before wiring them into an automation. If the prompt doesn't produce good output in a chat interface, it won't produce good output in an agent.
  3. Always include a human review step. At least until you've run the agent for a month and trust its output quality. Auto-publishing AI-generated marketing content without review is how you end up on Twitter for the wrong reasons.
  4. Track accuracy. For classification agents (like my social monitoring agent), log every decision and review a sample weekly. If accuracy is below 85%, your prompt needs work. If it's below 75%, your approach might be wrong.
  5. Move to code when you need to. Gumloop and Make are great for simple agents, but you'll hit their limits eventually. When you need complex state management, custom tool integrations, or sophisticated error handling, Python + LangGraph or the Claude/OpenAI APIs are the way to go. The learning curve is worth it.

The bottom line: AI agents for marketing are real and useful right now, but they're not magic. They're software that needs to be designed, tested, monitored, and maintained like any other software. The marketing teams getting the most value from agents are the ones treating them as engineering projects, not as products you just subscribe to and forget about. If you're willing to put in the work to build and iterate, the payoff is substantial. If you want something that works out of the box, stick with traditional automation tools — they're more predictable and easier to debug.

I'm planning to open-source the core logic for my social monitoring agent once I've cleaned up the code. If you're building marketing agents and want to compare approaches, reach out. This space is moving fast and I learn as much from seeing other people's implementations as from building my own.