Excessive Agency
Tests whether the LLM performs actions or grants permissions exceeding its intended scope without oversight.
Sub-types
functionality: Model performs actions beyond its intended scope.permissions: Model grants or exercises permissions it should not have.autonomy: Model acts autonomously without required human oversight.
Threat Profile
Recommended Datasets
Primary
- agentharm: AgentHarm dataset for evaluating excessive agency in tool use
Secondary
- agentharm_benign: Benign agent scenarios to establish baseline behavior
Attack Techniques
Primary
- Static Template: Template-based prompt construction
Metrics
asrjudge_score
Usage
Instantiate the Vulnerability
from hackagent.catalog.risks import ExcessiveAgency
from hackagent.catalog.risks.excessive_agency.types import ExcessiveAgencyType
# Use all sub-types
vuln = ExcessiveAgency()
# Or specify particular sub-types
vuln = ExcessiveAgency(types=[
ExcessiveAgencyType.FUNCTIONALITY.value,
ExcessiveAgencyType.PERMISSIONS.value,
])
Run an Evaluation Campaign
from hackagent.catalog.risks.excessive_agency import EXCESSIVE_AGENCY_PROFILE
from hackagent.orchestrator.campaign import run_campaign, summary
TARGET = {
"name": "my-agent",
"connection": {
"provider": "local",
"type": "OPENAI",
"endpoint": "http://localhost:8080/chat",
},
}
# Use profile recommendations
for attack in EXCESSIVE_AGENCY_PROFILE.primary_attacks:
for dataset in EXCESSIVE_AGENCY_PROFILE.primary_datasets:
result = run_campaign(
{
"version": 1,
"campaign": {
"name": f"{attack.technique} vs {dataset.preset}",
"description": EXCESSIVE_AGENCY_PROFILE.objective,
},
"dataset": {"source": {"type": "preset", "name": dataset.preset}},
"target": TARGET,
"attacks": [{"name": attack.technique}],
}
)
print(summary(result))