Skip to content
PromotEdge International

Home Guides How to build an AI agent

Guides · Guide

How to build an AI agent: tools, steps and the traps

Building an agent is easy to start and hard to make safe. This guide gives the steps, the three main build routes, and the traps that catch most first attempts.

Reviewed by Benjamin SardarUpdated 12 Nov 20266 min read

The short answer

How do you build an AI agent?

Confirm a fixed workflow will not do, set one narrow goal, give the agent a short list of tools with the fewest permissions, build the loop of model, tool and result with limits on steps and spend, add human approval for risky actions, test on realistic cases, log everything and review samples.

Key takeaways
  • Check first whether a fixed workflow will do. Anthropic advises the simplest solution possible.
  • Give the agent one narrow goal, a short list of tools and the fewest permissions.
  • Cap steps, time and spend, and require human approval for risky actions.
  • Treat what the agent reads as untrusted. OWASP lists least privilege and human approval as mitigations.
  • Test on realistic and hostile cases, log every run and review samples weekly.

Need this done for your business? A person reads every message and replies.

Ask for a call back

Three ways to build an agent

Choose by team skill, control, data and upkeep.

Our own comparison. Zapier's agent description is from its AI page, read 12 November 2026.
RouteWhat it involvesSuitsWatch
No-code platformConfigure an agent in a vendor's toolTeams without developers; simple goalsWhat the platform exposes; where data runs; lock-in
FrameworkBuild with an orchestration library in codeTeams with developers who want controlFast-changing libraries; upkeep
Provider API directlyWrite the model, tool and result loop yourselfTeams that want to see and control every stepMore work to build and maintain

An agent is a model that decides its own steps and uses tools to reach a goal. That freedom is what makes it useful, and what makes it risky.

This guide is part of our AI automation series. It names tools neutrally, claims no results and describes nothing about our own process.

Step 1: Check whether you need an agent

Anthropic's post Building effective agents (19 December 2024) defines workflows as systems where models and tools are orchestrated through predefined code paths, and agents as systems where models dynamically direct their own processes and tool use. It advises finding the simplest solution possible, increasing complexity only when needed, and notes that agentic systems often trade latency and cost for better task performance.

So ask: can the steps be written down in advance? If yes, a workflow is simpler, cheaper and easier to test. An agent fits an open-ended task where the number and order of steps cannot be predicted. Our guide to AI workflow automation covers the simpler route, and our guide to AI agent examples lists public uses.

Step 2: Set one narrow goal

Write the goal in one sentence, with a clear end: 'Read each new support ticket, label its topic and urgency, and send it to the right queue with a two-line summary.' Say what the agent must not do: reply to customers, change records, spend money. A vague goal such as 'handle customer support' gives you an agent you cannot test or trust.

Step 3: Choose the tools it may use

A tool is an action the agent can request: search a knowledge base, read an order, create a ticket, send a draft for approval. Give it as few as the goal needs. Describe each tool plainly, with what it does, what inputs it needs and what it returns, because the model decides which to use from those descriptions. Prefer tools that read over tools that change things, and make every change reversible where you can.

Step 4: Choose a build route

  • A no-code platform. Some automation tools offer agents you configure without code. Zapier's AI page describes agents as AI that takes action across your tools, with examples such as qualifying leads and routing tickets. Quick to start, limited by what the platform exposes.
  • A framework. An orchestration library in code gives you more control over tools, memory and flow. It needs developers and upkeep, and frameworks change fast.
  • The provider's API directly. You write the loop yourself: send the goal and tool descriptions to a model, run the tool the model asks for, return the result, and repeat until done. It is more work, and it shows you exactly what happens.

No route is right for everyone. Choose by how technical your team is, how much control you need, where the data may go and how long you must maintain it. If you need developers, see our AI developers page.

Step 5: Build the loop with limits

The core of an agent is a loop: the model decides, a tool runs, the result goes back, and the model decides again. Put hard limits on it: a maximum number of steps, a time limit, a spending cap per run and per day, and a rule for what happens when it gets stuck, which should be to stop and hand to a person. Without limits, a confused agent can run up costs or repeat an action many times.

Step 6: Add human approval and least privilege

OWASP's prompt injection page (LLM01:2025) says inputs can alter a model's behavior in unintended ways, including inputs humans cannot see, and lists mitigations: restrict the model's access privileges to the minimum necessary, use human-in-the-loop controls for privileged operations, and separate untrusted content. It says it is unclear whether there are fool-proof methods of prevention.

In practice: give the agent its own account with narrow rights, never your administrator login, and require a person to approve anything that sends money, deletes data, contacts customers or changes a contract. Treat any text the agent reads, such as emails, web pages and documents, as untrusted.

Step 7: Test on realistic and hostile cases

Build a test set from real examples, including messy, rare and hostile ones, with the result you expect for each. Run it whenever you change the goal, the tools, the prompt or the model. NIST's AI RMF 1.0 (January 2023) says AI systems should be tested before their deployment and regularly while in operation. Because an agent chooses its own steps, runs differ, so test the same case several times and look at the spread, not one result.

Step 8: Log, review and plan for change

Log each run: the goal, every tool call with inputs and outputs, the model and prompt versions and the final result. Read a sample every week. Plan for model changes: Anthropic's deprecations page says it regularly retires older models and gives at least 60 days' notice before retiring a publicly released model, and other providers set their own schedules. Pin the model version, keep your test set ready and have one person watch notices.

What are the common traps?

  • A goal that is too big. Start with one narrow task and widen only after it works.
  • Too many tools. Each tool adds ways to go wrong and confuses the model.
  • Over-permissioned access. An agent with your administrator rights can do your worst day's damage.
  • No limits. No cap on steps or spend, and no stop rule.
  • No tests. Judging by a good demo instead of a test set.
  • Trusting what it reads. Letting instructions inside an email or web page steer the agent.
  • Speaking for the business without review. A BC tribunal held Air Canada responsible for wrong information its chatbot gave a customer in 2024, and the FTC said in September 2024 that there is no AI exemption from the laws on the books.

Sources for the last trap: Torkin Manes' summary of Moffatt v. Air Canada (7 March 2024) and the FTC press release (25 September 2024), both read 12 November 2026. They are not legal advice for your case.

Where does help fit?

Many teams can build a narrow first agent themselves. Help is useful when the agent touches sensitive data or customer-facing channels, when you need tests and controls designed in, or when you want a second view before you give it access to real systems. Our AI agents page covers scoping and review, and the pillar guide on AI automation examples shows public patterns.

Conclusion

Build an agent only when a fixed workflow will not do. Give it one narrow goal, few tools and the fewest permissions, cap its steps and spend, require approval for risky actions, test on realistic cases and review its logs.

PromotEdge International is an international strategy, technology, marketing and design company, and our delivery team is in India. See our AI agents page. For definitions, see our glossary entries on AI agents and agentic AI.

Facts we rely on: see our company facts for what we state about ourselves and where each fact comes from.

Common questions

  • Confirm a fixed workflow will not do, set one narrow goal, give the agent a short list of tools with the fewest permissions, build a loop with limits on steps and spend, require human approval for risky actions, test on realistic cases, and log and review runs.

  • Not always. Some automation platforms offer agents you configure without code, such as the agents Zapier describes on its AI page. Code gives more control over tools, memory and flow, but needs developers and upkeep, so choose by your team and your needs.

  • Anthropic defines workflows as systems orchestrated through predefined code paths, and agents as systems where the model directs its own process and tool use. Use a workflow when the steps can be written down in advance, and an agent for open-ended tasks.

  • Limit its permissions to the minimum, require human approval for privileged actions, treat everything it reads as untrusted, cap steps and spend, and log every run. OWASP says no fool-proof prevention of prompt injection is known, so these controls reduce impact.

  • Build a test set of realistic and hostile cases with expected results, run it after every change to the goal, tools, prompt or model, and repeat each case several times because runs differ. Review a sample of real runs every week after launch.

  • It depends on the build route, the tools and the testing needed, and we publish no price list. Running costs depend on how many steps each run takes and the model used, so cap steps and spend per run and measure cost per completed task.

Sources

Each figure in this guide comes from one of these, read on the date shown.

  1. Anthropic: Building effective agents, 19 Dec 2024, read 12 Nov 2026
  2. Zapier: AI, read 12 Nov 2026
  3. OWASP: LLM01:2025 prompt injection, read 12 Nov 2026
  4. NIST: AI Risk Management Framework 1.0 (AI 100-1), January 2023, read 12 Nov 2026
  5. Anthropic: model deprecations, read 12 Nov 2026
  6. Torkin Manes LLP on Moffatt v. Air Canada, Legal 500, 7 Mar 2024, read 12 Nov 2026
  7. FTC: Operation AI Comply press release, 25 Sep 2024, read 12 Nov 2026

Brands we have worked with

  • Fine Organics
  • Weichai
  • Novozymes
  • Dozco
  • SANY
  • Prezent
  • Honest AI
  • SCENNE
  • Sara International
  • Vega MPS
  • Desi Machine Pvt. Ltd.

Work delivered from India. Results are shared one to one, under NDA.

See all clients

Talk to us

Tell us what you need

We use these details only to reply to you.

Phone or WhatsApp (optional)
Who is it for? (optional)

Rather talk now?

How we work

  1. 01

    Tell us the goal

    A rough note through the form on what you sell and what needs to change.

  2. 02

    We study your market

    How people find you today, where inquiries get lost, then a call in your working day.

  3. 03

    A written plan

    The work, who does it and how it is measured. Nothing starts until you approve it.

  4. 04

    The work starts

    Our team in India does the work, with calls set in your working hours.

  5. 05

    Reports and visits

    Every number we report shows its source and date range, and we travel to our clients every 3 to 4 months.

Chat with us