LOKI Chaos
Autonomous AI Testing & Synthetic Chaos Agent
📘 Full Documentation • Installation • CLI Reference • Releases
⚡ Overview
LOKI Chaos (loki / loki-chaos) is a standalone CLI testing agent that breaks, explores, and verifies web applications before your users do. Instead of only testing "happy paths", LOKI unleashes synthetic chaos personas, in-flight API mutations, client state corruption, and multi-tab race probes—then packages every failure into a deterministic Playwright reproduction script (repro_test.py), video replay, sanitized .har trace, and standalone HTML report.
🌟 Highlights
- 🐝 Chaos Personas & Swarm Mode (
--swarm):RageClicker,NoviceChaotic,NetworkTormentor, andAdversaryacross Chromium, Firefox, WebKit, and mobile viewports (--device). - ⚡ Ghost in the Wire (
--api-chaos): In-flight HTTP 500/502/503/429 injection, JSON schema stripping, and 401 auth token invalidation. - 🧪 Poisoned Well (
--state-chaos):localStorage/sessionStorageJSON rot,QuotaExceededErrorsimulation, temporal clock drift (Date.now), and poisoned reload survival checks. - 🔀 Concurrency & Infra Chaos: Synchronized multi-tab race condition probes (
--concurrency) and local process/container fault injection (loki infra). - 🧠 AI Rules & Autonomous Self-Healing: Evaluates plain-English business rules (
.loki/rules.md) via any LiteLLM provider (Gemini, OpenAI, Anthropic, Ollama, etc.) and synthesizes verified surgical patches (loki fix --apply,--auto-heal). - 💬 Interactive QA Terminal (
loki/loki chat): Built-in REPL to inspect runs, switch AI models (/model), and dispatch/run,/fix, and/report.
🚀 Quickstart
1. Install
- Precompiled Binaries & Windows Installer (no Python required): Download
loki-setup-windows-amd64.exeor standalone binaries for Windows, Linux, and macOS from GitHub Releases. - Via
uv(recommended for Python users):uv tool install loki-chaos-agent # Or run without installing: uvx --from loki-chaos-agent loki run http://localhost:8000 --swarm
- Via
pipx:pipx install loki-chaos-agent
2. Run
# 1. Initialize workspace (.loki/config.yaml & .loki/rules.md)
loki init
# 2. Launch a multi-persona chaos assault and open the HTML dashboard
loki run http://localhost:8000 --swarm --open
# 3. Replay the failure deterministically or synthesize a verified code fix
loki replay
loki fix --apply
# 4. Open the interactive QA terminal assistant
loki
📘 Documentation
Full guides, configuration references, and examples live at loki-agent.pages.dev (available in English & Spanish):
- Getting Started & Installation — Binaries,
uv, AI provider setup (.loki/config.yaml), and first run. - Core Concepts — Chaos personas, Swarm mode, journey recording (
loki record), and mobile emulation. - CLI Reference — Complete flag reference for
run,fix,replay,report,chat,infra, andauth. - AI Brain & Self-Healing — LiteLLM providers,
rules.mdassertions, and closed-loop code healing. - Advanced Chaos — API chaos (Ghost in the Wire), state chaos (Poisoned Well), concurrency lanes, and infrastructure faults.
- Security & CI/CD — Authorization gate, HAR token scrubbing, and GitHub Actions quality gates (
--ci).
🛡️ Security & Authorization Guardrail
Targeting localhost works out of the box. Against any remote host, LOKI blocks until you explicitly confirm ownership or written authorization (stored locally in .loki/authorized_targets.json, managed via loki auth). All captured network traces and recorded journeys automatically scrub credentials, cookies, and tokens. See SECURITY.md for details.
🤝 Contributing
Contributions and Pull Requests are welcome! You do not need an open issue to submit a PR.
- Read
CONTRIBUTING.mdfor development setup and testing (pytest,ruff). - Check
AGENTS.mdif working with AI coding agents. - Browse open
good first issuetasks.
📄 License
Licensed under the MIT License.
Metadata
Release files for loki-chaos-agent 1.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| loki_chaos_agent-1.11.0.tar.gz | 147.5 kB | With provenance | Details for loki_chaos_agent-1.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| loki_chaos_agent-1.11.0-py3-none-any.whl | Python 3 | none | any | Details for loki_chaos_agent-1.11.0-py3-none-any.whl |
Total release size: 272.9 kB
Release files / loki_chaos_agent-1.11.0.tar.gz
| Download URL | loki_chaos_agent-1.11.0.tar.gz |
|---|---|
| Size | 147.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46592ede6385ac4418ce5af42d8fdaca657d8355229d93c9c7891c90dd97cc56
|
|
BLAKE2b-256 checksum How to use checksums |
1e8e6fe5e95842fbef5506cf0c3549e4cfb62053c74a100e9e8a59ad8929a68e
|
| 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 Oct 24, 2026.
Transparency logRelease files / loki_chaos_agent-1.11.0-py3-none-any.whl
| Download URL | loki_chaos_agent-1.11.0-py3-none-any.whl |
|---|---|
| Size | 125.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d49b2c5e3490a70039a9ab10fd00e20c63c7d402680c07749af7635394c95ebd
|
|
BLAKE2b-256 checksum How to use checksums |
59bac08c2998fceac27e5e970d0e309eafedfc902d4ed8b3f38ab3bbfe90476c
|
| 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 Oct 24, 2026.
Transparency logSecurity for loki-chaos-agent 1.11.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for loki_chaos_agent-1.11.0.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 Oct 24, 2026.
Transparency logA 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.