🧠OWASP LLM Top 10 LLM-AGENT-AUDITRule: OWASP-LLM-AGT-001high

Agent Tool Invocation Logging

Description

Every LLM agent tool invocation logged with input, output, authorisation context, and timing. Forensic trail for agent behaviour.

⚠️ Risk Impact

Without invocation logging, agentic LLM behaviour is opaque. Post-incident reconstruction is impossible; root-cause analysis stalls; recurrence is inevitable.

🔍 How EchelonGraph Detects This

OWASP-LLM-AGT-001Automated scanner rule

EchelonGraph's Tier 1 Cloud Scanner automatically checks for this condition across all connected cloud accounts. Violations are flagged as high-severity findings with remediation guidance.

🔧 Remediation

Log every agent tool call (read + write) with structured fields: tool name, input args, output, principal, timestamp, decision rationale. Centralise to SIEM; retain 90+ days; cryptographically tamper-evident where possible.

💀 Real-World Attack Scenario

An LLM-based customer-support agent made an unauthorised refund. Investigation could not reconstruct the decision because tool-invocation logs covered API calls but not the agent's reasoning (chain-of-thought) or the input prompt that produced the decision. Resolution: manual customer-by-customer audit of $80K+ in suspect refunds.

💰 Cost of Non-Compliance

Insufficient agent logging: 3.2× longer incident investigation (DORA 2024). Avg per-incident investigation cost without logs: $180K (PwC).

📋 Audit Questions

  • 1.Show me the agent tool-invocation log structure.
  • 2.Are chain-of-thought / reasoning steps captured?
  • 3.Where are logs stored? For how long?
  • 4.Are logs cryptographically tamper-evident?

🎯 MITRE ATT&CK Mapping

T1070 — Indicator Removal on Host

🏗️ Infrastructure as Code Fix

main.tf
resource "google_logging_log_sink" "agent_invocations" {
  name        = "llm-agent-invocations"
  destination = "storage.googleapis.com/${google_storage_bucket.agent_logs.name}"
  filter      = "resource.type=\"k8s_container\" AND jsonPayload.event=\"agent_tool_invocation\""
  unique_writer_identity = true
}
resource "google_storage_bucket" "agent_logs" {
  name     = "llm-agent-logs"
  location = "EU"
  retention_policy { retention_period = 31536000 }  # 1 year
}

⚡ Common Pitfalls

  • Logging tool API calls but not the agent's input prompt + reasoning
  • Mutable log storage — can't trust forensics
  • Short retention (<30 days) — incidents surface after the window

📈 Business Value

Agent invocation logs are the foundation of agentic LLM trustworthiness. Material for any agent product handling regulated decisions or financial actions.

⏱️ Effort Estimate

Manual

2-3 weeks for structured logging + immutable sink

With EchelonGraph

EchelonGraph auto-instruments LangChain / LlamaIndex / AutoGPT agents with full invocation logging

🔗 Cross-Framework References

OWASP_LLM-LLM06EUAIA-ART12-LOGGING

Automate OWASP LLM Top 10 LLM-AGENT-AUDIT compliance

EchelonGraph continuously monitors this control across all your cloud accounts.

Start Free →