Duck
Tutorials6 min read

open ai agent builder: a no‑code approach for solopreneurs

Samet Turan— Editor··6 min read

Learn to build an Open AI agent builder that automates lead follow‑up, using real prompts, cost breakdowns, and debugging tips.

Building an open ai agent builder from scratch sounds like a lot of work, but you can get a functional system running in a day if you know where to focus. I’ve put together a workflow that uses the OpenAI Assistant API, a simple Airtable base for storage, and a Make.com scenario to glue everything together. By the end of this guide you’ll have a working agent that can qualify leads, answer FAQs, and push data to your CRM.

Why does the agent forget context after three turns?

The Assistant API keeps the whole conversation in its context window, which is limited to 8 k tokens by default. Each user message and each model reply adds tokens, and the system also stores any function‑call results. After a few exchanges the window fills and the oldest messages are dropped, making the agent seem to lose memory.

You can see this happen when you ask the agent to recall a detail you shared earlier in the chat. If the detail was in the first user message and you have already sent six or seven replies, the model may no longer see it and will answer “I don’t have that information.”

(which, yes, is annoying) but there is a simple workaround: store the important facts yourself in Airtable or another database and retrieve them with a tool call when needed. That way the agent never relies on the built‑in memory for anything critical.

It’s that simple.

What most guides get wrong about tool integration

Many tutorials treat the Assistant API’s tool calls as a plug‑and‑play feature: you define a function, expose an endpoint, and the model magically uses it. In reality you have to handle three distinct steps correctly.

First, you must return a valid JSON object that matches the schema you declared. If the model expects a string called “status” and you send a boolean, it will ignore the result and ask for clarification.

Second, you need to surface any errors from your endpoint back to the model in the same format it expects. A plain HTTP 500 will not be understood; you must wrap the error in the tool‑response shape.

Third, you must keep the conversation ID stable across turns. If you accidentally create a new thread for each tool call, the model loses the ability to chain multiple steps.

I love how the built‑in retrieval tool lets me upload a PDF and have the agent answer questions without extra code. It saves me from writing a custom embed‑and‑search pipeline for every knowledge base I want to expose.

How to debug when the agent returns empty responses

Empty replies usually mean the model decided not to generate text, often because it hit a tool‑call loop or received a malformed response.

My concrete gripe: the Assistant API returns very little diagnostic information when something goes wrong. You get a generic “max_tokens” or “stop” finish reason, with no hint about which tool call failed or why the model chose to stop.

To troubleshoot, start by logging every request and response from your middleware (Make.com or whatever you use). Check the tool_calls array in the assistant’s response—if it is empty, the model is not trying to use any tool. If it contains entries, verify that each one includes a valid function name and that the arguments parse.

Next, look at the HTTP response from your endpoint. Did it return 200 with a JSON body? Did the body contain the exact keys you declared in the schema? A missing key or a type mismatch will cause the assistant to discard the result and fall back to a plain text answer, which may be empty if you also gave it no instructions for that case.

Finally, reduce the complexity. Strip out all but one tool call and see if the model returns a sensible answer. Add tools back one by one until the problem reappears; that isolates the offending integration.

A concrete example: lead‑qualification prompt and Airtable setup

Below is a prompt that turns the assistant into a lead‑qualifier. It asks for budget, timeline, authority, and need, then writes the answers to an Airtable base via a Make.com webhook.


You are a sales assistant. Your goal is to qualify inbound leads.

When the user shares their company name, ask:
1. What is your approximate monthly budget for this type of solution?
2. When are you looking to implement?
3. Who will be the decision maker?
4. What is the biggest challenge you hope to solve?

After you have all four answers, send a POST request to https://hook.make.com/your‑webhook‑url with JSON body:
{
"company": "{{company}}",
"budget": "{{budget}}",
"timeline": "{{timeline}}",
"authority": "{{authority}}",
"need": "{{need}}"
}

Then reply with a short thank‑you message and end the conversation.

In Airtable create a table called Leads with fields: Company (text), Budget (text), Timeline (text), Authority (text), Need (text), Received At (date‑time). In Make.com set up a webhook that receives the POST, maps the JSON to those fields, and creates a record.

Test the flow by sending a message like “I run Acme Corp and we need help with automation.” The assistant should ask the four questions, collect the answers, push the record, and then say “Thanks for the info!”

Pricing reality check: what you’ll actually pay per month

The Assistant API charges per token for both input and output, plus a flat fee for each assistant you create. At the time of writing the cost is $0.002 per 1 k input tokens and $0.002 per 1 k output tokens.

For a modest lead‑qualification flow that uses about 500 input tokens and 300 output tokens per conversation, each run costs roughly $0.0016. If you handle 200 conversations a month you’re looking at under $0.50 just for token usage.

The real expense comes from the assistant itself: $29 per month for each active assistant if you stay on the pay‑as‑you‑go plan. I think $29/mo is fair for a small team that runs a handful of agents, but $199/mo for the dedicated tier is ridiculous for what you get—you still pay per token on top of that flat fee.

I think the free tier of the Assistant API is enough for solo experimentation, though many disagree. That opinion could be wrong if you need higher rate limits or want to keep assistants alive between sessions.

When to grab the blueprint instead of building from scratch

If you’ve followed the steps above you now have a working agent, but putting it all together still takes a few hours of wiring, testing, and debugging. For many operators the faster path is to start with a pre‑built automation that already includes the assistant, the Airtable base, and the Make.com scenario.

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

You can build this from the steps above OR grab a working 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.