Skip to main content

HackAgent is an open-source security toolkit to detect vulnerabilities of your AI Agents.

Project description

HackAgent - AI Agent Security Testing Toolkit

AI Security Red-Team Toolkit


App -- Docs -- API


Python Version License uv Commitizen Ruff Test Coverage CI Status


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

LiteLLM ADK OpenAI

🚀 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hackagent-0.6.0.tar.gz (320.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hackagent-0.6.0-py3-none-any.whl (491.1 kB view details)

Uploaded Python 3

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

Hashes for hackagent-0.6.0.tar.gz
Algorithm Hash digest
SHA256 84d198880e5fe8389c89a488d82598e6adf3258ec041929c830f4e416c77a76d
MD5 5cadbc4502c3ab21b869d14fd6775689
BLAKE2b-256 fbb7201fb70b6b7d82146a8e51c22491c1e4666f05efe84ec41bc9642006fd2b

See more details on using hashes here.

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

Hashes for hackagent-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfe834360beb74ada64dbddf45084ac59f8828d4442f5a0cc6ff75e5b7cffb03
MD5 19e5eaafc047f0bdcc51f8a68f4de7bf
BLAKE2b-256 442229e51d1fbb94e28742fa3495620e64e3fccd046a539498fa10060f834c97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page