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

# User Flow

## **Step 1 - User Initiation**&#x20;

The user sends a message to What AI on either WhatsApp, Telegram or Discord with a simple swap request: "Swap 2 ETH for DAI"

## **Step 2 - Natural Language Processing**&#x20;

What AI's advanced NLP engine interprets the message, extracting key information:

* Action: Swap
* Amount: 2
* From Token: ETH
* To Token: DAI

## **Step 3 - Market Analysis and Route Optimization**&#x20;

What AI's ML component analyzes current market conditions, available liquidity pools, and multiple DEXs to determine the optimal swap route.

## **Step 4 - Rate and Fee Estimation**

* What AI calculates the current exchange rate, such as "2 ETH = 3200 USDT," and estimates the required gas fees, for example, "$5 estimated gas fee."

## **Step 5 - User Confirmation**

* A detailed summary, including the swap rate and gas fees, is sent to the user. The user is asked to confirm the transaction before proceeding.

## **Step 6 - Swap Execution**

* Upon receiving user approval, What AI handles the swap by interacting with the appropriate smart contracts on the blockchain. All transaction details, including gas fees and required authorizations, are automatically managed by the system.

## **Step 7 - Transaction Confirmation**

* Once the swap is completed, What AI sends a confirmation message to the user.

## **Step 8 - Follow-up Actions**&#x20;

The user can then request additional information or actions, such as: "Yes, show my balances"

This user flow demonstrates how What AI leverages natural language processing, real-time market analysis, and seamless blockchain integration to provide a user-friendly crypto swapping experience on your favorite messaging platform.


---

# 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://what-ai.gitbook.io/what-ai/user-guide/user-flow.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.
