HackAgent is an open-source security toolkit to detect vulnerabilities of your AI Agents.
Project description
Overview
HackAgent is an open-source toolkit designed to help security researchers, developers and AI safety practitioners evaluate the security of AI agents. It provides a structured approach to discover potential vulnerabilities, including prompt injection, jailbreaking techniques, and other attack vectors.
🔥 Features
- Comprehensive Attack Library: Pre-built techniques for prompt injections, jailbreaks, and goal hijacking
- Modular Framework: Easily extend with custom attack vectors and testing methodologies
- Safety Focused: Responsible disclosure guidelines and ethical usage recommendations
🔌 AI Agent Frameworks Supported
🚀 Installation
Installation from PyPI
HackAgent can be installed directly from PyPI:
# With uv (recommended)
uv add hackagent
# Or with pip
pip install hackagent
📚 Quick Start
Run the interactive CLI to start testing your AI agents:
hackagent
Or use the SDK:
from hackagent import HackAgent, AgentTypeEnum
agent = HackAgent(
name="my_agent",
endpoint="http://localhost:8000",
agent_type=AgentTypeEnum.GOOGLE_ADK
)
results = agent.hack(attack_config={
"attack_type": "advprefix",
"goals": ["Test goal"],
# ... generator and judges config
})
Obtain your credentials at https://app.hackagent.dev
For detailed examples and advanced usage, visit our documentation.
📊 Reporting
HackAgent automatically sends test results to the dashboard for analysis and visualization.
Access your dashboard at https://app.hackagent.dev
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md and CODE_OF_CONDUCT.md for guidelines.
📜 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
⚠️ Disclaimer
HackAgent is a tool designed for security research and improving AI safety. Always obtain proper authorization before testing any AI systems. The authors are not responsible for any misuse of this software.
This project is for educational and research purposes. Always use responsibly and ethically.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hackagent-0.6.0.tar.gz.
File metadata
- Download URL: hackagent-0.6.0.tar.gz
- Upload date:
- Size: 320.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84d198880e5fe8389c89a488d82598e6adf3258ec041929c830f4e416c77a76d
|
|
| MD5 |
5cadbc4502c3ab21b869d14fd6775689
|
|
| BLAKE2b-256 |
fbb7201fb70b6b7d82146a8e51c22491c1e4666f05efe84ec41bc9642006fd2b
|
File details
Details for the file hackagent-0.6.0-py3-none-any.whl.
File metadata
- Download URL: hackagent-0.6.0-py3-none-any.whl
- Upload date:
- Size: 491.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfe834360beb74ada64dbddf45084ac59f8828d4442f5a0cc6ff75e5b7cffb03
|
|
| MD5 |
19e5eaafc047f0bdcc51f8a68f4de7bf
|
|
| BLAKE2b-256 |
442229e51d1fbb94e28742fa3495620e64e3fccd046a539498fa10060f834c97
|