Observed since 20 Oct, 20:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Adversarial Testing Harness for Large Language Models
Python SDK for Adversaria - Adversarial Testing Harness for LLMs.
pip install adversaria
Note: This SDK requires the Adversaria CLI to be installed:
cargo install adversaria
from adversaria import Adversaria
# Create client
client = Adversaria()
# Run tests
result = client.run(
provider="openai",
model="gpt-4",
api_key="sk-..." # Optional, uses OPENAI_API_KEY env var
)
# Check results
print(f"Risk Score: {result.risk_score}/100")
print(f"Successful Attacks: {result.successful_attacks}/{result.total_attacks}")
# Save report
report_path = result.save_report("./reports")
print(f"Report saved: {report_path}")
Main client class for running security tests.
client = Adversaria(config_path=None)
Methods:
run(provider, model, suites=None, api_key=None)Run security tests against an LLM.
Arguments:
provider (str): Provider name ('openai', 'anthropic', 'ollama')model (str): Model namesuites (list, optional): List of suite IDs to runapi_key (str, optional): API key (uses env var if not provided)Returns: TestResult
list_suites()List available attack suites.
Returns: List[Suite]
list_reports(directory="./reports")List available reports.
Returns: List[str] - List of report file paths
load_report(filepath)Load a report from file.
Returns: TestResult
Test execution results.
Attributes:
id (str): Unique test run IDmodel (str): Model testedprovider (str): Provider usedtimestamp (str): Test timestamprisk_score (int): Overall risk score (0-100)total_attacks (int): Total attacks executedsuccessful_attacks (int): Number of successful attacksfailed_attacks (int): Number of failed attacksduration_ms (int): Execution time in millisecondsraw_data (dict): Full report dataMethods:
save_report(directory="./reports")Save report to directory.
Returns: str - Path to saved report
import os
from adversaria import Adversaria
# Set API key
os.environ["OPENAI_API_KEY"] = "sk-..."
# Run test
client = Adversaria()
result = client.run(provider="openai", model="gpt-4")
if result.risk_score > 50:
print("⚠️ High risk detected!")
result = client.run(
provider="openai",
model="gpt-4",
suites=["prompt_injection", "jailbreak"]
)
providers = [
("openai", "gpt-4"),
("anthropic", "claude-3-opus-20240229"),
]
for provider, model in providers:
result = client.run(provider=provider, model=model)
print(f"{provider}/{model}: {result.risk_score}/100")
client = Adversaria()
# List all reports
reports = client.list_reports()
# Load latest report
if reports:
result = client.load_report(reports[0])
print(f"Risk Score: {result.risk_score}/100")
cargo install adversaria)MIT
pypistats · 37 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-19 – 2026-10-19 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-15 – 2026-10-15 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-09 – 2026-10-09 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-08 – 2026-10-08 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-07 – 2026-10-07 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-06 – 2026-10-06 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-10-02 – 2026-10-02 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-30 – 2026-09-30 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-28 – 2026-09-28 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-27 – 2026-09-27 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-26 – 2026-09-26 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-25 – 2026-09-25 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-19 – 2026-09-19 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-18 – 2026-09-18 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-16 – 2026-09-16 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-12 – 2026-09-12 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-09 – 2026-09-09 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-07 – 2026-09-07 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-09-03 – 2026-09-03 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-31 – 2026-08-31 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-28 – 2026-08-28 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-24 – 2026-08-24 | 7 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-23 – 2026-08-23 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-20 – 2026-08-20 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-14 – 2026-08-14 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-13 – 2026-08-13 | 3 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-09 – 2026-08-09 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-03 – 2026-08-03 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-02 – 2026-08-02 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-08-01 – 2026-08-01 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-07-30 – 2026-07-30 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-07-29 – 2026-07-29 | 1 | 2026-10-21T15:19:29.1579744Z |
| 2026-07-27 – 2026-07-27 | 2 | 2026-10-21T15:19:29.1579744Z |
| 2026-07-24 – 2026-07-24 | 2 | 2026-10-21T15:19:29.1579744Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 24 Feb 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:2aa20da90b28576ddbee9cd0801908b5c5c3daa757be99fd0d6c7fbd9be0a609