Skip to main content

enable_audit_log

Function
This function is defined in the security module.
Enable an append-only JSONL audit log for all agent tool calls. .. warning:: Registers on the process-global praisonaiagents.hooks registry; the audit sink applies to every Agent in the process. Keep the returned hook ID and remove it via praisonaiagents.hooks.remove_hook to scope or disable it later.

Signature

Parameters

Optional[str]
Path to the audit log file. Defaults to ~/.praisonai/audit.jsonl.
bool
default:"False"
Whether to include tool output in log entries.

Returns

str
Hook ID string.

Usage

Uses

  • AuditLogHook
  • add_hook
  • audit.create_after_tool_hook

Used By

Source

View on GitHub

praisonai/security/__init__.py at line 139