# Web agent

### Overview

The Web Agent is your AI-powered browser. Instead of writing scripts or clicking through pages manually, you describe what you need and the Web Agent figures out how to get it done by navigating pages, clicking buttons, filling forms, and extracting data.

It runs in a remote browser in the background, so it does not take over your computer. You can watch it work in real time through a live browser view, or let it run and come back to the results.

### When to use the web agent

Use the Web Agent for:

* **Complex research tasks** where you do not know all the steps upfront.
  * Example: "Find the CEO's email on the company website. Check the About page, Team page, or Contact form."
* **Dynamic websites** that are JavaScript-heavy or change often (for example, news sites, dashboards, and social platforms).
  * Example: "Search for product reviews and summarize the top five complaints."
* **Authenticated websites** behind logins (for example, LinkedIn profiles, private dashboards, and internal tools).
* **Multi-step interactions** like filling out forms, clicking through menus, or scrolling to load content.

{% hint style="info" %}
For simple public pages, use Firecrawl instead. The Web Agent is built for complex tasks. If you only need to scrape a public webpage, Firecrawl is usually faster and lower cost. Ask Cody, and it will pick the right tool.
{% endhint %}

### How it works

{% stepper %}
{% step %}
**Describe your goal**

Write clear, step-by-step instructions. The more specific you are, the better the results.

"Go to the company website, find the About or Team page, and get the CEO's name and LinkedIn profile URL."
{% endstep %}

{% step %}
**The Web Agent browses for you**

It opens a remote browser, navigates to the right pages, interacts with elements, and extracts the data you asked for.
{% endstep %}

{% step %}
**Watch live or wait for results**

You can watch the browser in real time through the live view panel, or let it run and check the results when it is done.
{% endstep %}

{% step %}
**Get your results**

The Web Agent returns what it found, including text, structured data, or page content, directly in the chat.
{% endstep %}
{% endstepper %}

<figure><img src="/files/B3kv5xjzXuk1CtreKeKj" alt=""><figcaption></figcaption></figure>

### Login and authentication

The Web Agent can access websites that require login. When you first need an authenticated site, Cody opens a live browser session where you can log in securely.

After you log in once, session cookies are saved. That means you do not need to log in again for future automations on the same site, because the Web Agent remembers your authenticated session across runs.

### Login limitations

The login step currently supports traditional username and password forms only. "Sign in with Google," single sign-on (SSO), and other OAuth-based login methods are not supported. Make sure the website has a standard login form before asking Cody to log in.

### Live browser view

When the Web Agent is running, you can watch it in real time. Cody shows a live browser view in the canvas panel on the right side of your screen. You can see what the agent sees, including pages loading, buttons being clicked, and content being extracted.

When the session finishes, you will see "Session Complete." Return to the chat, and Cody will show your results.

### Key limitations

| Limitation   | Detail                                                                                            |
| ------------ | ------------------------------------------------------------------------------------------------- |
| Timeout      | Runs have a 10-minute limit. If a task takes longer, it stops.                                    |
| Login method | Only username/password login is supported. OAuth, SSO, and "Sign in with Google" are not.         |
| Speed        | Slower than Firecrawl or the Chrome Extension. Best for tasks that need real browser interaction. |
| Cost         | Higher cost per run than simpler scraping tools, because it uses AI to reason through each step.  |

### Web Agent vs other tools

| Tool             | Best for                                              | Needs login?      | Speed  |
| ---------------- | ----------------------------------------------------- | ----------------- | ------ |
| Firecrawl        | Public pages and fast scraping                        | No                | Fast   |
| Web Agent        | Complex tasks, dynamic sites, and authenticated pages | Once (saved)      | Slower |
| Chrome Extension | Authenticated pages when you are at your computer     | Already logged in | Medium |

You do not need to choose the tool yourself. Tell Cody what you need, and it will choose the best approach. If a page is public, it will usually use Firecrawl. If it needs a real browser, it will use the Web Agent.

### Example prompts

* "Go to this company's website and find the CEO's name and email."
* "Log into my dashboard at \[URL] and download the latest report."
* "Search for reviews of \[product] on Google and summarize what people are saying."
* "Go to this LinkedIn profile and extract their work experience."
* "Fill out this contact form on \[website] with these details."

### FAQs

<details>

<summary>When should I use the Web Agent instead of Firecrawl?</summary>

Use the Web Agent when you need to interact with a page (click buttons, fill forms, or scroll to load content), or when the page requires login. For simple public pages where you only need text, Firecrawl is usually faster and lower cost.

</details>

<details>

<summary>Can I watch the Web Agent in action?</summary>

Yes. You can view a live browser window as the Web Agent performs your task. This makes it easy to monitor progress, verify results, or debug if something doesn’t go as expected.

</details>

<details>

<summary>What types of websites can it handle?</summary>

The Web Agent works on most modern websites, including JavaScript-heavy single-page apps, sites behind logins, and pages that require scrolling or interaction to load content.

</details>

<details>

<summary>Do I need to log in every time?</summary>

No. After you log in once through the live browser session, your cookies are saved. The Web Agent uses your saved session for future runs on the same site. If a session expires, Cody will ask you to log in again.

</details>

<details>

<summary>Is it safe to use on private or logged-in pages?</summary>

Yes. The Web Agent runs in a secure remote browser. Your login credentials are entered by you directly in the browser session, and CodeWords does not see or store your passwords. Your session data stays private to your account and is not accessible by other users.

</details>


---

# 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://docs.codewords.ai/more-features/web-automation/web-agent.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.
