# OptimAI Agentic

> OptimAI Agentic lets people find, understand and buy tokenized stocks (bStocks) on BNB Chain from what they are reading: posts on X, news sites in Chrome, and any app on Android. It ships as a Chrome extension and an Android app. This file is a step by step guide written for AI agents that install, test or explain OptimAI Agentic for a user.

## Rules for agents

- Never ask the user for a private key, a seed phrase or a wallet password. No step of this guide needs one. Every transaction is confirmed by the user inside their own wallet (MetaMask, or Trust Wallet on Android).
- Every buy is a real spot swap on BNB Smart Chain mainnet (chain id 56), paid in USDT with gas paid in BNB. Do not confirm a swap on the user's behalf. Stop at the wallet prompt and let the user decide.
- OptimAI Agentic reports prices, evidence and numbers. It does not give buy or sell recommendations, and neither should you when describing it.
- There is no account and no sign in. Prices, charts and the agent work with no wallet connected.

## Key facts

| Item | Value |
| --- | --- |
| Current version | 1.0.0 (Chrome extension and Android app) |
| Chain for trading | BNB Smart Chain, chain id 56 |
| Assets | bStocks (tokenized stocks), for example NVDAB, TSLAB, AAPLB |
| Route | PancakeSwap, paid in USDT |
| Wallets | MetaMask (Chrome and Android), Trust Wallet (Android, over WalletConnect) |
| License | MIT |
| Contact | tech@optimai.network |

### Downloads

- Chrome extension zip: https://github.com/OptimaiNetwork/optimai-agentic-extension/releases/download/v1.0.0/OptimAI-Agentic-Chrome-Extension-1.0.0.zip
- Android APK: https://github.com/OptimaiNetwork/optimai-agentic-android/releases/download/v1.0.0/OptimAI-Agentic-Android-1.0.0.apk
- Release notes: https://github.com/OptimaiNetwork/optimai-agentic-extension/releases/tag/v1.0.0 and https://github.com/OptimaiNetwork/optimai-agentic-android/releases/tag/v1.0.0

SHA-256 checksums:

```
cea5bfd1708ee652cd7c97ff91edf1c178e39530d6a8d449d22405460c51d076  OptimAI-Agentic-Chrome-Extension-1.0.0.zip
6d75f7328aab1a73e41f4f95c73a387828f817e6123b59f53c8dd34c8368de37  OptimAI-Agentic-Android-1.0.0.apk
```

### Source code

- Chrome extension: https://github.com/OptimaiNetwork/optimai-agentic-extension
- Android app: https://github.com/OptimaiNetwork/optimai-agentic-android

## Requirements

### Chrome extension

- To try it: Chrome on desktop, and an X account signed in for the X flows.
- To buy: MetaMask in the same Chrome profile, on BNB Smart Chain, with a little USDT and some BNB for gas.
- To build from source: Node 22.15.1 or newer and pnpm 10.11 (`corepack enable` picks up the pinned pnpm).

### Android app

- To try it: a phone or emulator on Android 8.0 (API 26) or newer.
- To buy: MetaMask or Trust Wallet on BNB Smart Chain, with a little USDT and some BNB for gas.
- To build from source: JDK 17, Android SDK Platform 36, and a free Reown project id from https://cloud.reown.com (needed for wallet connect).

## Install the Chrome extension

### Option A: prebuilt zip

1. Download `OptimAI-Agentic-Chrome-Extension-1.0.0.zip` from the link above and unzip it. The unzipped folder is the extension.
2. Open `chrome://extensions` and turn on Developer mode.
3. Click Load unpacked and select the unzipped folder.

### Option B: build from source

```bash
git clone https://github.com/OptimaiNetwork/optimai-agentic-extension.git
cd optimai-agentic-extension
corepack enable
pnpm install
pnpm build
```

Then load the `dist` folder with Load unpacked at `chrome://extensions`. After every rebuild, press the reload button on the extension card and reload the x.com tab.

### First run

1. Open https://x.com and click OptimAI Agentic in the left sidebar. The panel opens.
2. The panel starts on Solana with Ondo. In the panel header set Chain to BNB Chain and Issuer to bStocks. The choice is remembered.
3. To buy, install MetaMask in the same Chrome profile and select BNB Smart Chain.

## Install the Android app

### Option A: prebuilt APK

1. On the phone, download `OptimAI-Agentic-Android-1.0.0.apk` from the link above, open it, and allow installs from that source when Android asks.
2. Or, from a computer with a device or emulator attached:

```bash
adb install OptimAI-Agentic-Android-1.0.0.apk
```

The prebuilt APK is ready to connect a wallet. It is signed with an Android debug certificate for sideloading, so uninstall any earlier build signed with a different key first.

### Option B: build from source

```bash
git clone https://github.com/OptimaiNetwork/optimai-agentic-android.git
cd optimai-agentic-android
cp local.properties.example local.properties
# set reown.projectId=<your Reown project id> in local.properties, then:
./gradlew :app:installDebug
```

Start an emulator or connect a phone with USB debugging before `installDebug`. Command line builds also need `sdk.dir` in `local.properties` or `ANDROID_HOME`. If `java` is missing, point `JAVA_HOME` at the JDK bundled with Android Studio.

### First run

1. Open OptimAI Agentic. The Stocks tab lists every bStock on BNB Chain.
2. To trade, open Settings, tap Connect Wallet, pick MetaMask or Trust Wallet and approve in the wallet on BNB Smart Chain. The header pill turns green with a shortened address.
3. To use the keyboard, open Settings, then OptimAI Keyboard, and follow the steps to turn it on and switch to it. With adb:

```bash
adb shell ime enable com.test.agenttrade/.keyboard.OptimAIKeyboardService
adb shell ime set com.test.agenttrade/.keyboard.OptimAIKeyboardService
```

## Use cases

### Chrome extension

1. **Search a cashtag on X.** Search `$NVDA` on x.com. A card shows NVDAB on BNB Chain with its chart, next to X's own cashtag card.
2. **Price on every post.** Posts that mention a cashtag get a price pill. Hover it for price per share, 24h volume, market cap and holders. Click it to open the panel.
3. **Multiplier adjusted price.** One token is not always one share: bStocks reinvest dividends, so a token can hold slightly more than one share. The panel divides the token price by the multiplier and shows the gap against the underlying share price.
4. **Read the news, check the stock.** On news sites such as MarketWatch and CNBC, tickers and company names get the same badge and hover card. Trade now opens the buy panel beside the article.
5. **Ask the agent.** In the panel chat, ask for example "How does NVDAB's price compare with its reference price?". The answer shows its arithmetic and its sources. The agent may open X searches in the current tab and scroll them to read posts.
6. **Buy in MetaMask.** From a token, choose Buy, enter a USDT amount and review the live PancakeSwap quote. Confirm in MetaMask sends the swap to the wallet. The first buy of a token can ask for two prompts: a USDT approval, then the swap.

### Android app

1. **Browse bStocks.** The Stocks tab shows live prices and sparklines. A stock page shows the chart, 1H to 90D changes, company details and on chain market data.
2. **Ask the agent.** The Agent tab answers questions such as "Tesla technicals", "Key levels for Tesla?", "Is MSTR overbought?" or "Latest news on Apple?", with cards and sources. "Buy $100 of Apple" prepares an order preview with a live quote.
3. **Trade from any chat with the OptimAI Keyboard.** In any app (for example Telegram) type `@optimai buy 50$ nvidia`. The keyboard recognizes the stock and shows a trade card (USDT in, NVDAB out) with a Buy button.
4. **Ask inside the keyboard.** Type `@optimai recent news of nvidia`. Close the stock banner if it appears, then tap the glowing OptimAI chip on the ticker strip. The agent's answer appears inside the keyboard.
5. **Share a post to trade.** In Chrome or X, open a post that mentions a stock (for example https://x.com/WatcherGuru/status/1876288816413294852), tap Share and choose Trade with OptimAI. The app reads the post, lists the stocks it mentions (NVIDIA and Apple for this post) and shows a live quote with $50, $100, $250 and $500 presets.
6. **Buy and track.** Review the quote, sign in MetaMask or Trust Wallet, then follow the order in Activity (with its BscScan link) and the position in Portfolio (value, P&L, allocation).

## Troubleshooting

- **The extension does not show up on x.com, or a change is missing.** Chrome caches content scripts. After a rebuild, press reload on the extension card at `chrome://extensions`, then reload the x.com tab. Make sure the loaded folder is the unzipped folder or `dist`, not the repository root, and that Developer mode is on.
- **MetaMask shows the wrong network or not enough funds.** Switch to BNB Smart Chain (chain id 56). A buy needs USDT on BNB Smart Chain plus a little BNB for gas.
- **installDebug finishes but nothing appears on the phone.** Gradle installs nothing without a running emulator or a device with USB debugging. Start one first.
- **Connect Wallet does nothing on Android.** The prebuilt APK is ready to connect. A build from source needs `reown.projectId` in `local.properties` (or `REOWN_PROJECT_ID`); rebuild after setting it.
- **The OptimAI Keyboard is gone after reinstalling.** Every reinstall switches Android back to the default keyboard. Select it again, or run the `adb shell ime set` command above. On an emulator with a hardware keyboard, run `adb shell settings put secure show_ime_with_hard_keyboard 1`.

## About

OptimAI Agentic is powered by OptimAI Network (https://optimai.network), a decentralized AI ecosystem at scale, powered by 1M+ nodes to build the data and compute foundation for agentic AI. Backed by YZi Labs, CMC Labs and Google for Startups. Built for BNB Hack: Tokenized Stocks Edition.
