# MultiOn

**Architecture Overview**

```mermaid
flowchart TD  
    User[User Request] --> Scheduler[Task Scheduler]  
    Scheduler --> BOT[MultiOn Agent]  
    BOT --> Web[Web3 Interfaces]  
    Web -->|Outcome Data| AgentGPT[AgentGPT Blockchain]  
    AgentGPT --> SC[[Smart Contracts]]  
    SC -->|Payment Stream| BOT  
    SC --> Audit[[Audit Engine]]  
    style Web fill:#9cf,stroke:#333  
    style Audit fill:#fcc,stroke:#333  
```

***

#### **1. MultiOn Agent Configuration**

**Decentralized Browser Template (YAML)**

```yaml
# multion-config.yaml  
agents:  
  - name: "web3_swarm"  
    tasks:  
      - type: "defi_harvest"  
        steps:  
          - navigate: "https://app.aave.com"  
          - connect_wallet  
          - claim_rewards  
          - swap_to: "AGPT"  
        blockchain:  
          gas_strategy: "optimistic"  
          payment:  
            on_success: 0.15 AGPT  
            on_failure: -0.05 AGPT  
          verification: "zk-proof"  

  - name: "nft_minting"  
    tasks:  
      - type: "generative_art"  
        workflow: "midjourney→ipfs→mint"  
        retries: 3  
```

**Deployment Command**:

```bash
agentgpt deploy-browser --agents 5 --file multion-config.yaml  
```

***

#### **2. Smart Task Orchestration**

**Self-Paying Workflow Contract (Solidity)**

```solidity
// contracts/AutoBrowser.sol  
pragma solidity ^0.8.25;  

contract TaskRegistry {  
    struct WebTask {  
        bytes32 proofHash;  
        uint256 payment;  
        bool verified;  
    }  

    mapping(bytes32 => WebTask) public tasks;  

    function logTask(  
        string calldata url,  
        bytes calldata zkProof  
    ) external returns (bytes32 taskId) {  
        taskId = keccak256(abi.encode(url, block.timestamp, msg.sender));  
        tasks[taskId] = WebTask(keccak256(zkProof), 0, false);  
    }  

    function verifyAndPay(bytes32 taskId, bytes calldata proof) external {  
        require(tasks[taskId].proofHash == keccak256(proof), "Invalid proof");  
        tasks[taskId].verified = true;  
        _mint(msg.sender, 0.18 ether); // 0.18 AGPT per verified task  
    }  
}  
```

***

#### **3. Autonomous Web3 Workflows**

**Cross-Dapp Execution (Python)**

```python
from multion import BrowserAgent  
from agentgpt.web3 import WalletLinker  

class DeFiAutomator:  
    def __init__(self):  
        self.bot = BrowserAgent(headless=True)  
        self.wallet = WalletLinker(rpc="https://arb1.arbitrum.io")  

    async def execute_compound_liquidation(self):  
        await self.bot.navigate("https://app.compound.finance")  
        await self.bot.click_element('[data-testid="liquidate-btn"]')  
        tx_hash = await self.wallet.confirm_transaction()  
        return self._log_task_outcome(tx_hash)  

    async def _log_task_outcome(self, tx_hash: str):  
        proof = self.wallet.generate_zk_proof(tx_hash)  
        return await self.wallet.contract.verifyAndPay(  
            self.task_id,  
            proof  
        )  
```

***

#### **4. Privacy-First Browser Policy**

**Data Handling Rules**:

```yaml
privacy:  
  cookie_storage: "aleo-zkStorage"  
  screen_recordings:  
    encrypt: true  
    retention: "24h"  
  anonymization:  
    mask_ips: true  
    fake_user_agent: true  
blocked_domains:  
  - "*phishing-site.com"  
  - "*scam-nft.xyz"  
```

***

#### **5. Real-Time Monitoring**

```bash
agentgpt monitor multion --view live  
```

**Output**:

```
ACTIVE WEB AUTOMATION  
┌───────────────┬───────────────────┬───────────┬────────────┐  
│ Agent ID      │ Current Task      │ Success % │ AGPT Earned │  
├───────────────┼───────────────────┼───────────┼────────────┤  
│ MO-9281       ╎ DEX Arbitrage     │ 98.4%     │ 28.92       │  
│ MO-551A       ╎ Discord Mod       │ 100%      │ 15.30       │  
│ MO-LIQUIDATOR ╎ Aave Liquidations │ 89.7%     │ 82.14       │  
├───────────────┼───────────────────┼───────────┼────────────┤  
│ TOTAL         │ 14 concurrent     │ 95.2%     │ 126.36 AGPT  
└───────────────┴───────────────────┴───────────┴────────────┘  
```

***

#### **6. Security & Governance**

**Decentralized CAPTCHA Solving**

```solidity
// contracts/CaptchaDAO.sol  
pragma solidity ^0.8.25;  

contract CaptchaOracle {  
    mapping(bytes32 => address[]) public solutions;  

    function submitCaptchaSolution(  
        bytes32 challengeHash,  
        string calldata answer  
    ) external {  
        solutions[challengeHash].push(msg.sender);  
        if (solutions[challengeHash].length >= 5) {  
            _rewardSolvers(challengeHash);  
        }  
    }  

    function _rewardSolvers(bytes32 challengeHash) internal {  
        uint256 reward = 0.018 ether;  
        for (uint i=0; i < solutions[challengeHash].length; i++) {  
            _mint(solutions[challengeHash][i], reward);  
        }  
    }  
}  
```

***

#### **Troubleshooting**

| **Issue**       | **Resolution Protocol**                       |
| --------------- | --------------------------------------------- |
| Stale Element   | 1. Activate XPath fallback engine             |
| Captcha Wall    | 2. Distribute via CaptchaDAO ▸ Human Solvers  |
| RPC Failure     | 3. Failover to backup chain (e.g., QuickNode) |
| Payment Dispute | 4. Verify via IPFS+Filecoin proof log         |

***

#### **Best Practices**

1. **Anti-Detect Browsing**:

```yaml
stealth_config:  
  canvas_fingerprint: "randomized"  
  webgl: "spoofed"  
  timezone: "auto"  
  language: "random"  
```

2. **Gas-Aware Automation**:

```solidity
function estimateAutomationGas(string memory url) public view returns (uint256) {  
    return _averageGasForDomain[keccak256(bytes(url))] * 115 / 100;  
}  
```

3. **Task Redundancy**:

```bash
agentgpt multion redundancy --copies 3 --strategy "geographic"  
```


---

# Agent Instructions: 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:

```
GET https://agent-gpt.gitbook.io/agent-gpt/integration-examples/multion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
