How to build an AI agent
Kahu team·Updated 18 Sep 2026·8 min read
You can build an AI agent two ways. No-code: pick a platform, describe your business, connect your calendar, inbox and website, set what it may do without asking. Code: choose a model API, add tools as functions, write the loop, add memory and guardrails. For a small business the first route takes an afternoon; the second takes weeks and ongoing maintenance.
Decide these four things first
- 1The goalOne sentence. "Reply to every enquiry within five minutes with accurate answers and book the next step." Vague goals produce vague agents.
- 2The toolsWhat can it read and write? Calendar, inbox, WhatsApp, website, customer list. Fewer tools, fewer surprises.
- 3The guardrailsWhat does it do freely, what does it ask about, what can it never do? Write this down before anything is connected.
- 4The contextYour prices, hours, services, tone, and the ten questions customers actually ask. This is what makes it sound like you.
Route 1: no-code (most owners)
Business-focused agent platforms handle the model, the loop, the memory and the tool connections. You describe your business in plain language, connect the accounts you already use, and choose approval settings. Setup is measured in hours. Ongoing work is reviewing what it did and refining the context when it gets something wrong.
- Pros: fast, no maintenance, built-in safety settings, connected to your systems out of the box.
- Cons: you work within the platform's tools; deeply custom workflows may not fit.
Route 2: build it yourself (developers)
If you or your team write code, the pieces are well documented. Pick a model with tool-calling support (OpenAI, Anthropic, Google). Define each tool as a function with a clear description. Write the loop: send goal plus history to the model, execute whatever tool it calls, append the result, repeat. Add memory so it can reference past conversations. Add guardrails: allowed actions, spend limits, a human-approval step for anything risky.
- Frameworks that help: LangChain, LlamaIndex, the model vendors' own agent SDKs.
- Hard parts: reliable tool calling, error recovery, testing edge cases, keeping context under the token limit.
- Ongoing cost: model usage, hosting, and someone to fix it when a connected service changes.
| No-code platform | Build your own | |
|---|---|---|
| Time to first result | Hours | Weeks |
| Who maintains it | Vendor | You |
| Custom logic | Limited | Unlimited |
| Cost | Subscription | Dev time plus usage |
| Best for | Small businesses | Software products, unusual workflows |
Test it like a new hire
Whichever route, run the agent in draft mode for a week. Let it write every reply and post, but you press send. Read everything. Fix the context where it guessed wrong. Then loosen the approvals task by task. This is exactly how you would onboard a person, and it is the fastest way to trust the software.
Frequently asked questions
Can I build an agent with ChatGPT alone?
You can build a custom GPT that answers well, but connecting it to your calendar, inbox and website to take action requires either API work or a platform that has done that work already.
How much does it cost to run?
No-code platforms are typically a monthly subscription. Self-built agents pay per model call, often cents per task, plus hosting and developer time.
What if it does something wrong?
Good agents log every action. Start in approval mode, review the log, and only widen permissions where the track record is clean.
