> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optima.onl/llms.txt
> Use this file to discover all available pages before exploring further.

# Browser Automation

> AI operates websites without APIs for you — login, post, fill forms, all handled

# Browser Automation

Many platforms don't offer APIs — social media sites, supplier portals, customer service dashboards. Optima has built-in browser automation that lets **AI open a browser, log in, and operate pages for you**, like having someone click through websites on your behalf.

```
👤 Log into Xiaohongshu and post about our new product Organic Cotton Tee

🤖 Let me look up this product first...
   Product: Organic Cotton Tee, $30.00, 100% organic cotton
   Opening Xiaohongshu...

   I need your phone number to log in.

👤 13800138000

🤖 Verification code sent. What code did you receive?

👤 582901

🤖 Logged in! Publishing the post now...
   ✅ Post published
   - Title: 🌿 Organic Cotton Tee | Once you put it on, you won't take it off
   - Topic: #SustainableFashion
```

## How It Works

<Steps>
  <Step title="Tell AI what you need">
    Describe what you want to do and where, like "Post on Xiaohongshu for me"
  </Step>

  <Step title="AI opens the browser">
    Automatically launches a browser, navigates to the target site, and analyzes the page
  </Step>

  <Step title="Step-by-step operation">
    AI clicks, types, and selects like a human — asks you for login credentials or verification codes when needed
  </Step>

  <Step title="Task complete">
    Closes the browser automatically and reports the results
  </Step>
</Steps>

## Use Cases

### Social Media Posting

For social platforms without APIs, AI logs in and publishes content for you. It can even generate copy based on your product data.

```
Post on Xiaohongshu to promote my new product
```

```
Log into Instagram and post a product photo
```

```
Post a distributor recruitment ad on 1688 for our brand
```

### Bulk Operations on Third-Party Platforms

Just joined a new sales channel? AI fills in your product information in bulk.

```
Log into seller.example.com and list all Summer Collection products
```

```
Log into the supplier portal and enter all our orders
```

### Customer Service Tickets

No API for your helpdesk? AI logs in and replies in bulk, using real order data.

```
Log into the support dashboard and reply to all shipping inquiry tickets
```

AI automatically pulls your Optima order data and replies with real tracking numbers instead of generic templates.

### Website Testing

Just deployed a new version? AI walks through the core user journey for you.

```
Test the shopping flow on staging.myshop.com
```

```
Open our store and check the full flow from homepage to checkout
```

AI simulates real user actions and reports the status of each page step by step.

### Import Data from Websites

Scrape product info from a supplier's website and import it directly into your Optima store.

```
Go to supplier.example.com and add their new products to my store
```

AI opens the page, extracts product details, and creates them in your store — all in one go.

## Scripts: Zero-Cost Repeat Execution

For recurring tasks (like posting on Xiaohongshu every week), AI saves the operation as a **script** after the first run. Next time, it replays the script directly — no AI reasoning needed, zero token cost.

```
👤 Post on Xiaohongshu to promote this week's new products

🤖 Found an existing Xiaohongshu posting script, executing directly...
   ✅ Post published (via script, zero token cost)
```

### How Scripts Work

<Steps>
  <Step title="First time: AI explores and executes">
    AI operates the browser autonomously while the system records every step
  </Step>

  <Step title="Save as script">
    After completion, AI compiles the steps into a reusable script
  </Step>

  <Step title="Next time: script replays directly">
    The script replays deterministically — no AI reasoning required
  </Step>

  <Step title="Smart fallback">
    If the website UI changes and the script fails, AI takes over and completes the task
  </Step>
</Steps>

### Built-in Scripts

The system comes with pre-built scripts for common platforms, ready to use:

| Script                 | Function                                              |
| ---------------------- | ----------------------------------------------------- |
| Xiaohongshu Image Post | Publish an image post on Xiaohongshu Creator Platform |

<Tip>
  Built-in scripts are continuously updated to cover more platforms and operations. You can also have AI generate custom scripts by completing a task once.
</Tip>

## Integration with Optima Ecosystem

Browser automation isn't a standalone tool — it works seamlessly with Optima's other capabilities:

| Scenario                 | Browser does                        | Optima does                        |
| ------------------------ | ----------------------------------- | ---------------------------------- |
| Social media promotion   | Log in, publish content             | Read product info, generate copy   |
| Customer service replies | Log into helpdesk, fill in replies  | Query real order and shipping data |
| Supplier product import  | Browse pages, extract product data  | Create products, set pricing       |
| Multi-channel listing    | Log into third-party seller portals | Read store product information     |

## Important Notes

<CardGroup cols={2}>
  <Card title="Login credentials required">
    When encountering a login page, AI will ask for your username/password or verification code. AI does not store your passwords.
  </Card>

  <Card title="Transparent operations">
    AI reports every step so you can track progress or stop at any time.
  </Card>

  <Card title="Live view">
    A live screen feed is available during browser operations so you can see what AI is doing.
  </Card>

  <Card title="Auto timeout protection">
    If operations are idle for too long, the browser closes automatically to free up resources.
  </Card>
</CardGroup>

<Warning>
  For sensitive operations (like publishing posts or submitting orders), AI will ask for your confirmation before proceeding. Always review AI-generated content before confirming.
</Warning>
