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

# HOW $FAGOT WORKS

$FAGOT is a <mark style="background-color:green;">**decentralized, open sourced, AI-powered blockchain transaction verification platform**</mark>

<figure><img src="/files/lUEj6VQwgWZbsRK9X7LY" alt=""><figcaption></figcaption></figure>

$FAGOT is engineered to address four common blockchain interaction scenarios, each with tailored background data retrieval and risk analysis workflows:

1. **Smart Contract Interaction (Type 1):**
   * **User Action:** Initiating a transaction to interact with a smart contract.
   * **Required Data:**
     * Contract code
     * Contract ABI
     * Transaction data (tx data)
   * **Analysis Process:**\
     The system retrieves the contract code and ABI using our dedicated “Contract Data Retrieval Tool” and then combines this information with the user’s transaction data to perform a comprehensive audit.
2. **ERC20 Token Operations (Type 2):**
   * **User Action:** Executing token operations such as approvals or transfers.
   * **Required Data:**
     * Historical transaction records of the target address
     * If the target is a smart contract, its contract code and ABI are also fetched
   * **Analysis Process:**\
     Our “Transaction History Retrieval Tool” queries the target address’s past transactions. If the target is identified as a smart contract, the “Contract Data Retrieval Tool” is additionally employed to analyze the contract’s code and ABI.
3. **ETH Transfer (Type 3):**
   * **User Action:** Initiating an ETH transfer.
   * **Required Data:**
     * Historical transaction records of the target address
     * If the target is a smart contract, an analysis of its contract code and ABI is also performed
   * **Analysis Process:**\
     Similar to ERC20 operations, the system examines the target address using our Transaction History Retrieval Tool and, if necessary, the Contract Data Retrieval Tool.
4. **Signature Request (Type 4):**
   * **User Action:** Signing a message (e.g., for authorization or granting permissions).
   * **Required Data:**
     * The raw content of the message to be signed
   * **Analysis Process:**\
     The “Message Analysis Tool” extracts and examines the raw message content, assessing whether the action could impact your wallet assets.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fagot.gitbook.io/fagot.ai-docs/markdown.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
