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.17.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.17.0
File Size Uploaded Provenance Actions
hackagent-0.17.0.tar.gz 841.1 kB Without provenance Details for hackagent-0.17.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.0 MB

Release files / hackagent-0.17.0.tar.gz

Download URL hackagent-0.17.0.tar.gz
Size 841.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4289d1e679777fd596b62fd9a9ba7805c03929d0ee9d271c371a74f835289be9
BLAKE2b-256 checksum
How to use checksums
36771a693f984270ce2c55c7a51da916c6055ed342843ec75ffd87bf4bf9e49f
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.17.0-py3-none-any.whl

Download URL hackagent-0.17.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2fe4d3c36bc6175d25c18d215452d5828879e5792028a21b22c29abe29640477
BLAKE2b-256 checksum
How to use checksums
246977a7caa314ad7b86ad4fab3c89c1c3f47dea6bc4ff8b7af2c4ade8d21941
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.17.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.17.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