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.7.0.tar.gz (482.2 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.7.0-py3-none-any.whl (672.6 kB view details)

Uploaded Python 3

File details

Details for the file hackagent-0.7.0.tar.gz.

File metadata

  • Download URL: hackagent-0.7.0.tar.gz
  • Upload date:
  • Size: 482.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.7.0.tar.gz
Algorithm Hash digest
SHA256 767b2d3bdfde3f5113b0533dcf747185c1ed0bc19f8b8b8730eaf6ae16e63ed0
MD5 d4fc86e123ebd0d18eeaf0f2494509b5
BLAKE2b-256 279f47582576ac1e2de3b33089ca32ee3684e90ff80c5ed88ddc72b1e82c6a3e

See more details on using hashes here.

File details

Details for the file hackagent-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: hackagent-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 672.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47d7d778bea104d9ac40087d386c54f670519a07b82e590ba13ac71ce8355790
MD5 16f91f147dade9b09e8d4282cc177045
BLAKE2b-256 74868ac20b1571c9fa345de7323905f8858ad8ae369233316f96760f74d04aba

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