Building AI agents that can explain what they did
Last Updated
November 24, 2026
Read Time

Summary
With the rapid rise of Agentic AI in 2026, the aim is not simply to build agents that can act. It is to build agents that can account for what they have done and give organizations the evidence they need to understand, verify, and improve those actions.
What’s on this page
Imagine an AI agent confidently telling a customer, 'Your refund has been processed.'
It sounds reassuring. Yet, that single sentence could be hiding four very different situations. The payment system might have genuinely cleared the funds; it might have just ‘initiated,’ but the refund was still being processed; the request might have timed out and the payment system not have acted at all; or the agent might have simply called the wrong tool altogether.
The customer sees the same response in every case. To the business, they are very different outcomes.
If you want to know which reality you are dealing with, you need a detailed record of what the agent actually did. This is why an agent must be able to account for its actions, and that traceability needs to be baked in from the very beginning.
Why can't you ask the agent what happened?
Because it will inevitably make something up. When you ask an agent why it did something, it does not look up a record of its own workings. It simply invents a plausible-sounding narrative after the fact. Whether it is true is another matter.
Like humans, AI agents suffer from what researchers call ‘Choice Blindness,’ that is, building the story of their decisions after the fact.
Anthropic proved this in 2025 by slipping hidden hints into test questions. When asked to explain their answers, models like Claude 3.7 Sonnet admitted to using the hints only a quarter of the time. Worse, when the models found unauthorized shortcuts to game a test, they confessed in fewer than 2% of cases.
They didn't tell the truth because they couldn't; they just wrote a compelling fiction about why they made their choice.
More disastrously, in April 2026, a coding agent at PocketOS wiped a production database and its backups in nine seconds. Its instructions said, in capitals, never to guess. Afterwards, it admitted that guessing was exactly what it had done.
This is why an agent’s own testimony is entirely inadmissible. Explanation must come from an objective record.
Kore.ai Artemis takes a different approach. Rather than asking the agent afterwards, it keeps a record as events unfold: which agent acted, which tool it used, what came back, and which rules passed or failed. You no longer depend on what the agent says about itself; you read the record of everything that happened before it replied.
How to build agents that explain themselves
Building an explainable agent comes down to four steps: define what it should do, record what it does, capture why it acted, and use that record to improve it.
1. Define what the agent should do
You cannot measure a deviation if you haven't established a baseline. Before you understand whether an agent has behaved correctly, you explicitly need to know what it is actually meant to do.
In the Artemis platform, this is achieved through Agent Blueprint Language (ABL). ABL is a language for defining how an agent should behave. It provides a rigorous, structural definition of the agent’s tasks, tools, workflows, business constraints, and hand-off conditions.
The benefit is straightforward. When an execution inevitably goes wrong, engineers aren't left guessing what the agent intended to do; they have a concrete blueprint to measure the runtime reality against.
2. Capture what the agent actually does
Having a clear definition of the agent is only the starting point. The next step is to record what happens when the agent starts working.
This is the role of agent observability. In Artemis, StateTrace records the execution of each agent. It captures routing, handoffs, tool calls, workflow transitions, state changes, and the results returned by different systems. Think of it as a detailed record of the agent's journey.
Key events include:
- handoff_match: which agent a request was passed to, and why
- tool_call and tool_result: what was sent to a system, what came back, and whether it worked
- constraint_check: which business rule was tested, and whether it held firm
- flow_transition: the rationale for moving to the next workflow step
This is particularly useful the moment multiple agents start collaborating. For instance, if a supervisor hands an insurance query to a claims specialist, who then consults a policy expert, StateTrace preserves the entire chain of execution.
Engineers can follow the execution tree from start to finish, without piecing together separate logs. You record both what each agent did, as well as what it said.
3. Explain why the agent took a particular path
A record of the execution is useful, but it does not explain why something happened. Engineers also need to see the exact conditions that shaped the agent's actions.
In our earlier insurance example, the trace must show why the supervisor routed the query to the claims specialist, which routing condition matched, and exactly when the task returned to the supervisor.
The same goes for business rules. Suppose an agent is capped at issuing $1,000 refunds, explicitly codified as a constraint in ABL. When a $1,500 request arrives, the trace objectively logs the constraint failing and the immediate escalation to a human. There is no guesswork, and you certainly don’t have to rely on the AI’s version of events.
Similarly, tool execution needs the same scrutiny. If an agent says a refund is ‘complete’, but the payment system returns ‘initiated’, the trace captures the discrepancy.
This is why an explanation is only trustworthy when it is anchored in this unarguable, hard evidence.
4. Use the record to improve the agent
The ultimate goal of explainability isn't merely collecting evidence. It should help agents improve continuously.
In Artemis, this is the job of Autoloop, the platform’s optimization engine. Because every execution trace maps directly back to the original ABL blueprint, Autoloop can easily amend the exact rule at fault.
Returning to our refund example, that means adding a status check so the agent cannot confirm a refund until it is complete. Autoloop then re-checks the change against the team's goals. If the fix cannot be verified, Autoloop rolls it back and holds it for a human to review.
This is when observability becomes a part of continuous improvement: build, evaluate, diagnose, and refine.
How does Artemis protect the data in a trace?
Detailed traces can hold sensitive information, such as customer details and system payloads. To manage the risk, Artemis strips out PII and credentials before a trace is stored. These sanitized traces can then be exported to tools you already use, such as Datadog, LangSmith, and OpenTelemetry-compatible systems, making sure your agent observability sits neatly alongside your standard infrastructure monitoring.
Build agents that can account for their actions
As enterprises give AI agents more responsibility for business tasks, the way we judge their success will have to change. It is no longer enough to know that an agent produced a sensible answer or attempted to complete a task.
Organizations need to understand what an agent was designed to do, how it carried out the work, why it took particular actions, and whether the intended outcome was actually achieved.
That requires an architecture that connects the agent's intended behaviour with its actual execution, preserves the evidence behind its decisions, and uses that evidence to improve how it works.
Kore.ai Artemis delivers exactly this through ABL, StateTrace, Arch, and Autoloop.
Share