PluginsAudit Trail

Audit Trail

@agorio/plugin-audit-trail records a structured log of every tool call the agent makes. It hooks onAfterToolCall, so each entry captures what was called and what came back.

import { auditTrail } from '@agorio/plugin-audit-trail';
 
const agent = new ShoppingAgent({
  llm,
  plugins: [
    auditTrail({
      sink: (entry) => myLogStore.append(entry),
    }),
  ],
});

Redaction

Tool calls can carry sensitive data — payment details, customer PII. The audit trail applies redaction so secrets don’t end up in your logs while the structured shape of each entry stays intact for compliance review.

This pairs naturally with the Agorio Cloud audit-log viewer and the EU AI Act compliance export. It’s MIT-licensed and published as @agorio/plugin-audit-trail.