Skip to main content

ExaAiAgent Logo

ExaAiAgent

Advanced AI-Powered Cybersecurity Agent for Comprehensive Penetration Testing

Python PyPI License Version



v3.1.1 at a glance

What's new
MCP server exaai mcp · ExaAiAgent mcp · exaaiagent mcp — any works; plug into any MCP client (Claude, Cursor) in one command
Dashboard v2 Live WebSocket events; STOP scan; AI providers; Export All (.zip)
Contributors exaai contributors — GitHub-verified achievement badges
Security Zero-CVE litellm; CI gate: pip-audit + bandit; hardened container
CVE intel Evidence-required findings; EPSS + CISA KEV + OSV + GitHub advisories
Safety TargetScope enforced; command guard; token/tool/spawn budgets + circuit breaker

Previous versions (brief history)

Version Summary
v3.0.0 Anti-hallucination grounding (evidence_id + EvidenceStore), pinned CVE KB, sandbox hardening, attack-graph planning, conf-v1 validation, reporting v3 (SARIF/CSV/HTML), single-sourced version.
v2.3.2 K8s scanner tool registration fix, run persistence (exaai_runs/<run>/), lint pass.
v2.2.5 CI on PRs, import-safe tool server, multi-tool LLM responses, prompt-module merging, TUI target queue.
v2.2.2 - v2.0 Recon modules (subdomain / port / fingerprint), K8s / Azure / GCP modules, React2Shell CVE detection, auto-discovery, install.sh.

Details: see docs/CHANGELOG.md, docs/MIGRATION-v3.md, docs/MIGRATION-v3.1.md, SECURITY.md, and docs/.


Overview

ExaAiAgent is an AI-powered security testing framework that runs like a penetration tester: it executes code dynamically, finds vulnerabilities, and validates them with proof-of-concepts before reporting. It is built for developers and security teams who need fast, accurate testing with evidence behind every claim.

Key capabilities:

  • Full security toolkit out of the box, across web, API, cloud, container, and LLM targets
  • Teams of specialized agents that collaborate and share discoveries
  • Real validation with PoCs, not ungrounded claims
  • Developer-first CLI with actionable, reproducible reports
  • Multi-LLM support through LiteLLM: OpenAI, Anthropic, Gemini, OpenRouter, Ollama, and any compatible provider
  • Smart module loading that auto-detects GraphQL, WebSocket, OAuth, recon, and other attack surfaces

Use cases: application security testing, rapid penetration testing, bug-bounty research, CI/CD gating, API security testing (REST, GraphQL, gRPC), and cloud configuration review.


Quick Start

Prerequisites: Docker (running), Python 3.12+, and an LLM provider (OpenAI, Anthropic, OpenRouter, Ollama, or any compatible provider).

pip install exaai-agent
# or: pipx install exaai-agent

# Configure your AI provider (choose one)
export EXAAI_LLM="openai/gpt-5"
export LLM_API_KEY="your-openai-key"

# Option: Anthropic
# export EXAAI_LLM="anthropic/claude-sonnet-4-5"
# Option: OpenRouter
# export EXAAI_LLM="openrouter/openai/gpt-5"
# export LLM_API_KEY="your-openrouter-key"
# export LLM_API_BASE="https://openrouter.ai/api/v1"
# Option: Ollama (local models)
# export EXAAI_LLM="ollama/llama3"
# export LLM_API_BASE="http://localhost:11434"

# Run your first assessment (prompt modules auto-detected)
exaai --target https://your-app.com

The first run pulls the sandbox Docker image automatically. Results are saved to exaai_runs/<run-name>.


Troubleshooting

LLM connection failed / model not found

Modern models require a recent litellm. Update it:

pip install -U litellm

On externally-managed Linux environments, use a virtual environment:

python3 -m venv venv && source venv/bin/activate

or install with --user:

pip install -U litellm --user --break-system-packages

exaai: command not found after install

Your shell has not picked up the new PATH entry. Open a fresh terminal, or reload your shell config:

source ~/.bashrc

For zsh or fish:

source ~/.zshrc
fish_add_path ~/.local/bin

If you installed with pipx, run once and reopen the terminal:

pipx ensurepath

docker: command not found or the sandbox fails to start

ExaAiAgent runs tools inside a Docker sandbox. Install Docker Desktop (macOS/Windows) or Docker Engine (Linux), start the daemon, and verify:

docker info

On Linux, if your user gets permission errors, add it to the docker group:

sudo usermod -aG docker $USER

Then re-login.

LLM_API_KEY missing / 401 / 403 from the provider

Export the required variables in the same shell you run exaai:

export EXAAI_LLM="your-model"               # required
export LLM_API_KEY="your-api-key"           # required for hosted providers

Verify the value has no trailing newline, and confirm the model id matches your provider (e.g. openai/gpt-6-astra, anthropic/claude-opus-5-5, google/gemini-4-carbon etc...). For OpenRouter also set:

export LLM_API_BASE="https://openrouter.ai/api/v1"

Scan starts but tools return nothing / sandbox exits immediately

Check available disk space and RAM, and verify the sandbox image pulls:

docker pull ghcr.io/hleliofficiel/exaai-sandbox:1.0

Look at exaai_runs/<run>/run_metadata.json for the failing tool and exaai_runs/<run>/report.md for what ran.

Dashboard not reachable

Since v3.1.1 the dashboard binds 127.0.0.1:8000 by default. Open:

http://127.0.0.1:8000

To expose it on your LAN, pass host="0.0.0.0" or set EXAAI_DASHBOARD_TOKEN and authenticate with Authorization: Bearer <token>.

MODULE_DENY / TOOL_BLOCKED at scan time

The security manifest blocked that tool or module for your invocation. Check your --prompt-modules list and the tool's license and usage policy in docs/tools.md — some wrappers are invoke-only and require explicit --allow-tools or equivalent configuration.

pip dependency conflicts on upgrade

The v3.1.x line requires openai>=2.20,<4 and python>=3.12,<3.14. If your environment pins older versions, recreate it:

pipx install --force git+https://github.com/hleliofficiel/ExaAiAgent.git

Usage

# Local codebase
exaai --target ./app-directory

# GitHub repository review
exaai --target https://github.com/org/repo

# Black-box web assessment
exaai --target https://your-app.com

# Multi-target
exaai -t https://github.com/org/app -t https://your-app.com

# Explicit modules (overrides auto-detection)
exaai --target https://api.example.com --prompt-modules graphql_security,waf_bypass

# Grey-box authenticated testing
exaai --target https://your-app.com --instruction "Perform authenticated testing using provided credentials and identify authorization flaws"

# Headless / CI mode
exaai -n --target https://your-app.com

# Interactive TUI
exaai tui

Smart auto-loading resolves modules from the target when --prompt-modules is not set, for example GraphQL endpoints, WebSocket endpoints, OAuth/OIDC flows, and subdomain enumeration.

Configuration

export EXAAI_LLM="openai/gpt-5"        # required
export LLM_API_KEY="your-api-key"      # required for hosted providers
export LLM_API_BASE="your-api-base"    # for local / compatible endpoints
export EXAAI_LIGHTWEIGHT_MODE=true     # reduced token consumption
export EXAAI_MAX_SCAN_TOKENS=2000000   # per-scan token budget
export EXAAI_TOOL_TIMEOUT=120          # per-tool timeout (seconds)
export EXAAI_TARGETS="https://your-app.com"  # enforced target scope

Recommended models: OpenAI GPT-5 (openai/gpt-5), Anthropic Claude Sonnet 4.5 (anthropic/claude-sonnet-4-5), Google Gemini (gemini/gemini-2.0-flash).

CI/CD (GitHub Actions)

name: exaai-security-test
on:
  pull_request:
jobs:
  security-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install ExaAiAgent
        run: curl -sSL https://raw.githubusercontent.com/hleliofficiel/ExaAiAgent/main/install.sh | bash
      - name: Run ExaAiAgent
        env:
          EXAAI_LLM: ${{ secrets.EXAAI_LLM }}
          LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
        run: exaai -n -t ./

Security modules

Module Description
sql_injection SQL / NoSQL injection
xss Cross-site scripting
ssrf Server-side request forgery
xxe XML external entity
rce Remote code execution
idor Insecure direct object reference
authentication_jwt Auth and JWT flaws
business_logic Business-logic flaws
csrf Cross-site request forgery
race_condition Race-condition exploits
graphql_security GraphQL-specific attacks
websocket_security WebSocket vulnerabilities
oauth_oidc OAuth2 / OIDC flaws
waf_bypass WAF bypass techniques
subdomain_takeover Subdomain takeover
prompt_injection AI / LLM prompt injection
kubernetes_security K8s RBAC and pod-security auditing
subdomain_enumeration OSINT subdomain discovery
port_scanning Service discovery and port auditing
technology_fingerprinting Web technology identification

Full vulnerability coverage also includes NoSQL and command injection, GraphQL injection, deserialization flaws, prototype pollution, DOM vulnerabilities, workflow manipulation, session management, CSWSH and WebSocket message injection, subdomain takeover, and misconfigurations. See docs/ for module details.


Architecture

ExaAiAgent combines a multi-agent orchestration engine, a LiteLLM provider abstraction, a Docker sandbox runtime, browser automation, proxy traffic capture, a tool server and registry, security scanners, and CLI/TUI interfaces in the main exaaiagnt/ package.

Key packages: agents/ (supervisor, scan modes, shared memory), grounding/ (EvidenceStore), knowledge/ (pinned CVE KB), intelligence/ (EPSS/KEV/OSV feeds), verification/ (pipeline + hardening), safety/ (TargetScope, command guard, blocklist), coordination/ (RunState), planning/ (attack graph), validation/ (conf-v1), reporting/ (SARIF/CSV/HTML), tools/ (78 registered tools + wrappers), prompts/ (64 modules), and benchmark/ (Juice Shop / DVWA / WebGoat smoke tasks).



Changelog

Full history is in docs/CHANGELOG.md. Latest release: v3.1.2 (see docs/CHANGELOG.md).

Contributing

See CONTRIBUTING.md.

Acknowledgements

ExaAiAgent builds on the following open-source projects:

  • LiteLLM — multi-provider LLM abstraction (MIT)
  • Caido — interactive web-proxy traffic capture for the sandbox
  • ProjectDiscovery — scanner tooling used by wrapper modules (nuclei, httpx, katana)
  • Playwright — browser automation (Apache-2.0)
  • Textual — TUI framework (MIT)
  • OpenHands ACI — agent-computer interface primitives

Security research and prompt-engineering work is informed by the wider open-source security community. ExaAiAgent itself is open source under the Apache License 2.0 — see LICENSE.

Metadata

Release files for exaai-agent 3.1.2

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

Source distribution (sdist)

Source distribution for exaai-agent 3.1.2
File Size Uploaded Provenance Actions
exaai_agent-3.1.2.tar.gz 457.1 kB With provenance Details for exaai_agent-3.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for exaai-agent 3.1.2
File Interpreter ABI Platform Actions
exaai_agent-3.1.2-py3-none-any.whl Python 3 none any Details for exaai_agent-3.1.2-py3-none-any.whl

Total release size: 1.0 MB

Release files / exaai_agent-3.1.2.tar.gz

Download URL exaai_agent-3.1.2.tar.gz
Size 457.1 kB
Tags Source
SHA-256 checksum
How to use checksums
01f69f359c96244df34321cf64f7139ab9f7efa600de3a557c8cc0e82ed006d3
BLAKE2b-256 checksum
How to use checksums
65db1bfd52e615eaa8653d3c6d2360dca18ec67a07ee6daa3f9aba54ce5e55b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / exaai_agent-3.1.2-py3-none-any.whl

Download URL exaai_agent-3.1.2-py3-none-any.whl
Size 567.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebd48c70af56b8756223cb9b2a77e1c156409222b9087ea925181206930047b4
BLAKE2b-256 checksum
How to use checksums
19ceeb4c3947626353dcbf1ffd005fa43a0ccf47bd0ab86ef73305c1e271deb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for exaai-agent 3.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for exaai_agent-3.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

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.

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