Skip to the page
Tecyfy

Securing the Agentic Frontier: A Deep Dive into AprielGuard

As LLMs evolve into autonomous agents, safety risks are moving beyond simple toxicity. AprielGuard provides a unified 8B parameter framework to detect adversarial attacks and safety violations in complex agentic workflows.

Tecyfy · Published · Updated · 6 min read

Written in December 2025, when this was news. Models and prices have moved on since: today's are on Model prices.

Introduction

Large language modelsLarge Language ModelA model trained on a huge amount of text to predict the next token. Further training turns it into an assistant that follows instructions. are no longer only chat assistants. As agentsAgentA model that uses tools in a loop, deciding each next step from what the last one returned, until the task is done. they reason over many steps, call external tools, keep memory and run code.

However, this increased capability introduces a significantly broader attack surface. If you are building a production-grade AI agent, you are no longer just worried about a user asking for a recipe for something dangerous. You have to worry about prompt injectionPrompt InjectionAn attack that hides instructions in text a model reads, such as a web page, an email or a file, so the model follows the attacker instead of you., memory hijacking, and tool manipulation. Traditional safety filters, which often look at single messages in isolation, simply aren't enough for these complex workflows.

In December 2025 ServiceNow AI released AprielGuard, an 8 billion parameter model to act as a comprehensive safety and security guardrailGuardrailChecks placed around a model that stop or change what goes in and what comes out, such as a filter on user messages or an approval step before an agent acts.. It is built specifically to handle the nuances of modern, multi-turn, tool-using AI agents. This post explores how it works, the threats it mitigates, and why its architecture matters for your deployment pipeline.

The Problem with Traditional Guardrails

If you've ever implemented a basic safety classifier, you likely used a model trained to detect toxicity or hate speech in short snippets of text. While useful, these models often fail in professional or agentic contexts for a few reasons:

  • Context Blindness: They evaluate single user messages without knowing what happened three turns ago.
  • Reasoning Gaps: They can't see the "Chain of ThoughtChain of ThoughtHaving a model write out the steps of its reasoning before it gives an answer. Once a prompting trick, now built into "thinking" models." (CoT) the model is generating, where a safety violation might actually be occurring.
  • Tool Vulnerability: They don't understand that a model calling a delete_database tool via a clever prompt injection is a security breach, even if the language used is perfectly polite.

AprielGuard attempts to solve this by providing a unified taxonomy that covers 16 distinct safety categories alongside a robust adversarial attack detection system.

A Unified Taxonomy for Safety and Security

What makes AprielGuard different is its breadth. It doesn't just look for "bad words"; it looks for violations of logic and policy. The model classifies inputs and outputs into 16 safety categories, all of which are inspired by SALAD-Bench.

The 16 Safety Categories

The categories, numbered O1 to O16, span toxicity, hate, sexual content, misinformation, self-harm, illegal activities, privacy, security threats, fraud and manipulation, through to violation of personal property. When content is unsafe, the model names the categories it breaks.

Adversarial Attack Detection

Beyond these safety categories, the model is specifically trained to spot adversarial attacks. These are deliberate attempts to bypass a model's safety training. You might recognize these as "jailbreaksJailbreakA prompt written to talk a model out of its safety rules, so it produces something it was trained or instructed to refuse." or "role-play" attacks where a user tells the model to "act as a person who has no filters."

Its training covers a wide range of these patterns, including:

  • Prompt injection: instructions hidden in content that override the system's own.
  • Context hijacking: using the conversation history to steer the model toward forbidden behaviour.
  • Memory poisoning: planting malicious data in the memory an agent reads back later.
  • Role-play, world-building and persuasion: framing a harmful request as fiction or argument.

For attacks the verdict is simply adversarial or not: it does not say which kind of attack it saw.

Architecture: Dual-Mode Operation

AprielGuard is a transformerTransformerThe design behind almost every modern language model. It uses attention to let each word in a passage look at every other word, all at once. built from a variant of ServiceNow's Apriel-1.5 Thinker base model, scaled down to 8 billion parameters. For an engineer, the most practical feature of this model is its dual-mode operation. You can choose between Reasoning Mode and Fast Mode depending on where you are in the development lifecycle.

1. Reasoning Mode (Explainable AI)

In this mode, the model doesn't just say "Safe" or "Unsafe." It generates a structured explanation of why it reached that conclusion. This is invaluable during the red-teaming or debugging phase. If your agent is behaving oddly, you can see the guardrail's logic.

2. Fast Mode (Production Latency)

Once you move to production, latency is king. In non-reasoning mode the model outputs only its verdict and the category codes, which keeps latency and compute low. ServiceNow notes that the two modes occasionally disagree on the same input, so test the mode you will run in production.

Training on Synthetic Complexity

The researchers behind AprielGuard used a sophisticated synthetic data pipeline to overcome this.

They used Mixtral-8x7B and internally developed uncensored models to generate high-fidelity "unsafe" content across all 16 categories. They used NVIDIA NeMo Curator for multi-turn conversations and the SyGra framework for harmful prompts and attacks, and generated agentic workflows that include:

  • Tool Invocation Logs: Synthetic traces of agents calling APIs.
  • Scratch-pad Reasoning: The internal thoughts of an agent before it responds.
  • Multi-turn Contexts: Conversations that evolve over many interactions.

They also applied data augmentation techniques like leetspeak substitution (e.g., replacing 's' with '5') and character-level noise. This helps the guardrail cope when a malicious prompt is hidden behind typos or odd spellings.

Performance and Benchmarks

When evaluating a guardrail, you look for high Recall (catching as many bad things as possible) and low False Positive Rates (not blocking legitimate requests). ServiceNow reports these results on public safety benchmarks, among others:

BenchmarkPrecisionRecallF1-score
SimpleSafetyTests1.000.970.98
HarmBench1.000.991.00
Toxic-Chat0.650.840.73
XSTest0.900.990.94

Recall is very high on HarmBench, a set of clearly harmful requests. Toxic-Chat, real conversations with users, is harder: there a third of what it flags is a false alarm. XSTest checks the opposite failure, blocking safe requests that only sound dangerous. These results are ServiceNow's own; measure on your own traffic before you rely on them.

Practical Implementation

AprielGuard is published on Hugging Face, so you run it yourself, next to your agent. It reads inputs of up to 32k tokens.

That length matters. This is critical for RAG (Retrieval-Augmented Generation) use cases. If you are feeding a 10-page document into your agent, your guardrail needs to be able to read that entire document to ensure there isn't a "hidden" prompt injection buried in the text.

Limitations

ServiceNow lists these itself:

  • Mostly English. It was trained mainly on English; limited tests in German, Spanish, French, French (Canada), Italian, Dutch and Portuguese (Brazil) looked reasonable, but test before using it in another language.
  • New attacks. Attack strategies it has not seen can still get past it.
  • Specialist domains. It can do worse on legal, medical or scientific text.
  • Intended use. It is meant only as a safeguard and risk assessment model; using it outside the prescribed inference may give unreliable results.

Tecyfy Takeaway

As we build more autonomous AI systems, the definition of "safety" is shifting from content moderation to system security. AprielGuard represents a significant step toward unified security for LLMs.

Here is what you should keep in mind:

  • Don't rely on single-turn filters: If your agent has memory or tools, your safety model must understand those contexts.
  • Use Reasoning for debugging: Leverage the reasoning mode during development to understand your model's failure points, then switch to fast mode for production.
  • Context window matters: Ensure your guardrail can handle the same context length as your primary LLM, or you'll create a massive security blind spot.

By treating safety as a multi-layered architectural challenge rather than a simple text-matching problem, you can build agents that are not only powerful but also resilient against the evolving threat landscape.

Questions

What is AprielGuard?
AprielGuard is an 8-billion-parameter guardrail model released by ServiceNow AI in December 2025. It classifies inputs and outputs of AI agents into 16 safety categories and detects adversarial attacks such as prompt injection, context hijacking and memory poisoning.
Why are traditional safety filters not enough for AI agents?
They judge one message at a time, cannot see the model's reasoning, and do not understand that a polite request leading an agent to call a dangerous tool is a breach. Agents with memory and tools need a guardrail that reads the whole context.
What is the difference between AprielGuard's reasoning mode and fast mode?
Reasoning mode explains why it judged an input safe or unsafe, which helps during red-teaming and debugging. Fast mode returns only the verdict and category codes for low latency in production. The 2 modes occasionally disagree, so test the one you will run.
How accurate is AprielGuard?
ServiceNow reports an F1 of 1.00 on HarmBench and 0.98 on SimpleSafetyTests, but 0.73 on Toxic-Chat, real user conversations, where about a third of what it flags is a false alarm. Measure it on your own traffic.
What are AprielGuard's limitations?
It was trained mainly on English, can miss attack strategies it has not seen, can do worse on legal, medical or scientific text, and is one layer only. It is meant only as a safeguard and risk assessment model.