AI guides · 4 of 6

How to build an AI agent for your business: the parts and how they fit together

The parts of a working AI agent: task, model, rules, system connections, memory, limits and a log, shown on a morning sales report for a chain of locations.

22 November 202610 minMRKT.ERA

In 1913, at Ford's Highland Park plant, a moving assembly line went into operation, and the time needed to assemble a Model T chassis fell from about twelve and a half hours to about an hour and a half. Nobody invented a single new part to achieve this. Wheels, engines and frames had all been made before. Henry Ford and his engineers changed the order of work: each operation got its own place, its own tool and its own check, and the parts began to travel to the worker. An AI agent for a business is built on the same principle. Models, connections to business systems and messengers already exist. What makes an agent work is the order in which they are joined and the checks at every step. Below we take these parts one at a time and then assemble a single agent from them.

01Part one: the task and what a good result looks like

An agent starts with one sentence about what it does and one sentence about how to tell it did the job well. For example: "Every morning, send the owner a summary of revenue across all locations and flag the ones that fell behind their usual level." A good result here means the figures match the POS system, the lagging locations are flagged correctly and the summary takes a minute to read.

If you cannot write that pair of sentences, it is too early to build the agent. First the company has to agree internally on what exactly should happen.

02Part two: the model

The model handles understanding and writing. Many agents do well with a mid-tier working model, while a cheap model takes on high-volume operations such as sorting. We covered how to choose in detail in our [guide to choosing an AI model](/en/blog/which-ai-model-to-choose-for-work-2026/). One rule matters here: the agent should never be locked into a single provider. If a better or cheaper model comes out tomorrow, switching to it should take about an hour.

03Part three: the rules

The rules describe who the agent takes itself to be, what it never does and what good work looks like. They cover the tone of communication, prohibitions (for instance, never promising discounts or quoting dates that are absent from the system), the order of actions in disputed cases, and real examples.

Examples work better than descriptions. Twenty real replies that you consider exemplary will teach the agent your tone more precisely than a page of adjectives. Corrections that staff make to the agent's work are worth collecting and turning into new rules: this way the agent gradually learns from your experience.

04Part four: connections to your systems

The agent works with data through tools: a query to the POS system, reading a spreadsheet, sending a message in Telegram, writing a record into the CRM. Most often these are the systems' own APIs. For connecting models to tools there is now an open standard, the Model Context Protocol, which Anthropic introduced in November 2024, and many services already release ready-made connectors built on it.

If a system has no API, data can be collected through scheduled exports. This is slower and less reliable, but for a morning report it is often enough.

05Part five: memory and knowledge

An agent needs two kinds of memory. Reference memory holds the catalogue, the price list, procedures, answers to frequent questions and the customer's history. Working memory holds what the agent has already done, what it promised and which decisions a person made last time. Without the first the agent makes things up. Without the second it repeats the same mistakes.

Reference memory should be updated from the same source your people use. If prices change in the accounting system, the agent should take them from there: a file uploaded once by hand goes out of date with the first price change.

06Part six: limits

Limits decide what the agent may do on its own. Access to money and accounting is read-only. Anything that leaves the company is first seen by a person, until the agent has shown in practice that it can be trusted. A daily spending cap on the model keeps an error in a loop from turning into a bill for hundreds of dollars. Decisions that cannot be reversed stay with people.

07Part seven: the log and the owner

Every action of the agent is recorded: what it received, what it decided, what it sent and how much it cost. The log is there to investigate mistakes, measure the benefit and notice when something has broken. An agent that falls silent because a connection dropped is more dangerous than one that makes loud mistakes, so it must report failures of its own data sources.

And the agent needs an owner: a person who reads the log, edits the rules and answers for the result.

08Putting it together: a morning report for a chain

Let us build the agent from part one. Overnight it pulls the sales of every location from the POS system through an API with read-only access. For each location it compares yesterday's revenue with the median for the same weekday over recent weeks: promotions and seasonality distort this picture less than they distort a comparison with last year. It flags locations that have fallen noticeably behind their own norm and asks the model to write a short summary in plain language. At 09:00 the summary arrives in the owner's Telegram.

This is how the morning report we set up for chains works: one summary in place of a dozen messages from different systems, figures taken from the POS, deviations measured against each location's own norm. If the POS system did not respond overnight, the agent reports exactly that, and partial figures never reach the owner.

09What to build it with

Simple chains are assembled in visual builders such as n8n or Make: blocks are connected with the mouse and the model is plugged in as one step. More complex agents are built on platforms where the model provider itself runs the agent loop and supplies an isolated environment for it, or on open platforms such as Hermes Agent, which we cover in a [separate guide](/en/blog/hermes-agent-for-business/). The most flexible route is your own code on top of model APIs: it costs more at the start and belongs entirely to you.

The choice depends on how complex the task is, what the data requirements are and who will maintain the agent. For a first task a visual builder or a ready-made platform is usually enough.

10In place of a conclusion

Ford's assembly line made chassis assembly about eight times faster without a single new part. A good agent is assembled the same way: a task with a clear result, a suitable model, rules with examples, connections to your systems, memory, limits and a log, plus a person who keeps an eye on all of it. If any of these parts is missing, the agent works only until the first unusual case.

If you want an agent built for your own task, see our [AI automation](/en/services/ai-automation/) page or message us on Telegram @mrkt_era.

In short

  1. An agent starts with two sentences: what it does and how to tell it did the job well
  2. The model must be replaceable: switching to another one should take no more than an hour
  3. Twenty real reference examples teach the agent your tone better than a page of descriptions
  4. Read-only access to money, every outgoing message through a person, a daily spending cap on the model
  5. The action log and the agent's owner matter as much as the model itself

Related serviceAI agents for business: bookkeeping, content, SEO

Want to discuss how this would work for you? Message us on Telegram @mrkt_era.

Start

Let's start with a review

A document with priorities and a 45-minute conversation. Then you decide: on your own, with us, or not at all.

book a €250 review
€250 reviewbook