Docs

Overview

Xalgorix is a self-hosted, open-source AI security testing platform for authorized penetration testing and bug bounty workflows.

What is Xalgorix?

Xalgorix helps security researchers run authorized AI-assisted scanning workflows locally, monitor scan activity, triage findings, and generate reports. It combines an LLM-driven agent with browser automation, terminal tooling, a 22-phase testing methodology, live WebSocket events, finding management, and PDF report generation.

Who is it for?

  • Security researchers running authorized penetration tests
  • Bug bounty hunters who need a structured testing workflow
  • Developers auditing their own applications
  • Security teams running internal assessments

What it does

  • Local Web UI on 127.0.0.1:9137 for scan management
  • Single target, DAST, and wildcard/multi-target scan flows
  • 22-phase methodology with selectable phases per scan
  • Live feed for tool calls, agent messages, findings, and errors
  • Findings index with severity filters and CVSS details
  • Branded PDF reports with target/company name and logo
  • AgentMail integration for test inboxes and email verification
  • Discord webhook notifications with configurable severity
  • LLM settings management from the dashboard
  • Environment variable editor in Settings
  • Resource-aware instance limits based on CPU, RAM, and disk
  • Loopback-only binding by default with authentication for external access

What it does not do

  • It does not guarantee finding every vulnerability
  • It does not replace manual testing by a skilled pentester
  • It does not operate autonomously without human oversight
  • It does not bypass security controls on targets you don't own
  • It is not a SaaS platform — it runs entirely on your machine

Architecture Overview

┌──────────────────────────────────────────────────────────────┐
│                        USER LAYER                            │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌────────────┐  │
│  │  Web UI  │  │   CLI    │  │ REST API │  │  Discord   │  │
│  │Dashboard │  │ Terminal │  │ Endpoints│  │  Webhook   │  │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └─────┬──────┘  │
└───────┼──────────────┼────────────┼───────────────┼─────────┘
        └──────────────┼────────────┼───────────────┘
                       ▼            ▼
┌──────────────────────────────────────────────────────────────┐
│                        CORE LAYER                            │
│  ┌─────────────────────────────────────────────────────┐     │
│  │  Go Backend (HTTP + WebSocket + Queue + Config)     │     │
│  └────────────────────────┬────────────────────────────┘     │
│  ┌────────────────────────┼────────────────────────────┐     │
│  │  Agent Engine (LLM Client + Tool Executor + Hooks)  │     │
│  └────────────────────────┼────────────────────────────┘     │
└───────────────────────────┼──────────────────────────────────┘
                            ▼
┌──────────────────────────────────────────────────────────────┐
│                        TOOL LAYER                            │
│  terminal │ browser │ pageagent │ python │ websearch │ notes │
│  reporting│ finish  │ fileedit  │ proxy  │ agentmail │ skills│
│           │ agentsgraph (sub-agent spawning)                 │
└──────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌──────────────────────────────────────────────────────────────┐
│                   EXTERNAL TOOLS (85+)                       │
│  subfinder │ nuclei │ nmap │ sqlmap │ ffuf │ httpx │ ...    │
└──────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌──────────────────────────────────────────────────────────────┐
│                   INTEGRATION LAYER                          │
│  OpenAI │ Anthropic │ DeepSeek │ Groq │ Gemini │ Ollama     │
│  MiniMax │ Discord │ AgentMail │ Caido │ Custom endpoints   │
└──────────────────────────────────────────────────────────────┘

Quick Demo Flow

  1. Install Xalgorix with Go
  2. Create ~/.xalgorix.env with your LLM provider and API key
  3. Run xalgorix --web
  4. Open http://127.0.0.1:9137
  5. Start a scan from the dashboard
  6. Monitor live progress in the feed
  7. Review findings and download PDF report

Core Concepts

Understanding the key components and terminology used in Xalgorix.

Agent

The agent is the core LLM-driven loop that plans and executes security tests. It receives targets and instructions, calls tools in a loop, processes results, and decides what to test next. The agent uses a system prompt that defines a 22-phase testing methodology.

Scan

A scan is a single testing run against one or more targets. Each scan has a unique ID, configuration, status, events, and optional findings. Scans can be started from the dashboard or CLI, and can be paused, resumed, stopped, or restarted.

Scan Modes

Xalgorix supports three scan modes:

  • Single target — test one URL or host
  • DAST — browser-driven application security testing
  • Wildcard / multi — enumerate subdomains and scan each

Methodology

A 22-phase structured testing approach covering reconnaissance, vulnerability discovery, injection testing, access control, API testing, and reporting. Phases can be selected individually per scan.

Findings

Vulnerabilities discovered during a scan. Each finding has a severity (Critical/High/Medium/Low/INFO), CVSS score, evidence, and remediation guidance. Findings are used to generate PDF reports.

Tools

Xalgorix includes 14 built-in agent tools (terminal, browser, notes, reporting, etc.) and can invoke 85+ external security tools (nmap, nuclei, sqlmap, ffuf, etc.) through the terminal. Missing tools can be auto-installed when enabled.

Skills

Skills are specialized knowledge packages loaded into the agent's context. They contain expert-level payloads, bypass techniques, and methodology for specific vulnerability classes (XSS, SQLi, SSRF, etc.) or technologies (Django, Laravel, etc.).

LLM Provider

The AI model backend that powers the agent's reasoning. Xalgorix supports OpenAI, Anthropic, DeepSeek, Groq, Google Gemini, Ollama (local), MiniMax, and any custom OpenAI-compatible endpoint.

Responsible Usage

Xalgorix is a security testing tool. Use it responsibly and only on systems you are authorized to test.

Authorization Required

Only scan systems you own or have explicit written permission to test. Unauthorized scanning is illegal in most jurisdictions and violates the terms of service of most platforms.

Do not use Xalgorix against targets you do not have permission to test. This includes production systems, third-party infrastructure, and government networks unless you have a signed authorization letter or are participating in an active bug bounty program with a defined scope.

Scope Control

  • Define clear scope boundaries before starting a scan
  • Use the "Out of Scope" field in the dashboard to exclude targets
  • Use custom instructions to limit testing to specific vulnerability classes
  • Review the agent's actions in the live feed during testing

Rate Limiting

Configure rate limits to match the engagement rules. Default rate limits are conservative (60 requests per 60-second window). Increase only if the target's policy allows it.

Safety Controls

  • Destructive commands (rm -rf, DROP TABLE, etc.) are blocked by default
  • The agent is instructed to use read-only exploitation techniques
  • Time-based testing (SLEEP, WAITFOR) is preferred over destructive payloads
  • A circuit breaker stops tools after 5 consecutive failures
  • A watchdog monitors for stuck processes and enforces timeouts

Data Handling

  • All scan data is stored locally on your machine
  • No data is sent to external services except the configured LLM provider API
  • API keys are stored in ~/.xalgorix.env — protect this file
  • PDF reports may contain sensitive vulnerability details — handle accordingly

Installation

Install Xalgorix on Linux, macOS, or Windows (WSL).

Prerequisites

  • Go 1.24.2+ — check with go version
  • Node.js and npm — required for building the bundled React Web UI
  • Linux recommended (also works on macOS and Windows via WSL)
  • An LLM API key from a supported provider

Install with Go

GOPROXY=direct GOSUMDB=off go install github.com/xalgord/xalgorix/v4/cmd/xalgorix@latest

This downloads and installs the latest pre-built binary. The binary includes the embedded Web UI.

Build from Source

git clone https://github.com/xalgord/xalgorix.git cd xalgorix make build

The make build target builds the React Web UI into internal/web/static and then builds the Go binary. The result is at build/xalgorix.

To install the built binary system-wide:

sudo install -m 755 build/xalgorix /usr/local/bin/xalgorix

Install Go (if needed)

sudo rm -rf /usr/local/go wget -q https://go.dev/dl/go1.24.2.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.24.2.linux-amd64.tar.gz && rm go1.24.2.linux-amd64.tar.gz export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH

Linux Setup

The primary supported platform. Install Go, then use either installation method above. Common security tools (nmap, nuclei, etc.) are auto-installed on demand when XALGORIX_ALLOW_AUTO_INSTALL is enabled.

macOS Setup

Install Go via Homebrew:

brew install go

Then use the Go install or build-from-source method. Browser automation requires Chrome or Chromium.

Windows / WSL Setup

Xalgorix runs inside WSL (Windows Subsystem for Linux). Install a Linux distribution in WSL, then follow the Linux installation steps. Native Windows is not fully supported.

Updating Xalgorix

# Self-update from the binary xalgorix --update # Or reinstall via Go GOPROXY=direct GOSUMDB=off go install github.com/xalgord/xalgorix/v4/cmd/xalgorix@latest

Xalgorix also auto-checks for updates on every start (throttled to once per 6 hours).

Verifying Install

xalgorix --version

Expected output: xalgorix v4.4.1 (or newer).

Uninstalling

xalgorix --uninstall

This removes the binary and systemd service. Data directories are preserved:

  • ~/.xalgorix/ — configuration and skills
  • ~/xalgorix-data/ — scan data and reports

To remove all data: rm -rf ~/.xalgorix ~/xalgorix-data

Quickstart

Get from zero to your first local dashboard scan in under 5 minutes.

Step 1 — Install Xalgorix

GOPROXY=direct GOSUMDB=off go install github.com/xalgord/xalgorix/v4/cmd/xalgorix@latest

Verify: xalgorix --version

Step 2 — Configure LLM Provider

nano ~/.xalgorix.env

Add your provider and key:

XALGORIX_LLM=openai/gpt-4.1 XALGORIX_API_KEY=sk-your-api-key
Other providers work too. For example: anthropic/claude-sonnet-4-20250514, deepseek/deepseek-chat, groq/llama-4-scout-17b-16e-instruct, or ollama/llama3 for local models.

Step 3 — Start the Dashboard

xalgorix --web

Expected output:

Xalgorix Web UI starting on port 9137... Open http://localhost:9137 in your browser

Step 4 — Open the Web UI

Navigate to http://127.0.0.1:9137 in your browser. The dashboard is bound to localhost by default.

Step 5 — Start a Scan

  1. Click New Scan in the dashboard
  2. Enter a target URL you own (e.g., https://example.com)
  3. Select scan mode (Single target is fine for first run)
  4. Click Start Scan

Step 6 — Monitor Live Feed

The Overview page shows live scan progress. Switch to the Scan Detail or Live Feed view to see individual tool calls, agent messages, and findings in real time.

Step 7 — Review Findings

After the scan completes, go to the Findings page to see discovered vulnerabilities sorted by severity. Each finding includes evidence, CVSS score, and remediation guidance.

Step 8 — Generate Report

From the scan detail page, click Download Report to get a branded PDF. You can set a company name and upload a logo in Settings for branded reports.

Common First-Run Errors

ErrorCauseFix
XALGORIX_LLM is requiredMissing env fileCreate ~/.xalgorix.env with XALGORIX_LLM and XALGORIX_API_KEY
API returned 401Invalid API keyCheck your API key in ~/.xalgorix.env
command not found: xalgorixBinary not in PATHAdd $HOME/go/bin to your PATH
Dashboard won't loadPort in useUse --port 8080 or kill the process on 9137

First Scan

Detailed walkthrough of running your first scan and understanding the output.

Choosing a Target

Use a target you own or have explicit permission to test. Good first targets:

  • A local web application running on localhost
  • A test environment you control
  • A deliberately vulnerable app (DVWA, Juice Shop, etc.)
Never scan production systems without written authorization. Even light reconnaissance can trigger alerts.

CLI Scan

xalgorix --target https://your-target.example.com

CLI Scan with Custom Instructions

xalgorix --target https://app.example.com \ --instruction "Focus on SQL injection, IDOR, and auth bypass. Avoid destructive tests."

Dashboard Scan

  1. Open http://127.0.0.1:9137
  2. Go to Settings and confirm the LLM provider and API key
  3. Click New Scan
  4. Enter the target URL
  5. Select scan mode and methodology phases (optional)
  6. Click Start Scan

Understanding Scan Output

During a scan, the agent:

  1. Reconnaissance — discovers subdomains, ports, endpoints, technologies
  2. Vulnerability testing — tests parameters for injection, access control, business logic flaws
  3. Verification — confirms findings with exploitation proof
  4. Reporting — generates findings and PDF report

The live feed shows each tool call, result, and agent decision in real time.

Scan Lifecycle

StatusDescription
runningAgent is actively testing
completedAgent finished (called finish tool)
stoppedUser stopped the scan
errorScan failed (LLM errors, resource limits, etc.)

Web Dashboard

The local Web UI for managing scans, viewing findings, and configuring Xalgorix.

Starting the Dashboard

xalgorix --web # Custom port xalgorix --web --port 8080 # Bind to all interfaces (requires authentication) XALGORIX_USERNAME=admin XALGORIX_PASSWORD=change-this xalgorix --web --bind 0.0.0.0
The server refuses external binding (--bind 0.0.0.0) without dashboard authentication configured. Always set XALGORIX_USERNAME and XALGORIX_PASSWORD before exposing externally.

Dashboard Pages

PagePurpose
OverviewGlobal status, recent scans, active instances
ScansList of all scans with status, date, and actions
Scan DetailPhase progress, risk overview, findings, events, configuration
Live FeedReal-time tool calls, agent messages, findings, errors
FindingsFindings index across recent scans with severity filters
ReportsList of generated PDF reports with open, download, delete
SettingsLLM config, integrations, environment variables, branding

New Scan

From the dashboard, click New Scan to configure:

  • Target URL or host
  • Scan mode (Single, DAST, Wildcard/multi)
  • Methodology phase selection
  • Severity filters
  • Custom instructions
  • Company name and logo for reports
  • Target list upload (.txt file, one per line)

Authentication

# ~/.xalgorix.env XALGORIX_USERNAME=admin XALGORIX_PASSWORD=your-secure-password

Prefer XALGORIX_PASSWORD_HASH (bcrypt) for production deployments.

Bulk Scan Management

The Scans page supports row selection, select all, and bulk delete. You can also resume, restart, pause, or stop individual scans from the scan detail page.

WebSocket Status

The dashboard connects to ws://127.0.0.1:9137/ws for live events. If the connection drops, the dashboard shows a disconnection indicator and automatically reconnects.

CLI Reference

Complete command-line flag reference for Xalgorix.

Usage

xalgorix --web # Start Web UI (port 9137) xalgorix --target <url> # Run CLI scan

Flags

FlagAliasTypeDefaultDescription
--web-wboolfalseLaunch the Web UI dashboard
--port-pint9137Web UI port
--bindstring127.0.0.1Bind address
--target-tstringTarget URL, host, IP, or path (repeatable)
--instruction-istringCustom scan instructions
--model-mstringOverride XALGORIX_LLM for this run
--update-upboolfalseUpdate to latest release
--version-vboolfalsePrint version
--startboolfalseInstall and start system service
--stopboolfalseStop system service
--restartboolfalseRestart system service
--uninstallboolfalseRemove system service
--help-hboolfalseShow help

Examples

# Web UI on default port xalgorix --web # Web UI on custom port xalgorix --web --port 8080 # Scan a single target xalgorix --target https://example.com # Multiple targets xalgorix --target https://a.com --target https://b.com # Custom model and instructions xalgorix --target https://app.example.com \ --model anthropic/claude-sonnet-4-20250514 \ --instruction "Focus on API vulnerabilities" # Service mode sudo xalgorix --start sudo xalgorix --stop sudo xalgorix --restart xalgorix --uninstall

Service Mode

Install Xalgorix as a systemd service for persistent operation:

sudo xalgorix --start

View logs: journalctl -u xalgorix -f

Service commands: --stop, --restart, --uninstall

Scan Modes

Xalgorix supports three scan modes for different testing scenarios.

Single Target

Tests the exact target you provide. Best for a known URL or host. Runs the full 22-phase methodology against one target.

AspectDetail
InputOne URL, host, or IP
MethodologyFull 22 phases
Duration30 minutes to several hours
Best forKnown targets, specific endpoints, quick assessments

DAST

Dynamic Application Security Testing. Browser-driven testing for web applications, authentication flows, forms, and runtime behavior.

AspectDetail
InputOne application URL
MethodologyFull 22 phases with browser automation emphasis
Duration1-4 hours
Best forWeb apps with complex UI, auth flows, SPAs

Wildcard / Multi-target

Enumerates subdomains and scans each discovered target individually. The most comprehensive mode.

AspectDetail
InputA domain (e.g., example.com)
MethodologySubdomain enumeration → individual scans per target
DurationHours to days depending on attack surface
Best forBug bounty, comprehensive assessments

When to Use Each Mode

ScenarioRecommended Mode
Test a specific web app endpointSingle Target
Test a web app with login forms and SPAsDAST
Bug bounty on a root domainWildcard / Multi
Quick assessment of one hostSingle Target
Upload a list of 50 URLs to testSingle Target (with .txt upload)

Safety Considerations

  • Wildcard scans can generate significant traffic — configure rate limits appropriately
  • DAST scans use browser automation — ensure Chrome/Chromium is available
  • Multi-target scans may take hours — use the service mode for long-running scans

Findings

How findings are created, classified, and managed in Xalgorix.

How Findings are Created

Findings are created when the agent calls the report_vulnerability tool during a scan. The agent must provide exploitation proof, CVSS score, and verification method. Findings without manual verification are rejected by the finish gatekeeper hook.

Severity Model

CVSS ScoreSeverityExamples
9.0–10.0CriticalRCE, full database dump, mass account takeover
7.0–8.9HighSQLi with data extraction, stored XSS with session hijack, SSRF to internal services
4.0–6.9MediumReflected XSS, CSRF on non-critical actions, DOM XSS
0.1–3.9LowClickjacking, missing cookie flags, standalone open redirect
0.0INFOMissing headers, version disclosure, self-XSS

Evidence

Each finding includes:

  • Exploitation proof (command output, HTTP request/response)
  • Verification method (exploited, time_based, error_based, reflected, etc.)
  • CVSS 3.1 vector string
  • Affected endpoint and parameter
  • Remediation guidance

Finding Lifecycle

  1. Discovered — Agent detects a potential vulnerability
  2. Verified — Agent confirms with exploitation proof
  3. Reported — Agent calls report_vulnerability
  4. Included in Report — Finding appears in PDF report

False Positives

The agent is instructed to verify findings manually before reporting. Scanner-only findings without manual exploitation proof are rejected. However, false positives may still occur. Review findings critically and verify independently.

Best Practices

  • Review all findings in the dashboard after scan completion
  • Verify critical findings independently before including in reports
  • Use severity filters in the dashboard to focus on high-impact findings
  • Export findings via PDF report for client delivery

Reports

PDF report generation, contents, branding, and export.

PDF Report Generation

Reports are generated as PDF files using the go-pdf/fpdf library. They are created when a scan completes and are available from the scan detail page and the Reports page.

Report Contents

  • Executive Summary — Vulnerability counts by severity
  • Target and Scan Metadata — Target URL, scan date, mode, model used
  • Severity and CVSS Overview — Distribution chart
  • Verified Findings — Each finding with CVSS score, evidence, PoC, and remediation
  • Technical Analysis — Detailed exploitation steps
  • Proof of Concept — Commands, scripts, or HTTP requests
  • Remediation Guidance — Recommended fixes per finding

Branding

You can customize reports with:

  • Company/Target name — Appears on cover page and headers
  • Logo — Upload via Settings or POST /api/upload-logo

Logos are stored in ~/xalgorix-data/logos/.

Downloading Reports

# Via API curl http://127.0.0.1:9137/api/report/{scan-id} -o report.pdf # Via dashboard — click Download on the Reports page

Storage

Reports are stored at:

~/xalgorix-data/<target>/<date>/<scan-id>/report.pdf

Troubleshooting PDF Generation

IssueCauseFix
Empty reportNo findings during scanRun a longer scan or check LLM configuration
Report generation failsMissing report dataCheck scan completed successfully
Logo not showingUpload failedRe-upload via Settings, check file permissions

Environment Variables

Complete reference for all Xalgorix configuration variables.

Config File Location

Xalgorix loads configuration from these files (in order, later files override):

  1. /etc/xalgorix.env
  2. /home/<sudo-user>/.xalgorix.env (when launched through sudo)
  3. ~/.xalgorix.env
  4. Environment variables already present in the process

Required Variables

VariableRequiredDescriptionExample
XALGORIX_LLMYesModel name with provider prefixopenai/gpt-4.1
XALGORIX_API_KEYYesLLM provider API keysk-...

LLM Settings

VariableDefaultDescription
XALGORIX_API_BASEprovider defaultCustom OpenAI-compatible API base URL
XALGORIX_REASONING_EFFORThighReasoning effort: low, medium, high
XALGORIX_LLM_MAX_RETRIES5Retry count for transient LLM failures
XALGORIX_MEMORY_COMPRESSOR_TIMEOUT30Timeout in seconds for context compression
XALGORIX_MAX_ITERATIONS0Agent iteration cap. 0 = unlimited
GEMINI_API_KEYnoneOptional Gemini key for web-search enrichment

Web and Security

VariableDefaultDescription
XALGORIX_BIND127.0.0.1Web server listen address
XALGORIX_USERNAMEnoneDashboard username
XALGORIX_PASSWORDnoneDashboard password
XALGORIX_PASSWORD_HASHnonePreferred bcrypt password hash
XALGORIX_WORKSPACEcurrent directoryWorkspace root for scan execution

Integrations

VariableDefaultDescription
AGENTMAIL_PODnoneAgentMail pod identifier
AGENTMAIL_API_KEYnoneAgentMail API key
XALGORIX_DISCORD_WEBHOOKnoneDiscord webhook URL
XALGORIX_DISCORD_MIN_SEVERITYnoneMinimum severity for Discord alerts
CAIDO_PORT0Caido proxy port. 0 = auto-detect
CAIDO_API_TOKENnoneCaido API token

Rate Limits and Proxy

VariableDefaultDescription
XALGORIX_RATE_LIMIT_REQUESTS60Dashboard requests per window
XALGORIX_RATE_LIMIT_WINDOW60Dashboard rate-limit window in seconds
XALGORIX_RATE_RPS10Sustained outbound request rate
XALGORIX_RATE_BURST20Outbound burst size
XALGORIX_USE_PROXYfalseEnable proxy routing
XALGORIX_PROXY_URLnoneSingle proxy URL (overrides proxy file)
XALGORIX_PROXY_FILEnoneFile containing one proxy per line
XALGORIX_PROXY_ROTATIONroundrobinProxy rotation: roundrobin or random
XALGORIX_TLS_SKIP_VERIFYfalseSkip TLS verification for testing traffic

Runtime and Browser

VariableDefaultDescription
XALGORIX_DISABLE_BROWSERfalseDisable browser automation
XALGORIX_BROWSER_PATHautoCustom Chrome/Chromium executable path
XALGORIX_ALLOW_AUTO_INSTALLroot onlyPermit automatic package installation
XALGORIX_AUTO_INSTALL_SUDOfalsePermit sudo-prefixed auto-installs

Telemetry

VariableDefaultDescription
XALGORIX_TELEMETRYtrueEnable telemetry
XALGORIX_OTEL_ENDPOINTnoneOpenTelemetry endpoint

Full Example Config

# ~/.xalgorix.env # Required XALGORIX_LLM=openai/gpt-4.1 XALGORIX_API_KEY=sk-your-key # Optional — Custom API endpoint # XALGORIX_API_BASE=https://api.openai.com/v1 # Optional — Web search GEMINI_API_KEY=AIza... # Optional — Discord alerts XALGORIX_DISCORD_WEBHOOK=https://discord.com/api/webhooks/... XALGORIX_DISCORD_MIN_SEVERITY=high # Optional — AgentMail AGENTMAIL_POD=am_us_pod_47 AGENTMAIL_API_KEY=ak_... # Optional — Dashboard auth XALGORIX_USERNAME=admin XALGORIX_PASSWORD=change-this-password # Optional — Rate limiting XALGORIX_RATE_LIMIT_REQUESTS=60 XALGORIX_RATE_LIMIT_WINDOW=60

LLM Providers

Supported providers, configuration, and troubleshooting.

Supported Providers

When XALGORIX_API_BASE is empty, Xalgorix infers the API endpoint from the model prefix:

PrefixDefault API BaseExample Models
openai/https://api.openai.com/v1gpt-4.1, gpt-4o, o3
anthropic/https://api.anthropic.comclaude-sonnet-4-20250514, claude-opus-4-20250514
deepseek/https://api.deepseek.com/v1deepseek-chat, deepseek-reasoner
groq/https://api.groq.com/openai/v1llama-4-scout-17b-16e-instruct, mixtral
google/https://generativelanguage.googleapis.comgemini-2.5-pro, gemini-2.0-flash
gemini/https://generativelanguage.googleapis.comSame as google/
ollama/http://localhost:11434/v1llama3, qwen2, mistral (local)
minimax/https://api.minimax.io/v1MiniMax-M3

Custom OpenAI-Compatible Endpoints

XALGORIX_LLM=custom/security-model XALGORIX_API_BASE=https://your-provider.example/v1 XALGORIX_API_KEY=your_provider_api_key

Any provider that exposes an OpenAI-compatible /v1/chat/completions endpoint works.

Provider-Specific Notes

OpenAI

Uses the standard /v1/chat/completions endpoint with Bearer token auth. Supports streaming.

Anthropic

Uses /v1/messages endpoint with x-api-key header. Max tokens set to 8192. System prompt is passed as a top-level field.

Google Gemini

Uses /v1beta/models/MODEL:generateContent (or streamGenerateContent for streaming). Auth via x-goog-api-key header. GEMINI_API_KEY enables web search enrichment separately.

Ollama (Local)

Runs entirely locally. Requires Ollama installed and a model pulled. Set XALGORIX_LLM=ollama/<model-name>. No API key needed for local Ollama, but set XALGORIX_API_KEY=dummy to pass validation.

Local models may produce lower quality results than cloud models. Security testing requires strong reasoning and tool-calling capabilities. Test with a cloud provider first before switching to local models.

Troubleshooting Provider Errors

ErrorCauseFix
API returned 401Invalid API keyCheck XALGORIX_API_KEY
API returned 429Rate limited by providerWait or upgrade API plan. Xalgorix retries with backoff.
context window overflowMessage history too longAutomatic — Xalgorix prunes messages to fit
model not foundInvalid model nameCheck the model ID matches your provider's API
connection refusedOllama not runningStart Ollama: ollama serve

Rate Limits

Configuring rate limits for the dashboard API and outbound requests.

Dashboard Rate Limits

The Web UI API has built-in rate limiting to prevent abuse:

VariableDefaultDescription
XALGORIX_RATE_LIMIT_REQUESTS60Max requests per window per IP
XALGORIX_RATE_LIMIT_WINDOW60Window duration in seconds

WebSocket connections, static files, and dashboard read operations (GET requests for scan lists, status, etc.) are exempt from rate limiting.

Outbound Request Rate Limits

Controls how fast Xalgorix sends requests to target systems:

VariableDefaultDescription
XALGORIX_RATE_RPS10Sustained requests per second
XALGORIX_RATE_BURST20Burst size (max concurrent requests)

These are enforced by the internal rate limiter using a token bucket algorithm. Adjust based on your engagement rules and target capacity.

LLM Provider Rate Limits

When the LLM provider returns HTTP 429 (rate limited), Xalgorix waits 30 minutes before retrying. This is intentional — it avoids burning through retries and respects provider limits. The scan automatically resumes after the wait.

Integrations

External service integrations for notifications, email, and proxy.

Discord Alerts

Get real-time notifications for scan start, vulnerability discovery, and scan completion.

# ~/.xalgorix.env XALGORIX_DISCORD_WEBHOOK=https://discord.com/api/webhooks/... XALGORIX_DISCORD_MIN_SEVERITY=high

The XALGORIX_DISCORD_MIN_SEVERITY variable filters alerts. Set to high to only receive High and Critical findings. Valid values: critical, high, medium, low, info.

AgentMail

AgentMail provides temporary email inboxes for testing sign-up flows, email verification, and OTP flows. The agent can create inboxes, receive verification emails, and complete registration flows automatically.

# ~/.xalgorix.env AGENTMAIL_POD=am_us_pod_47 AGENTMAIL_API_KEY=ak_...

Usage in custom instructions: the agent uses the agentmail tool to create inboxes and wait for emails during authenticated testing workflows.

Caido Proxy

Integration with Caido for HTTP request capture and replay during scans.

# ~/.xalgorix.env CAIDO_PORT=8080 CAIDO_API_TOKEN=your-caido-token

Set CAIDO_PORT=0 (default) for auto-detection.

Testing Integrations

# Test Discord webhook curl -X POST "$XALGORIX_DISCORD_WEBHOOK" \ -H "Content-Type: application/json" \ -d '{"content": "Test alert from Xalgorix"}'

Methodology

Xalgorix organizes testing into 22 phases. Phases can be selected individually per scan from the dashboard.

Phase List

#PhaseDescription
1ReconnaissanceSubdomain enumeration (passive + active), DNS resolution, HTTP probing, port scanning, technology fingerprinting, WAF detection, URL crawling, parameter discovery, JS analysis
2Manual Vulnerability DiscoveryBaseline requests, special character handling, input reflection testing, SQL error detection, time-based behavior analysis, SSTI testing — all before automated scanners
3Directory & File DiscoveryDirectory brute-forcing (ffuf, gobuster, dirsearch), sensitive file probing (.env, .git, backups, configs, admin panels, API docs)
4CORS & Cookie AnalysisCORS credential theft testing, cookie security analysis (session fixation, SameSite bypass), technology fingerprinting for attack selection
5Authentication & Session TestingSQLi in login forms, username enumeration, password reset flaws, session fixation, JWT attacks (none algorithm, weak secret, key confusion), OAuth/OIDC testing, 2FA bypass
6Injection TestingManual parameter analysis → XSS, SQLi, command injection, SSTI, path traversal, XXE, NoSQL injection, CRLF injection, host header attacks, HTTP request smuggling
7SSRF TestingServer-side request forgery testing against cloud metadata endpoints (AWS, GCP, Azure), internal services, and protocol handlers (file://, gopher://, dict://)
8IDOR & Broken Access ControlID enumeration/decrement, UUID prediction, horizontal/vertical privilege escalation, HTTP method override, path traversal on API endpoints
9API & GraphQL TestingAPI endpoint discovery, Swagger/OpenAPI enumeration, GraphQL introspection, batching attacks, nested query DoS
10File Upload TestingExtension bypass, double extension, null byte injection, Content-Type bypass, SVG XSS, .htaccess upload, polyglot files, path traversal in filename
11Deserialization & RCEJava deserialization, PHP object injection, Python pickle, Node.js prototype pollution, .NET ViewState, Log4j (JNDI injection)
12Race Conditions & Business LogicTOCTOU bugs, concurrent request testing (coupon reuse, double spending), mass assignment, price manipulation, negative values, rate limit bypass
13Subdomain TakeoverDangling CNAME detection, subjack/subzy scanning for NXDOMAIN targets
14Open Redirect TestingParameter fuzzing for redirect vulnerabilities with various bypass payloads
15Email Security TestingEmail header injection, password reset token prediction, host header poisoning, account takeover via email change
16Cloud & InfrastructureS3/Azure/GCP bucket misconfiguration, AWS metadata SSRF, Kubernetes API, Docker API, credentials file exposure
17WebSocket TestingCross-site WebSocket hijacking (CSWSH), injection via WebSocket messages, authentication bypass, message tampering
18CMS-Specific TestingWordPress (wpscan), Joomla (joomscan), Drupal (droopescan) enumeration and vulnerability scanning
19Broken Link Hijacking & Content SpoofingDead domain detection in external links, HTML injection, content spoofing via URL parameters
20Exploit VerificationMandatory verification phase — confirm every finding with exploitation proof before reporting. Self-critique: "Did I actually exploit this?"
21Novel Vulnerability DiscoveryBehavioral differential fuzzing, parser differential testing, type confusion attacks, timing side-channel analysis, anomaly investigation
22Final ReportReview all notes, report verified findings with CVSS scores and PoC, deduplicate, generate summary with remediation priorities

Phase Selection

The dashboard lets you select which phases to run. This is useful for:

  • Recon-only scans — Select only Phase 1 and 22 (report)
  • Injection-focused scans — Select Phases 1, 2, 5, 6, 20, 22
  • Full methodology — Leave all phases selected (default)

How Phase Progress Appears in Dashboard

The Scan Detail page shows phase progress as the scan runs. Each phase is tracked based on the agent's tool calls and actions. The progress indicator shows which phase is currently active and which phases have been completed.

Tools

Xalgorix includes 14 built-in agent tools and supports 85+ external security tools.

Built-in Agent Tools

ToolDescription
terminal_executeRun shell commands with auto-install support
browser_actionBrowser automation via headless Chrome (rod)
page_agentPage-level JavaScript execution and discovery
file_editCreate and edit files in the workspace
add_noteSave findings, endpoints, and observations
read_notesRead saved notes from the current scan
report_vulnerabilityReport a verified vulnerability with CVSS and PoC
finishComplete the scan and generate summary
python_actionRun Python scripts in an isolated environment
web_searchSearch the web via Gemini/Brave/Google/Bing
agentmailCreate test inboxes and manage email flows
send_requestSend HTTP requests (optionally through Caido proxy)
read_skill / list_skillsLoad and browse deep knowledge skills
spawn_agent / check_agentRun parallel sub-agents for concurrent tasks

External Security Tools

Xalgorix can invoke 85+ external tools through the terminal_execute tool. These are organized by category:

Recon & Subdomain Enumeration (15)

subfinder, findomain, assetfinder, dnsx, amass, gospider, katana, hakrawler, gau, waybackurls, paramspider, crt.sh, bufferover, webarchive, shuffledns

HTTP & Scanning (15)

httpx, nuclei, gobuster, ffuf, feroxbuster, dirsearch, dirb, nikto, wfuzz, whatweb, wappalyzer, builtwith, wpscan, joomscan, cmsmap

Exploitation (15)

sqlmap, nmap, masscan, naabu, arp-scan, netdiscover, responder, impacket, secretdump, evilwinrm, hydra, medusa, john, hashcat, crackmapexec

Information Gathering (10)

theHarvester, metagoofil, spiderfoot, recon-ng, maltego, gh, git-dumper, gittools, trufflehog, gitleaks

Security Scanning (10)

zaproxy, burpsuite, semgrep, bandit, brakeman, gosec, sonarqube, owasp-zap, mitmproxy, sslyze

WAF & Protection (5)

wafw00f, whatwaf, bountycheck, subjack, nuclei-templates

Utilities (15)

curl, wget, jq, git, python3, pip, scrapling, xurl, qsreplace, unfurl, anew, gron, httprobe, httpx, notify

Auto-Install

When XALGORIX_ALLOW_AUTO_INSTALL is enabled (default for root), missing tools are automatically installed via the appropriate package manager:

  • Gogo install
  • APTapt install
  • PIPpip install
  • Cargocargo install
  • Gemgem install
  • NPMnpm install
Auto-install is disabled by default for non-root users. Enable it only when you trust the environment. Auto-install with sudo (XALGORIX_AUTO_INSTALL_SUDO) is a privilege-escalation surface on multi-user systems.

Architecture

Technical overview of Xalgorix's internal components and data flow.

Components

ComponentPackagePurpose
CLIcmd/xalgorix/Entry point, argument parsing, service management
Configinternal/config/Environment variable loading, validation
Agentinternal/agent/Core agent loop, hooks, system prompt, message management
LLM Clientinternal/llm/Multi-provider LLM API client with streaming, retry, and provider detection
Tool Registryinternal/tools/Tool registration, execution, circuit breaker
Web Serverinternal/web/HTTP server, WebSocket handler, REST API, static file serving
Scan Contextinternal/scanctx/Per-session state (vulns, notes, terminal, browser)
Proxyinternal/proxy/Proxy routing and rotation
Rate Limiterinternal/ratelimit/Request rate limiting
Resourcesinternal/resources/CPU/RAM/disk-aware instance limits

Data Flow

User Input (Dashboard / CLI)
    │
    ▼
Go Backend (HTTP + WebSocket)
    │
    ▼
Agent Engine
    │
    ├──► LLM Client ──► Provider API (OpenAI / Anthropic / etc.)
    │         │
    │         ▼
    │    Response + Tool Calls
    │
    ├──► Tool Registry ──► Built-in Tools (browser, terminal, notes, ...)
    │         │
    │         └──► External Tools (nmap, nuclei, sqlmap, ...)
    │
    ├──► Hooks (stuck detection, finish gating, WAF detection, ...)
    │
    ▼
Findings ──► PDF Report Generator ──► report.pdf
    │
    ├──► Discord Webhook (if configured)
    │
    └──► Dashboard (via WebSocket events)

Data Storage

~/xalgorix-data/ ├── _saved/ ├── logos/ ├── queue_state.json └── <target>/ └── <date>/ └── <scan-id>/ ├── scan.json └── report.pdf

Scan data is stored on disk so the dashboard can recover after refresh or restart.

Skills Directory

~/.xalgorix/skills/ ├── data/ │ ├── api-security/ │ ├── cloud-security/ │ ├── container-security/ │ └── ...

Skills are loaded from the embedded filesystem or the local skills directory. The read_skill tool injects skill content into the agent's context.

API Reference

REST API endpoints for programmatic control of Xalgorix.

Scan Endpoints

MethodPathPurpose
POST/api/scanStart or save a scan
POST/api/stopStop all running scans
GET/api/statusCurrent global status
GET/api/scansList scans
GET/api/scans/:idGet scan detail
DELETE/api/scans/:idDelete a scan and its report data
GET/api/report/:idDownload a PDF report

Instance Endpoints

MethodPathPurpose
GET/api/instancesList live and historical instances
GET/api/instances/:idGet instance detail
GET/api/instances/:id/eventsGet buffered event history
POST/api/instances/:id/stopStop a specific instance
POST/api/instances/:id/startStart a saved or completed scan as a new run
POST/api/instances/:id/restartRestart with the same configuration
POST/api/instances/:id/pausePause a running scan
POST/api/instances/:id/resumeResume a paused scan

Upload Endpoints

MethodPathPurpose
POST/api/upload-logoUpload a report logo
POST/api/upload-targetsUpload a target list (.txt)
POST/api/upload-instructionsUpload custom instructions

Settings Endpoints

MethodPathPurpose
GET/api/settings/environmentList editable environment settings
POST/api/settings/environmentSave environment settings
GET/api/settings/llmGet LLM settings
POST/api/settings/llmSave LLM settings
GET/api/settings/agentmailGet AgentMail settings
POST/api/settings/agentmailSave AgentMail settings
GET/POST/api/settings/rate-limitGet/set rate limit config

Queue Endpoints

MethodPathPurpose
GET/api/queue/statusCheck interrupted queue
POST/api/queue/resumeResume interrupted scan
POST/api/queue/clearClear scan queue

Auth Endpoints

MethodPathPurpose
POST/api/auth/loginAuthenticate with username/password
POST/api/auth/logoutEnd session
GET/api/auth/statusCheck authentication status

Other Endpoints

MethodPathPurpose
POST/api/chatSend message to running scan agent
GET/api/versionGet Xalgorix version
GET/api/stop-notifyTrigger stop notification (Discord)
GET/wsWebSocket live event stream

Authentication

When XALGORIX_USERNAME and XALGORIX_PASSWORD (or XALGORIX_PASSWORD_HASH) are configured, all API endpoints require authentication. Login via POST /api/auth/login with a JSON body:

curl -X POST http://127.0.0.1:9137/api/auth/login \ -H "Content-Type: application/json" \ -d '{"username":"admin","password":"your-password"}'

Error Format

{"error": "description of the error"}

HTTP status codes: 200 (success), 400 (bad request), 401 (unauthorized), 404 (not found), 429 (rate limited), 500 (server error).

WebSocket Events

Real-time event streaming via WebSocket for live scan monitoring.

Connection

ws://127.0.0.1:9137/ws

The WebSocket endpoint is at /ws. No authentication is required for WebSocket connections when the dashboard is on localhost (loopback binding).

Event Types

Event TypeDescriptionKey Fields
thinkingAgent iteration startcontent (iteration number), totalTokens
tool_callTool about to executetoolName, toolArgs
tool_resultTool execution resulttoolName, toolResult.output, toolResult.error
messageAgent text messagecontent, totalTokens
errorError eventcontent (error description)
finishedScan completedcontent (summary)

Event Payload Example

{ "type": "tool_call", "toolName": "terminal_execute", "toolArgs": {"command": "nmap -sV -sC --top-ports 200 example.com"}, "agentId": "agent_1715784000000000000", "timestamp": "2026-05-14T12:00:00Z", "totalTokens": 15420 }

Reconnect Behavior

The dashboard frontend automatically reconnects if the WebSocket connection drops. A disconnection indicator is shown while reconnecting. Events that occur during disconnection are buffered server-side and can be retrieved via GET /api/instances/:id/events.

Example Client

const ws = new WebSocket("ws://127.0.0.1:9137/ws"); ws.onmessage = (event) => { const data = JSON.parse(event.data); console.log(`[${data.type}]`, data.content || data.toolName); }; ws.onclose = () => console.log("Disconnected — will auto-reconnect");

Troubleshooting

Common issues and their solutions.

Installation Issues

IssueCauseFix
go: command not foundGo not installedInstall Go 1.24.2+ from go.dev
go install failsModule proxy issuesUse GOPROXY=direct GOSUMDB=off
command not found: xalgorixBinary not in PATHAdd $HOME/go/bin to PATH
make build failsMissing npmInstall Node.js and npm for the Web UI build

Dashboard Issues

IssueCauseFix
Dashboard won't openPort in use or server not runningCheck xalgorix --web is running; try --port 8080
WebSocket disconnectedServer restart or network issueRefresh the page — it auto-reconnects
External binding refusedNo auth configuredSet XALGORIX_USERNAME and XALGORIX_PASSWORD
Rate limit exceededToo many API requestsIncrease XALGORIX_RATE_LIMIT_REQUESTS or wait

Scan Issues

IssueCauseFix
LLM error 401Invalid API keyCheck XALGORIX_API_KEY in ~/.xalgorix.env
LLM error 429Provider rate limitXalgorix waits 30 minutes automatically. Or upgrade API plan.
Context window overflowLong conversationAutomatic — Xalgorix prunes messages. No action needed.
Scan stuck / no progressAgent loop or tool hangStop the scan and restart. Check the live feed for errors.
Missing toolsTools not installedEnable XALGORIX_ALLOW_AUTO_INSTALL=true or install manually
PDF generation failsScan incompleteEnsure scan completed successfully before generating report

Integration Issues

IssueCauseFix
Discord alerts not workingInvalid webhook URLTest with curl -X POST "$WEBHOOK" -d '{"content":"test"}'
AgentMail errorsInvalid API key or podCheck AGENTMAIL_API_KEY and AGENTMAIL_POD

Permission Issues

IssueCauseFix
Auto-install failsNot rootEnable XALGORIX_ALLOW_AUTO_INSTALL=true or install tools manually
Browser won't launchMissing Chrome or sandboxInstall Chrome/Chromium or set XALGORIX_BROWSER_PATH

FAQ

Frequently asked questions about Xalgorix.

Is Xalgorix free?

Yes. Xalgorix is open-source under the MIT license. There are no SaaS fees, per-scan charges, or usage limits. You pay only for your LLM provider API usage.

Is it self-hosted?

Yes. Xalgorix runs entirely on your machine. No data is sent to external services except the configured LLM provider API.

Does it require an API key?

Yes. You need an API key from a supported LLM provider (OpenAI, Anthropic, DeepSeek, Groq, Google, MiniMax). Ollama can run locally without an API key — set XALGORIX_API_KEY=dummy to pass validation.

Which LLMs are supported?

OpenAI, Anthropic, DeepSeek, Groq, Google Gemini, Ollama (local), MiniMax, and any custom OpenAI-compatible endpoint. See LLM Providers.

Can I use local models?

Yes, via Ollama. Install Ollama, pull a model (e.g., ollama pull llama3), and set XALGORIX_LLM=ollama/llama3. Local models may produce lower quality results than cloud models for security testing tasks.

Can I use it for bug bounty?

Yes. Xalgorix is designed for authorized testing workflows including bug bounty. Use custom instructions to follow program rules and scope restrictions.

Does it replace manual testing?

No. Xalgorix assists with structured testing workflows, but findings should be verified manually. It does not guarantee finding every vulnerability.

Is the dashboard safe to expose publicly?

The dashboard binds to 127.0.0.1 by default. To expose it externally, you must configure authentication (XALGORIX_USERNAME and XALGORIX_PASSWORD). Use XALGORIX_PASSWORD_HASH (bcrypt) for production. Consider using a reverse proxy with TLS for external access.

Can it resume scans?

Yes. The dashboard supports pause, resume, restart, and stop actions on running scans. Scan state is persisted to disk.

Does it generate reports?

Yes. PDF reports are generated automatically when a scan completes. Reports include executive summary, findings with CVSS scores, exploitation proof, and remediation guidance. Reports support custom branding.

What platforms are supported?

Linux is the primary platform. macOS and Windows (via WSL) are also supported. Docker support is not currently available.

How accurate are findings?

The agent is instructed to verify findings with exploitation proof before reporting. Scanner-only findings without manual verification are rejected. However, false positives may occur. Always verify findings independently.

Contributing

How to contribute to Xalgorix development and documentation.

Development Setup

# Clone the repository git clone https://github.com/xalgord/xalgorix.git cd xalgorix # Install Web UI dependencies make webui-install # Build everything (Web UI + Go binary) make build # Run tests go test ./... # Run from source go run ./cmd/xalgorix --web # Run frontend dev server only make webui-dev

Project Structure

xalgorix/ ├── cmd/xalgorix/ # CLI entry point │ └── main.go # Argument parsing, service management ├── internal/ │ ├── agent/ # Core agent loop, hooks, system prompt │ ├── config/ # Configuration loading │ ├── llm/ # Multi-provider LLM client │ ├── proxy/ # Proxy routing │ ├── ratelimit/ # Rate limiting │ ├── resources/ # Resource-aware limits │ ├── scanctx/ # Per-session scan context │ ├── tools/ # Built-in tools │ │ ├── terminal/ # Shell command execution │ │ ├── browser/ # Headless Chrome (rod) │ │ ├── pageagent/ # Page-level JS execution │ │ ├── fileedit/ # File creation/editing │ │ ├── notes/ # Note-taking tool │ │ ├── reporting/ # Vulnerability reporting │ │ ├── finish/ # Scan completion │ │ ├── python/ # Python script execution │ │ ├── websearch/ # Web search │ │ ├── agentmail/ # Email integration │ │ ├── agentsgraph/ # Sub-agent spawning │ │ └── skills/ # Skill loading │ ├── web/ # HTTP server, WebSocket, API │ │ ├── server.go # Main server │ │ ├── autonomous.go # Scan orchestration │ │ ├── report.go # Report generation │ │ ├── settings_env.go # Environment settings │ │ └── static/ # Embedded Web UI assets │ └── tui/ # Terminal UI (banner) ├── webui/ # React Web UI source ├── docs/ # Internal docs └── tools.md # Supported tools list

Adding Tools

Tools are registered in internal/tools/. Each tool has a Register function that adds it to the global registry. To add a new tool:

  1. Create a new package under internal/tools/
  2. Implement the Tool struct with Name, Description, Parameters, and Execute function
  3. Call reg.Register() in your Register function
  4. Call your Register function from agent.go

Adding LLM Providers

LLM provider support is in internal/llm/client.go. The resolveEndpoint method handles provider detection and URL construction. To add a new provider:

  1. Add the provider's API base to the providerBases map
  2. Add any special request/response handling in doChat and ChatStream
  3. Update the provider prefix documentation

Running Tests

# All tests go test ./... # With coverage go test ./... -cover # With race detector go test ./... -race # Full CI pipeline make test-ci

Submitting PRs

  • Fork the repository and create a feature branch
  • Write tests for new functionality
  • Ensure go test ./... passes
  • Run go vet ./... and go mod tidy
  • Submit a pull request with a clear description

Reporting Issues

Report bugs and feature requests at github.com/xalgord/xalgorix/issues.

Changelog

Version history and notable changes.

v4.4.1 (Current)

  • Current stable release
  • 22-phase methodology with selectable phases
  • Web dashboard with live feed, scan management, and settings
  • Multi-provider LLM support (8 providers + custom endpoints)
  • AgentMail integration for email verification flows
  • Discord webhook notifications
  • PDF report generation with branding
  • Resource-aware instance limits
  • Loopback-only binding with authentication for external access
  • Auto-update check (throttled to 6 hours)
  • Systemd service mode
  • Proxy support with rotation

Breaking Changes

ChangeOldNew
Module pathv3v4
Default port13379137
Methodology phases20 phases22 phases
Install commandv3/cmd/xalgorix@latestv4/cmd/xalgorix@latest
If you are upgrading from v3, update your install command to use v4 in the module path and note the new default port (9137).