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.

In local campaign coverage, each attack's evaluated goal outcomes appear while other goals are still running. Pending evaluations and errors remain unresolved. The pooled campaign verdict stays unresolved until the campaign finishes unless an attack has already jailbroken that goal.

Time to first jailbreak measures per-goal execution through the earliest successful target response. It includes rewriting and intervening judging, but excludes local concurrency-slot waits, final judging, and shared run preparation. Server-side queueing remains included. Legacy queue-inclusive clocks are not substituted when execution timing is unavailable.

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.18.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.18.0
File Size Uploaded Provenance Actions
hackagent-0.18.0.tar.gz 950.6 kB Without provenance Details for hackagent-0.18.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.2 MB

Release files / hackagent-0.18.0.tar.gz

Download URL hackagent-0.18.0.tar.gz
Size 950.6 kB
Tags Source
SHA-256 checksum
How to use checksums
06f1ee2fc65ef96fcb7c40bc5402fb2088551aa13c17d0f124253efca912e195
BLAKE2b-256 checksum
How to use checksums
f65816f896c6ba9e4b06d071e090f50ac1aaa4cf0ee264856e73a99c88e4537f
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.18.0-py3-none-any.whl

Download URL hackagent-0.18.0-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
52ea6412da5bd422b3383c889cd8f3dda0ed7ee3dd274c1ffde21feb36f7afc2
BLAKE2b-256 checksum
How to use checksums
3af940f656a33c1d6485407a8e71baf42cc0e597741360fd9dcb6b6a57eb1b4e
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.18.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.18.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