<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: BHANUJ AI</title>
    <description>The latest articles on DEV Community by BHANUJ AI (bhanuj-ai).</description>
    <link>https://dev.to/bhanuj-ai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F15406%2Fae7f8168-da80-4d94-88b7-54275d06cc90.png</url>
      <title>DEV Community: BHANUJ AI</title>
      <link>https://dev.to/bhanuj-ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bhanuj-ai"/>
    <language>en</language>
    <item>
      <title>Beyond Observability: Did the Evidence Actually Influence the AI Agent's Decision?</title>
      <dc:creator>Bhanuj Kashyap</dc:creator>
      <pubDate>Tue, 17 Nov 2026 23:46:10 +0000</pubDate>
      <link>https://dev.to/bhanuj-ai/beyond-observability-did-the-evidence-actually-influence-the-ai-agents-decision-1l0n</link>
      <guid>https://dev.to/bhanuj-ai/beyond-observability-did-the-evidence-actually-influence-the-ai-agents-decision-1l0n</guid>
      <description>&lt;p&gt;&lt;em&gt;Exploring controlled counterfactual replay, evidence influence, and the engineering challenges of auditing consequential AI decisions.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fggrfycio9ezx315fbpfs.png" alt="Overview" width="800" height="450"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Execution Traces Limitations
&lt;/h2&gt;

&lt;p&gt;As AI agents become more capable of interacting with enterprise systems, we are investing heavily in observability. We capture model interactions, tool invocations, execution traces, latency, token consumption, and errors. Frameworks and observability platforms are making it increasingly practical to reconstruct what happened during an agent's execution.&lt;/p&gt;

&lt;p&gt;That is necessary, particularly when agents begin participating in financial decisions, risk assessments, customer operations, and other consequential workflows. But there is a question that conventional execution traces cannot necessarily answer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Did the evidence retrieved by an AI agent actually influence its final decision?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Consider an agent that retrieves a fraud-risk assessment before deciding whether to approve or block a financial transaction. The execution trace confirms that the agent called the risk-assessment tool, received its response, and subsequently blocked the transaction.&lt;/p&gt;

&lt;p&gt;We know the sequence of events. We know what information was available. We may even know the exact model version and tool configuration. &lt;strong&gt;&lt;em&gt;But can we establish whether the risk evidence materially influenced the outcome?&lt;/em&gt;&lt;/strong&gt; The distinction matters because &lt;strong&gt;observing evidence consumption is not the same as measuring evidence influence.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Investigation
&lt;/h2&gt;

&lt;p&gt;Imagine an AI agent responsible for evaluating a financial transaction. It retrieves a risk assessment from an external system before making its decision.&lt;/p&gt;

&lt;p&gt;The tool returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Risk level: &lt;code&gt;HIGH&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Confidence: &lt;code&gt;0.90&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Agent decision: &lt;code&gt;BLOCK&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first glance, the behaviour appears reasonable. The transaction was considered high-risk, and the agent blocked it.&lt;/p&gt;

&lt;p&gt;Now consider an alternative scenario.&lt;/p&gt;

&lt;p&gt;What would happen if the same agent were presented with a risk assessment indicating &lt;code&gt;LOW&lt;/code&gt; risk and a confidence value of &lt;code&gt;0.20&lt;/code&gt;, while the other relevant execution inputs remained unchanged?&lt;/p&gt;

&lt;p&gt;Would the agent allow the transaction, or would it continue blocking it?&lt;/p&gt;

&lt;p&gt;This is a counterfactual question. We are not asking what happened in the original execution. We are investigating what happens under a specifically controlled change. Two possibilities are particularly interesting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario A: Decision Changes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The original execution returns &lt;code&gt;BLOCK&lt;/code&gt;. After replacing the risk evidence with an approved low-risk assessment, the replay returns &lt;code&gt;ALLOW&lt;/code&gt;. This provides evidence that the measured decision is sensitive to the modified risk information under the tested conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario B: Decision Remains Unchanged.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The original execution returns &lt;code&gt;BLOCK&lt;/code&gt;, and the counterfactual execution also returns &lt;code&gt;BLOCK&lt;/code&gt;. Perhaps another constraint, such as a locked account, independently requires the transaction to be blocked. Perhaps the modified evidence had little influence on the evaluated path. A stable outcome does not automatically mean that the agent ignored the tool. It means that the intervention did not materially change the measured outcome in this test.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Furdpe105yffeelnf0j9v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Furdpe105yffeelnf0j9v.png" alt="Causal Audit - Observations" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Both observations are useful, provided we interpret them within the boundaries of the experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tracing to Controlled Counterfactual Replay
&lt;/h2&gt;

&lt;p&gt;This question led me to explore &lt;strong&gt;&lt;a href="https://governance.bhanuj.ai/docs/causal-audit" rel="noopener noreferrer"&gt;Causal Audit&lt;/a&gt;&lt;/strong&gt;, a capability implemented in the open-source &lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;AI Governance Platform (AIGP)&lt;/a&gt;. The idea is straightforward: preserve the original execution, introduce one policy-approved change to its tool evidence, replay the execution in isolation, and compare the outcomes.&lt;/p&gt;

&lt;p&gt;The important part is not simply calling the model again with different data. The difficult engineering work lies in controlling the intervention, preserving the original evidence, reproducing the relevant execution conditions, and ensuring that the experiment cannot accidentally affect production systems.&lt;/p&gt;

&lt;p&gt;The workflow has 4 principal stages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Observe:&lt;/strong&gt; Record the completed execution, including ordered tool-call identities, approved evidence references, schema information, and a bounded outcome score.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorize:&lt;/strong&gt; Select an active, versioned intervention policy that explicitly permits a particular kind of change to the selected tool evidence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replay:&lt;/strong&gt; Ask the original runtime, through a registered adapter, to execute the approved counterfactual in isolation without production side effects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare:&lt;/strong&gt; Evaluate the original and counterfactual outcomes, classify the measured behaviour, and preserve the resulting audit lineage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The original execution is never rewritten. The counterfactual is a separate execution with its own evidence and identifiers. This separation is essential. An audit should investigate historical behaviour, not alter the history it is supposed to explain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Governance Boundary
&lt;/h2&gt;

&lt;p&gt;A natural question is whether this could simply be implemented inside an agent framework. For a single application, a developer could certainly build a replay function, change a tool result, and compare the responses. In fact, that is a reasonable starting point for experimentation.&lt;/p&gt;

&lt;p&gt;The architectural challenge emerges when we need to establish who is permitted to change the evidence, which execution can be reproduced, whether the replay is safe, and whether the resulting comparison remains reviewable later. This introduces responsibilities beyond ordinary agent orchestration.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;AIGP&lt;/a&gt;, these responsibilities are deliberately separated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The agent runtime owns execution.&lt;/strong&gt; It retains private prompts, tool arguments, tool outputs, and the information required to reconstruct its execution. It also owns the mechanism for safely replaying the agent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The governance control plane owns authorization and audit coordination.&lt;/strong&gt; It establishes which interventions are permissible, validates execution eligibility, coordinates durable replay jobs, and records the resulting classifications and lineage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The intervention policy defines the permissible change.&lt;/strong&gt; Supported strategies include &lt;code&gt;NULLIFY&lt;/code&gt;, &lt;code&gt;REPLACE&lt;/code&gt;, and &lt;code&gt;PERTURB&lt;/code&gt;, subject to the policy and evidence contract.&lt;/p&gt;

&lt;p&gt;The control plane does not need unrestricted access to the agent's private data, nor should it become another general-purpose agent runtime. This is an architectural distinction I consider especially important for enterprise systems: governance and enforcement boundaries should be explicit rather than hidden inside application-specific orchestration code.&lt;/p&gt;

&lt;h2&gt;
  
  
  OpenAI Implementation Demonstration
&lt;/h2&gt;

&lt;p&gt;To move beyond a conceptual architecture, I implemented an independently runnable reference lab using the OpenAI Responses API.&lt;/p&gt;

&lt;p&gt;The lab uses a real model interaction with a governed transaction-risk scoring tool. It records the original execution, submits bounded evidence to &lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;AIGP&lt;/a&gt;, applies an approved replacement policy, and performs the controlled replay through the external OpenAI runtime.&lt;/p&gt;

&lt;p&gt;Two scenarios demonstrate different behaviours.&lt;/p&gt;

&lt;p&gt;In the first scenario, the original risk assessment is &lt;code&gt;HIGH / 0.90&lt;/code&gt;, producing a &lt;code&gt;BLOCK&lt;/code&gt; decision. An approved replacement changes the risk evidence to &lt;code&gt;LOW / 0.20&lt;/code&gt;, producing an &lt;code&gt;ALLOW&lt;/code&gt; decision.&lt;/p&gt;

&lt;p&gt;In the second scenario, the agent also receives a separate locked-account fact. Although the risk assessment changes, that independent constraint keeps the outcome at &lt;code&gt;BLOCK&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The reference lab exercises the corresponding &lt;code&gt;EVIDENCE_ALIGNED&lt;/code&gt; and &lt;code&gt;EVIDENCE_IGNORED&lt;/code&gt; classifications.&lt;/p&gt;

&lt;p&gt;These examples are intentionally constrained. They demonstrate the integration contracts and measured outcomes without claiming to reproduce the full complexity of a production financial-decision system.&lt;/p&gt;

&lt;p&gt;Several implementation choices are worth highlighting.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provider-neutral governance:&lt;/strong&gt; The OpenAI SDK remains outside &lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;AIGP&lt;/a&gt; Core. The external runtime integrates through a versioned Plugin API rather than introducing provider dependencies into the control plane.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private evidence ownership:&lt;/strong&gt; Raw prompts, tool payloads, model responses, and reasoning are not ingested into Core. The runtime retains the information required for private reconstruction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evidence integrity:&lt;/strong&gt; Canonical JSON digests bind the approved replacement evidence to the replay request. The runtime rejects a replacement whose resolved content does not match the expected digest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Durable lineage:&lt;/strong&gt; Audit results retain references to the original execution, intervention policy version, replay executions, and outcome measurements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explicit replay safety:&lt;/strong&gt; A replay requires a compatible adapter and approved execution context. The system does not assume that arbitrary agent executions can be reproduced safely.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9iznitv7otsav1h4cj0t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9iznitv7otsav1h4cj0t.png" alt="AIGP - Causal Audit Outcome" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The OpenAI reference implementation also makes model-response state retention an explicit configuration choice. Its default continuation mode uses stateless Responses requests with &lt;code&gt;store=false&lt;/code&gt;; an alternative provider-state mode is available when native response continuation is required. These details may appear operational rather than algorithmic, but they determine whether a counterfactual experiment can be safely reproduced and reviewed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Causal Audit Features
&lt;/h2&gt;

&lt;p&gt;There is an important scientific and engineering limitation here.&lt;/p&gt;

&lt;p&gt;A counterfactual experiment on an AI agent does not provide unrestricted access to the model's internal reasoning. Nor does a changed outcome establish universal causation. It establishes something narrower: &lt;strong&gt;the measured sensitivity of a defined outcome to a specific, controlled evidence change under the conditions of the experiment.&lt;/strong&gt; &lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;AIGP&lt;/a&gt; compares the observed outcome score with the aggregate score obtained from successful controlled replays. A configured threshold determines whether the measured difference is material.&lt;/p&gt;

&lt;p&gt;The platform supports classifications including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;EVIDENCE_ALIGNED&lt;/code&gt; — The evidence materially influenced the measured outcome, with tool usage remaining within configured bounds.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EVIDENCE_IGNORED&lt;/code&gt; — The approved evidence change did not materially alter the evaluated outcome.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OVER_EXTENDED&lt;/code&gt; — Evidence influence was detected, but execution continued with unnecessary tool calls after the result had effectively settled.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;NO_TOOL_EVIDENCE&lt;/code&gt; — No usable tool evidence was available for the assessment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A failed or incomplete audit is not converted into a confident-looking result. Missing prerequisites, incompatible adapters, or failed replay samples must remain visible as limitations.&lt;/p&gt;

&lt;p&gt;There is also the broader question of repeatability. Models can exhibit stochastic behaviour, and not every runtime can reproduce its earlier state faithfully. A single counterfactual result should therefore be interpreted with appropriate caution, particularly when decisions are sensitive to small changes.&lt;/p&gt;

&lt;p&gt;The quality of the conclusion depends on the integrity of the evidence, the isolation of the replay, the consistency of the execution conditions, and the suitability of the outcome measurement.&lt;/p&gt;

&lt;p&gt;This is why I view &lt;a href="https://governance.bhanuj.ai/docs/causal-audit" rel="noopener noreferrer"&gt;Causal Audit&lt;/a&gt; as an execution-level diagnostic rather than a mechanism for proving what an AI model was thinking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond Fraud Detection
&lt;/h2&gt;

&lt;p&gt;Financial-risk assessment is one application, but the underlying problem is broader. Consider an AI assistant recommending whether a customer qualifies for a loan. It retrieves eligibility information from one service and policy constraints from another. If the recommendation is challenged, reviewing the execution trace may establish which services were consulted.&lt;/p&gt;

&lt;p&gt;A controlled replay can investigate whether changing an approved eligibility fact changes the recommendation, while preserving the policy constraints that should remain fixed.&lt;/p&gt;

&lt;p&gt;Similar questions arise in insurance assessment, compliance reviews, operational recommendations, and enterprise workflows where an agent consumes multiple pieces of external evidence before producing an outcome.&lt;/p&gt;

&lt;p&gt;This does not eliminate the need for deterministic business rules, authorization checks, human approvals, or conventional software testing. In particular, a favourable &lt;a href="https://governance.bhanuj.ai/docs/causal-audit" rel="noopener noreferrer"&gt;Causal Audit &lt;/a&gt; classification is not proof that a decision was correct, fair, compliant, or authorized. It adds another form of evidence to an existing engineering and governance process: an experimentally measured relationship between a controlled input change and an observed outcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering Questions
&lt;/h2&gt;

&lt;p&gt;Controlled replay introduces its own difficulties.&lt;/p&gt;

&lt;p&gt;Execution state must be recoverable, external dependencies may have changed, and replaying a workflow must not trigger payments, notifications, database mutations, or other production side effects. Parallel executions, nondeterministic model responses, and evolving tool schemas further complicate reproducibility.&lt;/p&gt;

&lt;p&gt;There are also practical costs. Each replay may consume model tokens, infrastructure resources, and external service capacity. Increasing the number of samples can improve the investigation but also increase latency and expense.&lt;/p&gt;

&lt;p&gt;For production use, these constraints require explicit ownership, isolation, versioned contracts, quotas, and operational controls.&lt;/p&gt;

&lt;p&gt;I do not think there is a universal replay mechanism that can reliably reproduce every agent framework and every execution environment. The safer approach is to require each runtime to declare its capabilities and refuse an audit when those capabilities are insufficient.&lt;/p&gt;

&lt;p&gt;That is the boundary adopted by &lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;AIGP&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;The industry has made substantial progress in observing AI systems. We can inspect traces, measure performance, identify failures, and reconstruct increasingly complex agent workflows. But consequential AI decisions invite questions that go beyond reconstructing an execution.&lt;/p&gt;

&lt;p&gt;When an agent retrieves information, did the information materially influence its behaviour? If the evidence were different, would the outcome change? And can we investigate that question without modifying historical records or creating new production risks?&lt;/p&gt;

&lt;p&gt;Controlled counterfactual replay offers one practical way to examine those questions. It does not reveal everything about an AI model's decision-making process. But it allows us to move from assuming that retrieved evidence mattered toward testing whether a specific evidence change produces a measurable difference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Knowing what an AI agent observed is useful. Investigating whether that observation influenced its decision is a different engineering capability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That distinction is worth exploring as AI agents take on more consequential responsibilities.&lt;/p&gt;




&lt;h3&gt;
  
  
  Explore the implementation
&lt;/h3&gt;

&lt;p&gt;The work described here is available in the open-source &lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;AI Governance Platform (AIGP)&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://governance.bhanuj.ai/docs/causal-audit" rel="noopener noreferrer"&gt;Causal Audit documentation&lt;/a&gt;&lt;/strong&gt; — Architecture, intervention policies, eligibility, audit classifications, and safety boundaries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://governance.bhanuj.ai/guides/openai-runtime-causal-audit" rel="noopener noreferrer"&gt;OpenAI Runtime Causal Audit developer guide&lt;/a&gt;&lt;/strong&gt; — A guided integration walkthrough.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/Bhanuj-AI/labs/tree/main/agent-frameworks/openai/openai-agent-runtime" rel="noopener noreferrer"&gt;OpenAI reference implementation&lt;/a&gt;&lt;/strong&gt; — Independently runnable lab with the governed tool, controlled replay integration, and tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/Bhanuj-AI/ai-governance-oss" rel="noopener noreferrer"&gt;AIGP on GitHub&lt;/a&gt;&lt;/strong&gt; — Open-source governance control plane.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This is an engineering exploration using controlled reference scenarios, not a claim of production validation for financial decision-making systems.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>architecture</category>
      <category>llm</category>
    </item>
    <item>
      <title>When AI Agents Fail After Success</title>
      <dc:creator>Bhanuj Kashyap</dc:creator>
      <pubDate>Mon, 16 Nov 2026 07:27:35 +0000</pubDate>
      <link>https://dev.to/bhanuj-ai/when-ai-agents-fail-after-success-mfc</link>
      <guid>https://dev.to/bhanuj-ai/when-ai-agents-fail-after-success-mfc</guid>
      <description>&lt;p&gt;&lt;em&gt;Understanding authorization, execution recovery, and replay in enterprise AI systems.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;AI agents are rapidly evolving from conversational interfaces into systems capable of performing consequential business operations. They can retrieve information, evaluate conditions, invoke external services, coordinate workflows, and modify application state. Frameworks such as &lt;a href="https://github.com/langchain-ai/langgraph" rel="noopener noreferrer"&gt;LangGraph&lt;/a&gt; have made these capabilities increasingly accessible by providing structured orchestration, persistence, checkpointing, and mechanisms for human intervention.&lt;/p&gt;

&lt;p&gt;However, integrating agents with enterprise applications introduces reliability challenges that cannot be addressed through orchestration alone. Once an agent performs an operation outside its own runtime, it becomes part of a distributed system. The familiar complications of network failures, partial execution, inconsistent state, and uncertain transaction outcomes begin to matter.&lt;/p&gt;

&lt;p&gt;These challenges are not new to software engineering. What is new is the increasing autonomy with which agents initiate operations and the possibility that probabilistic decisions may trigger deterministic business consequences.&lt;/p&gt;

&lt;p&gt;To understand the implications, consider a simple banking workflow in which an AI agent evaluates a loan application and initiates its approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Execution Problem
&lt;/h2&gt;

&lt;p&gt;Suppose an agent determines that a loan application satisfies the necessary approval conditions. It invokes an external banking service, which validates the request and updates the loan status from PENDING to APPROVED.&lt;/p&gt;

&lt;p&gt;The database transaction commits successfully, but immediately afterward, the agent runtime crashes before receiving or recording the confirmation. When the workflow resumes, the orchestration system knows that an operation was attempted, but it cannot establish whether that operation completed.&lt;/p&gt;

&lt;p&gt;From the agent's perspective, execution appears incomplete. From the banking application's perspective, the transaction has already succeeded.&lt;/p&gt;

&lt;p&gt;This discrepancy creates an important recovery problem. Retrying the operation without establishing its outcome could result in duplicate business effects. In a simplified example, updating the same database field twice might be harmless. In a production environment, however, loan approval could initiate fund disbursement, generate contractual documents, trigger downstream events, or update financial exposure. Repeated execution could therefore produce consequences beyond the original database mutation.&lt;/p&gt;

&lt;p&gt;Distributed systems have addressed variations of this problem for decades through idempotency keys, durable transaction records, reconciliation mechanisms, transactional outboxes, and explicit state machines. These mechanisms remain relevant to agentic applications because an orchestration framework cannot independently guarantee the outcome of a transaction owned by another system.&lt;/p&gt;

&lt;p&gt;The fundamental challenge is distinguishing an unsuccessful execution acknowledgement from an unsuccessful business operation. Without that distinction, automatic retry mechanisms can transform an otherwise recoverable incident into a more serious consistency problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Execution Boundaries
&lt;/h2&gt;

&lt;p&gt;Agentic applications introduce several responsibilities that are frequently treated as though they belong to a single execution lifecycle. In practice, the decision to perform an operation, the authority to perform it, the business transaction itself, and the evidence of its outcome are distinct concerns.&lt;/p&gt;

&lt;p&gt;Consider the loan approval workflow. The agent may conclude that an application meets the approval criteria, but this determination does not necessarily grant it permission to modify the banking system. Authorization must account for the actor, requested action, target resource, and applicable policy.&lt;/p&gt;

&lt;p&gt;Once authorization is granted, the runtime can initiate the operation. However, the authorization decision establishes only that the operation was permitted under particular conditions. It does not establish that the banking application performed the operation successfully.&lt;/p&gt;

&lt;p&gt;Similarly, a successful database transaction does not guarantee that the orchestration runtime received or persisted its result. Even when a runtime submits an execution receipt, that receipt represents evidence reported by the runtime rather than independent proof of the application's authoritative state.&lt;/p&gt;

&lt;p&gt;A reliable architecture must preserve these distinctions while maintaining traceability between them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgq2f9j8t7qqxo6i29a0a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgq2f9j8t7qqxo6i29a0a.png" alt="Architecture Ownership" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These responsibilities may be implemented using different technologies, but their ownership boundaries should remain explicit.&lt;/p&gt;

&lt;p&gt;A governance control plane should evaluate policies and retain evidence without becoming responsible for executing every business transaction. The business application must continue to own its data integrity, transaction semantics, and idempotency guarantees. The runtime must manage orchestration and communicate execution outcomes without assuming that its local state is authoritative for external operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Authorization Architecture
&lt;/h2&gt;

&lt;p&gt;Traditional authorization mechanisms generally evaluate whether a principal is permitted to perform an action against a resource. Agentic workflows introduce additional complexity because actions may be initiated by autonomous runtimes, delegated by trusted services, and executed across multiple operational boundaries.&lt;/p&gt;

&lt;p&gt;For consequential operations, authorization needs to be connected to a specific execution context rather than represented as a broad permission that the agent can reuse indefinitely.&lt;br&gt;
A request to approve a loan, for example, should identify the execution, actor, action, and resource. It may also include a delegation reference, idempotency key, request fingerprint, and argument digest. Together, these attributes allow the authorization system to evaluate a sufficiently precise representation of the intended operation.&lt;/p&gt;

&lt;p&gt;Delegation and authorization should also remain distinct.&lt;/p&gt;

&lt;p&gt;A trusted system may delegate limited authority to an agent runtime, specifying which actions and resources fall within its scope. However, possession of a delegation does not automatically mean that every subsequent operation should be permitted. An individual authorization decision can still evaluate the active policy and execution context before allowing a protected mutation.&lt;/p&gt;

&lt;p&gt;This approach creates a clearer relationship between the authority granted to a runtime and the specific action it is attempting to perform.&lt;/p&gt;

&lt;p&gt;The open-source &lt;a href="https://governance.bhanuj.ai/" rel="noopener noreferrer"&gt;AIGP governance control plane&lt;/a&gt; implements this separation through execution-scoped delegations and runtime-action authorization. Its &lt;a href="https://governance.bhanuj.ai/docs/runtime-action-authorization" rel="noopener noreferrer"&gt;runtime authorization&lt;/a&gt; implementation and contracts bind decisions to the operation being proposed rather than treating agent autonomy as unrestricted authority.&lt;/p&gt;

&lt;p&gt;The resulting authorization decision can be associated with execution evidence, allowing investigators to establish which policy version was evaluated and what operation was permitted. However, authorization remains only one part of the execution lifecycle. The system still needs to determine whether the permitted operation was performed and how to recover if the outcome cannot be established immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Recovery &amp;amp; Reconciliation
&lt;/h2&gt;

&lt;p&gt;One of the most consequential architectural decisions is how the system represents an execution whose outcome is uncertain.&lt;/p&gt;

&lt;p&gt;Many workflows rely on states such as SUCCEEDED and FAILED. These are useful when the runtime has sufficient evidence to establish an outcome, but they are inadequate when communication fails after an external operation has been initiated.&lt;/p&gt;

&lt;p&gt;Suppose the agent sends a loan approval request and the connection disappears. The request may have failed before reaching the application, failed during processing, or committed successfully before the acknowledgement was lost. The agent cannot distinguish these possibilities simply by examining the network error.&lt;/p&gt;

&lt;p&gt;Classifying the operation as failed would imply knowledge that the runtime does not possess. Retrying immediately could repeat the business operation, while assuming success would introduce an equally unjustified conclusion.&lt;/p&gt;

&lt;p&gt;An explicit UNKNOWN state provides a more accurate representation of the situation.&lt;/p&gt;

&lt;p&gt;Instead of automatically repeating the action, the runtime can initiate reconciliation using durable execution identifiers, idempotency records, and authoritative application state. The objective is to establish whether the original operation committed before deciding what recovery action is appropriate.&lt;/p&gt;

&lt;p&gt;This process also requires clearly defined ownership. The governance system should not independently query arbitrary business databases or attempt to reconstruct application transactions. The executing system and its supporting runtime must expose sufficient evidence to reconcile the operation reliably.&lt;br&gt;
In &lt;a href="https://governance.bhanuj.ai/docs/execution-receipts" rel="noopener noreferrer"&gt;AIGP's execution receipt and recovery&lt;/a&gt; model, the distinction between an unreported outcome and an explicitly uncertain outcome is preserved. The design supports bounded execution evidence, conflict handling, and reconciliation without assuming that missing evidence means the business operation never occurred.&lt;/p&gt;

&lt;p&gt;Idempotency is particularly important, but its guarantees should not be overstated. Providing an idempotency key does not make an operation idempotent unless the receiving system durably enforces the corresponding semantics. For workflows that span several independent transactions, recovery may additionally require compensating operations or application-specific reconciliation procedures.&lt;/p&gt;

&lt;p&gt;These mechanisms make it possible to preserve execution history without conflating a missing acknowledgement with an unsuccessful business transaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. LangGraph Implementation
&lt;/h2&gt;

&lt;p&gt;To explore these architectural concerns through a practical implementation, I developed a &lt;a href="https://github.com/Bhanuj-AI/labs/tree/main/agent-frameworks/langgraph/langgraph-execution-assurance-lab" rel="noopener noreferrer"&gt;LangGraph Execution Assurance Lab&lt;/a&gt; as part of &lt;a href="https://governance.bhanuj.ai/" rel="noopener noreferrer"&gt;BHANUJ AIGP&lt;/a&gt;, an open-source AI governance platform.&lt;/p&gt;

&lt;p&gt;The lab models a simplified banking workflow in which a LangGraph agent attempts to transition a loan from PENDING to APPROVED. The business state is maintained in SQLite, while governance services provide authorization decisions, delegation controls, and execution evidence management.&lt;/p&gt;

&lt;p&gt;The implementation intentionally separates governance from the business transaction. The agent must obtain authorization before invoking the protected operation, but the business application remains responsible for performing and persisting the mutation.&lt;/p&gt;

&lt;p&gt;The authorization process is bound to execution-specific information, including the actor, requested action, resource, request fingerprint, and idempotency identity. This allows the resulting decision to be associated with the operation and its subsequent execution evidence.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/Bhanuj-AI/labs/blob/main/agent-frameworks/langgraph/langgraph-execution-assurance-lab/run_lab.py" rel="noopener noreferrer"&gt;runnable scenario implementation&lt;/a&gt; exercises several controlled scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authorized Execution&lt;/strong&gt;&lt;br&gt;
In the authorized scenario, a trusted issuer establishes a scoped delegation, the runtime requests authorization for the specific loan approval, and the governance system evaluates the applicable policy. When authorization is granted, the protected operation proceeds and the application transitions the loan to APPROVED.&lt;/p&gt;

&lt;p&gt;The runtime subsequently submits execution evidence associated with the authorization decision, establishing traceability between the permitted operation and its reported outcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authorization Denial&lt;/strong&gt;&lt;br&gt;
The denial scenario demonstrates that a runtime cannot perform an operation merely because it possesses a delegation or can access the relevant tool.&lt;/p&gt;

&lt;p&gt;When the requested operation falls outside the permitted scope, authorization is denied and the loan remains unchanged. This demonstrates enforcement at the protected execution boundary rather than relying on the agent's instructions or reasoning to respect policy constraints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Delegation Revocation&lt;/strong&gt;&lt;br&gt;
The revocation scenario examines what happens when previously granted authority is withdrawn.&lt;/p&gt;

&lt;p&gt;The delegation remains part of the historical record, but its revoked status prevents it from supporting new authorized operations. This preserves auditability without allowing previously issued authority to remain usable indefinitely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Crash Recovery&lt;/strong&gt;&lt;br&gt;
The crash recovery scenario reproduces the failure discussed earlier. The loan approval transaction commits successfully, but the runtime crashes before reliably recording the outcome.&lt;/p&gt;

&lt;p&gt;The operation is treated as uncertain rather than automatically failed. Recovery examines the relevant idempotency evidence and authoritative business state to reconcile the execution without repeating the original mutation.&lt;/p&gt;

&lt;p&gt;Importantly, this recovery path does not require the governance system to assume ownership of the banking database. The application retains responsibility for its transactions, while the runtime and governance components preserve the necessary execution relationships and evidence.&lt;/p&gt;

&lt;p&gt;The full &lt;a href="https://governance.bhanuj.ai/guides/langgraph-execution-assurance" rel="noopener noreferrer"&gt;developer walkthrough&lt;/a&gt; documents the required policies, runtime identities, commands, and observed results, including the crash and recovery scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Replay Eligibility&lt;/strong&gt;&lt;br&gt;
The lab also demonstrates a replay eligibility boundary. An execution without the required replay capability is classified as ineligible rather than being passed into an unsupported replay operation. This is a deliberate safeguard because replaying a workflow is not necessarily equivalent to reproducing a harmless calculation. Depending on the implementation, an agent workflow may invoke external services or perform additional business mutations.&lt;/p&gt;

&lt;p&gt;The implementation provides a reference environment for examining these scenarios. It is not intended to establish universal exactly-once execution guarantees or replace the transaction and recovery mechanisms required by production banking systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Replay and Investigation
&lt;/h2&gt;

&lt;p&gt;Execution recovery addresses what happened to an operation and whether its outcome can be reconciled. Investigation introduces another dimension: understanding why the agent made a particular decision and whether changing an input would have changed the outcome.&lt;/p&gt;

&lt;p&gt;For example, an auditor examining an approved loan may want to know which policy was evaluated, what execution evidence was recorded, and how the workflow reached its result. A more advanced investigation might ask whether the same decision would have occurred if a controlled input had been different.&lt;/p&gt;

&lt;p&gt;The latter is a causal investigation rather than a conventional log inspection.&lt;/p&gt;

&lt;p&gt;Reproducing such a decision requires more than restoring an orchestration checkpoint. The original workflow may have depended on external data, mutable application state, particular tool responses, or model behavior that cannot be reproduced exactly at a later time.&lt;/p&gt;

&lt;p&gt;A checkpoint can restore execution state, but it does not automatically reproduce the external environment in which the original operation occurred.&lt;br&gt;
A defensible replay mechanism therefore needs explicit contracts governing input provenance, snapshot integrity, execution isolation, dependency handling, and the permissible scope of intervention.&lt;/p&gt;

&lt;p&gt;To investigate this boundary, I developed a separate &lt;a href="https://governance.bhanuj.ai/" rel="noopener noreferrer"&gt;AIGP&lt;/a&gt; LangGraph &lt;a href="https://github.com/Bhanuj-AI/aigp-langgraph-replay-adapter" rel="noopener noreferrer"&gt;Replay Adapter&lt;/a&gt; that integrates with the governance control plane without introducing LangGraph-specific dependencies into its core.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/Bhanuj-AI/aigp-langgraph-replay-adapter" rel="noopener noreferrer"&gt;adapter&lt;/a&gt; maintains private runtime snapshots and uses a bounded, isolated LangGraph computation to evaluate controlled counterfactual outcomes. It verifies execution identities, snapshot integrity, &lt;a href="https://github.com/Bhanuj-AI/aigp-langgraph-replay-adapter" rel="noopener noreferrer"&gt;adapter&lt;/a&gt; compatibility, and replay manifest bindings before performing the reference computation.&lt;/p&gt;

&lt;p&gt;The v0.1.0 release documents the implementation and its supported scope. It is a reference counterfactual executor, not a general-purpose LangGraph workflow replay engine. It does not restore arbitrary checkpoints, reinvoke business tools, or modify the original loan database. Full causal-audit execution additionally depends on appropriate intervention policies and compatible worker configuration.&lt;/p&gt;

&lt;p&gt;These limitations are intentional. They distinguish a reproducible reference implementation from a claim that arbitrary agent decisions and their external consequences can be reconstructed perfectly. For enterprise environments, that distinction is essential. Investigative evidence should describe what was reproduced, under which assumptions, and where the limits of reproducibility remain.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Architectural Considerations
&lt;/h2&gt;

&lt;p&gt;The introduction of agentic workflows does not remove the need for conventional engineering controls. It changes where those controls must be enforced and how their evidence must be correlated. A system that allows an agent to invoke consequential operations needs durable execution identities, explicit authorization contracts, reliable idempotency mechanisms, versioned policies, and well-defined reconciliation ownership. These mechanisms must also be evaluated against operational concerns that become particularly important at enterprise scale.&lt;/p&gt;

&lt;p&gt;Synchronous authorization introduces an availability dependency. If the governance service becomes unavailable, the architecture must define whether protected operations fail closed, whether narrowly bounded decisions can be reused, and how the validity of those decisions is established. Any optimization must preserve the intended security guarantees.&lt;/p&gt;

&lt;p&gt;Execution evidence introduces its own consistency requirements. Authorization decisions, business transactions, and receipts may be persisted in different systems without a shared transaction boundary. Their relationships must therefore tolerate delayed delivery, duplicate reporting, and temporary disagreement.&lt;/p&gt;

&lt;p&gt;Replay and investigation introduce further constraints around privacy, artifact integrity, dependency versions, and isolation. Sensitive execution evidence cannot simply be copied into an unrestricted debugging environment, and replay mechanisms must not accidentally repeat the business effects of the original workflow.&lt;/p&gt;

&lt;p&gt;Operational observability must also extend beyond model-centric metrics. Token consumption, latency, tool-call success rates, and model evaluation scores are valuable, but they do not establish whether an externally committed business operation was reconciled correctly.&lt;/p&gt;

&lt;p&gt;For consequential workflows, operational visibility should include authorization decisions, execution outcomes, unresolved operations, reconciliation attempts, evidence integrity, and the relationship between these events.&lt;/p&gt;

&lt;p&gt;These requirements are not specific to LangGraph or &lt;a href="https://governance.bhanuj.ai/" rel="noopener noreferrer"&gt;AIGP&lt;/a&gt;. They arise wherever autonomous software participates in distributed business operations.&lt;/p&gt;

&lt;p&gt;The objective is not to construct the most elaborate governance architecture possible. It is to establish the minimum set of enforceable contracts and operational responsibilities necessary to make the system reliable, auditable and recoverable.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Engineering Implications
&lt;/h2&gt;

&lt;p&gt;Much of the progress in agentic AI has focused on improving reasoning, planning, tool utilization, and workflow orchestration. These capabilities are essential, but they represent only part of what is required to operate agents safely in consequential enterprise environments.&lt;/p&gt;

&lt;p&gt;A sophisticated model can still experience a network failure immediately after committing a transaction. A durable workflow checkpoint can still contain an incomplete view of external business state. An authorization decision can still exist without evidence that its corresponding operation was executed.&lt;/p&gt;

&lt;p&gt;These are ordinary distributed-systems problems appearing within a new application architecture.&lt;/p&gt;

&lt;p&gt;The central engineering challenge is to prevent probabilistic decision-making from weakening deterministic operational guarantees. Agents may dynamically propose actions, but authorization can still be evaluated against explicit policies. Workflows may evolve during execution, but business applications must continue enforcing their own transaction semantics. Execution outcomes may become uncertain, but recovery should remain governed by durable evidence rather than assumptions.&lt;/p&gt;

&lt;p&gt;This is why I believe execution assurance deserves greater attention as enterprise agent adoption increases. The reliability of an agentic application cannot be assessed solely through the quality of its reasoning or the sophistication of its orchestration framework. It must also be evaluated through the integrity of its authorization boundaries, the correctness of its execution contracts, the quality of its evidence, and its ability to recover from partial failures.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://governance.bhanuj.ai/guides/langgraph-execution-assurance" rel="noopener noreferrer"&gt;LangGraph Execution Assurance Lab&lt;/a&gt; provides a reproducible starting point for exploring these concerns through actual execution scenarios rather than architectural abstractions. The implementation is available in the open-source lab repository, alongside the independently versioned replay adapter.&lt;/p&gt;

&lt;p&gt;The broader architectural question is how enterprises should allocate responsibility when an agent performs an operation across multiple systems, particularly when the runtime cannot immediately determine whether the external transaction succeeded. An effective architecture should establish that responsibility before an incident occurs, not reconstruct it afterward.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>bhanuj</category>
      <category>governance</category>
    </item>
    <item>
      <title>Identity Is Only the Beginning: Exploring Runtime Governance for AI Agents</title>
      <dc:creator>Bhanuj Kashyap</dc:creator>
      <pubDate>Wed, 28 Oct 2026 12:27:29 +0000</pubDate>
      <link>https://dev.to/bhanuj-ai/identity-is-only-the-beginning-exploring-runtime-governance-for-ai-agents-2c6j</link>
      <guid>https://dev.to/bhanuj-ai/identity-is-only-the-beginning-exploring-runtime-governance-for-ai-agents-2c6j</guid>
      <description>&lt;p&gt;&lt;em&gt;An architectural perspective on agent identity, delegated authority, runtime authorization, and execution evidence, informed by Auth0's Agent as Principal and Agent Gateway.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As AI agents evolve from conversational assistants into systems capable of executing real-world actions, their security boundaries become considerably more complicated. An agent that retrieves information presents one class of risk. An agent that can modify customer records, invoke financial transactions, provision infrastructure, or delegate work to another agent introduces an entirely different set of architectural concerns.&lt;/p&gt;

&lt;p&gt;Traditional identity and access management systems have spent decades refining how humans and applications authenticate and access protected resources. However, autonomous agents challenge several assumptions embedded in those systems. They can operate with or without an active user session, maintain execution context across multiple tools, and make decisions that were not explicitly enumerated when their credentials were issued.&lt;/p&gt;

&lt;p&gt;I recently came across two articles from Auth0 that explain these challenges particularly well: &lt;em&gt;Agent as Principal: &lt;a href="https://auth0.com/blog/agent-as-principal-purpose-built-identity-for-agents/" rel="noopener noreferrer"&gt;A Purpose-Built Identity for Agents&lt;/a&gt;&lt;/em&gt; and &lt;em&gt;Auth0 Agent Gateway: &lt;a href="https://auth0.com/blog/auth0-agent-gateway-beta/" rel="noopener noreferrer"&gt;The Identity Control Plane for Customer-Facing AI&lt;/a&gt;&lt;/em&gt;. Together, they describe an approach in which agents have distinct identities, delegated authority is preserved, and tool invocations are evaluated within the appropriate security context.&lt;/p&gt;

&lt;p&gt;What interested me was the architectural convergence with some of the problems we have been addressing while developing BHANUJ, an open-source agent governance platform.&lt;/p&gt;

&lt;p&gt;Our scope is different. We are not building an identity provider, replacing OAuth infrastructure, or attempting to reproduce Auth0's enterprise identity capabilities. Our work focuses on runtime governance, trusted delegation, authorization decisions, and execution evidence.&lt;/p&gt;

&lt;p&gt;Nevertheless, both approaches expose a fundamental architectural question: &lt;strong&gt;How do we preserve accountability and enforce security boundaries when software is no longer simply executing predefined instructions, but making decisions about which actions to perform?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Traditional Application Identity
&lt;/h2&gt;

&lt;p&gt;Consider a conventional application that connects to an external API. The application authenticates using a service account or OAuth client, receives an access token, and makes requests within its assigned permissions. Although these permissions may be broad, the application generally follows execution paths designed and reviewed by engineers.&lt;/p&gt;

&lt;p&gt;Now introduce an AI agent.&lt;/p&gt;

&lt;p&gt;The same application might allow an agent to select tools dynamically, formulate requests, and determine which operations are necessary to fulfil a user's objective. The agent could execute dozens of actions using the same underlying credentials, even though each action carries a different business risk.&lt;/p&gt;

&lt;p&gt;For example, consider an enterprise banking assistant authorized to help a customer manage their accounts. The assistant may retrieve transactions, categorize expenses, and prepare a payment. These operations share the same user context, but they should not automatically inherit identical execution privileges.&lt;/p&gt;

&lt;p&gt;Reading transaction history is not equivalent to initiating a payment. Preparing a payment is not equivalent to submitting it. Similarly, a user granting an agent access to their account does not necessarily authorize every operation that the connected API supports.&lt;/p&gt;

&lt;p&gt;This creates a distinction between authentication, delegated authority, and authorization at the point of execution.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Security concern&lt;/th&gt;
&lt;th&gt;Traditional application model&lt;/th&gt;
&lt;th&gt;Agentic execution model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Identity&lt;/td&gt;
&lt;td&gt;Typically identifies a user, application, or service account&lt;/td&gt;
&lt;td&gt;Must distinguish the agent, application, user, and potentially other delegated actors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authorization&lt;/td&gt;
&lt;td&gt;Often based on predefined roles, scopes, and application permissions&lt;/td&gt;
&lt;td&gt;May require decisions specific to the proposed action, execution context, and delegated authority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution behaviour&lt;/td&gt;
&lt;td&gt;Primarily follows application-controlled workflows&lt;/td&gt;
&lt;td&gt;May select actions dynamically based on goals and runtime observations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegation&lt;/td&gt;
&lt;td&gt;Often limited to known service-to-service relationships&lt;/td&gt;
&lt;td&gt;May involve multiple agents acting across several delegation boundaries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accountability&lt;/td&gt;
&lt;td&gt;Logs commonly identify users, services, and API calls&lt;/td&gt;
&lt;td&gt;Requires correlation between agent identity, delegated authority, policy decisions, and observed actions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revocation&lt;/td&gt;
&lt;td&gt;Disables credentials, sessions, or application access&lt;/td&gt;
&lt;td&gt;May also need to terminate outstanding authority and prevent additional agent actions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The challenge is not that established identity standards have become obsolete. OAuth, OpenID Connect, and conventional access controls remain fundamental.&lt;/p&gt;

&lt;p&gt;The problem is that authenticating an agent does not establish that every action the agent subsequently chooses is appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Auth0's Approach: Treating Agents as First-Class Principals
&lt;/h2&gt;

&lt;p&gt;Auth0's Agent as Principal introduces an important distinction between an agent and the underlying application credentials used to authenticate it.&lt;/p&gt;

&lt;p&gt;Rather than treating an agent merely as another machine-to-machine client, the approach gives the agent a persistent identity that can be associated with different execution modes. An agent might operate on behalf of an authenticated user in one workflow and execute autonomously in another. Its identity remains consistent even when the credentials or application context change.&lt;/p&gt;

&lt;p&gt;One particularly relevant detail is the use of OAuth token exchange and actor claims to preserve delegation relationships. When an agent performs an operation on behalf of a user, downstream systems need sufficient information to distinguish the original authority from the actor exercising it.&lt;/p&gt;

&lt;p&gt;This addresses a subtle but consequential security problem.&lt;/p&gt;

&lt;p&gt;Without an explicit delegation model, an agent may authenticate successfully to a downstream service while losing the context explaining why it was authorized to act in the first place. Each system can appear individually secure, yet the complete execution chain becomes difficult to reconstruct.&lt;/p&gt;

&lt;p&gt;Auth0's Agent Gateway extends this identity model into the tool invocation path. It introduces runtime authorization, contextual policy evaluation, credential brokering, and administrative controls designed for customer-facing agents operating across multiple tenants.&lt;/p&gt;

&lt;p&gt;The gateway can evaluate requests against agent, user, and organization context while keeping downstream credentials outside the agent's direct control. This matters because giving an agent access to a credential effectively gives the execution environment an additional capability that may be difficult to constrain after the credential is exposed.&lt;/p&gt;

&lt;p&gt;Together, the two capabilities illustrate how identity infrastructure can evolve to accommodate autonomous execution without abandoning established security protocols.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. BHANUJ AIGP's Runtime Governance
&lt;/h2&gt;

&lt;p&gt;While exploring similar security boundaries in BHANUJ OSS, we approached the problem from the execution side rather than from identity issuance.&lt;/p&gt;

&lt;p&gt;Our starting point was a practical architectural concern: an agent framework already knows how to orchestrate agents, invoke tools, and manage workflow state. Should a governance platform duplicate those responsibilities simply to enforce policies and capture evidence?&lt;/p&gt;

&lt;p&gt;We concluded that governance should remain a separate concern.&lt;/p&gt;

&lt;p&gt;The agent framework should retain ownership of execution. Identity providers should remain authoritative for authentication and credential lifecycle management. The governance layer should evaluate explicitly submitted actions against applicable policies and preserve bounded evidence of those decisions.&lt;/p&gt;

&lt;p&gt;This separation has influenced the design of our open-source capabilities, particularly trusted delegation, runtime action authorization, and framework-integrated execution evidence.&lt;/p&gt;

&lt;p&gt;The relationship between these components becomes clearer when we compare their responsibilities.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Architectural dimension&lt;/th&gt;
&lt;th&gt;Auth0 approach&lt;/th&gt;
&lt;th&gt;BHANUJ OSS approach&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Agent identity&lt;/td&gt;
&lt;td&gt;First-class agent principals with lifecycle management&lt;/td&gt;
&lt;td&gt;Governance identifies participating actors and execution context; it does not replace an identity provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegated authority&lt;/td&gt;
&lt;td&gt;OAuth token exchange and actor-aware identity context&lt;/td&gt;
&lt;td&gt;Trusted delegation relationships and bounded execution authority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime authorization&lt;/td&gt;
&lt;td&gt;Gateway evaluates tool requests using identity and policy context&lt;/td&gt;
&lt;td&gt;Runtime Action Authorization evaluates proposed operations against governance policies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Credential management&lt;/td&gt;
&lt;td&gt;Token Vault, short-lived gateway credentials, and token brokering&lt;/td&gt;
&lt;td&gt;Credential lifecycle remains an external infrastructure responsibility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution ownership&lt;/td&gt;
&lt;td&gt;Gateway mediates supported downstream tool access&lt;/td&gt;
&lt;td&gt;Agent framework retains orchestration and execution ownership&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evidence&lt;/td&gt;
&lt;td&gt;Identity-linked action logging and tenant audit integration&lt;/td&gt;
&lt;td&gt;Bounded execution evidence, policy decisions, and integrity-oriented references&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enforcement&lt;/td&gt;
&lt;td&gt;Gateway can mediate and enforce tool access&lt;/td&gt;
&lt;td&gt;Integration must honor the governance decision at the actual execution boundary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Advanced assurance&lt;/td&gt;
&lt;td&gt;Identity, policy, credential, and access controls&lt;/td&gt;
&lt;td&gt;Causal replay and formal bundle attestation are longer-term capabilities, not current OSS claims&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are not statements of feature equivalence. The systems operate at different architectural boundaries, and their enforcement guarantees depend on their respective integrations.&lt;/p&gt;

&lt;p&gt;The important convergence is conceptual: authorization cannot simply be inferred from the existence of a valid identity, and accountability requires more than collecting application logs after execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Example: An Agent Initiating a Payment
&lt;/h2&gt;

&lt;p&gt;Consider a customer asking an AI banking assistant to transfer $5,000 from a savings account to another account.&lt;/p&gt;

&lt;p&gt;Assume the customer is authenticated and the agent has legitimate access to the bank's payment APIs. The agent retrieves the relevant account information and prepares a transfer instruction.&lt;/p&gt;

&lt;p&gt;At this point, authentication has established who the user is and which application or agent is operating. However, the presence of a valid token does not necessarily establish that this particular payment should proceed.&lt;/p&gt;

&lt;p&gt;The system may need to determine whether the destination is permitted, whether the transfer exceeds the customer's configured limits, whether additional approval is required, and whether the agent's delegated authority includes payment execution rather than merely payment preparation.&lt;/p&gt;

&lt;p&gt;A robust architecture separates these responsibilities.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Execution stage&lt;/th&gt;
&lt;th&gt;Question being answered&lt;/th&gt;
&lt;th&gt;Responsible architectural layer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;Who is the user and which agent is acting?&lt;/td&gt;
&lt;td&gt;Identity provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegation&lt;/td&gt;
&lt;td&gt;What authority has the user or calling system granted?&lt;/td&gt;
&lt;td&gt;Identity and delegation infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Action proposal&lt;/td&gt;
&lt;td&gt;What payment does the agent intend to initiate?&lt;/td&gt;
&lt;td&gt;Agent runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy evaluation&lt;/td&gt;
&lt;td&gt;Does this action satisfy the applicable execution constraints?&lt;/td&gt;
&lt;td&gt;Runtime governance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enforcement&lt;/td&gt;
&lt;td&gt;Has the authorization decision been enforced before the payment API executes?&lt;/td&gt;
&lt;td&gt;Tool gateway, application, or API enforcement point&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution&lt;/td&gt;
&lt;td&gt;Was the payment accepted, rejected, or left in an indeterminate state?&lt;/td&gt;
&lt;td&gt;Banking service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evidence&lt;/td&gt;
&lt;td&gt;What was requested, decided, and observed?&lt;/td&gt;
&lt;td&gt;Governance evidence and operational audit systems&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Suppose the policy requires explicit customer confirmation for payments above $2,000. The governance layer can return a decision indicating that the proposed $5,000 payment must not proceed without the required approval.&lt;/p&gt;

&lt;p&gt;However, there is an important architectural subtlety. Returning a DENY decision is not the same as preventing execution.&lt;/p&gt;

&lt;p&gt;If the agent runtime ignores the decision and calls the payment API directly, the policy engine has not provided an effective security boundary. Enforcement must occur at a point the agent cannot bypass, or the protected service must independently validate the required authorization.&lt;/p&gt;

&lt;p&gt;Similarly, the system must account for what happens if a policy service becomes unavailable, a request is retried, or the delegated authority changes between evaluation and execution.&lt;/p&gt;

&lt;p&gt;These are not theoretical edge cases. They determine whether runtime governance is genuinely enforceable or merely advisory.&lt;/p&gt;

&lt;p&gt;For financial operations, the underlying transaction system must also continue to enforce its own business rules, approval requirements, and idempotency guarantees. An agent governance decision does not replace the bank's transaction authorization controls.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Authorization Decisions &amp;amp; Execution Evidence
&lt;/h2&gt;

&lt;p&gt;This distinction became particularly important during our work on execution evidence.&lt;/p&gt;

&lt;p&gt;A governance system may accurately record that a proposed action was allowed, but this does not establish that the action completed successfully. Conversely, an application may report that an operation succeeded without preserving sufficient information to explain which authority permitted it.&lt;/p&gt;

&lt;p&gt;These represent different facts.&lt;/p&gt;

&lt;p&gt;The authorization decision records what the governance system permitted at a particular boundary. Execution evidence records what the integration observed during the subsequent operation. The downstream system remains authoritative for the actual business outcome.&lt;/p&gt;

&lt;p&gt;For example, an agent might receive authorization to initiate a payment, invoke the API, and then encounter a network timeout. The governance record may show ALLOW, while the client-side execution status remains uncertain. Only reconciliation with the payment system can establish whether the transaction was committed.&lt;/p&gt;

&lt;p&gt;Treating these observations as interchangeable creates misleading audit trails.&lt;/p&gt;

&lt;p&gt;Our open-source work therefore emphasizes bounded evidence, explicit identities for tool invocations, policy decisions, and integrity-oriented references. The objective is to preserve useful execution facts without indiscriminately collecting prompts, credentials, sensitive business data, or internal model reasoning.&lt;/p&gt;

&lt;p&gt;This is also where our longer-term exploration of causal replay and evidence attestation becomes relevant. Reconstructing why a particular outcome occurred is a different problem from proving that an agent was authenticated or authorized.&lt;/p&gt;

&lt;p&gt;Those advanced capabilities remain areas of development. Nevertheless, separating identity, authorization, observed execution, and causal explanation from the outset provides a more coherent foundation for evolving the architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Architectural Boundaries
&lt;/h2&gt;

&lt;p&gt;There is an understandable temptation to centralize identity, authorization, policy management, credential handling, execution, and auditing into a single agent security platform.&lt;/p&gt;

&lt;p&gt;Such consolidation may simplify early demonstrations, but it can also introduce operational coupling. A governance component can inadvertently become responsible for credential availability, tool orchestration, transaction handling, and execution recovery, even when those responsibilities belong elsewhere.&lt;/p&gt;

&lt;p&gt;We have deliberately tried to avoid that direction.&lt;/p&gt;

&lt;p&gt;A composable architecture should establish clear ownership between its control plane and enforcement points. It should make data contracts explicit, preserve failure isolation where feasible, and avoid hidden dependencies between security decisions and downstream execution.&lt;/p&gt;

&lt;p&gt;Several engineering considerations follow from this approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authorization context must be explicit.&lt;/strong&gt; A policy engine should not be required to infer a user's identity, tenant, or delegated authority from unrelated application state. The request contract should identify the relevant actors, operation, resource, and supporting authorization context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enforcement must be independently verifiable.&lt;/strong&gt; Integrating an authorization API into a framework does not automatically guarantee that every sensitive operation is mediated. Unprotected execution paths and direct API access remain architectural risks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Governance failures need defined behaviour.&lt;/strong&gt; A timeout or unavailable policy engine must not silently become permission to execute a sensitive action. Failure handling should be explicit and proportionate to the risk of the operation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evidence should be useful without becoming a liability.&lt;/strong&gt; Capturing every prompt, response, credential, and payload may appear attractive for auditability, but it creates substantial privacy, retention, and security concerns. Bounded metadata and protected references often provide a more sustainable approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Component boundaries should support independent evolution.&lt;/strong&gt; Identity infrastructure, governance policy, agent runtimes, and downstream services have different owners and release cycles. Their integration should rely on versioned, explicit contracts rather than implicit assumptions about one another's implementation.&lt;/p&gt;

&lt;p&gt;None of these principles is unique to agentic AI. They are established distributed-systems and security engineering practices. Autonomous execution simply makes the consequences of violating them more visible.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. What We Have Built, and What Remains
&lt;/h2&gt;

&lt;p&gt;BHANUJ.AI is still evolving, and it would be misleading to describe it as a complete enterprise agent security platform.&lt;/p&gt;

&lt;p&gt;Our current implementation work has established foundational governance components, including trusted delegation, runtime action authorization, policy decisions, bounded execution evidence, and framework integration. These provide a practical starting point for experimenting with agent security boundaries and examining how decisions are represented during execution.&lt;/p&gt;

&lt;p&gt;At the same time, significant enterprise concerns require further validation and development. These include comprehensive enforcement coverage, large-scale policy administration, distributed revocation behaviour, operational resilience, integration with external identity systems, and advanced evidence assurance.&lt;/p&gt;

&lt;p&gt;We have also intentionally avoided owning responsibilities better served by established infrastructure. Credential issuance, enterprise authentication, and general-purpose identity lifecycle management should not need to be recreated inside an execution governance platform.&lt;/p&gt;

&lt;p&gt;That boundary is not an indication that those capabilities are unimportant. It reflects an architectural decision about where they belong.&lt;/p&gt;

&lt;p&gt;In that sense, the relevance of Auth0's work is particularly encouraging. It demonstrates how sophisticated identity and delegation infrastructure can address one part of the agent security problem, while independently developed governance components can explore complementary concerns at the execution boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: From Identity to Accountable Execution
&lt;/h2&gt;

&lt;p&gt;The transition from traditional applications to autonomous agents does not invalidate existing security architecture. It requires us to apply those principles across a more dynamic execution model.&lt;/p&gt;

&lt;p&gt;Identity establishes who is acting. Delegation establishes the authority under which they operate. Runtime authorization evaluates whether a particular action is permissible. Enforcement ensures that the decision is respected. Execution evidence helps explain what was subsequently observed.&lt;/p&gt;

&lt;p&gt;Each responsibility is valuable independently, but the relationships between them determine the trustworthiness of the complete system.&lt;/p&gt;

&lt;p&gt;Reading Auth0's Agent as Principal and Agent Gateway articles reinforced the importance of these boundaries. Our work on BHANUJ OSS has approached the problem from a different direction, but many of the underlying architectural considerations are remarkably consistent.&lt;/p&gt;

&lt;p&gt;For me, the most interesting engineering challenge is no longer just how to give agents identities or permissions. It is how to construct an execution environment in which authority remains explicit, decisions remain enforceable, and consequential actions remain accountable.&lt;/p&gt;

&lt;p&gt;That is the problem we are continuing to explore through open-source implementation.&lt;/p&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Auth0 — Agent as Principal: A Purpose-Built Identity for Agents&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://auth0.com/blog/agent-as-principal-purpose-built-identity-for-agents/" rel="noopener noreferrer"&gt;https://auth0.com/blog/agent-as-principal-purpose-built-identity-for-agents/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auth0 — Agent Gateway: The Identity Control Plane for Customer-Facing AI&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://auth0.com/blog/auth0-agent-gateway-beta/" rel="noopener noreferrer"&gt;https://auth0.com/blog/auth0-agent-gateway-beta/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BHANUJ — Agent Governance Documentation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://governance.bhanuj.ai/docs/runtime-action-authorization" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai/docs/runtime-action-authorization&lt;/a&gt;&lt;br&gt;
&lt;a href="https://governance.bhanuj.ai/docs/policy-engine" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai/docs/policy-engine&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>identity</category>
      <category>security</category>
    </item>
    <item>
      <title>Your AI Agent Has Permission to Run. But Who Authorized That Database Change?</title>
      <dc:creator>Bhanuj Kashyap</dc:creator>
      <pubDate>Mon, 19 Oct 2026 08:08:11 +0000</pubDate>
      <link>https://dev.to/bhanuj-ai/your-ai-agent-has-permission-to-run-but-who-authorized-that-database-change-351a</link>
      <guid>https://dev.to/bhanuj-ai/your-ai-agent-has-permission-to-run-but-who-authorized-that-database-change-351a</guid>
      <description>&lt;p&gt;AI agents are becoming increasingly capable of interacting with operational systems. They can query databases, update records, invoke APIs, and coordinate workflows across applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: An operations assistant receives the following request:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Put operational record OPS-001 into maintenance mode.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The assistant understands the request. It identifies the appropriate tool and prepares to execute it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should understanding the request be sufficient authorization to modify the database?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Of course not.&lt;/p&gt;

&lt;p&gt;Yet this is precisely the security boundary that becomes difficult to reason about as AI agents gain access to more tools and enterprise systems.&lt;/p&gt;

&lt;p&gt;I wanted to explore how we could enforce authorization independently of an agent's reasoning, without replacing the agent framework or introducing another orchestration engine. So I built a practical experiment using &lt;strong&gt;LangGraph, SQLite, and BHANUJ-AIGP&lt;/strong&gt;, an open-source AI governance platform.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Problem: Tool access is not task authorization
&lt;/h3&gt;

&lt;p&gt;Imagine an operations assistant with two capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;operations.read_status&lt;/code&gt; — inspect an operational record.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;operations.update_status&lt;/code&gt; — modify that record.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The assistant receives a request to update record &lt;code&gt;OPS-001&lt;/code&gt; from &lt;code&gt;PENDING&lt;/code&gt; to &lt;code&gt;MAINTENANCE&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Technically, it knows how to perform the operation.&lt;/p&gt;

&lt;p&gt;But several questions remain unanswered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who authorized this particular operation?&lt;/li&gt;
&lt;li&gt;Does that authorization apply to this specific record?&lt;/li&gt;
&lt;li&gt;Is the permission still valid?&lt;/li&gt;
&lt;li&gt;Could the agent reuse the permission for another operation?&lt;/li&gt;
&lt;li&gt;What happens if the authorization service becomes unavailable?&lt;/li&gt;
&lt;li&gt;Can we later establish which decision permitted the database modification?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions are distinct from whether the model selected the correct tool.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tool selection determines what an agent intends to do. Authorization determines what it is permitted to do.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  2. Architecture: Separate execution from authorization
&lt;/h3&gt;

&lt;p&gt;The experiment deliberately retains LangGraph as the workflow engine. LangGraph owns the execution. It reads the record, prepares the proposed change, and invokes the tool when permitted. BHANUJ-AIGP owns the independent authorization decision and receives execution evidence.&lt;/p&gt;

&lt;p&gt;The architecture follows this sequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User requests an operation
           |
           v
      LangGraph Agent
           |
           v
   Read current record
           |
           v
   Propose database update
           |
           v
    Authorization Check
           |
           v
        AIGP OSS
     Policy Decision
        /      \
      ALLOW    DENY
        |        |
        v        v
     SQLite     Stop
      Update   No Change
        |
        v
    Record Tool
     Execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is one important architectural distinction here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AIGP does not execute the database operation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The LangGraph integration enforces the returned authorization decision immediately before invoking SQLite. This preserves a clear separation of responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LangGraph:&lt;/strong&gt; Workflow execution and tool invocation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AIGP:&lt;/strong&gt; Policy evaluation, authorization decisions, and evidence management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLite:&lt;/strong&gt; Application data and state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to make the agent framework responsible for an entirely new governance system. It is to introduce an explicit security boundary at the point where an AI decision becomes a real-world action.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Authentication vs Delegated Authority
&lt;/h3&gt;

&lt;p&gt;This was one of the most interesting parts of the experiment. A runtime can have a valid identity without being authorized to perform every operation.  &lt;em&gt;In the lab, Keycloak authenticates two separate service identities.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The delegation issuer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A trusted application identity that has permission to issue narrowly scoped delegation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The agent runtime&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A separate identity that executes the LangGraph workflow and requests authorization before performing a protected operation.&lt;/p&gt;

&lt;p&gt;The runtime cannot simply declare its own authority. Before execution, the integrating application establishes a delegation bound to a particular execution, runtime identity, action, resource, and expiry. The authorization service validates and persists that delegation. When the runtime later proposes a protected tool call, the authorization service independently verifies the delegation and applicable policies.&lt;/p&gt;

&lt;p&gt;This introduces two distinct controls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is the issuer authorized to delegate this action?&lt;/li&gt;
&lt;li&gt;Is the runtime's proposed operation permitted by the applicable policy and delegation?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The agent cannot select a convenient policy or expand the delegation by changing its prompt.&lt;/p&gt;

&lt;p&gt;This matters because &lt;strong&gt;an authenticated agent is not necessarily an authorized agent&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. The Experiment: An authorized database update
&lt;/h3&gt;

&lt;p&gt;Let's consider the permitted scenario. Our local SQLite database initially contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Record: OPS-001
Status: PENDING
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The LangGraph assistant proposes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Action: operations.update_status
Resource: operational-record:OPS-001
New status: MAINTENANCE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before SQLite executes the update, the runtime requests authorization from AIGP. AIGP evaluates the stored execution-scoped delegation and the active applicable policies. For this scenario, authorization is granted.&lt;/p&gt;

&lt;p&gt;The resulting lab output includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Outcome: WRITE_COMPLETED
Reason: ALLOW_POLICY_MATCHED
SQLite record status: MAINTENANCE
AIGP evidence status: COMPLETED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The operation succeeds because the specific action satisfies the authorization requirements.&lt;/p&gt;

&lt;p&gt;Not merely because the agent has access to the tool.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Remove Authority
&lt;/h3&gt;

&lt;p&gt;Here's where the experiment becomes more interesting. Suppose the runtime receives a delegation that permits only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;operations.read_status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But it attempts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;operations.update_status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proposed operation exceeds the delegated authority. The policy decision is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DENY — DELEGATION_SCOPE_DENIED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Database status: PENDING
Successful TOOL_CALL events: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fouaedptu94jm25ib6zkc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fouaedptu94jm25ib6zkc.png" alt="Figure 1 - PENDING SQLite result, no successful tool call, and terminal execution status." width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The protected mutation never executes. This denial was validated against the running AIGP OSS API, rather than merely simulated by a local mock. An interesting detail - the overall agent execution can still finish successfully because it handled the denial safely.&lt;/p&gt;

&lt;p&gt;That exposes another important distinction:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Successful workflow completion does not imply successful or authorized tool execution.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A well-behaved assistant may complete its task by reporting that the requested action was not permitted. The workflow outcome and the authorization outcome need to remain separate.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. What happens if the authorization service goes down?
&lt;/h3&gt;

&lt;p&gt;A security boundary is useful only if its failure behavior is predictable. Suppose the agent attempts a protected database operation, but the authorization service times out. Should the assistant proceed because the request appears legitimate?&lt;/p&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;For protected operations, the integration follows a fail-closed design. A denied decision, expired authorization, invalid response, mismatched operation, or unavailable authorization service prevents the database write.&lt;/p&gt;

&lt;p&gt;The lab also includes deterministic offline failure exercises for these behaviors. Importantly, those offline fixtures are not presented as genuine AIGP authorization decisions. The &lt;code&gt;aigp&lt;/code&gt; scenario uses the authoritative API; &lt;code&gt;allowed&lt;/code&gt;, &lt;code&gt;denied&lt;/code&gt;, and &lt;code&gt;outage&lt;/code&gt; are local teaching and testing scenarios.&lt;/p&gt;

&lt;p&gt;This distinction matters when evaluating whether a security architecture actually works outside a demonstration.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. Authorization Without Evidence
&lt;/h3&gt;

&lt;p&gt;Preventing an unauthorized operation is essential. But operational teams also need to understand what happened afterward. Consider an investigation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An agent changed an operational record. Was the change permitted? Which execution performed it? Which authorization decision preceded the tool call?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this experiment, the AIGP integration records a bounded execution history. A typical sequence includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EXECUTION_STARTED
        |
        v
WORKFLOW_STEP
        |
        v
RUNTIME_ACTION_AUTHORIZATION
        |
        v
TOOL_CALL
        |
        v
EXECUTION_COMPLETED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foyx4mv6yinmbq2hgxvyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foyx4mv6yinmbq2hgxvyw.png" alt="Figure 1: BHANUJ-AIGP execution evidence showing the runtime authorization decision and its causal relationship to the subsequent tool call." width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A successful tool-call record references the authorization decision through a &lt;code&gt;causation_id&lt;/code&gt;. That allows a reviewer to connect the runtime-reported action to the decision that authorized it. The evidence is deliberately privacy-bounded. It includes identifiers, decision metadata, outcomes, and references rather than storing raw prompts, complete tool payloads, credentials, or model reasoning. There is also an important limitation: AIGP receives the runtime-reported tool outcome. It does not independently witness the SQLite transaction.&lt;/p&gt;

&lt;p&gt;This is useful authorization provenance and execution evidence, not an immutable proof of every underlying database effect.&lt;/p&gt;




&lt;h3&gt;
  
  
  8. Why not implement authorization entirely inside LangGraph?
&lt;/h3&gt;

&lt;p&gt;You absolutely can implement conditional checks inside a LangGraph workflow. The question is whether those checks should constitute the authoritative security boundary. For a small, isolated experiment, local checks may be sufficient.&lt;/p&gt;

&lt;p&gt;However, enterprise systems introduce additional requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple agents built using different frameworks.&lt;/li&gt;
&lt;li&gt;Shared enterprise policies.&lt;/li&gt;
&lt;li&gt;Independent policy administration.&lt;/li&gt;
&lt;li&gt;Explicit delegation and revocation.&lt;/li&gt;
&lt;li&gt;Consistent denial behavior.&lt;/li&gt;
&lt;li&gt;Centralized authorization evidence.&lt;/li&gt;
&lt;li&gt;Operational visibility across executions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Embedding authoritative policies independently inside every agent implementation risks creating inconsistent enforcement. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One framework may enforce a rule differently from another. A future tool integration might bypass a check. Policy changes become difficult to coordinate. The alternative is to separate policy decisions from framework-specific execution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each agent runtime integrates with an authoritative authorization service, while retaining responsibility for enforcing the decision at the actual tool boundary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The critical requirement is that the runtime must not provide an alternate path around enforcement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An independent policy service is not sufficient if tools can still execute without passing through the protected boundary.&lt;/p&gt;




&lt;h3&gt;
  
  
  9. Limitations
&lt;/h3&gt;

&lt;p&gt;There are some deliberate limitations. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The lab does not introduce a new agent orchestration system.&lt;/li&gt;
&lt;li&gt;It does not deploy applications, autonomously repair unauthorized changes, or guarantee that every downstream business constraint is satisfied.&lt;/li&gt;
&lt;li&gt;It does not provide a replayable SQLite execution or demonstrate causal replay.&lt;/li&gt;
&lt;li&gt;The evidence history is not a formally sealed ledger or a cryptographic attestation of the underlying database transaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, the integrity binding of tool arguments protects the authorization relationship to the proposed operation. It does not replace business-level validation inside the application. These boundaries are important because AI governance should not become another collection of security claims that are difficult to verify.&lt;/p&gt;




&lt;h3&gt;
  
  
  10. Try Yourself
&lt;/h3&gt;

&lt;p&gt;The implementation is publicly available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hands-on developer guide:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://governance.bhanuj.ai/guides/langgraph-governed-operations" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai/guides/langgraph-governed-operations&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open-source labs:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Bhanuj-AI/labs" rel="noopener noreferrer"&gt;https://github.com/Bhanuj-AI/labs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BHANUJ-AIGP:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The developer guide walks through the LangGraph workflow, SQLite integration, identity configuration, policy setup, authoritative authorization path, failure scenarios, and execution evidence inspection.&lt;/p&gt;

&lt;p&gt;The first read-only checkpoint requires no model API or paid cloud service. The authoritative authorization exercise additionally requires the local AIGP OSS service and appropriate identity and policy configuration.&lt;/p&gt;




&lt;h3&gt;
  
  
  Larger Engineering Question
&lt;/h3&gt;

&lt;p&gt;As agents become capable of modifying production systems, the security boundary cannot depend solely on what the model believes it is allowed to do. The model may determine the next action. But the authority to execute that action should come from a trusted system outside the model's control. That is the principle this experiment explores.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I'm curious how other engineers are approaching this:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Should authorization for AI agent tool calls live inside the agent framework, at the tool boundary, or in an independent policy service?&lt;/p&gt;

&lt;p&gt;And more importantly, how are you proving that unauthorized actions cannot bypass the enforcement mechanism?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm building BHANUJ-AIGP as an open-source project focused on AI governance, runtime authorization, execution evidence, and change assurance. This article describes one practical integration experiment and its current limitations.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>opensource</category>
      <category>python</category>
    </item>
  </channel>
</rss>
