Personal blog — thoughts and experiences, not employer-related. Disclaimer

DR. ATABAK KH

Cloud Platform Modernization Architect specializing in transforming legacy systems into reliable, observable, and cost-efficient Cloud platforms.

Certified: Google Professional Cloud Architect, AWS Solutions Architect, MapR Cluster Administrator

Personal content — not employer-related. This article is published in a personal capacity and shares thoughts and experiences based on public industry patterns — not a description of employer or client systems, and not professional instructions. It does not reflect the views, systems, projects, or policies of any current or past employer, client, or financial institution. See the full site disclaimer.

By mid-2025 “agents” were on every vendor slide. What separated a demo from something operators could live with was rarely a better system prompt. It was permissions, logging, approval flows, and fallbacks.

Context: Tool-using agents moved from lab curiosity to roadmap item. In discussions I was in, the risk profile changed fast: one bad prompt is a mistake; one bad agent is a blast radius. These are the layers I saw teams put in place when they meant to go beyond the deck.


Chatbot vs agent

Agent guardrail stack diagram

A chatbot returns text. An agent may query warehouses, open tickets, trigger workflows, chain tool calls without a human in the loop. That needs infrastructure controls, not only “be careful” in the prompt.


Layers that actually mattered

Identity and permissions. Dedicated service account per workflow. Scoped to specific datasets, APIs, actions. No shared “analytics admin” for production agents. Pass user context explicitly.

Tool allowlists. Deny by default.

agent: support_triage
allowed_tools:
  - search_kb_index
  - read_case_summary
  - create_draft_reply
denied_tools:
  - execute_sql_adhoc
  - delete_records
  - export_bulk_pii
max_tool_calls_per_run: 8

Data boundaries. Retrieval limited to approved collections. Row/column filters before context hits the model. as_of and source IDs on chunks. Prompts do not enforce GDPR. Technical controls enforce data boundaries, while lawful basis, retention, data-subject rights, and organizational processes remain part of compliance.

Approval by risk.

Tier Examples Control
Read-only search, summarize Auto
Low risk draft text, suggest tags Log + optional review
High risk send email, change record Human approval
Forbidden bulk export, privilege change Block at tool layer

Audit and replay. Log user, agent version, tools, input hashes, outputs, latency, cost, outcome. Replay for incidents without redoing side effects.

Kill switch. Env flag or config to disable model calls and return a deterministic safe response. For anything production-facing, I would not skip it.

# lib/kill_switch.py - pattern from personal lab PoC
import os

def is_ai_enabled() -> bool:
    return os.getenv("AI_ENABLED", "true").lower() == "true"

def with_kill_switch(fn, fallback):
    if not is_ai_enabled():
        return {"outcome": "fallback", "result": fallback, "ai_enabled": False}
    try:
        return {"outcome": "success", "result": fn(), "ai_enabled": True}
    except Exception as e:
        return {"outcome": "error", "result": fallback, "error": str(e), "ai_enabled": True}

Multi-agent adds coordination risk

Shared memory can leak context across trust boundaries. Retry loops multiply cost and tool calls. Blame gets fuzzy.

What helped: orchestrator owns step budget and timeout; sub-agents get minimum context; approval gates between trust zones; cost ceiling per run.


Metrics beyond accuracy

Tool calls per task (p95), approval queue time, kill-switch rate, policy blocks, cost per successful outcome, human override rate. When override rate climbs, tools are too powerful or guardrails too loose.


Anti-patterns

“Start open, tighten later” - incidents happen in week two. Prompt-only PII rules. Same agent for internal ops and customer-facing. No version pin so a model update quietly changes behavior.


Closing

Agentic AI is an operations and security problem wearing an innovation badge. Permissions, allowlists, approvals, audit, kill switches - that is what separates a useful agent from an expensive autocomplete loop.

This is a personal blog. The views, thoughts, and opinions expressed here are my own and do not represent, reflect, or constitute the views, policies, or positions of any employer, university, client, or organization I am associated with or have been associated with.

© Copyright 2017-2026