Moonxi
Book a diagnostic
Guide · AI in production

What an AI agent is and what changes when you put one in production.

An agent does not answer: it decides the next step and acts. That changes everything downstream — approval, cost, audit, and what happens the day it gets something wrong.

The short answer.

AWS defines an AI agent as a software program that interacts with its environment, collects data, and uses that data to perform self-directed tasks toward a predetermined goal. The word that makes the difference is self-directed: the agent chooses the next step, and that is why putting one in production is an operations problem, not a model problem.

A chat gets something wrong and somebody reads a wrong answer. An agent gets something wrong and somebody receives a wrong invoice, a ticket closed with no solution, or an email that should never have gone out. It is the same technology with a different consequence, and the consequence is what needs designing.

The four pieces of an agent.

As AWS describes them. Any product calling itself an agent has these four pieces, under different commercial names.

01.

Foundation model

The reasoning. It is the language model that interprets the request and decides the next step.

02.

Memory

It retains information across interactions, sessions or tasks. It is what lets the agent remember what it already tried.

03.

Tools

The connection to external software, APIs and devices. This is where the agent leaves the text and touches the world.

04.

Planning

It breaks the goal into smaller steps and puts them in a logical sequence.

The cycle AWS describes has three moments: set the goal and break it into tasks, fetch the information needed to carry them out, and execute while assessing progress at each step. That last point — assessing its own progress — is what makes an agent hard to test the way ordinary software is tested.

What separates the demo from production.

Five layers. None of them shows up in a demo, and all of them show up in the first month of operation.

A written approval boundary

Which actions go out alone and which wait for a person. That is a business decision, not an engineering one, and it belongs in a document somebody signs — not in a code comment.

Calculation outside the model

Scores, amounts, rates and deadlines are computed by tested code. The agent writes the text around the number; it never produces the number. Both paths are compared before anything reaches production.

A trace of every step

Which tool the agent called, with which arguments, with which result. Without that trace, investigating an error becomes archaeology and the answer takes days instead of minutes.

Cost per execution

An agent that retries until it succeeds can cost ten times the forecast on a bad day. Measuring cost per execution and setting a ceiling per task is operational control, not a technical detail.

The one nobody writes

The procedure for when it is wrong

Who gets told, how quickly, how the agent is switched off without taking the rest down, and how what it did gets undone. A pilot that gets it wrong becomes an in-house joke; a production system that gets it wrong needs a named person and a button.

Four questions before you take yours out of pilot.

If you cannot answer all four in writing, the agent is not ready — and the problem will not show up in the demo.

01.

What is the most expensive action it can take on its own today?

02.

Where does each number it shows come from, and can it be checked in one click?

03.

What does one execution cost, and what is the daily ceiling?

04.

Who is told when it gets something wrong, and how fast can it be switched off?

Questions about AI agents.

What is an AI agent?

AWS defines an AI agent as a software program able to interact with its environment, collect data, and use that data to perform self-directed tasks that meet predetermined goals. That is the difference from a chat: the agent decides the next step and acts, instead of only answering.

What is inside an agent?

Four pieces, in the AWS description: a foundation model, which does the reasoning; a memory module, which retains information across interactions, sessions or tasks; tool integration, which connects the agent to external software, APIs and devices; and a planning module, which breaks the goal into smaller steps and puts them in order.

What is the difference between an agent and RAG?

RAG retrieves information so the model can answer better. An agent uses tools to make something happen — open a ticket, update a record, trigger a charge. Almost every useful agent has RAG inside it; the reverse is not true.

Can an agent act on its own inside my operation?

It can, and the right question is where. The rule we apply is simple: where a mistake is expensive, a person approves before the action goes out. What is reversible and cheap, the agent does directly. That boundary is the client’s decision, it is written down, and it is the first thing we define before building.

Which risks does AWS name?

Four: data privacy, because agents handle large volumes of information; biased or inaccurate output coming from the model; technical complexity, which demands specific machine-learning experience; and consumption of computing resources.

Why does an agent pilot never become production?

Because the demo is judged by one person who wants to see it work, and production is judged by ten who need to trust it. What is missing is almost always the same: nobody defined who approves what, where each number comes from, what one execution costs, and what happens on the day the agent gets it wrong.

Got an agent stuck in pilot?

The diagnostic answers the four questions above with evidence from your own case, and says what is missing for it to reach production with an owner. Two weeks, one document, one fixed quote.

Book a diagnostic → See a case with 44 agents

Sources

The definitions, the four pieces, the execution cycle and the risks cited come from the AWS pages, opened on August 9, 2026. The five production layers and the four questions are Moonxi implementation practice, and are written as practice.