# AI Tools Guide
Source: https://www.zkcompression.com/ai-tools/guide
Guidance to AI tools when working with ZK Compression. Includes Agent Skill, MCP server, DeepWiki, and AI Search guides.
# For Docs
* **Docs AI Search** - Search documentation with AI in the search bar.
* **Markdown Export** - Append `.md` to any page URL for raw markdown.
# For Development
## AI agents
### `skill.md`
`skill.md` is a structured capability file that tells agents what they can do
with Light Protocol and ZK Compression. If you're
building with agents, start here.
* View: [`/skill.md`](https://zkcompression.com/skill.md)
### `llms.txt`
`llms.txt` is an index of the docs. It lists key pages with descriptions
so agents can navigate to answers quickly.
* View: [`/llms.txt`](https://zkcompression.com/llms.txt)
### `llms-full.txt`
`llms-full.txt` is the full, expanded index for agents that want complete coverage of the documentation.
* View: [`/llms-full.txt`](https://zkcompression.com/llms-full.txt)
## MCP
The Model Context Protocol (MCP) is an open standard to connect AI apps to data sources and tools. The DeepWiki MCP server provides access to the Light Protocol repository with its search capabilities (AskDevin).
### Installation
Simply **copy paste this snippet**.
| [GetCompressedAccount](/api-reference/json-rpc-methods/getcompressedaccount) | Retrieves information about a specific compressed account by its address or hash. |
| [GetCompressedAccountsByOwner](/api-reference/json-rpc-methods/getcompressedaccountsbyowner) | Returns all compressed accounts owned by a specific address. |
| [GetCompressedBalance](/api-reference/json-rpc-methods/getcompressedbalance) | Retrieves the balance of a compressed account. |
| [GetCompressedBalanceByOwner](/api-reference/json-rpc-methods/getcompressedbalancebyowner) | Gets the total balance of all compressed accounts owned by an address. |
| [GetCompressedMintTokenHolders](/api-reference/json-rpc-methods/getcompressedminttokenholders) | Lists all holders of a specific compressed token mint. |
| [GetCompressedTokenAccountBalance](/api-reference/json-rpc-methods/getcompressedtokenaccountbalance) | Retrieves the token balance of a compressed token account. |
| [GetCompressedTokenAccountsByDelegate](/api-reference/json-rpc-methods/getcompressedtokenaccountbydelegate) | Returns all compressed token accounts delegated to a specific address. |
| [GetCompressedTokenAccountsByOwner](/api-reference/json-rpc-methods/getcompressedtokenaccountsbyowner) | Lists all compressed token accounts owned by a specific address. |
| [GetCompressedTokenBalancesByOwner](/api-reference/json-rpc-methods/getcompressedtokenbalancesbyowner) | Retrieves all token balances for compressed accounts owned by an address. |
| [GetCompressionSignaturesForAccount](/api-reference/json-rpc-methods/getcompressionsignaturesforaccount) | Returns signatures for transactions involving a compressed account. |
| [GetCompressionSignaturesForAddress](/api-reference/json-rpc-methods/getcompressionsignaturesforaddress) | Retrieves signatures for transactions involving a specific address. |
| [GetCompressionSignaturesForOwner](/api-reference/json-rpc-methods/getcompressionsignaturesforowner) | Returns signatures for transactions where an address is the owner. |
| [GetCompressionSignaturesForTokenOwner](/api-reference/json-rpc-methods/getcompressionsignaturesfortokenowner) | Lists signatures for transactions involving tokens owned by an address. |
| [GetIndexerHealth](/api-reference/json-rpc-methods/getindexerhealth) | Returns the health status of the compression indexer. |
| [GetIndexerSlot](/api-reference/json-rpc-methods/getindexerslot) | Retrieves the current slot of the compression indexer. |
| [GetLatestCompressionSignatures](/api-reference/json-rpc-methods/getlatestcompressionsignatures) | Returns the most recent transaction signatures related to compression. |
| [GetLatestNon-VotingSignatures](/api-reference/json-rpc-methods/getlatestnonvotingsignatures) | Retrieves recent non-voting transaction signatures. |
| [GetMultipleCompressedAccounts](/api-reference/json-rpc-methods/getmultiplecompressedaccounts) | Retrieves multiple compressed accounts in a single request. |
| [GetMultipleNewAddressProofs](/api-reference/json-rpc-methods/getmultiplenewaddressproofs) | Returns proofs that the new addresses are not taken already and can be created. |
| [GetTransactionWithCompressionInfo](/api-reference/json-rpc-methods/gettransactionwithcompressioninfo) | Returns transaction details with additional compression-related information. |
| [GetValidityProof](/api-reference/json-rpc-methods/getvalidityproof) | Retrieves a validity proof for compressed data. |
| **TypeScript** | [@lightprotocol/stateless.js](https://lightprotocol.github.io/light-protocol/stateless.js/index.html) | Client SDK for Compressed Accounts |
| **TypeScript** | [@lightprotocol/compressed-token](https://lightprotocol.github.io/light-protocol/compressed-token/index.html) | Client SDK for Compressed Tokens |
| **Rust** | [light-client](https://docs.rs/light-client) | Client SDK for Compressed Accounts and Tokens |
| 1 | Verifies validity proofs, compressed account ownership checks, and CPIs the Account Compression Program to update tree accounts. | |
| 2 | CPI Signer |
* PDA to sign CPI calls from your program to the Light System Program. * Verified by the Light System Program during CPI. * Derived from your program ID. |
| 3 | Registered Program PDA | Provides access control to the Account Compression Program. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 |
* Writes to state and address tree accounts. * Clients and the Account Compression Program do not interact directly — handled internally. |
|
| 6 | Solana System Program used to transfer lamports. |
| Instruction | Address Tree | State Tree (includes nullifier queue) | Output Queue |
|---|---|---|---|
| Create | ✓ | - | ✓ |
| Update / Close / Reinit | - | ✓ | ✓ |
| Burn | - | ✓ | - |
| 1 | Verifies validity proofs, compressed account ownership checks, and CPIs the Account Compression Program to update tree accounts. | |
| 2 | CPI Signer |
* PDA to sign CPI calls from your program to the Light System Program. * Verified by the Light System Program during CPI. * Derived from your program ID. |
| 3 | Registered Program PDA | Provides access control to the Account Compression Program. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 |
* Writes to state and address tree accounts. * Clients and the Account Compression Program do not interact directly — handled internally. |
|
| 6 | Solana System Program used to transfer lamports. |
| 1 | Verifies validity proofs, compressed account ownership checks, and CPIs the Account Compression Program to update tree accounts. | |
| 2 | CPI Signer |
* PDA to sign CPI calls from your program to the Light System Program. * Verified by the Light System Program during CPI. * Derived from your program ID. |
| 3 | Registered Program PDA | Provides access control to the Account Compression Program. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 |
* Writes to state and address tree accounts. * Clients and the Account Compression Program do not interact directly — handled internally. |
|
| 6 | Solana System Program used to transfer lamports. |
| 1 | Verifies validity proofs, compressed account ownership checks, and CPIs the Account Compression Program to update tree accounts. | |
| 2 | CPI Signer |
* PDA to sign CPI calls from your program to the Light System Program. * Verified by the Light System Program during CPI. * Derived from your program ID. |
| 3 | Registered Program PDA | Provides access control to the Account Compression Program. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 |
* Writes to state and address tree accounts. * Clients and the Account Compression Program do not interact directly — handled internally. |
|
| 6 | Solana System Program used to transfer lamports. |
| 1 | Verifies validity proofs, compressed account ownership checks, and CPIs the Account Compression Program to update tree accounts. | |
| 2 | CPI Signer |
* PDA to sign CPI calls from your program to the Light System Program. * Verified by the Light System Program during CPI. * Derived from your program ID. |
| 3 | Registered Program PDA | Provides access control to the Account Compression Program. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 |
* Writes to state and address tree accounts. * Clients and the Account Compression Program do not interact directly — handled internally. |
|
| 6 | Solana System Program used to transfer lamports. |
| 1 | Verifies validity proofs, compressed account ownership checks, and CPIs the Account Compression Program to update tree accounts. | |
| 2 | CPI Signer |
* PDA to sign CPI calls from your program to the Light System Program. * Verified by the Light System Program during CPI. * Derived from your program ID. |
| 3 | Registered Program PDA | Provides access control to the Account Compression Program. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 |
* Writes to state and address tree accounts. * Clients and the Account Compression Program do not interact directly — handled internally. |
|
| 6 | Solana System Program used to transfer lamports. |
| SPL | Compressed | |
|---|---|---|
| [**Transfer**](#full-code-examples) | transferChecked() | transfer() |
| [**Compress**](#full-code-examples) | N/A | compress() |
| [**Decompress**](#full-code-examples) | N/A | decompress() |
| [**Get Balance**](#get-balances) | getAccount() | getCompressedTokenAccountsByOwner() |
| [**Transaction History**](#get-transaction-history) | getSignaturesForAddress() | getCompressionSignaturesForOwner() |
| Account Type | Key Features | |
|---|---|---|
| **[Mint Accounts](#light-mint-accounts)** | Solana Account |
|
| **[Token Accounts](#light-token-account)** | Solana account |
|
| Field | Light-Mint | SPL Mint |
|---|---|---|
| mint\_authority | ✓ | ✓ |
| supply | ✓ | ✓ |
| decimals | ✓ | ✓ |
| is\_initialized | ✓ | ✓ |
| freeze\_authority | ✓ | ✓ |
| Light-Mint Data | ✓ | - |
| Extensions | ✓ | via Token-2022 |
| Field | Light Token | SPL Token Account |
|---|---|---|
| mint | ✓ | ✓ |
| owner | ✓ | ✓ |
| amount | ✓ | ✓ |
| delegate | unimplemented | ✓ |
| state | ✓ | ✓ |
| is\_native | ✓ | ✓ |
| delegated\_amount | unimplemented | ✓ |
| close\_authority | ✓ | ✓ |
| extensions | ✓ | via Token-2022 |
| Token Program | - | The light token program for CPI. |
| Account | mutable | The light-token account to close. |
| Destination | mutable | Receives remaining lamports from the closed account. |
| Owner | signer\* |
* Owner of the light-token account.
- \*Must be signer for `invoke()`. For `invoke_signed()`, program signs via PDA seeds. |
| Rent Sponsor | mutable, optional | * light token program PDA that fronts rent exemption at creation. \* Claims rent when account compresses and/or is closed. |
| Owner | - |
* The wallet that will own this light-ATA. * Used to derive the light-ATA address deterministically. |
| Mint | - |
* The SPL or light-mint token mint. * Used to derive the light-ATA address deterministically. |
| Payer | signer, mutable |
* Pays initial rent per epoch, transaction fee and compression incentive. * Does NOT pay rent exemption (paid by the light token program, `rent_sponsor`). |
| light-ATA Account | mutable |
* The light-ATA being created. * Address is derived from `[owner, light_token_program_id, mint]`. |
| - | Solana System Program. Required for CPI to create the on-chain account. | |
| Bump | u8 | The PDA bump seed for the light-ATA address derivation. |
| Idempotent | bool |
* When `true`, silently succeeds if account already exists. * When `false`, fails if account already exists. |
| Account | Description | |
|---|---|---|
| 1 | Verifies validity proofs and executes compressed account state transitions. | |
| 2 | CPI Authority PDA | PDA that authorizes CPIs from the Light Token Program to the Light System Program. |
| 3 | Registered Program PDA | Proves the Light Token Program is registered to use compression. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 | Writes to state and address Merkle tree accounts. | |
| 6 | Solana System Program. |
| Payer | signer, mutable |
* Pays initial rent per epoch, transaction fee and compression incentive. * Does NOT pay rent exemption (paid by the light token program, `rent_sponsor`). |
| light-token Account | signer\*, mutable |
* The light-token account being created. * \*Must be signer for `invoke()`. For `invoke_signed()`, program signs via PDA seeds. |
| Mint | - | The SPL or light-mint token mint. |
| Owner | Pubkey | The owner of the token account. Controls transfers and other operations. |
| Create Mint | Create light-mints with token metadata |
| Create ATA | Create associated light-token accounts |
| Create Token Account | Create light-token accounts |
| Mint To | Mint tokens to light-token accounts |
| Close Token Account | Close token account to reclaim remaining lamports |
| Transfer | Transfer between Light Token, SPL and Token 2022 accounts |
| Transfer Checked | Transfer between Light Token accounts with decimals verification |
| Burn | Burn tokens from light-token accounts |
| Freeze & Thaw | Freeze and thaw light-token accounts |
| Approve & Revoke | Delegate and revoke token authority |
| Wrap & Unwrap | Convert between SPL/Token 2022 and light-token |
| Load ATA | Load cold light-token accounts to hot balance for transfers in one instruction |
| **Light Token -> Light Token Account** |
|
| **SPL token -> Light Token Account** |
|
| **Light Token -> SPL Account** |
|
| Light | SPL | |
|---|---|---|
| **Get/Create ATA** | getOrCreateAtaInterface() | getOrCreateAssociatedTokenAccount() |
| **Derive ATA** | getAssociatedTokenAddressInterface() | getAssociatedTokenAddress() |
| **Transfer** | transferInterface() | transferChecked() |
| **Get Balance** | getAtaInterface() | getAccount() |
| SPL | Light | |
|---|---|---|
| **Get/Create ATA** | getOrCreateAssociatedTokenAccount() | getOrCreateAtaInterface() |
| **Derive ATA** | getAssociatedTokenAddress() | getAssociatedTokenAddressInterface() |
| **Transfer** | transferChecked() | transferInterface() |
| **Get Balance** | getAccount() | getAtaInterface() |
| **Tx History** | getSignaturesForAddress() | rpc.getSignaturesForOwnerInterface() |
| **Wrap from SPL** | N/A | wrap() |
| **Unwrap to SPL** | N/A | unwrap() |
| SPL | Light | |
|---|---|---|
| **Get/Create ATA** | getOrCreateAssociatedTokenAccount() | getOrCreateAtaInterface() |
| **Derive ATA** | getAssociatedTokenAddress() | getAssociatedTokenAddressInterface() |
| **Transfer** | transferChecked() | transferInterface() |
| **Get Balance** | getAccount() | getAtaInterface() |
| **Tx History** | getSignaturesForAddress() | rpc.getSignaturesForOwnerInterface() |
| **Wrap from SPL** | N/A | wrap() |
| **Unwrap to SPL** | N/A | unwrap() |
| Create Mint | Create light-mints with token metadata |
| Create ATA | Create associated light-token accounts |
| Create Token Account | Create light-token accounts |
| Mint To | Mint tokens to light-token accounts |
| Close Token Account | Close token account to reclaim remaining lamports |
| Transfer | Transfer between Light Token, SPL and Token 2022 accounts |
| Transfer Checked | Transfer between Light Token accounts with decimals verification |
| Burn | Burn tokens from light-token accounts |
| Freeze & Thaw | Freeze and thaw light-token accounts |
| Approve & Revoke | Delegate and revoke token authority |
| Wrap & Unwrap | Convert between SPL/Token 2022 and light-token |
| Load ATA | Load cold light-token accounts to hot balance for transfers in one instruction |
| 1 | Verifies validity proofs, compressed account ownership checks, and CPIs the Account Compression Program to update tree accounts. | |
| 2 | CPI Signer |
* PDA to sign CPI calls from your program to the Light System Program. * Verified by the Light System Program during CPI. * Derived from your program ID. |
| 3 | Registered Program PDA | Provides access control to the Account Compression Program. |
| 4 | Signs CPI calls from the Light System Program to the Account Compression Program. | |
| 5 |
* Writes to state and address tree accounts. * Clients and the Account Compression Program do not interact directly — handled internally. |
|
| 6 | Solana System Program used to transfer lamports. |
| **TypeScript** | [@lightprotocol/stateless.js](https://lightprotocol.github.io/light-protocol/stateless.js/index.html) | Client SDK for Compressed Accounts |
| **TypeScript** | [@lightprotocol/compressed-token](https://lightprotocol.github.io/light-protocol/compressed-token/index.html) | Client SDK for Compressed Tokens |
| **Rust** | [light-client](https://docs.rs/light-client) | Client SDK for Compressed Accounts and Tokens |