---
title: What is state in an AI agent? An explanation for business processes
description: State is what an AI agent knows about what actually happened.
  Without evidence for each action, an agent can wrongly assume that an action
  succeeded.
lang: en
canonical: https://www.en-twine.ai/en/what-is/agent-state/
updated: 2026-10-02T17:19:37.000Z
---
An [AI agent](/en/what-is/ai-agent/) performs actions: sending a message, updating a record in a system or opening a page. But the model in that agent cannot observe whether it succeeded. It only sees what the layer around it, [the harness](/en/what-is/harness/), returns.

In an AI agent working in a business process, state is the recorded current situation. This includes the current process status, pending steps, previous results, approvals and evidence of completed actions.

## Why missing state causes problems

If an agent receives no result, a gap remains in what it knows. A language model can fill that gap with a plausible continuation. The result can be an agent reporting that an email was sent when it was not. This is often called "hallucination", but the real problem is the missing confirmation.

This happens in practice too. Researchers examined almost 12,000 completed agent tasks. In customer service tasks, the agent still reported that the work was done in almost half of the failed cases. The software used also recorded these tasks as successful afterwards, regardless of what had actually happened ([Advani, 2026](https://arxiv.org/abs/2606.09863)).

There is a more difficult variant where the system does respond but the business change has not been carried out. Take an agent that needs to set a customer's CRM status to "active". The CRM confirms with "200 OK" that the request has technically been received. However, the response body says that the change was rejected because a required field is empty. If the tool only looks at the technical confirmation, it passes "succeeded" to the model while the customer status is still "inactive". The request has been received, but the intended result has not been achieved.

The same pattern underlies a search that returns zero results because a filter is wrong, or a page that loads but shows a login screen instead of the requested data. The model cannot see that difference itself. It only receives the summary the tool produces. Whether that summary includes the difference between technical success and a successful business outcome is a design choice in the harness.

## What good state does at a minimum

Good state does at least four things:

- **Evidence for each action:** what changed, in which version and at what time? Confirmation that a request arrived is different from evidence that the desired effect was achieved. In the CRM example, the tool reads the customer status again after the change and returns the new value.
- **More statuses than succeeded and failed:** for example, awaiting approval, partly completed and outcome unknown. With a timeout, nobody knows for certain whether the action went through. That should remain visible.
- **Safe retries:** each command gets a unique number so that the same command is not carried out twice. That way, a repeated attempt does not lead to a second email. In software this is called [idempotency](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/).
- **A clear owner for each fact:** your systems remain the owners of business facts, the harness tracks execution and the model gets a restricted view and makes proposals. An agent cannot declare an action successful just by writing it down.

## What this means for your design

As long as an agent only prepares work, missing evidence is mainly inconvenient. As soon as it does something that cannot be undone, a serious risk arises. That is why irreversible actions [go through a person](/en/what-is/human-in-the-loop/): because of the potential harm, responsibility for the decision and the fact that mistakes cannot always be repaired. How that choice affects the rest of the build is covered in the guide to [building your own AI agent](/en/guides/build-ai-agent/). You can read the practical story behind it in [why AI agents hallucinate that the work is done](/en/blog/why-ai-agents-hallucinate-completion/).