AI agents are programs that, based on a language model, independently plan and execute several work steps – for example retrieving data, calling an interface, evaluating a result and then choosing the next step based on it.This very independence is what makes them interesting for business processes.And it is precisely this that makes them difficult to control.
A recent report describes the problem with a vivid comparison: companies deploy agents as if they were employing a thousand bank clerks without ID cards.The activities run, but no one can say in retrospect beyond doubt who did what and when.Supervisory authorities in the EU and the US are calling for real-time monitoring of agent activity.However, according to this account, the common frameworks with which such agents are built do not provide the data necessary for this.
Why the gap arises
The widely used agent libraries are primarily designed for functionality: chaining prompts, connecting tools, returning results.Observability – that is, the ability to assess the internal state of a system from the outside based on its outputs – was not a design goal from the outset for many of these projects.
There is also a structural peculiarity: with classic software, the flow is defined in advance and can therefore be logged.An agent decides the flow at runtime.A log that records only the final result therefore loses the actually interesting information – namely why the agent chose this path, which tools it called and which data it accessed in the process.
What a robust log should contain
Regardless of the specific technology, the requirements for an agent log can be stated quite clearly.Anyone starting such a project should clarify these points early on:
- Identity: Under which technical identity does the agent act, and on whose behalf?An agent that performs actions under a shared collective account cannot be attributed afterwards.
- Tool calls: Which interfaces, databases or files were accessed with which parameters – including timestamps and return status.
- Decision path: Which intermediate steps led to the result?Without this trail, misbehaviour can neither be reproduced nor fixed.
- Data access: Which personal or confidential data did the agent process and to which model did it transmit it?
- Abort and escalation points: When was a process stopped, and who was informed?
What matters is that this data does not just end up somewhere in a log file, but is analysable – structured, with a consistent process ID and with a retention period that matches your own compliance requirements.
Real time is a different requirement from traceability
The two terms are often conflated, but they mean different things.Traceability is retrospective: after an incident, it answers the question of what happened.Real-time monitoring is forward-looking: it is intended to interrupt a process before damage occurs – for example if an agent retrieves an unusually large number of data records, calls the same interface conspicuously often in a short time, or uses permissions it does not need for its actual task.
Technically, this means that log data must not be written only at the end of a run, but must flow to a monitoring system during execution.There it needs thresholds, alerting and – this is the most difficult part – a working emergency stop that actually stops a running agent and does not merely send a notification.
Consequences for the architecture
If the frameworks do not provide the required data by themselves, the responsibility shifts into the architecture of your own project.In practice, this usually means: the agent does not get direct access to production systems, but works through its own intermediate layer.
This layer – sometimes referred to as a gateway or policy layer – performs three tasks at once.It authenticates the agent, it checks every action against stored rules, and it writes the log.The advantage: logging no longer depends on whether a particular library supports it, and a change of framework or model provider leaves traceability unaffected.
In addition, the principle of least privilege, known from classic IT security, is worthwhile: an agent gets exactly the permissions its task requires – time-limited and, where possible, restricted to read access.Writing or deleting operations are either safeguarded by human approval or limited to clearly defined data areas.
What this means for project planning
Monitoring and logging are often treated as a topic for the second stage of expansion in agent projects.This is risky for two reasons.First, a logging layer can only be retrofitted into an established agent landscape with considerable effort.Second, without it, the pilot phase lacks precisely the data basis with which it could be assessed whether the agent works reliably at all.
The reverse approach is more sensible: first identity, permission model and logging are created, then the first productive use case.
For the selection of tools and service providers, this gives rise to a concrete question to examine – which events the system outputs on its own, in what format, and whether this data can be transferred into the existing monitoring landscape.
Classification
For web and software projects, this shifts part of the effort from function to control: an agent that maintains content, processes form data or participates in a development pipeline needs the same traceability as an editorial system with versioning and user accounts. Anyone wishing to deploy agents should budget logging, a permission model and the ability to switch them off as part of the scope of services and not as an optional add-on. This noticeably increases the initial effort, but it is the prerequisite for later being able to transfer such systems into productive and auditable operation at all.