Duck
Tutorials6 min read

build your own ai agent

Samet Turan— Editor··6 min read

Step-by-step guide to build your own AI agent using no-code tools, real prompts, pricing breakdowns, and debugging tips for solopreneurs.

If you’ve ever wondered how to build your own ai agent without hiring a developer, you’re not alone. Many guides show flashy demos but leave you stuck when the agent hallucinates or fails to trigger. By the end of this article you’ll have a working prototype, a clear cost estimate, and a checklist for debugging common failures.

Why start with a simple trigger?

Begin with something that happens often in your workflow—a new row in a Google Sheet, a new email in a specific label, or a webhook from a form. A reliable trigger gives the agent a clear start point and makes testing easier. I like using the Make platform because its visual scenario builder lets you see each step without writing code.

One gripe I ran into early was the lag on the free tier of Make.com. When I tested a scenario that polled a sheet every five minutes, the actual delay sometimes stretched to twenty minutes, which made real‑time feel impossible. The paid plan fixes that, but the free tier felt like a bait‑and‑switch for anyone hoping to prototype without paying.

On the love side, the built‑in error handling in Make.com is genuinely useful. If a step fails, the scenario can automatically send you a Slack message or retry after a set interval. That saved me hours of manual checking during my first few builds.

How do you stop the agent from making up facts?

Hallucinations happen when the model tries to answer beyond its knowledge. The simplest fix is to ground the response in data you provide. Instead of asking the model “What is the latest price of Bitcoin?”, you feed it the current price from an API and ask it to summarize.

Here’s a real prompt I use for a lead‑qualification agent:

You are a sales assistant. Use ONLY the information in the lead data below to decide if the lead is hot, warm, or cold. Do not add any outside knowledge.

Lead data:
– Name: {{name}}
– Company: {{company}}
– Industry: {{industry}}
– Recent activity: {{activity}}

Output a single word: hot, warm, or cold.

The double curly brackets are placeholders that Make.com replaces with actual values from the sheet. By constraining the output to a single word and forbidding outside knowledge, the agent stays on track.

A mild aside: (which, yes, is annoying) you must remember to escape any quotes inside the placeholder values, otherwise the JSON payload breaks and the scenario fails silently.

What most guides get wrong about agent memory

Many tutorials treat memory as an afterthought, suggesting you just paste the whole chat history into each prompt. That works for short chats but blows up token usage fast. A better approach is to keep a short summary of past turns and feed that summary instead of the raw transcript.

I built a simple memory buffer using a Google Sheet that stores the last three exchanges. Before each new request, the agent reads those rows, concatenates them into a brief context block, and appends the current user message. This keeps the prompt under 800 tokens for most interactions, which cuts cost dramatically.

One concrete love: the sheet‑based memory is transparent. You can open the sheet at any time and see exactly what the agent is remembering, which makes trust easier to build.

Concrete example: building a lead‑qualification agent with Make.com and GPT‑4

Let’s walk through a full scenario that you can copy.

  1. Create a Google Sheet with columns: Timestamp, Name, Company, Industry, Activity, Qualification.
  2. In Make.com, create a new scenario.
  3. Add a “Watch Changes” module for the Google Sheet, set to trigger when a new row is added.
  4. Add a “Set Variable” module to pull the values from the new row into readable names.
  5. Add an “HTTP” module that calls the OpenAI ChatCompletion endpoint. Use your API key in the headers. The body should contain the prompt from the earlier block, with the variables substituted.
  6. Add a “Parse JSON” module to extract the model’s single‑word answer.
  7. Add a “Update Row” module that writes the answer back into the Qualification column.
  8. Save and turn the scenario on.

Cost breakdown: Make.com’s Core plan at $29/mo gives you 10,000 operations, more than enough for a solo operator handling a few dozen leads per day. The OpenAI API charges $0.03 per 1k tokens for GPT‑4‑turbo; with the short prompts above each run uses about 600 tokens, so roughly $0.018 per lead. At 50 leads a day that’s under $0.90, making the total monthly cost under $40.

I think the $29/mo Make.com plan is fair for the reliability it offers—especially compared to the free tier’s unpredictable delays.

How to debug when the agent stops responding

When the scenario appears dead, start at the trigger. Open the Make.com scenario log and confirm that the watch module actually fired. If it didn’t, check the Google Sheet for permission issues or a mismatch in the column name you’re watching.

If the trigger fires but the HTTP module shows a 401 error, double‑check that the OpenAI API key is correctly stored in Make.com’s credential manager and that it hasn’t expired. A common mistake is copying the key with a trailing space, which the API rejects.

If the HTTP call returns 200 but the Parse JSON module fails, look at the raw response. Sometimes the model adds extra punctuation or a newline after the single word, breaking the JSON parser. Adding a “trim” step before parsing solves that.

Finally, if the update row step fails, verify that the sheet is still shared with the Make.com service account and that you haven’t hit the daily write limit.

One concrete gripe: the error messages from Make.com’s HTTP module are notoriously vague—often just “Request failed” with no hint about status code or response body. You have to dig into the execution log and manually replay the request to see what the API actually returned, which feels like a step backward compared to tools like n8n workflows that show the full response.

And a quick parenthetical: — and good luck finding docs for this — the OpenAI API documentation assumes you’re comfortable with curl, but the Make.com HTTP module hides those details, so you end up guessing the exact JSON structure.

Final thoughts and where to go next

You now have a working agent that can be triggered by real business data, stays grounded in facts, and keeps costs predictable. From here you can expand the agent’s abilities—add a memory buffer that summarizes longer histories, plug in a vector store like Pinecone for semantic search, or switch to a self‑hosted model if you need tighter data control.

Adjacent reading: 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.