Start with the identity behind the action
Decide whether a tool operates under an individual user's delegated identity or a service identity with explicitly limited permissions. Record the organisation, the task owner and the allowed scope. A shared integration account with broad access can silently give an agent more authority than the person who started the task.
Authentication establishes who is calling. Authorisation decides whether that identity may perform this operation on this record now. OWASP's guidance recommends denial by default and permission checks on every request. Those checks still apply when the request originated from a model-generated tool call.
Separate reading, preparing and committing
A tool that retrieves a supplier record has a different consequence from one that changes its payment details. Give read, draft and write operations separate interfaces and policies. Validate arguments against trusted records and current state. Treat document text, tool responses and external messages as information, not authority to widen the permitted scope.
Do not expose a universal 'execute any API request' tool where a narrow operation will do. A bounded tool can check permitted fields, record relationships, transaction limits and the state in which an update is allowed. A prompt can explain those boundaries; it cannot replace their enforcement.
Give audit events a stable meaning
Separate proposed, denied, approved, sent, acknowledged and reconciled events. Each needs its own identifier, timestamp and outcome. Connect events using a task or operation reference that survives retries; do not rely on the order in which log lines happen to arrive from different systems.
Record which policy and object version were evaluated, and reference the approval for the exact proposed operation. The human-approval guide explains the approval lifecycle. The audit specification should make its decisions traceable without duplicating that entire workflow in a transcript.
Build a timeline an operator can investigate
Suppose a remote system accepts an agent's supplier-contact update, but the connection drops before confirmation. The operator needs to distinguish a submitted request from an acknowledged update and an unconfirmed outcome. A repeated attempt should point to the same business operation, not appear as an unrelated task.
The support view should answer three questions: what was attempted, what the target system confirms and what remains unresolved. Link the outstanding state to a recovery owner and the eventual reconciliation event. A fluent final agent message is not proof of a successful write, and an absent confirmation is not proof of rejection.
Keep an audit record that answers operational questions
A useful record connects the task to the operation, not just to the final assistant message. It should allow an authorised reviewer to establish:
- Which identity and customer context were used, and which policy was checked?
- Which operation, record and fields were proposed?
- Which evidence and versions informed the proposal?
- Who approved it, when, and for which exact change?
- What was attempted, retried, rejected or confirmed by the target system?
- Who owns recovery, and how was the final state reconciled?
The record need not reproduce every prompt or confidential document. Choose identifiers, hashes, redacted fields or controlled evidence references according to the investigation need. Protect the log itself with permissions and retention rules; an indiscriminate transcript can become another sensitive data store.
Set access and retention independently of the chat
A person allowed to use an assistant does not automatically need diagnostic access to other people's tasks. Define operator, reviewer and security-investigation views, and log access to sensitive evidence. Ensure searches and exported incident packs respect the same customer boundaries as the live application.
Set retention by the purpose of each record and the applicable obligations. Keep enough to reconcile actions and investigate incidents, while avoiding indefinite storage of raw documents and conversation content. Capture observable requests, authorisation decisions and tool results; do not require or expose private model chain-of-thought as an audit artifact.
Test the policy, not only the model's cooperative behaviour
Attempt a write under a read-only identity. Change the record after approval. Repeat a request, remove a user's access and return a misleading instruction inside a document. Verify that the application rejects or contains the action even if the model proposes it.
Test partial failures across multiple systems, too. Some actions can be reversed, others require a compensating step and others cannot be undone automatically. Agree those paths before describing a workflow as autonomous.
Use incidents to refine the boundary
Measure useful completion alongside unauthorised attempts, stale approvals, recovery effort and time spent reviewing uncertain outcomes. A low failure count is not meaningful if exceptions disappear into an unowned queue. Name the operating owner and a way to disable consequential actions without losing the evidence needed to investigate.
For the broader change from text to action, read what changes when an assistant becomes an agent. Begin with one bounded workflow whose action policy and failure handling can be demonstrated. Expand authority only after the operating evidence supports it.