# LOKI Chaos — Autonomous AI Testing & Chaos Engineering CLI > LOKI Chaos (v1.11.0) is a standalone autonomous AI CLI agent that swarms web applications with synthetic chaos personas, enforces natural-language business rules (.loki/rules.md), injects API and local infrastructure faults, and self-heals bugs across Chromium, Firefox, and WebKit. - Official Documentation: https://loki-agent.pages.dev/ - Full Single-File LLM Corpus: https://loki-agent.pages.dev/llms-full.txt - Spanish Documentation (Español): https://loki-agent.pages.dev/?lang=es - GitHub Repository: https://github.com/Elabsurdo984/loki-agent - Latest Release Download: https://github.com/Elabsurdo984/loki-agent/releases/latest ## Getting Started - [Introduction](https://loki-agent.pages.dev/docs/introduction): LOKI Chaos is an autonomous AI testing and synthetic chaos engineering agent for your terminal. - [Installation](https://loki-agent.pages.dev/docs/installation): Install LOKI on Windows, macOS or Linux. - [Windows Installer](https://loki-agent.pages.dev/docs/windows-installer): Interactive .exe installer that configures PATH, shortcuts, Explorer context menu, and Chromium. - [Quickstart](https://loki-agent.pages.dev/docs/quickstart): From zero to your first chaos report in under a minute. - [Playground & .loki/ Files](https://loki-agent.pages.dev/docs/playground-and-workspace): Test LOKI locally against playground/index.html and understand every file inside .loki/ (knowledge.json, models.json, authorized_targets.json, config.yaml, and rules.md). ## Core Concepts - [Architecture](https://loki-agent.pages.dev/docs/architecture): How the safety gate, chaos sandbox, passive detectors, evidence scrubber, AI brain, and CodeHealer fit together. - [Chaos Personas](https://loki-agent.pages.dev/docs/chaos-personas): Four synthetic chaos personas plus swarm, all, and none modes. - [Multi-Browser & Seeds](https://loki-agent.pages.dev/docs/multi-browser-and-seeds): Run on Chromium, Firefox and WebKit with reproducible randomness. - [Failure Detectors](https://loki-agent.pages.dev/docs/failure-detectors): What LOKI monitors and records as a failure during a chaos session. - [Run Artifacts & Reproduction](https://loki-agent.pages.dev/docs/run-artifacts-and-repro): Inside .loki/runs/run_*/: incident.json, network.har, replay.webm, report.html, and the two standalone repro_test.py reproduction scripts. ## CLI Reference - [loki init](https://loki-agent.pages.dev/docs/loki-init): Scaffold a .loki/ workspace in the current directory. - [loki run](https://loki-agent.pages.dev/docs/loki-run): Launch an autonomous chaos session against a target URL. - [loki record](https://loki-agent.pages.dev/docs/loki-record): Interactively record a human user journey and save it as a blueprint in .loki/journeys/. - [loki replay](https://loki-agent.pages.dev/docs/loki-replay): Replay a captured incident deterministically or open its recorded video. - [loki report](https://loki-agent.pages.dev/docs/loki-report): Generate or open the interactive visual HTML report for a test run. - [loki install-browser](https://loki-agent.pages.dev/docs/loki-install-browser): Download and install a single Playwright browser engine. - [loki auth](https://loki-agent.pages.dev/docs/loki-auth): Manage non-local hosts authorized for chaos testing in .loki/authorized_targets.json. - [loki fix](https://loki-agent.pages.dev/docs/loki-fix): Autonomously diagnose crashes from a run, synthesize a surgical code patch, apply it with a .loki.bak backup, and verify it via repro_test.py. - [loki update & version](https://loki-agent.pages.dev/docs/loki-update-version): Check for new GitHub releases and self-update LOKI via uv. ## AI Brain & Self-Healing - [AI Providers (LiteLLM)](https://loki-agent.pages.dev/docs/ai-providers-litellm): Gemini is the bundled default (GEMINI_API_KEY). Use OpenAI, Anthropic, Mistral, Groq, Ollama or any LiteLLM-compatible model. - [Business Rules](https://loki-agent.pages.dev/docs/business-rules): Describe invariants in plain language in .loki/rules.md — evaluated at the end of the session (PASSED or VIOLATED). - [loki chat](https://loki-agent.pages.dev/docs/loki-chat): Interactive conversational QA terminal REPL — and the default screen when running loki with no arguments. - [Auto-Healing (`CodeHealer`)](https://loki-agent.pages.dev/docs/auto-healing): Synthesize, apply, and deterministically verify surgical code patches with .loki.bak backups and automatic rollback. ## Advanced Chaos - [Concurrency & Race Probes](https://loki-agent.pages.dev/docs/concurrency-race-probes): Open N synchronized browser lanes and fire the same action simultaneously to expose race conditions. - [API & Auth Chaos](https://loki-agent.pages.dev/docs/api-and-auth-chaos): Inject semantic HTTP faults, corrupt JSON payloads, and disrupt auth tokens mid-flight via ApiChaosEngine. - [Client State & Temporal Chaos ('Poisoned Well')](https://loki-agent.pages.dev/docs/state-and-temporal-chaos): Corrupt persisted browser storage (localStorage / sessionStorage), trigger QuotaExceededError, shift the JS clock forward, and test rehydration survival on page.reload(). - [Mobile Emulation (`devices.py`)](https://loki-agent.pages.dev/docs/mobile-emulation): Emulate mobile viewports, touch events, device scale factors, and orientations using aliases from src/loki/engine/devices.py. - [Infrastructure Chaos](https://loki-agent.pages.dev/docs/infra-chaos): Kill or pause local processes and Docker containers, or saturate CPU and memory with loki infra. ## Security & CI/CD - [Authorization Guardrail](https://loki-agent.pages.dev/docs/authorization-guardrail): Localhost runs with zero friction; non-local hosts require a one-time confirmation persisted in .loki/authorized_targets.json. - [Network Scrubber](https://loki-agent.pages.dev/docs/network-scrubber): Automatic redaction of auth headers, cookies, tokens, API keys, and sensitive parameters in network.har. - [GitHub Actions CI](https://loki-agent.pages.dev/docs/github-actions-ci): Enforce chaos quality gates with --ci / --strict and automatic $GITHUB_STEP_SUMMARY reports. - [Security Policy (SECURITY.md)](https://loki-agent.pages.dev/docs/security-policy): Supported versions, vulnerability disclosure, and the 7 non-negotiable security invariants enforced by LOKI. - [Contributing (CONTRIBUTING.md)](https://loki-agent.pages.dev/docs/contributing): Architecture principles, local development setup, coding standards, and pull request checklist. ## Releases - [Changelog v1.11.0](https://loki-agent.pages.dev/docs/changelog-v1-11): "Poisoned Well" client storage, quota & temporal chaos (--state-chaos), loki-chaos CLI alias, and Windows .exe installer. - [Changelog v1.10.0](https://loki-agent.pages.dev/docs/changelog-v1-10): Multi-browser engine support (Chromium, Firefox, WebKit), deterministic seeds (--seed), and expanded pluggable failure detectors. - [Changelog v1.9.2](https://loki-agent.pages.dev/docs/changelog-v1-9-2): Direct api_key configuration in .loki/config.yaml and .loki/models.json, enterprise CI/CD matrix, and PyInstaller size optimizations. - [Changelog v1.9.1](https://loki-agent.pages.dev/docs/changelog-v1-9-1): Comprehensive security audit hardening (SECURITY.md, SSRF/path containment, HAR response scrubbing) and Docker detection in loki init. - [Changelog v1.9.0](https://loki-agent.pages.dev/docs/changelog-v1-9): "Ghost in the Wire" semantic API & session chaos (--api-chaos, --fault-rate, --auth-chaos), UI freeze sniffer, and mocked API repro routes. - [Changelog v1.8.0](https://loki-agent.pages.dev/docs/changelog-v1-8): Self-update commands (loki update, loki version --check, /update in chat), autonomous multi-agent operating manual (AGENTS.md), and Windows UTF-8 fixes. - [Changelog v1.7.0](https://loki-agent.pages.dev/docs/changelog-v1-7): Local infrastructure chaos (loki infra list/kill/pause/cpu-stress/memory-stress/cleanup) and CHANGELOG/ release notes. - [Changelog v1.6.0](https://loki-agent.pages.dev/docs/changelog-v1-6): Per-host authorization guardrail (loki auth list/add/remove), interactive hostname confirmation, and --authorized flag for CI. - [Changelog v1.5.0](https://loki-agent.pages.dev/docs/changelog-v1-5): SQL-injection auth-bypass payloads in Adversary persona, modern mobile device aliases, and NetworkScrubber unit test suite. - [Changelog v1.4.0](https://loki-agent.pages.dev/docs/changelog-v1-4): /run, /fix, and /report slash commands now execute real CLI actions directly inside loki chat. - [Changelog v1.3.0](https://loki-agent.pages.dev/docs/changelog-v1-3): Any LiteLLM-compatible AI provider (api_base / api_key_env), /model profile switcher, and loki chat as default screen. - [Changelog v1.2.0](https://loki-agent.pages.dev/docs/changelog-v1-2): Multi-tab concurrency probe (loki run --concurrency) to expose server-side race conditions. - [Changelog v1.1.0](https://loki-agent.pages.dev/docs/changelog-v1-1): Trace-based repro_test.py, mobile device emulation (--device), and autonomous code self-healing (loki fix --apply, --auto-heal). - [Changelog v1.0.0](https://loki-agent.pages.dev/docs/changelog-v1-0): Initial public release of LOKI: Playwright chaos sandbox, 4 personas, swarm mode, loki chat, journey recorder, HTML reports, and NetworkScrubber.