> For the complete documentation index, see [llms.txt](https://ggai.gitbook.io/ggai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ggai.gitbook.io/ggai-docs/chaos-as-a-service-caas.md).

# 🤖 Chaos-as-a-Service (CaaS)

How does it work?

1. **Developer or User Initiates Request:** Through a front-end UI or CLI tool, they supply chaos parameters—like “simulate malicious transactions over a five-minute window”—and sign a transaction transferring $GREMLINAI tokens to the program.
2. **On-Chain Request Creation:** *GlitchGremlinProgram* stores this request in a new `ChaosRequest Account` with status = `Pending`.
3. **Off-Chain Retrieval:** The AI engine’s aggregator sees the new request, fetches parameters, and begins to orchestrate the chaos scenario in a sandbox.
4. **Simulation Execution:** The AI engine bombards the target system with the requested or AI-derived malice: spamming, injection attempts, concurrency edge-case triggers, or any exploit test from the engine’s library.
5. **Completion and Reporting:** Logs are uploaded to decentralized storage. The AI engine signs a finalize transaction on-chain with references to these logs.
6. **On-Chain Finalization:** The program updates the request’s status to Completed, un-escrows, burns tokens based on the request’s outcome, and potentially triggers reward logic

***

<mark style="background-color:yellow;">This cyclical flow ensures that the chaos process is transparent—each step is either visible on-chain or easily auditable through the logs, letting developers confidently rely on $GREMLINAI for stress-testing.</mark>
