Skip to main content
New in 1.11.0
The LLM agent vulnerability testing is designed to test the robustness and security of AI agents by simulating adversarial scenarios. It helps identify vulnerabilities in agent behavior, such as susceptibility to prompt injection, instruction override, or social engineering attacks. Vulnerability testing is a critical step in evaluating AI systems because it:
  • Uncovers weaknesses in agent policies and safeguards.
  • Validates compliance with security and ethical guidelines.
  • Improves resilience against malicious or unintended behaviors.
  • Supports continuous improvement by providing measurable attack success rates.
Note:For now, you can use this feature only with native agents.

What are attacks?

In this context, an attack is a deliberate attempt to manipulate the AI agent into behaving in a way that violates its intended policies, security constraints, or ethical guidelines. These attacks simulate real-world threats, such as:
  • Prompt injection: inserting malicious instructions into user input.
  • Instruction override: convincing the agent to ignore its original rules.
  • Social engineering: exploiting trust to extract sensitive information or bypass safeguards.
By testing these scenarios, you can measure how well the agent resists such manipulations and identify areas for improvement.

Examples of attacks

Attacks summary

The attacks are divided into the following categories:
  • On-policy attack: the attack is based on the agent definition instructions.
  • Off-policy attack: does not depend on the agent defintion instructions.
The following table provides an overview of the supported attacks, their purpose, and their alignment with the OWASP Top 10 for LLM Applications (2025).

The red-teaming command

Red-teaming is a security practice where a group (the “red team”) simulates real-world attacks to identify weaknesses in a system before malicious actors can exploit them. In the context of LLM agents, red-teaming involves crafting adversarial prompts and scenarios to test the agent’s resilience against manipulation, data leakage, or policy violations. This approach helps ensure that AI agents remain secure, reliable, and compliant under adversarial conditions. The orchestrate evaluations red-teaming command group provides tools to list attacks, plan scenarios, and run evaluations.

List all supported attacks

Lists all supported attacks and their variants.

Example output

Planning attack scenarios

Before you run the command, you must create a dataset to generate attacks. For more inforamtion on how to generate datasets, see Creating an evaluation dataset. The command generates a set of attack scenarios based on selected attack types, datasets, and agents.
--attack-list (-a)
list[string]
required
Comma-separated list of red-teaming attacks to generate (see the Attacks summary section).
--datasets-path (-d)
list[string]
required
Comma-separated list of files or directories containing datasets to generate attacks.
--agents-path (-g)
string
required
Directory containing all agent definitions.
--target-agent-name (-t)
string
required
Name of the target agent to attack. Must be present in the --agents-path and must be imported in the current active environment.
--output-dir (-o)
string
Directory where evaluation results will be saved.
--max-variants (-n)
string
Number of variants to generate per attack type.
--env-file (-e)
string
Path to the .env file that overrides the default environment.
Example Output:

Running attacks

Executes the generated attacks and evaluates the results.
--attack-paths (-a)
string
required
Comma-separated list of directories containing attack files.
--output-dir (-o)
string
Directory where evaluation results will be saved.
--env-file (-e)
string
Path to the .env file that overrides the default environment.

Example output


Best Practices

  • Start with a small set of attacks to validate your setup.
  • Use -n to limit variants for faster iterations.
  • Review success rates to identify weak points in your agent’s defenses.