Duck
Tutorials5 min read

Building agentic ai systems that actually work for solo operators

Samet Turan— Editor··5 min read

Learn how to build agentic ai systems for cold email, lead gen, and invoicing with real prompts, tool picks, and debugging tips — then grab a ready‑made blueprint.

You’ve heard the hype around agentic ai systems, but most tutorials leave you staring at a blank prompt and a broken workflow. After reading this, you’ll be able to stitch together a working agent that pulls leads, writes personalized cold emails, and logs invoices — all without writing a single line of traditional code.

What most guides get wrong

Many guides treat agentic ai systems as if they were magic boxes you just plug in and forget. They skip the part where you have to define clear boundaries for the agent’s actions, which leads to runaway loops or useless output. I’ve seen agents start sending the same email fifty times because the stop condition was buried in a comment.

Another common mistake is assuming the model will remember context across separate calls. Without a memory layer, each invocation starts from scratch, so the agent can’t reference a lead it just looked up. That forces you to rebuild state in every prompt, which quickly becomes unmanageable.

The fix is simple: give the agent a tiny external store — think a JSON file or a lightweight database — and make every step read and write to it. That tiny change turns a fragile demo into something you can actually rely on.

A real‑world prompt that gets the agent to draft a follow‑up email

Here’s the exact prompt I use after the agent has scraped a LinkedIn profile and pulled the prospect’s recent post. I keep it in a file called followup_prompt.txt and feed it to the model each loop.

  • You are a helpful sales assistant. Use the following data to write a short, friendly follow‑up email:
  • Prospect name: {{name}}
  • Company: {{company}}
  • Recent LinkedIn post: {{post}}
  • Our product helps {{pain_point}} by {{benefit}}.
  • Keep the email under 120 words, end with a low‑pressure question about their current process.

The double curly brackets are placeholders that my wrapper script replaces with the scraped values before sending the prompt to the model. This keeps the prompt readable and lets me test each piece independently.

How do you keep the agent from hallucinating price quotes?

One of the first things that went wrong in my early builds was the agent inventing pricing details that never existed. It would tell a prospect our service cost $49/mo when the real price is $79/mo, just because the number sounded plausible.

I stopped this by adding a validation step after any generation that mentions money. The step runs a tiny regex to capture numbers followed by “$” or “USD” and then checks them against a whitelist stored in the agent’s memory. If the number isn’t on the list, the agent is prompted to correct itself or to say “I don’t have that information.”

Here’s what the validation snippet looks like in my workflow:

  • import re
  • text = agent_output
  • matches = re.findall(r'\$?\s?\d+(?:\.\d+)?', text)
  • for m in matches:
  • val = float(m.replace('$', '').replace(',', ''))
  • if val not in PRICE_WHITELIST:
  • return f"Please verify the price: {m} is not a known rate."
  • return text

PRICE_WHITELIST is just a Python set I load from the agent’s memory at startup: {49.0, 79.0, 199.0}. It’s not glamorous, but it catches the hallucinations before they reach the prospect.

How to debug when this breaks

When the agent stops behaving, I first look at the logs of each step: the scraper, the prompt builder, the model call, and the validation layer. Most failures happen at the interface between two steps — usually a missing placeholder or an unexpected character in the scraped data.

If the logs look fine but the output is still weird, I run the prompt directly in the model’s playground with the exact same inputs. That isolates whether the problem is the prompt or the surrounding automation.

Sometimes the issue is a silent failure in the memory write — the agent thinks it saved a lead but the file never updated because of a permission error. I added a simple health check after each write that logs “OK” or throws an alert if the file size didn’t change.

My gripe? The default logging library in the framework I use swallows exceptions unless you turn on verbose mode, which made me waste an afternoon chasing a bug that was just a missing folder.

On the love side, I adore how the built‑in retry wrapper lets me set a maximum of three attempts with exponential back‑off, all configured in a single YAML block. It’s saved me from countless rate‑limit headaches.

Pricing opinion and where to spend your time

If you’re going to piece together your own agentic ai system, expect to spend about $10‑$15/mo on a small VPS for the scraper and the memory store, plus whatever you pay for the model API. I use the open‑source Mistral model hosted on a $8/mo droplet, which keeps the total under $20/mo.

I think paying $199/mo for a “no‑code agent platform” that locks you into their UI is overpriced for a solo operator — you get flashy drag‑and‑drop but still hit the same limits on custom logic. The free tier of most platforms is a joke; you can’t run more than a handful of executions per day.

At $29/mo, the Agentic AI Blueprint we offer in the vault gives you a pre‑wired scraper, prompt templating, memory layer, and the validation snippets I described — all ready to deploy in an afternoon. It’s not the cheapest option, but it saves you the hours of trial‑and‑error that would otherwise eat into your billable time.

We cover this in more depth elsewhere — deeper coverage of AI agent platforms.

If you’d rather skip the build and deploy a working version in an afternoon, we’ve packaged this workflow as a blueprint at deepusecase.com/vault.

— The Colophon

One AI tool. Tested. Reviewed.
In your inbox every Sunday.

~3 minute read. Real outcomes from operators, not marketers.

Free. One email per Sunday. Unsubscribe in one click.