WAF-AGN-030 – Reasoning Transparency

Description

Agent decisions must be traceable – not a black box. Every decision step must be logged including chain of thought, reasoning, and decision outcome. Audit trails must preserve the full context of agent decision-making for compliance and debugging.

Rationale

Black-box decision-making creates significant operational and compliance risks:

Debugging difficulty: When agents make incorrect decisions, without reasoning logs, it’s impossible to understand why and fix the root cause.

Compliance gaps: Regulatory frameworks require explainability for automated decisions, especially those affecting individuals.

Trust issues: Stakeholders cannot trust agent decisions if they cannot understand how they were made.

Missed learning opportunities: Without reasoning logs, organizations cannot learn from agent decisions to improve systems.

Requirements

  • Chain of thought must be captured in logs

  • Every decision step must be recorded with timestamp and context

  • Input prompt, model response, and reasoning path must be logged

  • Audit trail must be immutable and secure

  • Logs must support querying by agent ID, session ID, and time range

Implementation Guidance

  1. Enable inference logging: Configure cloud provider’s logging for agent inference (Bedrock, Vertex AI, Azure OpenAI)

  2. Capture reasoning metadata: Include reasoning tokens, tool call details, and decision parameters

  3. Set up log aggregation: Forward logs to centralized system for analysis

  4. Create dashboards: Build monitoring dashboards for reasoning patterns and anomalies

  5. Implement log retention: Define retention policies based on compliance requirements

Maturity Levels

Level Name Criteria

1

Black Box

Agent decisions not logged. No visibility into reasoning process.

2

Basic Response Logging

Input prompts and output responses logged. No reasoning details.

3

Full Reasoning Trace

Chain of thought, tool calls, and decision logic all logged.

4

Analysis Enabled

Logs enable post-mortem analysis and pattern detection.

5

Predictive Reasoning

Log analysis used to predict and prevent reasoning failures.

Terraform Checks

waf-agn-030.tf.aws.bedrock-agent-logging-enabled

Checks: AWS Bedrock inference logging is enabled for agents.

Compliant Non-Compliant
resource "aws_cloudwatch_log_group" "agent_reasoning" {
  name = "/aws/bedrock/inference-logs/reasoning"
}

resource "aws_bedrockagent" "reasoning_agent" {
  agent_name = "reasoning-enabled-agent"
}

No logging configuration

waf-agn-030.tf.aws.tracing-enabled

Checks: Distributed tracing is enabled for agent operations.

# Compliant
resource "aws_lambda_function" "agent_handler" {
  function_name = "agent-handler"
  environment {
    variables = {
      AWS_XRAY_TRACING_NAME = "agent-service"
    }
  }
}

Remediation: Enable inference logging in cloud console. Configure X-Ray tracing. Instrument agent code with tracing SDK.

Evidence

Type Required Description

IaC

✅ Required

CloudWatch log groups, X-Ray configuration, tracing SDK setup.

Config

✅ Required

Logging levels, sampling rates, log retention settings.

Process

✅ Required

Reasoning log analysis report, tracing dashboards.

Governance

Optional

Reasoning transparency policy defining requirements.

Regulatory Mapping

Framework Controls

ISO 27001:2022

A.8.1 – Information security roles and responsibilities; A.8.2 – Privileged access rights

NIST SP 800-53

AU-2 – Event logging; AU-3 – Event content; AU-12 – Audit generation

NIST CSF 2.0

DE.CM – Continuous monitoring; DE.DP – Data protection

GDPR

Art. 32 – Security of processing; Art. 22 – Automated individual decision-making

PCI DSS v4.0

Req 6.4 – Secure development lifecycle; Req 10 – Monitor and detect threats

TISAX

Information security – Monitoring and logging

ANSSI SecNumCloud

Domain – Logging and monitoring

BIO

BIO – Logboekhouding en monitoring

ENS High

op.exp.6 – Gestión de cambios

UK NCSC CAF

A4 – Policy and assurance

FedRAMP

AU-2, AU-3, AU-12 (Moderate baseline)

CMMC 2.0

AU.L2-3.8.1 – Flow audit logs to central log management

IT-Grundschutz

ORP.1 – Informationstechnisch-related Angriffsschutz

IRAP

ISM – Logging and monitoring

CCCS PBMM

AU-2, AU-3 – Logging and audit

MAS TRM

Ch.9 – Change management

ISMAP

Monitoring and logging controls

FISC

Technical measures – Logging and monitoring

AWS Well-Architected Framework

Security Pillar – Logging and monitoring

Google Cloud Architecture Framework

Operations – Monitoring and logging

BSI C5:2020

OPS-01 – Operational monitoring; OPS-02 – Operational control

SOC 2 Type II

CC4.1 – Monitoring activities; CC7.1 – Infrastructure and software monitoring

CSA STAR

CCM Logging and Monitoring