Why every agent tool call needs a log line

A record's change history tells you what a field used to say. It does not tell you which of 145 possible tools an agent called to change it, or why.

An admin approves every new account by hand. Nothing is created until then. We reply by email; no newsletter, no sequence.

app.salescrew.io/today
The daily working view

The short answer

  • A record-level change log answers 'what did this field used to be'. That is not the same question as 'what tool did the agent call, with what arguments, in which run'.
  • Once an agent has a wide tool surface, 145 registered tools in SalesCrew's case, a mistake can come from any one of them. Finding it needs a log indexed by tool call, not only by the record that changed.
  • SalesCrew writes every tool call to the audit log with the actor recorded as a user, a token, or an agent. A call made by an agent is never confused with the same call made by a person.
  • The practical payoff is reversal. If an agent run did something wrong across many records, the tool-call log shows every call that run made, not only the one record someone noticed first.

Two different questions that look similar

"What changed on this record" and "what did this agent do" sound like one question asked two ways. They are answered by two different kinds of log, and a system with only the first cannot answer the second. A change log on a record shows a field's history: it was X, now it is Y, changed at this time. That is useful for one record in isolation. It says nothing about what else happened in the same session, what other records were touched, or what the actor intended.

A tool-call log answers the second question by recording the action itself, not only its visible effect: which tool was called, with what arguments, what it returned, and who or what invoked it. For a person clicking through a UI one action at a time, the gap between the two logs is small. A person's actions are spread out and easy to reconstruct from memory or a support ticket. For an agent that can call any of 145 tools in quick succession, the gap matters a great deal. There is no human memory to fall back on.

Why the tool surface size changes what logging has to do

With a handful of possible actions, a person investigating an unexpected change can usually guess which one caused it. With 145 registered tools spanning contacts, deals, the inbox, cadences, approvals, agent controls, marketing, the knowledge base and billing, guessing stops working. A wrong value on a deal could have come from a direct field update, a stage-change tool, an import, a sync from an integration, or an agent acting on a misread signal. Without a log of the specific call, arguments included, telling those apart means guessing. Or asking the agent to explain itself after the fact, which is not an audit trail.

The arguments matter as much as the tool name. Knowing that deal_update_stage was called tells you a stage changed. Knowing it was called with a specific deal ID, a specific target stage, and a specific reason tells you whether the call was correct given the data the agent had. Two calls to the same tool with different arguments can be one right decision and one wrong one. Only the arguments tell them apart.

The actor field matters too. SalesCrew's audit log records the actor as a user, a token, or an agent, so a tool call made by a person is never confused with the same call made by an agent. After an unwanted change, the first question is usually "was this a person, or was this automation". The actor field answers it before anyone decides how to respond.

What this makes possible: reconstructing and reversing a whole run

Logging at the tool-call level pays off when something must be undone. Suppose an agent run updated the wrong field on two hundred records because of a bad assumption early in its reasoning. A record-level log shows that only when someone opens one of those records and notices. A tool-call log, queried by the run's identifier, shows every call that run made in one place: which two hundred records, what the field was changed to, and what it was before. The fix becomes a query and a batch correction, not two hundred separate investigations.

The design implication applies to any product that exposes a wide tool surface to an agent, not only a CRM. The audit log must be built around the tool call as the unit of record, not only around the record that changed. That means logging reads as well as writes, because a read that fed a wrong decision is part of the story. It means the log is append-only, so no actor, human or automated, can cover its tracks by editing it later. Building this after the tool surface has grown is possible but harder. Building it in from the first tool is cheaper. It matters most before an agent moves from review to auto for any action.

Questions

Isn't a change history on the record itself enough?
A change history shows the before and after value of a field, which answers what changed. It does not capture which tool call produced the change, what arguments it used, or which agent run it belonged to. Those are what you need to reconstruct why the change happened and what else that run touched.
Does logging every tool call create a huge amount of data?
It creates more rows than logging only user-facing changes, because read-only calls and internal actions get logged too. That volume is the price of answering 'what did this agent actually do' completely, rather than only for the calls that happened to change a visible field.
Who is the audit log actually for, a person or another system?
Both. A person queries it after the fact to understand or reverse an incident. A well-structured log, one row per tool call with actor, arguments and outcome, is also queryable by automation. It can flag an agent run with an unusual pattern of calls before a person goes looking.