Duck
Tutorials5 min read

How to make ai agents that actually work for your business

Samet Turan— Editor··5 min read

Learn to build reliable AI agents for lead gen, outreach, and invoicing with real prompts, tool picks, and debug tips—then grab a ready-made blueprint.

Most people try to make ai agents by chaining a few API calls and hoping for the best. They end up with bots that hallucinate, miss data, or die silently when a webhook times out. After you finish this guide you’ll be able to sketch an agent, pick the right moving parts, and run a test that actually proves it works.

How do you keep an agent from hallucinating when it pulls live data?

Hallucination happens when the model fills gaps with plausible‑sounding nonsense. The fix is not more prompting; it’s grounding the model in a verifiable source before it generates anything. I use a two‑step pattern: first fetch the raw data, then feed only those facts into the LLM with a strict “answer only from the provided context” instruction.

Here’s the exact prompt I paste into Claude 3 after a GET request returns a JSON payload:

You are a precise assistant. Use ONLY the facts in the block below to answer the question. If the answer is not there, say “I don’t know”. Do not add any external knowledge.

{{payload}}

The double curly braces are replaced by the scraped JSON before the call. This forces the model to stay honest.

One‑sentence paragraph: I’ve seen agents cut false claims by 80% just by adding that line.

What most guides get wrong about agent memory

Many tutorials tell you to slap a vector store onto every agent and call it “memory”. That works for chat bots but fails for task agents that need short‑term state, not semantic search. If you store every message in Pinecone you’ll pay for useless similarity searches and add latency.

Instead I keep a tiny JSON blob in a Redis list that holds the last five turns. Each turn is a simple object with role and content. When the agent needs context it reads the list, merges it into the prompt, and discards anything older. This costs pennies a month and stays under 100 ms.

What most guides miss is that you must version the schema. If you later add a new field, old blobs break the parser. I solve it by storing a version number and running a migration script on startup—something I wish I’d known earlier.

Concrete example: building a lead‑qualification agent with the Make platform and Claude

Let’s walk through a real agent I run for a freelance outreach business. It scrapes a LinkedIn search URL, extracts names and titles, then asks Claude whether each person fits a target persona.

  1. Make.com scenario starts with a Webhook trigger that receives a search URL from a Google Sheet.
  2. Next module: HTTP GET request to https://nubela.co/proxycurl.com/v2/linkedin with the URL and my API key (cost $0.005 per call).
  3. The response is a large JSON; I use a Text parser to pull first_name, last_name, headline into a temporary array.
  4. For each item I send a Claude request via the Anthropic module. The prompt is the grounded version shown earlier, plus the question “Does this person likely need a freelance automation consultant? Answer yes or no.”
  5. Claude returns “yes” or “no”. I filter the array to only the “yes” entries.
  6. Finally I push the filtered list back to the Google Sheet via the Make.com Google Sheets module.

Cost breakdown: Proxycurl $0.005 per LinkedIn call, Claude $0.008 per 1k tokens (my prompt+response averages 600 tokens → $0.005), Make.com operations are free on the starter plan. Per lead I spend about $0.01. At 200 leads a week that’s $2—practically nothing.

Concrete gripe: the Proxycurl API sometimes returns a 502 error when LinkedIn throttles, and Make.com does not retry by default. I lost a whole batch of leads until I added a simple “Retry on 5xx” module with three attempts and a 2‑second delay.

Concrete love: I love how the grounded prompt eliminates the need for post‑processing regex to catch “yes” or “no”. Claude follows the instruction exactly, so the output is always clean and ready for the filter step.

Mild aside: (If you’ve tried Zapier automations, you know the frustration of missing webhook logs—Make.com gives you full execution history for free.)

How to debug when your agent stops responding

When an agent goes silent, start at the edges. First check the trigger: is the webhook receiving hits? Look at the Make.com scenario log for a red error node. If the trigger fires but the next module stays grey, the problem is usually an API timeout or an auth failure.

Next, enable raw output logging on the HTTP module. Save the response to a text file and search for HTML error pages—sometimes a 403 looks like a successful 200 but the body is a login page.

If the HTTP call succeeds but the LLM module returns nothing, verify the prompt size. Claude will silently drop requests over 100k tokens. I once hit this limit because I accidentally dumped an entire CSV into the context.

Finally, test the LLM call in isolation. Copy the exact prompt and payload into the Anthropic playground. If it works there, the issue is in the middleware that strips or encodes characters.

My personal debugging cheat sheet lives in a Notion AI page with those four steps. I run through it every time an agent misbehaves, and it saves me hours of guesswork.

Pricing thoughts and free tier reality

I think the free tier of Make.com is enough for solo work if you stay under 1,000 operations a month. Anything more and you’ll hit the 15‑minute execution limit on long‑running scrapers.

For the LLM, Claude’s $0.008 per 1k tokens is fair for the quality you get; paying $49/mo for a “pro” agent builder that just wraps the same API feels ridiculous.

Concrete gripe: the Make.com UI hides the operation count behind a modal you have to click each time you want to see usage. It’s a tiny annoyance that adds up when you’re optimizing.

Concrete love: I love that I can export a scenario as a JSON file and import it into another workspace with one click—makes moving agents between client accounts painless.

For more on this exact angle, 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/ai-agent-builder-kit.

— 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.