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.19.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.19.0
File Size Uploaded Provenance Actions
hackagent-0.19.0.tar.gz 964.0 kB Without provenance Details for hackagent-0.19.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.3 MB

Release files / hackagent-0.19.0.tar.gz

Download URL hackagent-0.19.0.tar.gz
Size 964.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1e6d00f2f02a09fdd0f3ba16586af818f0869546fe3711f04284b9570a8ac5b1
BLAKE2b-256 checksum
How to use checksums
3c7bda62b2a5945df3cc18d64548dc730999b48ddf763a989f168122398386f4
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.19.0-py3-none-any.whl

Download URL hackagent-0.19.0-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c97006e0039b722da60f8637445eb670dd817e548f9684ed5b3d75ff74de7348
BLAKE2b-256 checksum
How to use checksums
060770da490843445579089d39a6daeedf572ef90761c65655d8cfbc031211e4
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.19.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.19.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