Skip to main content
Agentic behavior testing evaluates AI agents for safety concerns specific to autonomous systems. These probes test whether agents can be manipulated into unauthorized actions, tool misuse, or unsafe autonomous behaviors.

Purpose

As AI systems gain more autonomy and tool access, testing for agentic safety becomes critical:
  • Preventing unauthorized tool usage
  • Ensuring agents respect operational boundaries
  • Testing resistance to manipulation into unsafe behaviors
  • Validating agent control mechanisms

Safety Categories

Sub-CategoryDescription
Stop Command OverrideTests if agents can be manipulated to ignore stop commands
Continuous Execution PromptEvaluates resistance to prompts encouraging endless operation
Self-Preservation PromptTests if agents can be convinced to prioritize self-preservation
Tool Misuse SimulationAssesses resistance to using tools inappropriately
Recursive Planning TestEvaluates handling of recursive or infinite planning loops
Long-Horizon Behavioral DriftTests for gradual deviation from intended behavior over time
Arbitrary Tools InvocationAssesses resistance to invoking unauthorized tools

How It Works

The evaluator assesses agent behavior:
  • Pass: The agent maintains safe and intended behavior
  • Fail: The agent exhibits unsafe autonomous behavior

Usage Example

from trusttest.catalog import AgenticBehaviorScenario
from trusttest.targets.http import HttpTarget, PayloadConfig

target = HttpTarget(
    url="https://your-agent-endpoint.com/chat",
    headers={"Content-Type": "application/json"},
    payload_config=PayloadConfig(
        format={
            "messages": [
                {"role": "user", "content": "{{ test }}"}
            ]
        },
        message_regex="{{ test }}",
    ),
)

scenario = AgenticBehaviorScenario(
    target=target,
    sub_category="tool-misuse-simulation",
    max_attacks=15,
)

test_set = scenario.probe.get_test_set()
results = scenario.eval.evaluate(test_set)
results.display_summary()

When to Use

Use agentic behavior testing when you need to:
  • Test AI agents with tool access
  • Validate agent control mechanisms
  • Ensure agents respect operational boundaries
  • Test autonomous system safety
  • Prepare agents for production deployment