The short answer
AI runtime security is the set of controls that act while an AI system runs. A runtime control checks each prompt, model call, tool call, and answer at the moment it happens. The control confirms who sent the call, inspects what the call carries, counts what the call costs, and records the result.
What does AI runtime security mean?
Runtime is the period when software runs and handles live requests. For an AI system, that period holds many steps. A person or an app sends a prompt to a model. The model asks for a tool. An AI agent calls the tool, reads the result, and calls the model again.
An AI agent is software that uses a model to choose its next step and then takes that step. One question from one person can become dozens of model calls and tool calls. Many of those calls happen after the person has an answer.
AI runtime security puts a control on those calls. The control runs in the data path, which is the route that each call takes. It sees each call, decides what happens to it, and records the result.
The term covers three kinds of AI traffic:
- Prompts and answers between a person or an app and a model.
- Tool calls between an agent and a tool or a data source. Many tools use the Model Context Protocol (MCP), an open protocol that connects agents to tools.
- Calls between agents, when one agent gives work to another agent.
For short definitions of these terms, see the AI security glossary.
How is it different from tests before release?
Teams test an AI system before they release it. They run evaluations, and a red team sends attack prompts to the model. These tests decide one question: is this system safe to release?
The runtime question is different: may this caller send this call now? That question needs facts that exist only while the system runs. Before release, no one knows which document an agent will read next week. No one knows what a tool will return, or which tool the agent will call after that.
A gateway at the network edge decides a third question. The three kinds of check work together, and each kind has its own job.
Before release
Is this AI system safe to release? Evaluations and red team tests check the model against a set of test prompts.
At the network edge
May this traffic cross the edge? A gateway at the edge checks the AI calls that come in or go out.
While the AI system runs
May this caller send this call now? A runtime control checks each model call and each tool call where the call starts or arrives.
A test covers the prompts in the test
A test set holds the prompts that a team wrote down. Live traffic brings prompts, documents, and tool results that nobody wrote down.
What can go wrong while an AI system runs?
Most AI risks depend on the content of live traffic. The Open Worldwide Application Security Project (OWASP) publishes a list of the top 10 risks for apps that use large language models (LLMs). Prompt injection is the first risk on that list.
Six problems show why the control must act at runtime.
Prompt injection
An attacker hides instructions in text that the model reads. The text can come from a person, a document, a web page, or a tool result. The model then follows the attacker’s instructions.
Sensitive data in prompts and answers
People paste personal, health, and business data into prompts. A model or a tool can also return data that the caller has no right to see.
Tool calls outside the agent's role
An agent that can reach many tools can call any of them. One injected instruction can make the agent delete a record, send a message, or move data.
Usage with no budget
An agent in a loop can make thousands of model calls. Each call uses tokens, which are the units that models use to measure text. The cost shows on a later invoice.
Calls with no verified caller
Many apps and agents call a model with one shared key. A key proves only that the caller holds it. After an incident, the team has no way to show who started the work.
Work that continues after the answer
An agent can keep working after the person gets an answer. A check at sign-in covers one moment. The later calls need their own checks.
Each problem appears in a live call. A control in the data path sees that call at the moment it happens.
What does a runtime control do on each AI call?
A runtime control for AI traffic does four jobs on every call.
Identity: who sent the call?
The control verifies the person, the app, and the agent behind each call. Proof is a credential that the control can test, such as a certificate or a signed token.
Inspection: what does the call carry?
The control reads the prompt, the tool call, and the answer. It reports or blocks attacks, and it finds sensitive data in both directions.
Budget: what does the call cost?
The control counts the tokens for each call against a budget for a person or a group. A call over budget stops before it reaches the model.
Record: what happened?
The control writes a record for each call. The record names the caller, the model or the tool, the result, and the usage.
The other three jobs depend on identity, so identity comes first. Inspection with no identity finds a problem and has no caller to name. A budget with no identity has no person to count against. A record with no identity names no one.
For example, a support agent receives a question from a person. The agent calls a model and then calls an order tool. The control verifies the person and the agent on both calls. It reads the prompt and the tool arguments, adds the tokens to the person’s daily total, and writes two records.
Where does an AI runtime control run?
Many teams put AI controls in one gateway at the network edge. That gateway sees the calls that cross the edge. Agents and tools often run inside the network. A call from an agent to a tool inside the network never reaches the edge.
A runtime control runs next to each workload that sends or receives AI calls. A workload is any running program, such as an app, an agent, or a tool server. In that place, the control sees every call, including the calls that stay inside the network. It also knows the verified caller, because the same control checks identity.
How does it relate to AI guardrails and AI gateways?
The three terms overlap, and each one names a different thing.
- AI guardrails are checks on the content of AI traffic. They do the inspection job.
- An AI gateway is a control point for calls to AI models. It routes each call to an approved model, applies budgets, and records the call.
- AI runtime security is the full set of jobs on every call: identity, inspection, budget, and record. It covers model calls, tool calls, and calls between agents, wherever they start.
Guardrails and a gateway are parts of AI runtime security. Both need a verified caller to be useful. Both must also see the calls that stay inside the network.
How does AI runtime security relate to Zero Trust?
Zero Trust removes the trust that comes from network location. Every request must prove who sent it and must pass a policy check, every time. AI runtime security applies that rule to AI traffic. A model, an agent, or a tool gets no trust from its place in the network.
Some sources call this practice AI runtime Zero Trust, AI Zero Trust, or Zero Trust for AI. The names describe one idea. Each model call and each tool call gets an identity check, a policy check, encryption, and a record while the agent runs.
Related explainer
The same rule for every request
Zero Trust runtime security checks every request to an app, an API, or an AI agent while the software runs. Read What is Zero Trust runtime security?
How does Greymatter apply AI runtime security?
Greymatter is a Zero Trust runtime security platform. It moves security controls into the live data path, closest to the resource. Greymatter inspects AI calls where they start, inside your network. It names who sent each call, and it adds no hop and no app changes.
Teams turn on blocking in steps. Greymatter starts all Guardrails modules in detect mode, where they report what they would block. Your team turns on blocking one module at a time.
What Greymatter adds
The four jobs in Greymatter
Each job of an AI runtime control maps to a part of the platform.
Identity
Identity gives each AI agent its own workload identity, so it can only do what you allow. Records tie the agent’s actions to that agent and to the person it acted for.
Inspection
AI Guardrails and data loss prevention (DLP) run right beside each app. They read prompts, answers, and AI tool calls in one pass, after the caller is verified. Guardrails maps its modules to all ten OWASP risks for AI apps and can block.
Budget and tools
In the App, API & AI Gateway, your team sets a daily AI token budget for a person or a group. Once a person goes over budget, the call never leaves. With the MCP Router, tools outside an agent’s role never appear to it.
Record
Forensic Auditing records AI model and tool requests, so you can search by person, agent, or request. The record shows the person, any alerts, and the AI usage for each request.
Greymatter also reads tool calls made with MCP, including streamed calls. With MCP inspection on, Greymatter reads the method, the tool, and every argument of each tool call. Your team keeps lists of approved and blocked tools. Read more in the AI & Agent Control use case.
- Kubernetes
- OpenShift
- RKE2
- k3s
- k0s
- Fully offline networks
What does the record of an AI call show?
Greymatter records the model and the input, output, and total tokens for a call, with the person who sent it. The record also shows any alerts for that request.
For an AI agent, records tie the agent’s actions to that agent and to the person it acted for. That includes work that the agent finishes after its reply. Your team can search the records by person, agent, or request.
What the record shows
- Who
- The person and the agent
- What
- The model or the tool
- Alerts
- What inspection found
- Usage
- Input, output, and total tokens
AI runtime security is one rule: check every prompt, model call, and tool call, where it happens, while the AI system runs. Greymatter runs those checks in the live data path, closest to the resource.

