> 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/high-level-architecture.md).

# High-Level Architecture

### <mark style="color:green;">Glitch Gremlin's</mark> Architecture Relies on a Split Between On-Chain and Off-Chain Components&#x20;

#### On-Chain:

A Solana program (“*GlitchGremlinProgram*”) that handles token escrow, records chaos requests, updates request states, and provides governance hooks.

#### Off-Chain:&#x20;

An AI-driven aggregator that periodically queries the blockchain for pending chaos requests, performs the requested tasks in a test environment, and writes back the results to the chain.

***

<mark style="background-color:yellow;">By offloading the computationally heavy and dynamic AI tasks to an off-chain environment, the system preserves Solana’s throughput and keeps costs predictable. The on-chain program maintains trustless accountability and ensures that $GREMLINAI tokens are properly managed.</mark>
