# Welcome

**Brian** enables users and AI Agents to interact with Web3 by providing textual prompts to execute various Web3-related actions, such as:

* Transactions: "Can you swap 10 usdc for eth on Ethereum ?"&#x20;
* Protocol info: "How Uniswap v4 hooks work?"
* Protocol data: "Give me the pools with the highest TVL on Uniswap"
* Smart contract: "Generate an ERC20 with name BrianAI and a supply of 1000 tokens"

The [Brian API](https://docs.brianknows.org/brian-api/apis) and [Brian TS SDK](https://docs.brianknows.org/brian-sdk) allow developers to integrate the Brian AI capabilities in their applications to build intent-based apps that could be custodial, non-custodial, or support smart accounts.

The [LangChain<>Brian SDK](https://docs.brianknows.org/ai-agents/langchain-less-than-greater-than-brian-sdk) allows devs to launch LangChain AI Agents capable of transacting and deploying tokens on-chain.

The [Brian App](https://www.brianknows.org/), built on top of Brian APIs, offers users an interface for performing transactions in a non-custodial way, researching web3 info, and deploying smart contracts by prompt.

{% hint style="warning" %}
There is a Prompt-to-earn program on the Brian App! Find out more [here](https://docs.brianknows.org/prompt-to-earn).
{% endhint %}

### How Brian API works

**Brian** API is an Intent Recognition and Execution Engine capable of understanding the user intent for Web3 interactions, providing accurate textual answers and data, building transactions, or generating smart contracts.

{% hint style="info" %}
If you have any questions or doubts, join our [**Dev community**](https://t.me/+NJjmAm2Y9p85Mzc0)**!**
{% endhint %}

This is the end-to-end flow of the Brian API.&#x20;

<figure><img src="https://2619509982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdTchFf41KFpbOQdCzUvt%2Fuploads%2FqOt9sL3fzJSTx1Kmt9z4%2FScreenshot%202024-12-10%20alle%2014.41.16.png?alt=media&#x26;token=ee46c947-5ef7-4013-a04f-df3854c68742" alt=""><figcaption></figcaption></figure>

Anyone can try it on our non-custodial [Brian App](https://www.brianknows.org/app) or [API swagger](https://api.brianknows.org/swagger). \
\
**1) Prompt/Intent**&#x20;

Users and Agents can prompt their intent for a web3 interaction: \
‣"I want to bridge 1 eth to Base and send them to vitalik.eth" \
‣"Tell me how Uniswap v4 works" \
‣"Deploy an ERC20 with name BrianAl and a supply of 1000 tokens" \
‣"What are the top trending tokens today?" \
\
**2) Intent Recognition Engine\***&#x20;

Brian Al extracts your intent into parameters and passes them to the execution engine. \
\* *Brian mission is to provide the best web3 intent recognition.*&#x20;

**3) Intent Execution Engine**&#x20;

The output of the API is built using a series of existing off-chain tools and, for TXs, on-chain aggregators in the market (like Enso Finance or Bungee Exchange).&#x20;

**4) Output**&#x20;

The API output could be:&#x20;

‣ A TX to sign and execute (by Agents or Users) \
‣ Text answer \
‣ Code to deploy \
‣ Market data
