Records: what to log so you can reconstruct what an agent did

Here is the test. Pick an agent and a day last month. Could you say what it did, in what order, and why?

If not, you will find out at the worst time: after something has gone wrong, when a customer, an auditor or your own leadership asks what happened.

What to record for each action

  • When it happened.
  • Which agent, and which version of its instructions.
  • What set it off: a message, a schedule, another system.
  • What it read to decide. A reference is enough. You do not need a copy of everything.
  • What it did: the exact action and the result.
  • Who approved it, if anyone.

That is one line for each action. It is not a transcript of everything the model produced.

Where to keep it

Somewhere the agent cannot reach. An agent, or the administrator of the product it runs in, should not be able to edit or delete the record of what the agent did. If your only log lives inside the vendor's console, export it to the log store you already use for everything else.

How long

Do not invent a number. Tie it to rules you already follow. If an agent schedules payments, its records are kept as long as your payment records. If it writes to customer accounts, as long as those. The record of an action should outlive any dispute about that action.

What records are for

Logs nobody reads are storage. Three uses earn their keep:

  • A weekly look at the exceptions. Rejected approvals, hits against a limit, actions outside normal hours.
  • Alerts. A sudden rise in volume. A first-time recipient. An action of a kind this agent has never taken.
  • The account afterward. When something goes wrong, the record is how you learn how far it went.

The gaps we expect to find

  • The vendor keeps the log 30 days, and nobody exports it.
  • The log shows what the agent said, not what it did.
  • Several agents share one account, so no one can tell which of them acted.
  • The log holds personal data and is protected less carefully than the system it came from.

Next: Stopping and undoing

Start with the review.