Home Agentic AILLM Security Isn’t Application Security: Why Enterprises Need a New Architectural Model (¼)

LLM Security Isn’t Application Security: Why Enterprises Need a New Architectural Model (¼)

by Vamsi Chemitiganti

This is Part 1 of a four-part series on architecting security for LLM and agentic AI systems in the enterprise. I’ll cover why the threat model here is genuinely new, the failure classes that don’t map to existing security tooling, and why this has to be solved architecturally rather than with a filter bolted on after the fact.

Most enterprises are trying to secure LLM and agentic AI deployments with the instincts they already have from web app security — a WAF (Web application Firewall), an API gateway, some input validation at the edge. However, those setups don’t transfer cleanly to LLM powered application architectures. Traditional firewalls are built to block malicious code, but how do you stop a cyberattack written in perfect, polite English? As enterprises rush to deploy Large Language Models (LLMs), security teams are discovering a harsh reality: our existing security playbooks are fundamentally broken. Because GenAI operates on probabilistic language rather than deterministic code, classic tools like WAFs and input validation are blind to threats like prompt injection and data hallucination. To secure the AI era, we have to stop treating LLMs like traditional software and start securing the prompt lifecycle itself.

The Underlying Problem With AI Security is Architectural.

In a traditional database, there is a clear wall between the commands (the code) and the information (the data). Security tools use this wall to block hackers from slipping malicious code into a data field. But in a language model, that wall does not exist. The system’s instructions, the user’s chat message, a uploaded PDF, and the model’s own notes all get mixed into a single text box. The AI simply cannot tell the difference between “here is a document to read” and “here is a new rule you must obey.” This is not a temporary software bug that a tech company can patch next week. It is a fundamental reality of how these models think.

Because of this, every single piece of text an AI reads becomes a potential security risk. Think about an AI screening tool reading a candidate’s resume, a virtual assistant summarizing a customer support ticket, or a research tool scraping a website. If any of those documents contain hidden instructions, the AI will follow them. Our current security tools were never designed to handle plain English as dangerous, executable code.

Using enterprise data to train or guide your AI (a process known as RAG) actually complicates this issue. While pulling from internal documents keeps the AI accurate, it also means the AI trusts everything it reads. If an attacker manages to slip a manipulated PDF onto a shared drive or post a malicious article to your company help center, thats a security trap right there. The moment the AI retrieves that document, it triggers an attack which completely bypassing your normal security defenses. Security teams can no longer just protect their software code; they now have to protect every single piece of data the AI is allowed to read.

The Flaws Your Current Security Tools Are Missing

Most companies are preparing for the wrong type of attack. They focus entirely on “direct injection”—when a user types a trick like “ignore your previous rules” directly into a chat window. While this is what everyone tests for, it is also the easiest to block with a strong setup prompt.

The real danger is “indirect injection.” This happens when the trick isn’t typed by the user, but is hidden inside a document, an email, or a website that the AI reads while doing its job. If your security strategy stops at monitoring the chat box, you are completely blind to these hidden traps.

The moment an AI is given the power to take actions—like sending emails, updating a database, or modifying a customer record, the price of a security failure skyrockets. A successful attack is no longer just about the AI leaking a secret; it becomes an unauthorized action problem. There is a massive structural difference between a simple chatbot that answers questions and an autonomous AI agent with edit access to your company database. These are two completely distinct security challenges, not just the same problem at a higher severity level.

Most companies accidentally give their AI far too much freedom. It is simply easier to give an AI agent broad access to your files or communication tools up front than it is to carefully limit its permissions for every specific task. But this is a dangerous shortcut. Because of how AI works, you can never truly predict which tool it will choose to use when it encounters a strange or tricky prompt. The actual security boundary cannot rely on the AI’s judgment. It must be built directly into the permission layers of your network.

Finally, many teams treat the AI’s final response as a minor design concern when it is actually a major security risk. AI-generated text is routinely fed straight into other software systems—rendered as webpage code, dropped into databases, or used to trigger internal commands. If that AI response was secretly influenced by a hidden instruction earlier in the pipeline, you have effectively allowed an attacker’s commands to run freely inside your network. Treating an AI’s output as safe simply because “the AI wrote it” can be a costly mistake.

Why a Bolted-On Filter Isn’t Enough

It is tempting to think you can handle AI risk by simply using a content filter or a data-scrubbing tool on top of your existing app. While things like injection detectors and privacy filters are useful layers of defense, they rely on guesswork to stop a system that also operates on guesswork. Stacking these types of tools on top of each other will never give you the absolute certainty a regulated business actually needs. A filter that catches 95% of attacks sounds great—until you realize a hacker can try an infinite number of times, and you cannot choose which 5% slips through.

The AI model itself can never be your security boundary. The real boundary must be the software architecture built around the model. Security has to happen where rules can be strictly enforced: exactly what files the AI is allowed to pull, what actions it can trigger, whose identity it uses to run a command, and what checks happen before its output is sent downstream. None of this can be solved by writing a clever prompt or switching to a “safer” AI model. This is an infrastructure and platform engineering problem.

The companies handling this successfully are all adopting a similar setup: an API gateway that monitors every AI interaction, a strict policy firewall between what the AI wants to do and the tool it is trying to use, and identity permissions that check every single action individually rather than trusting an entire user session.

Right now, the speed of AI adoption has completely outrun the security architecture needed to protect it. You cannot close that gap by waiting for a smarter model. You close it by building a better architecture.

Conclusion: Fixing the Foundation

The rush to adopt generative AI has left security teams playing a dangerous game of catch-up. Relying on basic prompt engineering or superficial content filters to secure an LLM is like putting a digital padlock on a screen door. It might deter casual users, but it won’t stop a determined attacker who understands how these models process information.

True AI security is not about policing what the user types; it is about controlling what the model is allowed to do. When plain language becomes executable code, your entire data ecosystem becomes an attack surface. Accepting this structural reality is the first step toward building systems that are resilient by design. The gap between AI capability and AI security cannot be bridged by a smarter model. It can only be closed with a completely new approach to software architecture.

Coming Up in Part 2: The Gateway Architecture

Now that we understand why traditional tools fall short, it’s time to look at what actually works. In Part 2 of this series, we will step out of theory and look at the blueprint for a modern, deterministic security layer.

We will break down the exact architecture of an AI API gateway, exploring how to build a strict policy firewall between a model’s intent and your critical corporate systems. We’ll show you how to enforce identity controls at the individual tool-call level, ensuring your autonomous agents never possess more agency than they safely need.

This is Part 1 of a four-part series on LLM and agentic AI security architecture. Follow @VamsiTalksTech for updates.

Featured image designed by Freepik

Disclaimer

This blog post and the opinions expressed herein are solely my own and do not reflect the views or positions of my employer. All analysis and commentary are based on publicly available information and my personal insights.

Discover more at Industry Talks Tech: your one-stop shop for upskilling in different industry segments!

Ready to master the future of telecom? My book, “Cloud Native 5G – A Modern Architecture Guide: From Concept to Cloud: Transforming Telecom Infrastructure (Industry Talks Tech)” is now available on Amazon.

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.