Building an AI agent is less about the AI model and more about everything around it: which workflow the agent will handle, what it may do on its own, what the data in your systems looks like and how you test it before you let it loose. Start with a well-defined, recurring workflow, set the agent's mandate, connect it to your systems via API, test it on real data in simulation mode and go live in small steps with a person in the loop. This guide walks through the six steps.
Short answer
- Step 1: Choose the right workflow. Recurring, rule-based and built on information that is already digital.
- Step 2: Define the task and the mandate. What the agent should do, what it may do on its own and where a person needs to approve.
- Step 3: Understand the data and the systems. How the information is structured, where it lives and how the agent accesses it.
- Step 4: Build the agent. Instructions, tools, connections to your systems and logging.
- Step 5: Test in simulation mode. On real data, without the agent changing anything for real.
- Step 6: Go live in small steps and measure. Expand the mandate only once you trust the results.
What is an AI agent?
An AI agent performs well-defined work in your systems on its own: it receives something, understands what needs to be done, does it and logs what it did. Unlike a chatbot, it doesn't just answer, it acts. Unlike regular automation, it handles variation, such as emails and documents that look different. Read more about the types of AI agents for businesses we build.
- Receives
- Interprets
- Fetches data
- Takes action
- Logs
The agent receives, for example, an email or a document, understands what it is about, fetches what it needs from your systems, takes the action within its mandate and logs what it did and why.
Step 1: Choose the right workflow
The most common mistake is starting too big. A good first agent handles a single, well-defined workflow where it is easy to see whether it gets things right.
Tick what applies to you
0 of 6A good first workflow for an AI agent meets most of these points.
Typical first agents interpret incoming orders or invoices and create them in the right system, sort and answer incoming tickets or compile recurring reports.
Step 2: Define the task and the mandate
Write down exactly what the agent should do, and just as important, what it shouldn't do. Then decide how much it may do on its own. It is wise to start low and raise the mandate once the agent has proven that it works.
- The agent does the work but saves the result as a draft
- A person reviews and carries it out
Best place to start
- The agent proposes an action in the system
- A person approves with one click
Once the agent has shown it gets it right
- The agent carries out the action itself within clear limits
- Exceptions and uncertain cases go to a person
For routine cases where the agent has proven accuracy
Step 3: Understand the data and the systems
An AI agent is never better than the data it works with. Before anything is built, you need to understand how the information is structured in the systems the agent will work in: which registers and fields exist, how they connect, what is required and where the data is incomplete or duplicated. In an ERP such as Visma Net, that can mean the chart of accounts, subaccounts and the customer and supplier registers.
Also check how the agent accesses the systems. Most modern systems have an API, and the agent should have its own permissions with as little access as possible, not an employee's login.
Step 4: Build the agent
In practice, an AI agent consists of five parts:
- The language model, which interprets text and makes decisions within the limits.
- The instructions, which describe the task, the rules and what the agent should do when it is unsure.
- The tools, meaning the connections to your systems that the agent may use, such as reading a customer or creating an order.
- The knowledge, such as your routines, price lists or past tickets that the agent can look up.
- The log, which shows what the agent did, when and why.
Which language model you choose often matters less than the instructions, tools and tests. Choose a provider that meets your requirements for where data is handled and that it isn't used to train the model.
Step 5: Test in simulation mode
Let the agent work on real data without changing anything for real. Compare what it would have done with what a person did in the same cases. Collect both common cases and difficult exceptions, and note where it goes wrong and why. Most improvements come from better instructions and clearer rules, not from a different AI model.
Step 6: Go live in small steps and measure
- Start with part of the workflow, such as one customer group or one type of document.
- Measure before and after: time per ticket, error rate and lead time. Without numbers from before, you can't show the impact.
- Raise the mandate gradually, from preparing to proposing and then executing, once accuracy is proven.
- Plan for ongoing management. Routines, prices and systems change, and the agent needs to keep up.
Build it yourself or get help?
Simpler agents, such as an assistant that summarizes emails, can often be set up on your own with ready-made tools. When the agent needs to read and write in a business system, handle exceptions and work around the clock, more is required: API connections, permissions, testing and ongoing management. That is where it pays to get help building the AI agent from someone who knows both AI and your systems. If you first want a picture of where AI makes the biggest difference for you, an AI consultant can start with a current-state assessment.
Frequently asked questions
How do you build an AI agent?
Start with a well-defined workflow where the work is recurring and follows clear rules. Decide what the agent may do and where a person needs to approve, understand the data in your systems, build the agent with instructions, tools and logging, test it on real data in simulation mode and go live in small steps.
What is the difference between AI automation and an AI agent?
AI automation is a fixed workflow where AI is used in one or more steps, such as extracting data from an invoice, while the rules for what happens next are set in advance. An AI agent is given a goal and decides which steps and tools it needs to reach it, within the limits you have set. Automation fits when the workflow always looks the same, an agent when it varies and requires judgment.
How long does it take to build an AI agent?
A first agent for a well-defined workflow can often be in production within a few weeks, if the systems have an API and the data is in order. What takes the most time is rarely the build itself, but defining the workflow, understanding the data and testing.
Do you need to know how to code to build an AI agent?
For simpler agents, there are ready-made tools that don't require coding. When the agent needs to work in a business system, with its own permissions, exceptions and logging, development and knowledge of the system's API and data structure are usually required.
Which AI model should you use?
It often matters less than the instructions, tools and tests. Choose a model and provider that can handle the task and meet your data protection requirements, such as where data is handled and that it isn't used for training.
Is it safe to let an AI agent work in our systems?
Yes, if it is built right: with its own permissions and as little access as possible, a log of every action, human approval where a mistake would be costly and testing in simulation mode before it goes live.
What does it cost to build an AI agent?
It depends mainly on how many systems the agent needs to work in and how many different cases it needs to handle. If you build in systems you already have, the cost is mainly in the work, not in new licenses.
Next steps
Pick a workflow that takes time today and write down how it works step by step, including the exceptions that usually come up. That is the best start for an AI agent, whether you build it yourselves or get help. If you want help, you can book a free mapping session.