Skip to main content
HackAgent

The open-source red-team toolkit for AI models and agents

Docs · App · API

PyPI Python License CI Coverage

HackAgent attacks your AI model or agent with research-backed techniques — jailbreaks, prompt injection, tool misuse — and has judge models score every reply. You get a measured success rate per attack, so you can see how exposed a target is and whether a fix helped.

See it run

Terminal UI. Start from an example, change what you need, run it.

Building and running a campaign in the HackAgent terminal UI

Command line. The same campaign is one YAML file you can edit, check and run, in a shell or in CI.

Copying, editing, validating and running a campaign from the command line

Dashboard. Browse runs, results and traces with hackagent web, or on app.hackagent.dev.

Browsing campaign results in the HackAgent dashboard

Quick start

pip install 'hackagent[tui]'
hackagent                # opens the terminal UI

Or run an example end to end, fully local, with Ollama:

ollama pull gemma3:4b
hackagent examples copy h4rm3l-demo
hackagent campaign run h4rm3l-demo.yaml

No API key needed: results go to a local database unless a campaign says otherwise.

Learn more

Questions? Join the discussions or email ais@ai4i.it.

Responsible use

HackAgent is for authorized security testing only. Test systems you own or have written permission to test, and report what you find through coordinated disclosure. Read the responsible disclosure guidelines and our security policy.

Contributing

Contributions are welcome. See CONTRIBUTING.md and CODE_OF_CONDUCT.md.

License

Licensed under Apache-2.0. See LICENSE. HackAgent is intended for security research and AI safety improvement; the authors are not responsible for misuse.

Metadata

Release files for hackagent 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hackagent 0.16.0
File Size Uploaded Provenance Actions
hackagent-0.16.0.tar.gz 796.3 kB Without provenance Details for hackagent-0.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hackagent 0.16.0
File Interpreter ABI Platform Actions
hackagent-0.16.0-py3-none-any.whl Python 3 none any Details for hackagent-0.16.0-py3-none-any.whl

Total release size: 1.8 MB

Release files / hackagent-0.16.0.tar.gz

Download URL hackagent-0.16.0.tar.gz
Size 796.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ce8c9d93ba7a7debdd013010164cca21b28b71e206f09133ef388ad866543cb8
BLAKE2b-256 checksum
How to use checksums
58ad69644953a0290bc3d4381bec04e74067c24afc45e5b50b14acfcbafb47aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hackagent-0.16.0-py3-none-any.whl

Download URL hackagent-0.16.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4fee7911c86175299caf9d6f9e0a7b3bf718aac527a6956bff6730533085485c
BLAKE2b-256 checksum
How to use checksums
2f663f114e71c4dbe13a79b9cc4b461426825ab3e3131d7d2a8fb652470d5ea3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for hackagent 0.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page