Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesHow do I let my app’s AI agent actually complete a task on a website (click, type, submit), not just read pages?
Most AI features inside apps stop at “read this page and summarize it.” The moment you ask them to actually do something—log in, click a button, submit a form—they fall back to brittle Playwright/Selenium scripts or give up altogether.
As someone who’s maintained a 1,200+ test suite of browser automations, the pattern is always the same: selectors drift, sessions expire, bot protection tightens, and your “AI agent” can’t reliably complete a single checkout.
This guide shows how to let your app’s AI agent actually complete tasks on real websites—click, type, submit—using MultiOn’s Agent API (V1 Beta) instead of hand-rolled scripts. I’ll walk through:
- When you still need a real browser vs. pure API integration
- How to send intent in (
cmd+url) and get actions executed - How to keep workflows alive with
session_id - How to extract structured data as JSON when you’re done
Quick Answer: The best overall choice for letting your app’s AI agent reliably click, type, and submit on real websites is MultiOn’s Agent API (V1 Beta). If your priority is “read + structure data from web pages” with minimal actions, the Retrieve API is often a stronger fit. For “local” automations inside a user’s existing browser session, consider the MultiOn Chrome Browser Extension.
At-a-Glance Comparison
| Rank | Option | Best For | Primary Strength | Watch Out For |
|---|---|---|---|---|
| 1 | Agent API (V1 Beta) | End-to-end web actions from your backend | Runs real browser sessions with step-by-step control and session_id continuity | Requires server-side integration and API key management |
| 2 | Retrieve API | Turning dynamic pages into JSON for your app | Structured extraction (JSON arrays of objects) with renderJs, scrollToBottom, maxItems | Not meant for multi-step UI workflows (e.g., cart → checkout) |
| 3 | Chrome Browser Extension | User’s own browser session automations | Operates “locally” in the user’s active browser, aligned with what they see | Tied to user’s Chrome, not a headless backend capability |
Comparison Criteria
We evaluated each option against the following criteria to ensure a fair comparison:
- Web action reliability: How well it handles real-world sites with logins, dynamic JS, multi-step flows, and bot protection.
- Session continuity & control: How easily your app can maintain state across steps, reuse context, and orchestrate multi-step tasks.
- Integration surface: How cleanly it fits into your existing stack—backend APIs, front-end extensions, and how much custom glue code you have to ship.
Detailed Breakdown
1. Agent API (V1 Beta) (Best overall for full web task completion)
Agent API (V1 Beta) ranks as the top choice because it takes natural-language intent (cmd) and executes it in a real browser, while giving you a session_id to drive multi-step workflows programmatically.
You call an endpoint like:
POST https://api.multion.ai/v1/web/browse
X_MULTION_API_KEY: YOUR_API_KEY
Content-Type: application/json
{
"url": "https://www.amazon.com",
"cmd": "Search for USB-C charger, pick a 30W model under $25, add the top-rated one to cart.",
"mode": "step"
}
The agent opens a secure remote browser, executes the steps, and returns a response that includes a session_id plus a summary of what happened.
What it does well:
-
End-to-end actions in a real browser:
Instead of scripting selectors, you describe the task:- “Log in with the saved credentials, then navigate to my orders page.”
- “Post a new update on X saying ‘Shipping update: orders are delayed by 24 hours.’”
- “Go to my H&M wishlist and buy the latest saved item.”
The Agent API uses a real browser environment, so the agent can click, type, scroll, and submit forms on the actual UI—exactly what you’d try to test with Playwright, but here it’s driven by intent. No XPath graveyard, no manually written flows for each site.
-
Session continuity with
session_id:
The real reliability lever is continuity—not a single call. Agent API returns asession_idyou can reuse:POST https://api.multion.ai/v1/web/browse X_MULTION_API_KEY: YOUR_API_KEY Content-Type: application/json { "session_id": "prev-session-id", "cmd": "Proceed to checkout and stop at payment step.", "mode": "step" }This keeps cookies, login state, and page context alive. You can chain:
- Search & add to cart
- Apply a promo code
- Confirm the shipping address
- Complete payment (or stop at a review step for human confirmation)
Without a stable
session_id, you’d constantly re-implement login flows and lose your place mid-checkout. -
Step mode for controlled automation:
Withmode: "step"you can pause between segments of the task, inspect the result, then keep going. Useful patterns:- Your backend calls Agent API to reach “cart ready to pay,” sends a summary to the user for approval, then resumes the session to finalize.
- You capture intermediate page snapshots or logs when a step fails, similar to how you’d debug a flaky Playwright spec.
Tradeoffs & Limitations:
-
Requires backend integration & operational thinking:
You’re running real remote sessions at scale. That means:- Manage
X_MULTION_API_KEYand rate limits. - Handle error states, including “402 Payment Required” responses when your usage/billing hits limits.
- Decide how to store and expire
session_idvalues securely.
This isn’t a copy-paste “no-code” tool; it’s an infrastructure surface your app owns, which is exactly what you want if you’ve ever babysat a Selenium grid.
- Manage
Decision Trigger: Choose Agent API (V1 Beta) if you want your app’s AI agent to actually complete tasks on websites—log in, click, type, submit—and you care about reliable session continuity and backend orchestration more than minimal setup.
2. Retrieve API (Best for data extraction with light interaction)
Retrieve is the strongest fit when the main job is “read and structure this web page for my app,” not “drive a multi-step UI flow.”
You still operate on real pages, but the outcome is structured data, not a human-style journey through buttons and forms.
A typical call looks like:
POST https://api.multion.ai/v1/web/retrieve
X_MULTION_API_KEY: YOUR_API_KEY
Content-Type: application/json
{
"url": "https://www2.hm.com/en_us/women/shop-by-product/dresses.html",
"renderJs": true,
"scrollToBottom": true,
"maxItems": 50,
"schema": {
"name": "string",
"price": "string",
"colors": "string[]",
"productUrl": "string",
"imageUrl": "string"
}
}
The response returns a JSON array of objects that match your schema:
[
{
"name": "Rib-knit dress",
"price": "$24.99",
"colors": ["Black", "Beige"],
"productUrl": "https://www2.hm.com/...",
"imageUrl": "https://lp2.hm.com/..."
},
...
]
What it does well:
-
Structured JSON from dynamic pages:
Retrieve is designed to handle:- JavaScript-heavy pages with
renderJs: true - Infinite scroll / lazy-loading with
scrollToBottom: true - Result-size control with
maxItems
Instead of maintaining a dedicated scraper for each site, you define the shape of data you want and get back JSON arrays of objects. That’s the right primitive if your AI feature is “compare items” or “suggest best options” based on web data.
- JavaScript-heavy pages with
-
Simpler mental model for “read-only + light tasks”:
If your app’s AI agent:- Needs to read content
- Extract structured information
- Maybe click once or trigger a filter
…but doesn’t have to log in, navigate multiple pages, or fill complex forms, Retrieve keeps the implementation lean. You get one call, one JSON response, no long-lived browser session to manage.
Tradeoffs & Limitations:
-
Not meant for multi-step UI workflows:
Retrieve can’t replace full agent-driven flows like:- Logging into Amazon, updating an address, and then placing an order
- Navigating through a KYC portal across several screens
- Posting content on X with multiple interaction steps
It can read and structure what’s on a page, but it’s not a drop-in for “click, type, submit” flows. For those, you still want Agent API with
session_id.
Decision Trigger: Choose Retrieve if you want your app’s AI to “read the web and give me clean JSON,” and you only need minimal interaction—not a full, stateful browser workflow.
3. Chrome Browser Extension (Best for local, user-session automations)
The MultiOn Chrome Browser Extension stands out for “local” scenarios where you want your user to stay in control of their own browser session, but still delegate steps to an AI agent.
Instead of spinning up a remote browser in your backend, the extension operates in the user’s active Chrome window.
What it does well:
-
Acts inside the user’s existing session:
The extension sees the same DOM the user sees:- Your user is already logged into Amazon? The agent works within that session.
- They’re editing a document, replying to email, or managing orders? The agent can click, type, and submit in that exact view.
This is useful when you don’t want to handle user credentials at all; you let the user’s own browser own authentication, while the agent handles actions.
-
Great for “assist while I browse” use cases:
Think:- “Fill this form using my saved profile info.”
- “Compare the products on this page and highlight the cheapest 3.”
- “Draft a reply using the content in this email thread.”
You’re not building a backend “agent platform” as much as giving users a power tool in their browser.
Tradeoffs & Limitations:
-
Tied to Chrome and interactive user sessions:
The extension is not a replacement for backend capabilities. You don’t get infinite parallelism or server-side orchestration. If you need:- Millions of concurrent agents
- Controlled, headless execution for commerce workflows
- Integration into your own app’s backend
…you still need the Agent API instead of (or in addition to) the extension.
Decision Trigger: Choose the Chrome Browser Extension if you want to augment what your users already do in Chrome—letting an AI agent click, type, and submit within their live session—without owning the backend automation yourself.
Final Verdict
If the question is “How do I let my app’s AI agent actually complete a task on a website—click, type, submit—not just read pages?”, the decision framework looks like this:
- Use Agent API (V1 Beta) when you want backend-owned, production-grade web actions in a real browser, with
session_idcontinuity across steps. This is your replacement for brittle Playwright/Selenium flows in commerce, social posting, and login-heavy portals. - Use Retrieve when your primary goal is read + structure: convert dynamic pages into JSON arrays of objects using controls like
renderJs,scrollToBottom, andmaxItems, and maybe do a light interaction or two. - Use the Chrome Browser Extension when you want local, in-browser assistance inside the user’s own Chrome session, without taking on backend browser orchestration.
In my experience, serious product teams end up combining these:
- Chrome Extension for “assist while I browse”
- Retrieve for “web → JSON”
- Agent API as the backbone for “intent in, actions executed, outcomes confirmed”
That’s how you move from “AI that reads pages” to “AI that actually does the work for your users in real browsers.”