Discover and explore top open-source AI tools and projects—updated daily.
AISecurityLabStrengthen AI agent security with automated vulnerability testing
Top 97.0% on SourcePulse
HackAgent is an open-source Python SDK and CLI designed for security researchers, developers, and AI safety practitioners. It addresses the growing need to evaluate and harden AI agents against novel security threats like prompt injection, jailbreaking, and goal hijacking, which traditional tools cannot detect. By automating vulnerability testing with research-backed attack techniques, HackAgent helps identify and mitigate risks, enhancing the overall security posture of AI systems.
How It Works
HackAgent employs a modular pipeline architecture to test AI agent robustness. The core components include an Attack Engine that orchestrates various adversarial techniques (e.g., AdvPrefix, AutoDAN-Turbo, PAIR), a Generator LLM responsible for creating malicious prompts, and a Judge LLM that assesses whether attacks successfully bypass safety measures. The system tests a Target Agent, leveraging pre-built or custom datasets, and supports multiple AI agent frameworks. This LLM-driven, modular approach allows for flexible and comprehensive security evaluations.
Quick Start & Requirements
python3 -m venv .venv && source .venv/bin/activate && pip install hackagentHighlighted Details
Maintenance & Community
Community discussions are available via email at ais@ai4i.it. Contribution guidelines are detailed in CONTRIBUTING.md, and a CODE_OF_CONDUCT.md is provided.
Licensing & Compatibility
Licensed under the Apache-2.0 license. This license is permissive and generally allows for commercial use and integration into closed-source projects.
Limitations & Caveats
HackAgent is strictly intended for authorized security testing and AI safety research. The project explicitly prohibits testing systems without permission, malicious exploitation, or violating terms of service, with authors disclaiming responsibility for any misuse.
4 days ago
Inactive