<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: CAMEL-AI</title>
    <description>The latest articles on Forem by CAMEL-AI (@camelai).</description>
    <link>https://forem.com/camelai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F10303%2Fb4e814eb-07c5-444d-813d-16d08f362f9d.png</url>
      <title>Forem: CAMEL-AI</title>
      <link>https://forem.com/camelai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/camelai"/>
    <language>en</language>
    <item>
      <title>What Building a Hybrid Browser Toolkit Taught Us About the Web</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Wed, 01 Oct 2025 19:10:57 +0000</pubDate>
      <link>https://forem.com/camelai/what-building-a-hybrid-browser-toolkit-taught-us-about-the-web-2omo</link>
      <guid>https://forem.com/camelai/what-building-a-hybrid-browser-toolkit-taught-us-about-the-web-2omo</guid>
      <description>&lt;p&gt;If you’ve ever tried browser automation, you know the drill:&lt;br&gt;
You spin up Selenium, Playwright, or Puppeteer, point it at a page, and suddenly you’re wrestling with flaky selectors, weird screenshots, or the dreaded “element not found” even though it’s right there.&lt;/p&gt;

&lt;p&gt;I’ve been there. It feels like teaching a robot to surf the web by giving it a pair of oven mitts. Sure, it clicks and scrolls, but half the time it’s guessing.&lt;/p&gt;

&lt;p&gt;At CAMEL-AI, we ran into this wall too. Our original Camel BrowserToolkit was a first attempt at solving it. It did the basics — take screenshots, inject custom IDs, and click things. But it was… let’s say, not elegant. It worked more like asking an AI to click on pictures instead of actually understanding the page.&lt;/p&gt;

&lt;p&gt;That got us thinking:&lt;br&gt;
What if the toolkit could “see” the page like a human and understand the structure like a dev?&lt;/p&gt;
&lt;h2&gt;
  
  
  From Monolith to Hybrid
&lt;/h2&gt;

&lt;p&gt;The big shift came when we re-architected things. Instead of one heavy Python process, we now have a Hybrid setup using Python and TypeScript.&lt;/p&gt;

&lt;p&gt;Python is still your scripting layer. That means you can write automation in a language most of us are comfortable with.&lt;br&gt;
TypeScript is the engine under the hood. It runs Playwright natively, handles async operations, and talks directly to the browser.&lt;/p&gt;

&lt;p&gt;The two communicate over WebSockets. So Python gives high-level commands, while TypeScript executes them efficiently.&lt;/p&gt;
&lt;h2&gt;
  
  
  Introducing the CAMEL Hybrid Browser Toolkit
&lt;/h2&gt;

&lt;p&gt;Enter the &lt;strong&gt;Hybrid Browser Toolkit&lt;/strong&gt;. We've rebuilt the toolkit from the ground up as a TypeScript–Python hybrid. In this new design, TypeScript (running on Node.js) handles the browser directly via Playwright's fast native APIs, and Python remains your friendly front-end interface.&lt;/p&gt;

&lt;p&gt;What does that buy you? Faster performance, access to all the latest Playwright features (like the new &lt;code&gt;_snapshotForAI&lt;/code&gt;), and true async event-driven power – without sacrificing the ease of Python scripting.&lt;/p&gt;

&lt;p&gt;The result is a layered architecture: your Python code talks to a TypeScript server over WebSockets. The TypeScript layer manages browser instances, DOM queries, screenshots, etc., all in the same high-performance JavaScript environment. Python just sends commands and gets structured results.&lt;/p&gt;

&lt;p&gt;This split means lower latency and better concurrency. As one example, Node's Playwright doesn't spawn a fresh process for every browser window like the Python version did, so it can manage many tabs with far less CPU and memory overhead.&lt;/p&gt;

&lt;p&gt;In short, Python becomes the brain giving high-level instructions, and TypeScript is the muscle doing the work efficiently.&lt;/p&gt;
&lt;h2&gt;
  
  
  What's Different Under the Hood
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F51cc44tjyrsao5rcc8we.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F51cc44tjyrsao5rcc8we.png" alt=" " width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the legacy toolkit, every action that needed to find or click an element typically involved injecting a random ID into the page via a script, then querying it. That worked, but it felt hacky.&lt;/p&gt;

&lt;p&gt;In the hybrid toolkit, we leverage standard accessibility (ARIA) selectors and Playwright's new tools. Now you can do things like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[aria-label="Submit"]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Submit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;snapshot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_snapshotForAI&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// snapshot now has structured data on all elements and their ARIA roles&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Playwright's &lt;code&gt;_snapshotForAI()&lt;/code&gt; (an internal API) lets us get a rich DOM snapshot: every interactive element, its role (like button, link, textbox), labels, etc. We assign each element a ref ID and use those for all interactions. This replaces the old random-ID trick with a semantic mapping.&lt;/p&gt;

&lt;p&gt;It also means the same snapshot data fuels both text mode and the visual "set-of-marks" screenshots.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set-of-Marks Screenshots
&lt;/h3&gt;

&lt;p&gt;Speaking of screenshots, the new toolkit's SoM (Set-of-Marks) screenshots are crisp and clever. We inject a small script into the page that outlines every clickable element with a little numbered marker (their ref ID).&lt;/p&gt;

&lt;p&gt;This isn't just a dumb screenshot – it knows about element overlap and tries not to mark hidden elements. If a button has an icon and text, it merges them into one mark. It even picks good positions for labels so they don't scribble over each other. (This injection-based approach in the browser is more reliable than our old memory-only screenshots.)&lt;/p&gt;

&lt;h3&gt;
  
  
  Enhanced Stealth Mode
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9btju8x2a4jzcb9etyz2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9btju8x2a4jzcb9etyz2.png" alt=" " width="800" height="957"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We've also beefed up stealth mode. By default, Playwright can be detected by many sites (indeed, "stock" Playwright is often blocked by modern anti-bot measures.&lt;/p&gt;

&lt;p&gt;The new toolkit launches browsers with a full suite of anti-detection flags, customizable user agents, headers, etc. You can tweak a &lt;code&gt;StealthConfig&lt;/code&gt; object to set exactly which flags or headers to use. And we maintain this even across persistent contexts or CDP connections.&lt;/p&gt;

&lt;p&gt;The bottom line: you get a much more human-like browser fingerprint without extra work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory-Efficient Screenshots
&lt;/h3&gt;

&lt;p&gt;Other small but nice improvements include how we handle screenshots and images. In the old toolkit, screenshots were held entirely in memory and passed around as objects. Now we save screenshots to disk and only pass around file paths.&lt;/p&gt;

&lt;p&gt;This keeps memory usage low, especially when you take many screenshots in a run. The agent can still request the image (and even run vision-based analysis on it), but the heavy data lives on disk.&lt;/p&gt;

&lt;h3&gt;
  
  
  Smarter Form Filling
&lt;/h3&gt;

&lt;p&gt;We also made form-filling smarter. You can now send multiple inputs in one command, and the toolkit will try to find the right input fields (even if you accidentally point at a container).&lt;/p&gt;

&lt;p&gt;It watches for dropdowns appearing after you type and will return just the new options (a "diff" snapshot), so you don't get overwhelmed by the whole page again. If something goes wrong, the tool tries simple recovery steps too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features at a Glance
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Multi-Mode Operation:&lt;/strong&gt; The toolkit has three modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text Mode:&lt;/strong&gt; DOM-based automation, returning textual snapshots of element lists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Mode:&lt;/strong&gt; Screenshot-based, with interactive elements highlighted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid Mode:&lt;/strong&gt; Smart switching between text and visual as needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;TypeScript Core:&lt;/strong&gt; All browser work is done in a Node.js/TypeScript server. That means native Playwright calls (no bridging) and full async/await support. We get TypeScript's compile-time checks and the latest APIs instantly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better Element Handling:&lt;/strong&gt; Use real ARIA selectors and Playwright locators instead of injected IDs. E.g. click by aria-label or role. Plus, &lt;code&gt;_snapshotForAI&lt;/code&gt; returns structured data with semantic roles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instant Snapshots:&lt;/strong&gt; Every action (click/type/etc.) that changes the page returns an updated snapshot by default, so you see the new state immediately in text mode.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced Screenshot (SoM):&lt;/strong&gt; Annotated screenshots with numbered marks for each element. Optionally, an AI can analyze the image (like "find all sign-up buttons").&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intelligent Typing:&lt;/strong&gt; Typing into fields automatically detects dropdowns (autocomplete) and only returns the new suggestions (diff snapshot). If you point to a container, it will find the actual input inside and type there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Powerful Stealth:&lt;/strong&gt; Multiple Chrome flags, custom user agent/headers, persistent context, etc., to reduce bot detection. (After all, many sites try to fingerprint automation. &lt;br&gt;
&lt;strong&gt;Flexible Connections:&lt;/strong&gt; You can launch a fresh browser via Playwright, attach to an existing Chrome/Edge via CDP (Chrome DevTools Protocol), or even hook into an AI agent via the Model Context Protocol (MCP).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool Registry:&lt;/strong&gt; The toolkit neatly separates "tools" (actions) from the core. Screenshots go to files, not memory, so you can handle them in custom agents or pipelines without huge overhead.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try It: Session &amp;amp; Navigation Tools
&lt;/h2&gt;

&lt;p&gt;Let's see some examples. First, create a toolkit instance and open the browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;camel.toolkits&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HybridBrowserToolkit&lt;/span&gt;

&lt;span class="c1"&gt;# Launch a real browser (non-headless for debugging)
&lt;/span&gt;&lt;span class="n"&gt;toolkit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HybridBrowserToolkit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;headless&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_open&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;    &lt;span class="c1"&gt;# "Browser opened."
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tabs: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;total_tabs&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, Active: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;current_tab&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Initial Snapshot:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;snapshot&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your first call must be &lt;code&gt;browser_open()&lt;/code&gt;. That spins up Chromium/Chrome/Edge and returns a snapshot of whatever the default page is (typically about:blank or your start URL). You'll get something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Result: Browser opened.
Tabs: 1, Active tab index: 0
Initial Snapshot:
- link "Get Started" [ref=1]
- link "Documentation" [ref=2]
- link "GitHub" [ref=3]
- ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now navigation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Open a new tab and navigate to example.com
&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_visit_page&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://example.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Visiting example.com: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Snapshot:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;snapshot&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tabs now: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;total_tabs&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, Active: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;current_tab&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Go back and forward
&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_back&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;      &lt;span class="c1"&gt;# go back in history
&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_forward&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;   &lt;span class="c1"&gt;# then forward again
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;browser_visit_page(url)&lt;/code&gt; opens the URL in a new tab and switches to it. Each call makes a new tab.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;browser_back()&lt;/code&gt; and &lt;code&gt;browser_forward()&lt;/code&gt; move in the history of the current tab. They both return the updated page snapshot and tab info.&lt;/p&gt;

&lt;p&gt;For example, after visiting a couple of pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_visit_page&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://example.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_visit_page&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://example.com/about&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_back&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Back: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, now at &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;snapshot&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Page Inspection Tools
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1zq5bvnp03nllzhcmvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1zq5bvnp03nllzhcmvb.png" alt=" " width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see what's on the page without doing anything, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;snapshot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_get_page_snapshot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;snapshot&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This returns a textual list of all interactive elements in the current tab (links, buttons, inputs, etc.), each with a &lt;code&gt;[ref=id]&lt;/code&gt;. By default it lists the full page, but you can initialize with &lt;code&gt;viewport_limit=True&lt;/code&gt; to only see elements visible on screen. E.g.:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- link "Home" [ref=1]
- button "Sign In" [ref=2]
- textbox "Search..." [ref=3]
- link "Products" [ref=4]
- ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a visual view, try:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_get_som_screenshot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="c1"&gt;# e.g. "Screenshot captured with 12 interactive elements (saved to: ./screenshots/page123_som.png)"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This takes a screenshot of the page and marks every element. You can also ask the toolkit to analyze it with an AI, e.g.:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_get_som_screenshot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;read_image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Find all buttons for submitting forms&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="c1"&gt;# e.g. "Screenshot captured... Agent analysis: Found 3 form buttons: [ref=5], [ref=9], [ref=12]"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Behind the scenes, it saved an image file and ran an agent (if requested) to look at it. The raw image path is in &lt;code&gt;result['screenshotPath']&lt;/code&gt; if you need it.&lt;/p&gt;

&lt;p&gt;To inspect tabs, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;tab_info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_get_tab_info&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Total tabs: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;tab_info&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;total_tabs&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tab&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tab_info&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tabs&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; (current)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;is_current&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;- &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; @ &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;url&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see each tab's ID, title, and URL. This is handy to pick a tab to switch to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Switch to tab by ID (the 'id' field from tab_info)
&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_switch_tab&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tab_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;some_tab_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Interaction Tools
&lt;/h2&gt;

&lt;p&gt;Now for real interactions:&lt;/p&gt;

&lt;h3&gt;
  
  
  Click an Element
&lt;/h3&gt;

&lt;p&gt;Click an element by its ref:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;   &lt;span class="c1"&gt;# e.g. "Clicked on button 'Submit'"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the click opened a new tab, result will include &lt;code&gt;newTabId&lt;/code&gt;, and &lt;code&gt;current_tab&lt;/code&gt;/&lt;code&gt;total_tabs&lt;/code&gt; will update accordingly. You can then &lt;code&gt;browser_switch_tab&lt;/code&gt; to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type into Input Fields
&lt;/h3&gt;

&lt;p&gt;Type into an input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Single input
&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the element with ref=3 triggers an autocomplete dropdown, the toolkit will detect it. Instead of returning the full page again, it gives you &lt;code&gt;result['diffSnapshot']&lt;/code&gt; containing just the new options (this is the "intelligent dropdown detection"). For example, typing "San" might return:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- option "San Francisco" [ref=23]
- option "San Diego" [ref=24]
- option "San Antonio" [ref=25]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can click one of those by ref. If you have multiple fields to fill, just pass a list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;inputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ref&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;John&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ref&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;4&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Doe&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ref&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;john.doe@example.com&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;details&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;  &lt;span class="c1"&gt;# shows success/failure per field
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Select Dropdowns
&lt;/h3&gt;

&lt;p&gt;Select (for &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; dropdowns):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;country-select&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;US&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must provide the option's value attribute, not visible text. (If needed, you can &lt;code&gt;browser_get_page_snapshot()&lt;/code&gt; first to see element refs.)&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter Key
&lt;/h3&gt;

&lt;p&gt;Enter key (submit form etc.):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_enter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simulates pressing Enter in the currently focused field. It's handy after typing search terms.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scroll
&lt;/h3&gt;

&lt;p&gt;Scroll the page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_scroll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;direction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;down&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use "up" or "down", with optional pixel amount. It returns the new snapshot. You can loop scrolls to load more content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;prev&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_scroll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;down&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;snapshot&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;  &lt;span class="c1"&gt;# no new content
&lt;/span&gt;    &lt;span class="n"&gt;prev&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;snapshot&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mouse Control
&lt;/h3&gt;

&lt;p&gt;Mouse control by coordinates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_mouse_control&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;click&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;350.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_mouse_control&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dblclick&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;123.4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;456.7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_mouse_control&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;right_click&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Useful for canvas or image-map interactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Drag and Drop
&lt;/h3&gt;

&lt;p&gt;Mouse drag-and-drop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_mouse_drag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;from_ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;item-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to_ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;trash-bin&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Drag the element with ref="item-5" onto ref="trash-bin". Handy for reordering or file moves in web UIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Press Keys
&lt;/h3&gt;

&lt;p&gt;Press keys/combinations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_press_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tab&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_press_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Control+a&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;  &lt;span class="c1"&gt;# select all
&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_press_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Alt+Left&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;   &lt;span class="c1"&gt;# back in history
&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_press_key&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;F5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;         &lt;span class="c1"&gt;# refresh
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Send any key or combo. The toolkit uses Playwright's key syntax.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tab Management
&lt;/h2&gt;

&lt;p&gt;Working with multiple tabs is easy:&lt;/p&gt;

&lt;h3&gt;
  
  
  Switch Tab
&lt;/h3&gt;

&lt;p&gt;Switch tab by ID (from &lt;code&gt;browser_get_tab_info&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_switch_tab&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tab_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;some_tab_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This activates that tab and returns its snapshot.&lt;/p&gt;

&lt;h3&gt;
  
  
  Close Tab
&lt;/h3&gt;

&lt;p&gt;Close a tab:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_close_tab&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tab_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;some_tab_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After closing, it returns info on the remaining tabs.&lt;/p&gt;

&lt;p&gt;You can, for instance, close all but the first tab by iterating through them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;tab_info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_get_tab_info&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tab&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tab_info&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tabs&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;is_current&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_close_tab&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tab_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tab&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Console Commands
&lt;/h3&gt;

&lt;p&gt;Console commands: You can execute arbitrary JS on the page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_console_exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;return window.location.href&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Current URL:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And view console logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;logs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_console_view&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;console_messages&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;] &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced &amp;amp; Utility
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Wait for Manual Step
&lt;/h3&gt;

&lt;p&gt;Wait for manual step: Sometimes you need a human (e.g. to solve a CAPTCHA). Use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_wait_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;timeout_sec&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;completed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;result&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;User resumed, snapshot after:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;snapshot&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Wait timed out.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pauses execution and shows the last snapshot. When the user presses Enter (or timeout), it returns control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Combine It All
&lt;/h3&gt;

&lt;p&gt;Combine it all: Here's a mini example putting a few tools together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;toolkit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HybridBrowserToolkit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;headless&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_open&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_visit_page&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://example.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Look for a product link and click it
&lt;/span&gt;    &lt;span class="n"&gt;snap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_get_page_snapshot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="c1"&gt;# Suppose ref=7 is "Products"
&lt;/span&gt;    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;7&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Now add to cart and checkout
&lt;/span&gt;    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;add-to-cart&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;checkout&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Fill checkout form
&lt;/span&gt;    &lt;span class="n"&gt;inputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ref&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Alice&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ref&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;email&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;alice@example.com&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ref&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;address&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;1 Developer Way&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;shipping&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;standard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_console_exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;return document.querySelector(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;form&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;).checkValidity()&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;place-order&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was just a taste. The Hybrid Browser Toolkit provides all the basic navigation and interaction tools you'd expect, plus some powerful extras (like smart screenshots and AI-assisted analysis) to help you automate complex tasks smoothly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operating Modes: Text vs. Visual vs. Hybrid
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Text Mode&lt;/strong&gt; is the default: every action returns a text snapshot. It's lightweight and great for pure data tasks (like scraping or filling forms). Each element is listed with a &lt;code&gt;[ref=ID]&lt;/code&gt; and a label. If you initialize with &lt;code&gt;full_visual_mode=True&lt;/code&gt;, then actions don't auto-return snapshots (fast mode); you can still call &lt;code&gt;browser_get_page_snapshot()&lt;/code&gt; manually when you need it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visual Mode&lt;/strong&gt; uses screenshots. The &lt;code&gt;browser_get_som_screenshot()&lt;/code&gt; tool we saw is the core of this mode. It's ideal for verifying layouts, catching visual glitches, or when a human needs to see something. You'll often toggle visual mode on when you need to confirm that a button is visible, or to show the agent exactly what's on screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hybrid Mode&lt;/strong&gt; is smart: it uses text mode by default, but seamlessly takes and interprets screenshots when needed (or as requested). For example, you might click through forms in text mode, then do one final screenshot with AI analysis to "spot check" the result.&lt;/p&gt;

&lt;p&gt;A good rule of thumb:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;Text Mode&lt;/strong&gt; for most automation (fast, headless, easy parsing).&lt;/li&gt;
&lt;li&gt;Switch to &lt;strong&gt;Visual Mode&lt;/strong&gt; when you need the UI context (e.g. for CAPTCHAs, complex UIs, or human verification).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combine Both&lt;/strong&gt; as needed. E.g., click by refs in text mode, then verify with a screenshot.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Connection Modes: Playwright vs CDP vs MCP
&lt;/h2&gt;

&lt;p&gt;Finally, how do we connect to the browser?&lt;/p&gt;

&lt;h3&gt;
  
  
  Standard Playwright (default)
&lt;/h3&gt;

&lt;p&gt;The toolkit launches and manages its own browser instance. Just &lt;code&gt;HybridBrowserToolkit()&lt;/code&gt; and call &lt;code&gt;browser_open()&lt;/code&gt;. You can set &lt;code&gt;headless=True/False&lt;/code&gt;, &lt;code&gt;user_data_dir&lt;/code&gt; for persistence, timeouts, etc. Use this when you just want an isolated browser.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chrome DevTools Protocol (CDP)
&lt;/h3&gt;

&lt;p&gt;This lets you attach to an already running browser (Chrome/Edge/Chromium) that was started with &lt;code&gt;--remote-debugging-port&lt;/code&gt;. For example, start Chrome manually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;google-chrome &lt;span class="nt"&gt;--remote-debugging-port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;9222 &lt;span class="nt"&gt;--user-data-dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp/chrome-profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;http://localhost:9222/json/version&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ws&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;webSocketDebuggerUrl&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;toolkit_cdp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HybridBrowserToolkit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cdp_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# No need to call browser_open(); it's already running
&lt;/span&gt;&lt;span class="n"&gt;tab_info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toolkit_cdp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browser_get_tab_info&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Connected to &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;tab_info&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;total_tabs&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; tabs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CDP is the same protocol Chrome DevTools uses to talk to the browser &lt;a href="https://chromedevtools.github.io" rel="noopener noreferrer"&gt;chromedevtools.github.io&lt;/a&gt;, so any browser with debugging enabled can be controlled. You can even set &lt;code&gt;cdp_keep_current_page=True&lt;/code&gt; to make the toolkit use the current page instead of opening a new one.&lt;/p&gt;

&lt;h3&gt;
  
  
  MCP (Model Context Protocol)
&lt;/h3&gt;

&lt;p&gt;This is for connecting the toolkit to an AI assistant (like Claude via LLMs) so the AI can call these browser tools as if they were native functions. Here's how to set it up:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. Install the MCP Server&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/camel-ai/browser_agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;browser_agent
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;2. Configure Claude Desktop&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Add to your Claude configuration file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;macOS&lt;/strong&gt;: &lt;code&gt;~/Library/Application Support/Claude/claude_desktop_config.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: &lt;code&gt;%APPDATA%\Claude\claude_desktop_config.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hybrid-browser"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"python"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-m"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"hybrid_browser_mcp.server"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c2ksxayol6zt4klfv15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2c2ksxayol6zt4klfv15.png" alt=" " width="800" height="639"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;3. Restart Claude Desktop&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fei6ln5wuog081xji0npb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fei6ln5wuog081xji0npb.png" alt=" " width="800" height="641"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After adding the configuration, completely restart Claude Desktop. The browser tools will appear when you click the 🔌 icon in the chat interface.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Available Browser Tools&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Once connected, you'll have access to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Navigation&lt;/strong&gt;: &lt;code&gt;browser_open&lt;/code&gt;, &lt;code&gt;browser_visit_page&lt;/code&gt;, &lt;code&gt;browser_back&lt;/code&gt;, &lt;code&gt;browser_forward&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interaction&lt;/strong&gt;: &lt;code&gt;browser_click&lt;/code&gt;, &lt;code&gt;browser_type&lt;/code&gt;, &lt;code&gt;browser_select&lt;/code&gt;, &lt;code&gt;browser_scroll&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Screenshots&lt;/strong&gt;: &lt;code&gt;browser_get_som_screenshot&lt;/code&gt; (captures page with clickable elements marked)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tab Management&lt;/strong&gt;: &lt;code&gt;browser_switch_tab&lt;/code&gt;, &lt;code&gt;browser_close_tab&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced&lt;/strong&gt;: &lt;code&gt;browser_console_exec&lt;/code&gt;, &lt;code&gt;browser_mouse_control&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Basic Usage Example&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Claude can now control browsers with simple commands:
&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;browser_open&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;browser_visit_page&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://example.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;browser_type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AI automation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;browser_click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;submit-button&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;browser_get_som_screenshot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;browser_close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Customization&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Modify browser behavior in &lt;code&gt;browser_agent/config.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;BROWSER_CONFIG&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;headless&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;# Show browser window
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stealth&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;      &lt;span class="c1"&gt;# Avoid bot detection
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enabled_tools&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...]&lt;/span&gt; &lt;span class="c1"&gt;# Specify which tools to enable
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;In summary, the Hybrid Browser Toolkit is a major upgrade over the old screenshot-only BrowserToolkit. We still give you a friendly Python API to work with, but under the hood we're speaking the browser's native language via TypeScript.&lt;/p&gt;

&lt;p&gt;That means faster, more reliable interactions and access to shiny new features like Playwright's accessibility snapshots. Whether you need lightning-fast DOM scraping or human-like visual checks (or both!), this toolkit handles it.&lt;/p&gt;

&lt;p&gt;It also plays well with modern workflows. Want to connect to an existing Chrome? No problem (thanks to CDP). Want your AI agent to browse the web? Check out MCP integration.&lt;/p&gt;

&lt;p&gt;From practical navigation (click, type, scroll) to advanced tricks (Set-of-Marks screenshots, smart autocomplete typing, multi-tab management), everything's here.&lt;/p&gt;

&lt;p&gt;Give it a spin, and let us know what you build with it. Welcome to the new era of browser automation with CAMEL's Hybrid Browser Toolkit – it's like taking off those gloves and driving with all the precision you wanted, at full speed.&lt;/p&gt;

&lt;p&gt;Happy automating!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>javascript</category>
      <category>automation</category>
    </item>
    <item>
      <title>We hired AI to do Growth Engineering and here’s what happened</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Wed, 17 Sep 2025 10:16:00 +0000</pubDate>
      <link>https://forem.com/camelai/we-hired-ai-to-do-growth-engineering-and-heres-what-happened-4ad0</link>
      <guid>https://forem.com/camelai/we-hired-ai-to-do-growth-engineering-and-heres-what-happened-4ad0</guid>
      <description>&lt;p&gt;In open source projects, time is precious. Maintainers juggle bug fixes, feature requests, community support, and documentation, all while trying to keep code secure and releases organized. One repetitive but crucial task is &lt;strong&gt;reviewing pull requests and preparing release updates&lt;/strong&gt;. It's necessary, but it eats up hours that could be spent innovating.&lt;/p&gt;

&lt;p&gt;In our work at &lt;a href="https://www.camel-ai.org/" rel="noopener noreferrer"&gt;CAMEL-AI&lt;/a&gt;, open-source contributions move fast. Every week, our team spends time reviewing pull requests, highlighting key changes, and preparing release notes. It’s important work, but also repetitive — hours get lost in scanning PRs, checking impact, and formatting updates.&lt;/p&gt;

&lt;p&gt;This time, instead of doing it manually, we asked ourselves: what if a multi-agent system could take over this process?&lt;/p&gt;

&lt;p&gt;That’s when we decided to try it with Eigent and a custom MCP server for GitHub. The idea was simple: let AI agents handle the weekly workflow, from fetching PRs to summarizing them and even drafting release-ready notes and short posts.&lt;/p&gt;

&lt;p&gt;What if automation could handle the grunt work for you? That's where Eigent step in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F20axnnnosg6htpsxqpkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F20axnnnosg6htpsxqpkh.png" alt=" " width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.eigent.ai/" rel="noopener noreferrer"&gt;Eigent&lt;/a&gt;&lt;/strong&gt; is the world's first &lt;strong&gt;Multi-agent Workforce&lt;/strong&gt; desktop application, empowering you to build, manage, and deploy a custom AI workforce that can turn your most complex workflows into automated tasks. It's a &lt;strong&gt;modular, multi-agent system&lt;/strong&gt; that can break down complex tasks and handle them through specialized agents working in coordination.&lt;/p&gt;

&lt;p&gt;Eigent's &lt;strong&gt;multi-agent coordination platform&lt;/strong&gt; boosts productivity by turning your workflows into automated tasks. Built on the open-source CAMEL framework, it brings parallel execution, customization, and privacy to your AI automation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What can Eigent do for you?&lt;/strong&gt; For first-time readers, consider Eigent as a flexible agentic assistant. You can create different "workers" (AI agents) with domain-specific skills (e.g. coding, documentation, DevOps) and have them collaborate on tasks. Some examples of technical workflows Eigent can simplify include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub automation with AI agents:&lt;/strong&gt; Reviewing code changes, summarizing pull requests, triaging issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release note generation:&lt;/strong&gt; Automatically compiling highlights of what's new in each release.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation and code analysis:&lt;/strong&gt; Extracting key points from docs or codebases, suggesting improvements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-source workflows:&lt;/strong&gt; Keeping track of project activity, generating reports for contributors, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this guide, we'll show you &lt;strong&gt;how to configure a custom GitHub MCP server inside Eigent&lt;/strong&gt; and set up an agent workflow that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Fetches new pull requests from a repo&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extracts and analyzes PR data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Formats the highlights into release-ready notes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Generates a short social post (e.g. for Twitter/X)&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's dive into the step-by-step guide!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Open Eigent and Navigate to MCP &amp;amp; Tools Settings
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39pmrfvrvei10w05gkcw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39pmrfvrvei10w05gkcw.gif" alt=" " width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have Eigent running, begin by opening the &lt;strong&gt;Settings&lt;/strong&gt; panel. In the Settings, find and click on the &lt;strong&gt;"MCP &amp;amp; Tools"&lt;/strong&gt; section. This is where you can configure external tools and servers for your AI agents. We'll use this area to add a new custom MCP server for GitHub tasks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Eigent's Settings interface. Navigate to the **MCP &amp;amp; Tools&lt;/em&gt;* tab to configure external AI tools and servers.*&lt;/p&gt;

&lt;p&gt;In the &lt;em&gt;MCP &amp;amp; Tools&lt;/em&gt; tab, you'll see a list of available tools and any configured MCP servers. By default, Eigent might include some basic tools (e.g. web search, code execution). To add our own, look for an &lt;strong&gt;"Add MCP Server"&lt;/strong&gt; button (usually a &lt;strong&gt;+&lt;/strong&gt; or a labeled button) and click it. This will open a dialog where you can input a JSON configuration for the new server.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 2: Add a Custom MCP Server via JSON Configuration
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh4bf1hnw0ck18idk2i1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh4bf1hnw0ck18idk2i1.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Eigent allows advanced users to add custom agent servers by providing a JSON config. In the &lt;strong&gt;Add MCP Server&lt;/strong&gt; dialog that opened, you'll see a text area to paste JSON. We're going to add a &lt;strong&gt;sequential-thinking&lt;/strong&gt; MCP server - this is a general-purpose AI reasoning engine that can coordinate tasks (perfect for breaking down complex prompts). We will also tie it into GitHub by providing the GitHub integration toolset and our credentials.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Adding a new MCP server via JSON configuration. Paste in the JSON definition for the **sequential-thinking&lt;/em&gt;* server.*&lt;/p&gt;

&lt;p&gt;The JSON defines how Eigent should launch the external agent server. For our use case, we'll use Node's &lt;strong&gt;&lt;code&gt;npx&lt;/code&gt;&lt;/strong&gt; to run the &lt;strong&gt;Sequential Thinking&lt;/strong&gt; server package, and include the official GitHub MCP tool. Below is the JSON structure to use (as provided by Eigent's docs and examples):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sequential-thinking"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-sequential-thinking"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Configure the GitHub MCP Server Settings (Include Your PAT)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fvbac8wej56ng4m6qqz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fvbac8wej56ng4m6qqz.gif" alt=" " width="720" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before finalizing the MCP server setup, include your &lt;strong&gt;GitHub Personal Access Token (PAT)&lt;/strong&gt; in the configuration. This token will allow the agent to authenticate with the GitHub API and fetch repository data. You should generate a PAT from your GitHub account (with at least read access to repos; for public repos a classic token with default public scopes is sufficient). In the JSON, we'll add an environment variable for the token and specify the GitHub toolset.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Configuring the GitHub MCP server by adding environment variables. Provide your **GitHub PAT&lt;/em&gt;* in the JSON config so the agent can access the GitHub API.*&lt;/p&gt;

&lt;p&gt;To integrate the GitHub tools, modify the JSON as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the GitHub MCP server container to the arguments.&lt;/li&gt;
&lt;li&gt;Set the environment variable for your token.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, you can extend the &lt;strong&gt;&lt;code&gt;"args"&lt;/code&gt;&lt;/strong&gt; array to include the GitHub server image and use the &lt;strong&gt;&lt;code&gt;"env"&lt;/code&gt;&lt;/strong&gt; field for the token:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sequential-thinking"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-sequential-thinking"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"ghcr.io/github/github-mcp-server"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"GITHUB_PERSONAL_ACCESS_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ghp_yourGitHubTokenHere"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this configuration, we pass the official &lt;strong&gt;GitHub MCP server&lt;/strong&gt; (hosted at &lt;a href="http://ghcr.io/github/github-mcp-server" rel="noopener noreferrer"&gt;ghcr.io/github/github-mcp-server&lt;/a&gt; as an argument to the sequential thinking agent. The sequential agent will spin up the GitHub toolset internally. We also set &lt;code&gt;GITHUB_PERSONAL_ACCESS_TOKEN&lt;/code&gt; in the environment so the agent can authenticate to GitHub. &lt;em&gt;(Make sure to replace *&lt;/em&gt;"ghp_yourGitHubTokenHere"** with your actual PAT.)*&lt;/p&gt;

&lt;p&gt;Once the JSON is ready, click &lt;strong&gt;Install&lt;/strong&gt; or &lt;strong&gt;Add&lt;/strong&gt; to save the MCP server. Eigent will download and initialize the server in the background. After a moment, you should see the new server listed in your MCP tools, indicating a successful installation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Add a GitHub-Focused Worker (Agent) Using the New MCP Server
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fio64czclz7a3uw60i2op.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fio64czclz7a3uw60i2op.gif" alt=" " width="720" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that the MCP server is configured, we need to create a Worker that uses this server. In Eigent, a "Worker" is essentially an AI agent persona that can carry out tasks using a specified toolset or MCP server. Navigate back to the main &lt;strong&gt;Workforce&lt;/strong&gt; or &lt;strong&gt;Agents&lt;/strong&gt; screen (often the home screen showing your AI workers). Look for an &lt;strong&gt;"Add Worker"&lt;/strong&gt; or &lt;strong&gt;"+"&lt;/strong&gt; button to create a new agent.&lt;/p&gt;

&lt;p&gt;When the &lt;strong&gt;Add Worker&lt;/strong&gt; dialog appears, enter a name and description for your new agent. For example, name it &lt;strong&gt;"GitHub MCP"&lt;/strong&gt; and describe it as "Helps around GitHub Tasks". Most importantly, assign the &lt;strong&gt;Agent Tool&lt;/strong&gt; to the MCP server we just added (it might appear in a dropdown as "sequential-thinking" or whatever name you gave it). This ensures your new worker will utilize the GitHub-enabled sequential thinking agent.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Creating a new Worker agent for GitHub tasks. Give it a name (e.g. "GitHub PR Reviewer") and select the **GitHub MCP&lt;/em&gt;* server as the agent's tool.*&lt;/p&gt;

&lt;p&gt;After filling in the details and selecting the correct MCP server, save the worker. You should now see a new agent in your AI workforce list. This agent is essentially your &lt;strong&gt;GitHub automation assistant&lt;/strong&gt;, equipped with the ability to reason through tasks and interact with GitHub data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Prompt the Agent to Summarize Pull Requests
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshzloyxfaii0wnvr5tyy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshzloyxfaii0wnvr5tyy.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the GitHub-enabled agent up and running, it's time to put it to work. Open a chat or command interface with your new worker (in Eigent, clicking the worker might open a chat panel where you can give it instructions). We'll provide a task prompt asking the agent to review pull requests from a repository and summarize them.&lt;/p&gt;

&lt;p&gt;As an example, try a detailed prompt like this one:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Review all the 30 latest pull requests from the repo &lt;a href="https://github.com/camel-ai/camel" rel="noopener noreferrer"&gt;https://github.com/camel-ai/camel&lt;/a&gt;. Select the top 5 by impact (lines changed, files touched, or discussion depth). For each selected PR, generate a release-ready update in this format: ✨ Feature: &amp;lt;catchy one-liner summary&amp;gt; 💡 Why it matters: &amp;lt;short bullet-point explanation&amp;gt; 🙏 Thanks @&amp;lt;GitHubAuthor&amp;gt;...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Entering a prompt for the GitHub agent to review recent PRs and produce summaries. This complex instruction asks the AI to fetch the latest 30 PRs, pick the most impactful ones, and format a brief release note for each.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the chat, paste or type in the prompt (as shown above) and hit send. This instructs the agent to automate a common open-source workflow: analyzing recent pull requests in the &lt;strong&gt;camel-ai/camel&lt;/strong&gt; repo and preparing a synopsis of important changes. You can customize the repository URL or criteria as needed - for instance, use your own project's repo link. The key is that our agent now has the tools (via MCP) to fetch GitHub data and the reasoning ability to summarize it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Watch Eigent Automatically Break Down the Task and Fetch Data
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dfw49zliobuqvg5s6ld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dfw49zliobuqvg5s6ld.png" alt=" " width="800" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you send the prompt, &lt;strong&gt;Eigent's multi-agent engine kicks in&lt;/strong&gt;. The request is fairly complex, but Eigent will handle it by dividing the work into manageable subtasks. Behind the scenes, the Sequential Thinking MCP server interprets the instruction and decides on a plan. It may do something like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fetch the list of the latest 30 PRs from the specified repository (using the GitHub MCP tool).&lt;/li&gt;
&lt;li&gt;Analyze each PR's metadata (lines changed, files, comments) to determine "impact".&lt;/li&gt;
&lt;li&gt;Pick the top 5 PRs based on the criteria.&lt;/li&gt;
&lt;li&gt;For each of those PRs, compose a summary in the requested format (✨ Feature, 💡 Why it matters, 🙏 Thanks...).&lt;/li&gt;
&lt;li&gt;Possibly also prepare a condensed version for X (Twitter) if requested, or any additional subtasks inferred.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Eigent actually &lt;strong&gt;displays the subtask breakdown&lt;/strong&gt; in the interface, so you can see the agent's thought process. It might list steps it's taking, which makes it transparent and debug-friendly. For example, the agent may explicitly show a step to retrieve PR data and then a step to filter them by impact. This showcases Eigent's dynamic task planning: &lt;em&gt;"Eigent dynamically breaks down tasks and activates multiple agents to work in parallel, automating complex tasks much faster than traditional single-agent workflows"&lt;/em&gt; &lt;a href="https://docs.eigent.ai/get_started/welcome#:~:text=Eigent%20dynamically%20breaks%20down%20tasks,step%20scenarios%20with%20ease" rel="noopener noreferrer"&gt;Eigent Docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The GitHub agent (powered by the &lt;a href="https://github.com/github/github-mcp-server" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt;) fetching repository data. Here the agent executed a subtask to retrieve PR details via the GitHub API, returning JSON data almost instantly.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In our case, the first subtask is to call GitHub and get details of the latest 30 PRs. The agent, using the GitHub MCP, does this in seconds and obtains a JSON array of PR info (IDs, titles, authors, lines changed, etc.). Next, the agent evaluates which PRs have the largest impact. Another subtask might involve sorting or filtering the list by those metrics. Once the top 5 PRs are identified, the agent generates the summary for each.&lt;/p&gt;

&lt;p&gt;Finally, the agent produces the &lt;strong&gt;output&lt;/strong&gt;: a neatly formatted set of release-ready updates for the top 5 PRs. The result is typically presented in the chat as Markdown text (since we asked for a release update format). Each update might look like:&lt;/p&gt;

&lt;p&gt;✨ &lt;strong&gt;Feature:&lt;/strong&gt; Added comprehensive model table and requirements badges to docs&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provides quick, up-to-date model info right in the documentation&lt;/li&gt;
&lt;li&gt;Helps users assess at a glance what's available and what's required&lt;/li&gt;
&lt;li&gt;Elevates project transparency and onboarding experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🙏 Thanks @wendongfan for this integration&lt;/p&gt;

&lt;p&gt;PR link: &lt;a href="https://github.com/camel-ai/camel/pull/1341" rel="noopener noreferrer"&gt;https://github.com/camel-ai/camel/pull/1343&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(The above are illustrative examples.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You would see five such entries corresponding to the top PRs. The agent might also provide a shorter "X-posting" version (e.g. a tweet-worthy one-liner) if that was part of the prompt. The outcome is that you have, in a few moments, a draft of changelog/release notes highlights, complete with acknowledgments to contributors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Empowering OSS Workflows with Agentic Automation
&lt;/h3&gt;

&lt;p&gt;In this tutorial, we configured Eigent to automate an open-source maintenance task—summarizing GitHub pull requests—using an AI agent. We introduced a custom &lt;strong&gt;&lt;a href="https://github.com/github/github-mcp-server" rel="noopener noreferrer"&gt;GitHub MCP server&lt;/a&gt;&lt;/strong&gt; into Eigent, created a dedicated worker, and successfully generated release note snippets from live repository data. The process demonstrates the power of &lt;strong&gt;agentic automation for OSS contributors&lt;/strong&gt;: instead of manually combing through PRs, maintainers can rely on AI agents to do the heavy lifting. By leveraging Eigent's &lt;strong&gt;MCP integration&lt;/strong&gt; and multi-agent coordination, even complex workflows (like triaging dozens of PRs) can be handled efficiently by AI, freeing you to focus on higher-level decisions.&lt;/p&gt;

&lt;p&gt;Eigent makes it approachable for both developers and non-developers to harness multi-agent AI. With a few simple steps, you can &lt;strong&gt;configure MCP for open-source workflows&lt;/strong&gt; and let your personalized AI workforce assist you. This was just one example—&lt;strong&gt;Eigent&lt;/strong&gt; can be tailored to many scenarios, from writing summaries and managing issues to testing code or updating documentation. As the platform evolves, the possibilities for GitHub automation with AI agents will only grow.&lt;/p&gt;

&lt;p&gt;Give Eigent a try in your own projects, and enjoy the productivity boost of having an AI-powered team on your side! The future of open-source collaboration might just be a mix of human passion and tireless AI assistants working together. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy automating!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agentaichallenge</category>
      <category>powerfuldevs</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The New Era of Automation: How OWL, CRAB, and MCP Are Bridging the Last Mile</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Mon, 14 Apr 2025 20:34:23 +0000</pubDate>
      <link>https://forem.com/camelai/the-new-era-of-automation-how-owl-crab-and-mcp-are-bridging-the-last-mile-231a</link>
      <guid>https://forem.com/camelai/the-new-era-of-automation-how-owl-crab-and-mcp-are-bridging-the-last-mile-231a</guid>
      <description>&lt;p&gt;The field of autonomous agents is experiencing a renaissance. These AI systems—designed to reason, interact with tools, and complete complex tasks—are making rapid and tangible progress. From cutting-edge research frameworks to powerful platforms enabling agents to manage incredibly intricate workflows. These systems are no longer just promising demos, they’re beginning to reshape how we think about digital labor and automation.&lt;/p&gt;

&lt;p&gt;A key enabler of this progress is the &lt;strong&gt;Model Context Protocol&lt;/strong&gt; (MCP), introduced by &lt;strong&gt;Anthropic&lt;/strong&gt;. MCP serves as a new standard for connecting AI assistants to the systems where data lives—including content repositories, business tools, and development environments. It has quickly gained traction, especially with Cursor and Windsurf's integration. OpenAI recently announced their support for MCP in their agent SDK, marking a significant step for the ecosystem. We have also integrated it into the CAMEL framework to embrace the MCP ecosystem.&lt;/p&gt;

&lt;p&gt;Despite these advancements, agents still face a fundamental limitation: they &lt;strong&gt;struggle with long-term decision-making and adaptation&lt;/strong&gt;. While they can execute well-scoped tasks, they falter on multi-step objectives that require learning, revising plans, or reacting to change. Current agents follow instructions but don’t truly evolve through experience.&lt;/p&gt;

&lt;p&gt;This gap stems from the static nature of internet training data. Language models learn from passive text, not from interaction. To gain real autonomy, agents must operate and evolve within &lt;strong&gt;environments&lt;/strong&gt;—digital or physical spaces where they can &lt;strong&gt;perceive, act, and learn from experience.&lt;/strong&gt; Only through this feedback loop can agents begin to improve through trial and error.&lt;/p&gt;

&lt;p&gt;To address this “last mile” challenge in agent automation, we introduce &lt;strong&gt;OWL&lt;/strong&gt; and &lt;strong&gt;CRAB&lt;/strong&gt;, two agent automations projects and &lt;strong&gt;MCP&lt;/strong&gt; integration that are designed specifically for interactive environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  OWL: Optimized Workforce Learning
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/camel-ai/owl" rel="noopener noreferrer"&gt;OWL (Optimized Workforce Learning)&lt;/a&gt;, built on top of the CAMEL-AI Framework, is our recently released project for real-world task automation. OWL has shown promise in task automation, achieving an impressive average score of 58.18 on the GAIA benchmark—ranking #1 among open-source submissions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff34y6lykuw7dpvprr6y5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff34y6lykuw7dpvprr6y5.png" alt="Image description" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camel-ai.github.io/camel_asset/owl_gemini%202.5.mp4" rel="noopener noreferrer"&gt;Watch the video&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How OWL Works
&lt;/h2&gt;

&lt;p&gt;OWL is a multi-agent system for automating digital tasks through the use of a browser, terminal, code execution, function calls, and MCP tools. The project has integrated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Browser Automation:&lt;/strong&gt; Sophisticated browser interaction capabilities using the Playwright framework, allowing for scrolling, clicking, input handling, downloading, navigation, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Online Search Capabilities:&lt;/strong&gt; Support for multiple search engines (including Google, DuckDuckGo, Baidu, Bocha, Wikipedia) enabling real-time information retrieval and knowledge acquisition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Execution:&lt;/strong&gt; Ability to write and execute Python code using an interpreter, enabling programmatic solutions to complex problems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Document Parsing:&lt;/strong&gt; Advanced extraction of content from various document formats (Word, Excel, PDF, PowerPoint), with conversion to text or Markdown format.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multimodal Processing:&lt;/strong&gt; Robust handling of internet or local videos, images, and audio data through specialized toolkits (ImageAnalysisToolkit, VideoAnalysisToolkit, AudioAnalysisToolkit).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensive Toolkit Integration:&lt;/strong&gt; Access to a comprehensive set of built-in toolkits including ArxivToolkit, GitHubToolkit, GoogleMapsToolkit, and many more specialized tools built in the CAMEL framework.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core of OWL’s functionality is built on the CAMEL framework’s RolePlaying module, which creates unique initial settings for different agents through predefined prompts. This system primarily utilizes two main agents:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. UserAgent:&lt;/strong&gt; Responsible for breaking down tasks and providing instructions&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. AssistantAgent:&lt;/strong&gt; Executes instructions using various pre-configured tools or tool agents&lt;/p&gt;

&lt;p&gt;This architecture enables OWL to handle complex workflows through dynamic agent interactions, making it particularly effective for task automation across diverse domains.&lt;/p&gt;

&lt;p&gt;Furthermore, OWL employs a multi-agent system with context isolation for handling long-horizon tasks. Specialized sub-agents maintain isolated context windows for their domain (e.g., WebAgent keeps browser interaction history separate from main agent context).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41nxnwfj755cfx10v8u0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41nxnwfj755cfx10v8u0.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  OWL with MCP Integration
&lt;/h2&gt;

&lt;p&gt;MCP has emerged as the “USB interface” of the LLM field, becoming a universal solution for addressing AI information silos, with its ecosystem growing daily. OWL supports the MCP protocol to call MCP servers within its ecosystem, achieving more standardized and efficient tool invocation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl9kwbrxb9khfnesqwdj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl9kwbrxb9khfnesqwdj9.png" alt="Image description" width="800" height="557"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Here’s a step-by-step guide to implementing MCP with OWL:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Setting Up MCP Servers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, install the required MCP servers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Install MCP Playwright Server
npm install -g @executeautomation/playwright-mcp-server
npx playwright install-deps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Configure MCP Servers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a configuration file named &lt;code&gt;mcp_servers_config.json&lt;/code&gt; with the following structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@executeautomation/playwright-mcp-server"]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Implementation in OWL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here’s how to integrate OWL with MCP in your code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import asyncio
import sys

from camel.models import ModelFactory
from camel.toolkits import MCPToolkit
from camel.types import ModelPlatformType, ModelType
from camel.societies import RolePlaying
from camel.logger import set_log_level

from owl.utils.enhanced_role_playing import arun_society

set_log_level(level="DEBUG")

async def main():
    # Initialize MCP toolkit and connect
    mcp_toolkit = MCPToolkit(config_path="mcp_servers_config.json")

    try:
        await mcp_toolkit.connect()

        # Get task from command line or use default
        task = sys.argv[1] if len(sys.argv) &amp;gt; 1 else (
            "Using a web browser, search Google Scholar for Andrew Ng's academic profile. Create a comprehensive report that includes: (1) his main research directions in AI and machine learning, (2) at least five of his most influential published papers with citation counts, (3) his affiliated institutions throughout his career, and (4) a summary of his impact on the field."
        )

        # Setup model
        model = ModelFactory.create(
            model_platform=ModelPlatformType.OPENAI,
            model_type=ModelType.GPT_4O,
        )

        # Create and run society
        society = RolePlaying(
            task_prompt=task,
            user_role_name="user",
            user_agent_kwargs={"model": model},
            assistant_role_name="assistant",
            assistant_agent_kwargs={
                "model": model,
                "tools": mcp_toolkit.get_tools(),
            },
        )

        answer, chat_history, token_count = await arun_society(society)
        print(f"\033[94mAnswer: {answer}\033[0m")

    finally:
        try:
            await mcp_toolkit.disconnect()
        except Exception:
            print("Disconnect failed")


if __name__ == "__main__":
    asyncio.run(main())
‍
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example Use Case
&lt;/h3&gt;

&lt;p&gt;Consider this task: “Using a web browser, search Google Scholar for Andrew Ng's academic profile. Create a comprehensive report that includes: (1) his main research directions in AI and machine learning, (2) at least five of his most influential published papers with citation counts, (3) his affiliated institutions throughout his career, and (4) a summary of his impact on the field.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The OWL framework with MCP can handle this by:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Utilizing autonomous agents to decompose and tackle different aspects of the task&lt;/li&gt;
&lt;li&gt;Leveraging the Playwright MCP Server to navigate academic websites and extract paper information&lt;/li&gt;
&lt;li&gt;Coordinating the agents through OWL’s role-playing mechanisms to complete the task&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Benefits of OWL + MCP Integration
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Standardized Tool Access:&lt;/strong&gt; MCP offers a unified interface for interacting with tools and data sources.&lt;br&gt;
&lt;strong&gt;2. Ecosystem Expansion:&lt;/strong&gt; New MCP servers can be seamlessly integrated to enhance OWL’s capabilities.&lt;br&gt;
&lt;strong&gt;3. Security:&lt;/strong&gt; MCP’s architecture safeguards sensitive data through its robust design.&lt;br&gt;
&lt;strong&gt;4. Flexibility:&lt;/strong&gt; Users can easily switch between any AI models that support the MCP standard.&lt;br&gt;
&lt;strong&gt;5. Efficiency:&lt;/strong&gt; Development time for complex multi-agent systems is significantly reduced.&lt;br&gt;
‍&lt;/p&gt;

&lt;h2&gt;
  
  
  OWL’s Future Directions
&lt;/h2&gt;

&lt;p&gt;OWL’s development roadmap focuses on enhancing its capabilities in several key areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Expanding Tool Integration:&lt;/strong&gt; Incorporating more specialized toolkits to address domain-specific challenges&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improving Multi-Agent Coordination with RL:&lt;/strong&gt; Incorporating environmental feedback to train the multi-agent systems with reinforcement learning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strengthening Reasoning Capabilities:&lt;/strong&gt; Developing more sophisticated planning and decision-making mechanisms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Broadening Environment Compatibility:&lt;/strong&gt; Ensuring seamless operation across different computing environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The recent integration of MCPToolkit, FileWriteToolkit, and TerminalToolkit represents significant progress toward these goals, enhancing OWL agents with MCP tool calling, file writing capabilities, and terminal command execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  CRAB: Cross-environment Agent Benchmark
&lt;/h2&gt;

&lt;p&gt;CRAB stands for &lt;strong&gt;CR&lt;/strong&gt;oss-environment &lt;strong&gt;A&lt;/strong&gt;gent &lt;strong&gt;B&lt;/strong&gt;enchmark, is the first agent framework that supports cross-device task execution. This project aims to build a benchmark that enables agents to perform tasks across multiple environments. For instance, within the CRAB framework, an agent can read a message on a smartphone and then operate a PC based on the message content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://crab.camel-ai.org/static/videos/demo3_calendar_to_vim.mp4" rel="noopener noreferrer"&gt;Crab Demo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is an “Environment” in CRAB?
&lt;/h2&gt;

&lt;p&gt;The term &lt;em&gt;environment&lt;/em&gt; is crucial in CRAB. In the example above, there are two environments: an Ubuntu PC and an Android smartphone. In fact, an environment can be any device, application, or even a more complex multi-device system—as long as it has a well-defined action space and observation space.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Cross-Environment Matters
&lt;/h2&gt;

&lt;p&gt;Cross-environment capability is a crucial consideration in our framework, enabling agents to interact simultaneously with multiple devices or applications. This involves coordinating across environments, leveraging information between them, and passing messages. Much like humans who naturally navigate diverse environments—each with different action/observation spaces and logic, to solve complex problems, this capability is vital. However, it stands in contrast to most existing agent benchmarks, which are typically limited to interactions within a single device or application.&lt;/p&gt;

&lt;p&gt;CRAB introduces the first cross-environment agent benchmark, &lt;strong&gt;CRAB Benchmark v0&lt;/strong&gt;, which includes 120 tasks spanning more than 20 applications on Ubuntu desktops and Android smartphones. We believe that scaling agent environments is a key step toward building capable and practical agents.&lt;/p&gt;

&lt;p&gt;The cross-environment capability unlocks tremendous potential for real-world applications. One exciting possibility is applying CRAB to IoT scenarios—imagine controlling all your devices through a single intelligent agent assistant. In industries such as networking and cloud computing, managing a large number of heterogeneous devices is a constant challenge. Our cross-environment paradigm offers a promising path forward in these domains.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0wu12mljzss9hwm4gnv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0wu12mljzss9hwm4gnv.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next: CRAB’s Updating Directions
&lt;/h2&gt;

&lt;p&gt;We are actively improving CRAB and planning several key upgrades in the upcoming version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Usability&lt;/strong&gt;: Simplifying configuration and improving code readability. Introducing MCP (Model Connector Protocol) for seamless integration with any model or framework.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensibility&lt;/strong&gt;: Adopting a modular design that makes it easy to add new environments or virtual device implementations. We’ll also introduce a plugin system to support easy customization of existing modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Robustness&lt;/strong&gt;: Our current VM implementations rely on QEMU/KVM and the Google Android Emulator, which are not very stable and Linux-dependent. We plan to switch to more stable and convenient alternatives like Docker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation&lt;/strong&gt;: Reducing the amount of manual labor needed to conduct experiments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’ll be integrating more components into our official &lt;a href="https://github.com/camel-ai/crab" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Popular Benchmarks: OSWorld, WebArena, and more&lt;/li&gt;
&lt;li&gt;New Environments: Windows, macOS, iOS, web browsers, specific applications, OpenAI Gymnasium, etc.&lt;/li&gt;
&lt;li&gt;Visual Prompt Tools: OmniParser, Ferret-UI, Grounding DINO, etc.&lt;/li&gt;
&lt;li&gt;Advanced GUI models: OpenAI Operator, Claude Computer Using, etc.&lt;/li&gt;
&lt;li&gt;Multi-Agent Systems: Frameworks like CAMEL and OWL, protocols like MCP&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  OWL + CRAB: A Unified Agent Operating System
&lt;/h2&gt;

&lt;p&gt;The integration of OWL and CRAB creates a potent ecosystem for developing, testing, and scaling agents.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;OWL can execute complex, multi-step digital tasks using its sophisticated reasoning and toolkits within a defined environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CRAB can provide and manage the diverse, interconnected environments (like PCs, smartphones, specific apps) where these tasks unfold, enabling agents to operate across previously siloed systems.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Complementary Capabilities&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;OWL&lt;/strong&gt; and &lt;strong&gt;CRAB&lt;/strong&gt; complement each other in several important ways:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Development and Evaluation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OWL provides the framework for building sophisticated multi-agent systems.&lt;/li&gt;
&lt;li&gt;CRAB offers standardized methods for evaluating their performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Task Automation and Environment Adaptation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OWL is good at automating complex tasks.&lt;/li&gt;
&lt;li&gt;CRAB ensures these capabilities work consistently across different environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Tool Integration and Benchmark Standardization&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OWL’s extensive toolkit integration is balanced by CRAB’s rigorous benchmarking approach&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data Generation Potential
&lt;/h3&gt;

&lt;p&gt;Combining these projects enables the generation of high-quality training data. Once established, the environments can be used to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create Diverse Scenarios:&lt;/strong&gt; Generate a wide range of task scenarios across different environments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Capture Agent Interactions:&lt;/strong&gt; Record how agents navigate these scenarios, including both successful and unsuccessful approaches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Develop Improvement Metrics:&lt;/strong&gt; Analyze interaction data to uncover patterns and strategies that correlate with better performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Train New Agent Models:&lt;/strong&gt; Use the synthetic data and identified success signatures to guide the training process through RLHF, targeted fine-tuning, and supervised learning.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This data generation capability creates a &lt;strong&gt;virtuous cycle&lt;/strong&gt; where agent performance continuously improves through iterative testing and refinement.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Critical Role of Environment in Agent Scaling
&lt;/h2&gt;

&lt;p&gt;CAMEL-AI has identified environment as one of the three key dimensions in the scaling laws of agents—alongside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the number of agents&lt;/li&gt;
&lt;li&gt;memory capabilities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This highlights how crucial &lt;strong&gt;environment design&lt;/strong&gt; is to advancing agent technology.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Environments Matter for Agent Scaling
&lt;/h3&gt;

&lt;p&gt;Environments provide the context in which agents operate and learn. They define:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Action Space: What agents can do and how they interact with the world&lt;/li&gt;
&lt;li&gt;The Observation Space: What information agents can perceive&lt;/li&gt;
&lt;li&gt;The Reward Structure: How agent behaviors are reinforced&lt;/li&gt;
&lt;li&gt;The Task Complexity: The range of challenges agents must overcome&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As environments become more diverse and complex, they drive the development of more sophisticated agent capabilities. This creates a &lt;strong&gt;scaling effect&lt;/strong&gt;—better environments lead to better agents, which in turn can handle more complex environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cross-Environment Challenges
&lt;/h3&gt;

&lt;p&gt;The ability to operate across different environments represents a significant leap in agent capabilities. It requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Abstraction Skills: Understanding common principles that apply across environments&lt;/li&gt;
&lt;li&gt;Adaptation Mechanisms: Adjusting strategies based on environment-specific constraints&lt;/li&gt;
&lt;li&gt;Transfer Learning: Applying knowledge gained in one environment to another&lt;/li&gt;
&lt;li&gt;Meta-Learning: Learning how to learn in new environments quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CRAB’s focus on &lt;strong&gt;cross-environment benchmarking&lt;/strong&gt; directly addresses these challenges, providing a structured way to measure and improve these critical capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Environment-Driven Intelligence
&lt;/h3&gt;

&lt;p&gt;CAMEL-AI’s hypothesis on the &lt;strong&gt;scaling laws of agents&lt;/strong&gt; emphasizes that &lt;strong&gt;intelligence emerges from the interplay between agents and their environments.&lt;/strong&gt; This aligns with Marvin Minsky’s Society of Mind concept—suggesting that intelligence is not monolithic, but emerges from diverse interactions. Environments serve as crucial testing grounds, stretching and refining agent capabilities. By developing increasingly complex environments, we drive the creation of more sophisticated agents—mirroring how &lt;strong&gt;human intelligence&lt;/strong&gt; evolved through natural and social interactions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Directions in Environment Design
&lt;/h2&gt;

&lt;p&gt;As agent technology advances, environment design will likely focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increased Realism: Mimicking real-world complexity&lt;/li&gt;
&lt;li&gt;Dynamic Adaptation: Evolving in response to agent capabilities&lt;/li&gt;
&lt;li&gt;Multi-Agent Ecosystems: Encouraging rich agent-to-agent interactions&lt;/li&gt;
&lt;li&gt;Cross-Modal Integration: Combining sensory and interaction modalities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The combination of OWL's advanced agent capabilities and CRAB's rigorous environment specifications offers an ideal platform for exploring these frontiers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The integration of &lt;strong&gt;OWL, CRAB,&lt;/strong&gt; and &lt;strong&gt;MCP&lt;/strong&gt; represents a significant step forward in solving the &lt;em&gt;“last mile”&lt;/em&gt; challenge of agent automation.&lt;/p&gt;

&lt;p&gt;By creating environments where agents can learn from experience, operate across platforms, and leverage standardized tool interfaces, we’re building the foundation for truly autonomous systems. As these projects continue to evolve, they promise to unlock new possibilities for AI agents—from more effective task automation to cross-environment coordination and continuous improvement through interaction. &lt;strong&gt;The future of agent technology lies not just in better models, but in better environments&lt;/strong&gt;—environments that allow those models to learn, adapt, and grow through experience.&lt;/p&gt;

&lt;p&gt;‍Join us in exploring this frontier of AI research and development—where the boundaries between environments dissolve, and agents gain the power to navigate our complex digital world with increasing autonomy and effectiveness. &lt;strong&gt;Ready to join? Click the &lt;a href="https://www.camel-ai.org/collaboration-questionnaire" rel="noopener noreferrer"&gt;link&lt;/a&gt; or paste it into your browser to apply now.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The combination of OWL and CRAB provides an ideal platform for exploring these directions, with OWL's sophisticated agent capabilities complemented by CRAB's rigorous environment specifications.&lt;/p&gt;

&lt;p&gt;OWL GitHub: &lt;a href="https://github.com/camel-ai/owl" rel="noopener noreferrer"&gt;https://github.com/camel-ai/owl&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CRAB GitHub: &lt;a href="https://github.com/camel-ai/crab" rel="noopener noreferrer"&gt;https://github.com/camel-ai/crab&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🐉 Loong: Synthesize Long CoTs at Scale through Verifiers</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Wed, 09 Apr 2025 18:07:51 +0000</pubDate>
      <link>https://forem.com/camelai/loong-synthesize-long-cots-at-scale-through-verifiers-27b4</link>
      <guid>https://forem.com/camelai/loong-synthesize-long-cots-at-scale-through-verifiers-27b4</guid>
      <description>&lt;p&gt;Recent Large Reasoning Models such as DeepSeek-R1 have demonstrated that general reasoning capabilities of LLMs greatly improve when base models undergo post-training with Reinforcement Learning (RL) with a verifiable reward. Mathematics and programming have particularly benefited from this approach, as these domains can be verified quite easily—allowing accurate interpretation of LLM responses and effective comparison to the ground truth on a semantic level. This idea that ease of verification is crucial to improving domain-specific capabilities has become widely accepted in the research community.&lt;/p&gt;

&lt;p&gt;Another critical prerequisite which is often overlooked is the abundance of &lt;strong&gt;high-quality datasets&lt;/strong&gt;, featuring questions paired with verified correct answers in the domains of Math and Coding. These curated datasets provided the necessary signal for models to learn to construct coherent &lt;strong&gt;Chains-of-Thought&lt;/strong&gt; (CoTs) leading reliably to correct answers.&lt;/p&gt;

&lt;p&gt;However, many other domains also require reliable reasoning—such as logic, graph theory, physics, and finance. These domains lack comparable datasets, and human-supervised data production at scale is prohibitively expensive. Without abundant correct answers to learn from, models cannot easily acquire domain-specific reasoning patterns. This raises a crucial question:  &lt;em&gt;Can similar reasoning performance be achieved in domains beyond math and programming?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this blog, we introduce Project &lt;strong&gt;Loong&lt;/strong&gt; - focusing on scaling up &lt;strong&gt;synthetic data generation&lt;/strong&gt; with &lt;strong&gt;verifiers&lt;/strong&gt; for a &lt;strong&gt;broad range&lt;/strong&gt; of domains. We believe that &lt;strong&gt;synthetic data generation&lt;/strong&gt; is essential—not only for addressing gaps in data-scarce domains, but also for enhancing reasoning capabilities in areas like math and programming by expanding dataset availability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing the Verification Gap in Synthetic Data for RL
&lt;/h2&gt;

&lt;p&gt;Naturally, a natural gap exists between synthetic questions and their answers, as the correctness of synthetic answers isn't inherently guaranteed. To close this gap entirely, one would need human supervision which is prohibitively expensive. We try to close this gap as much as possible without involving a human in the loop.&lt;/p&gt;

&lt;p&gt;To do this, we developed a multi-agent system that generates synthetic questions and corresponding answers from a seed dataset. These synthetic questions are then posed to the agent we want to train, and we employ various domain-specific verifiers to compare the agent's responses against the synthetic answers to check for semantic equivalence.&lt;/p&gt;

&lt;p&gt;One of our main ideas is grounded in a simple hypothesis: an LLM equipped with a code interpreter can solve questions significantly more reliably compared to one relying solely on its own chain-of-thought reasoning in natural language.&lt;/p&gt;

&lt;p&gt;This makes intuitive sense, as many fields beyond computer science—such as physics, neurophysiology, economics, and computational biology—frequently rely on code-based solutions to solve problems in their own domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Loong Environment
&lt;/h2&gt;

&lt;p&gt;Since we are mostly interested in doing RL, we have structured all components into a unified Gym-like &lt;strong&gt;environment&lt;/strong&gt;, providing a clear interface for RL experimentation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hec7m1u449xnutfwbqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hec7m1u449xnutfwbqw.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our environments compromises three main components:&lt;/p&gt;

&lt;h3&gt;
  
  
  Seed Dataset
&lt;/h3&gt;

&lt;p&gt;We begin by manually collecting domain-specific datasets consisting of questions and ground truth answers. Each question in the seed dataset is ensured to be solvable using code. If available, we also record the code that leads to the ground truth. The purpose of the seed dataset is not to be a large -scale dataset to use directly for training, but as a means to bootstrap the synthetic data generation process by seeding the generative process of the LLM.&lt;/p&gt;

&lt;p&gt;Dataset Overview&lt;/p&gt;

&lt;p&gt;The repository currently includes a total of &lt;strong&gt;3,551 questions&lt;/strong&gt; spanning &lt;strong&gt;8 diverse domains&lt;/strong&gt; (and growing):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Math:&lt;/strong&gt; 1,615 questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Physics:&lt;/strong&gt; 434 questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computational Biology:&lt;/strong&gt; 304 questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finance:&lt;/strong&gt; 320 questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph &amp;amp; Discrete Math:&lt;/strong&gt; 179 questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logic:&lt;/strong&gt; 110 questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mathematical Programming:&lt;/strong&gt; 68 questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security &amp;amp; Safety:&lt;/strong&gt; 521 questions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Synthetic Data Generator
&lt;/h3&gt;

&lt;p&gt;Our Synthetic Data Generator can be seen as a blackbox, that is seeded by a seed dataset, and generates an arbitrary number of synthetic questions and synthetic answers to those questions based on the seed dataset. The environment makes no further assumptions about the inner workings of the generator. This means that any algorithm can be used under the hood for creating synthetic data. We currently support few-shot prompting over the seed data, as well as a mutli-agent system, where we use &lt;a href="https://arxiv.org/abs/2212.10560" rel="noopener noreferrer"&gt;self-instruct&lt;/a&gt;, &lt;a href="https://arxiv.org/abs/2304.12244" rel="noopener noreferrer"&gt;evol-instruct&lt;/a&gt; or &lt;a href="https://github.com/camel-ai/camel/tree/master/camel/datagen" rel="noopener noreferrer"&gt;other data generation pipelines&lt;/a&gt; for generating questions and a solver agent for the synthetic answers.&lt;/p&gt;

&lt;p&gt;It is important to stress, that we do not expect these synthetic answers to always be correct. While we assume that we will obtain more correct solutions than with a naive CoT due to the code execution providing accurate computations, we are well aware that a lot of synthetic answers will still be wrong.&lt;/p&gt;

&lt;p&gt;However, this is not a problem since we don’t learn from this raw synthetic data. We will further filter it in the next step and only learn from this filtered synthetic data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verifier
&lt;/h3&gt;

&lt;p&gt;While the Synthetic Data Generator produces ample synthetic data, it's essential to filter out incorrect solutions before using them for training. To do this effectively, we validate synthetic answers using two independent approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Deriving one solution directly through the Synthetic Data Generator’s code execution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Independently generating another solution via natural-language Chain-of-Thought (CoT) reasoning.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If these independent solutions agree, it's highly likely that the answer is correct. Although rare, there's still a possibility of false positives (both approaches incorrectly agreeing). However, given the fundamentally different methods involved, we believe this will not occur often enough to be detrimental to model training.&lt;/p&gt;

&lt;p&gt;Each environment also includes a &lt;strong&gt;verifier&lt;/strong&gt; that semantically compares the LLM response with the synthetic answer, ensuring they are effectively equivalent. This verification step is crucial for accurately filtering semantic equivalences, significantly reducing false negatives (cases where semantically correct answers would otherwise be wrongly rejected).&lt;/p&gt;

&lt;p&gt;The CoT-generating agent is the model we ultimately aim to train. During RL training, this agent receives positive rewards only when its final CoT-generated answer is semantically confirmed by the verifier to match the synthetic answer, thus ensuring it learns exclusively from likely-correct synthetic data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A code snippet to get started with the Loong Environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The code snippet below shows a simplified version of how to use the Loong environment. Implementation details that are not conducive to improving the understanding on a cursory level have been omitted. For a detailed explanation on how to use the single step environment, please refer to this &lt;a href="https://github.com/camel-ai/loong/blob/main/cookbooks/env_with_generator.ipynb" rel="noopener noreferrer"&gt;cookbook.&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from camel.environments import SingleStepEnv
from camel.datasets import FewShotGenerator, StaticDataset
from camel.verifiers import PythonVerifier
from camel.agents import ChatAgent
from datasets import load_dataset

# Load and initialize a seed dataset
dataset = load_dataset("camel-ai/loong", split="graph_discrete_math")
seed_dataset = StaticDataset(dataset)

# Set up the verifier
verifier = PythonVerifier(required_packages=["numpy", "networkx"])

# Define a model backend to use for the generator
model = ...

# Set up synthetic data generation
generator = FewShotGenerator(seed_dataset=seed_dataset, verifier=verifier, model=model)

# Initialize the Loong environment
env = SingleStepEnv(generator, verifier)

# Define the agent that shall interact with the environment
agent = ChatAgent()

# Example environment interaction
obs = await env.reset()
agent_response = agent.step(obs.question)  # a step for the agent
next_obs, reward, done, info = await env.step(agent_response)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Contribute to Project Loong 🐉
&lt;/h2&gt;

&lt;p&gt;Researchers and developers can use the Loong environment to generate synthetic data across a variety of domains. We have already collected seed datasets for a few domains, including Mathematics, Graph Theory, Mathematical Programming and Logic. The seed data, as well as cookbooks can be found on &lt;a href="https://github.com/camel-ai/loong" rel="noopener noreferrer"&gt;Github&lt;/a&gt;. Additionally, we encourage you to collect your own seed datasets and leverage Loong to generate synthetic data for your domain.We have have unified and uploaded all the seed dataset we collected to HuggingFace:&lt;a href="https://huggingface.co/datasets/camel-ai/loong" rel="noopener noreferrer"&gt;check here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, we encourage you to collect your own seed datasets and leverage Loong to generate synthetic data for your domain.&lt;/p&gt;

&lt;p&gt;We are currently working on using the environment that we built to do post-training on top of LLMs of different sizes to see whether we can see an improvement in the general as well as domain-specific reasoning capabilities. We are still experimenting with different reward setups, focusing mainly on accuracy rewards, following the approach of DeepSeek. More details, as well as our results will be released in our upcoming preprint paper.&lt;/p&gt;

&lt;p&gt;At CAMEL, we believe that environments are a vital component for improving domain-specific agent reasoning. If a problem can be framed clearly within an environment, agents have the potential to master it autonomously.&lt;/p&gt;

&lt;p&gt;With Loong, we aim to address a key challenge in synthetic data generation: &lt;strong&gt;ensuring data quality through verifiability.&lt;/strong&gt; Our goal with Loong is to make it easier to build reliable reasoning datasets in domains where curated data is scarce.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We invite researchers and developers to contribute seed datasets, verifiers, and ideas to help improve and extend our project. &lt;em&gt;Ready to join? Click the &lt;a href="https://www.camel-ai.org/collaboration-questionnaire" rel="noopener noreferrer"&gt;link&lt;/a&gt; or paste it into your browser to apply now.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Scaling Environments for Agents</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Mon, 07 Apr 2025 12:13:04 +0000</pubDate>
      <link>https://forem.com/camelai/scaling-environments-for-agents-h0h</link>
      <guid>https://forem.com/camelai/scaling-environments-for-agents-h0h</guid>
      <description>&lt;p&gt;At &lt;a href="//CAMEL-AI.org"&gt;CAMEL-AI.org&lt;/a&gt;, we are committed to pushing the boundaries of artificial intelligence through multi-agent systems. This blog post restates our mission, discusses current limitations and trends of AI agents, and outlines our initiative to build environments for the data-driven future of AI agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.camel-ai.org/launchweek-environments#Initiative" rel="noopener noreferrer"&gt;Mission: Finding the Scaling Laws of Agents&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzk0tjscao7bw1hasmrz2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzk0tjscao7bw1hasmrz2.jpg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our mission has always been clear and unwavering: to uncover the scaling laws of agents and build the foundational infrastructure for multi-agent systems that can drive the future of artificial intelligence. From the beginning, we have been committed to exploring how agents scale in complexity, environments, and evolution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dimensions of Scaling Laws of Agents
&lt;/h3&gt;

&lt;p&gt;We focus on three key dimensions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Number of Agents:&lt;/strong&gt; How do agents behave when scaled to large numbers? What emergent abilities arise from their interactions? We aim to study these phenomena and uncover patterns that reveal new capabilities as agent systems grow in scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Environments:&lt;/strong&gt; How do we create environments designed to enable agents to learn complex reasoning, long-term decision-making, adaptive behavior, and allow agents to acquire new knowledge or skills through interaction? Our focus is on developing environments that simulate real-world complexity while providing reward signals that effectively drive agent learning and evolution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Evolution:&lt;/strong&gt; How can agents evolve through interactions within their environment? We are building reinforcement learning environments and memory systems for agents to create agents that can generalize across tasks, adapt to new challenges, and continuously improve through experience.&lt;/p&gt;

&lt;p&gt;In this blog, we are focusing on the importance of scaling environments. Environments are not just containers for agent activity; they are essentially the missing data for agents that cannot be acquired simply by scraping the internet. Environments provide the dynamic, interactive contexts necessary for agents to learn adaptive behaviors and develop long-term decision-making capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Rise of End-to-End Reinforcement Learning for LLM Agents
&lt;/h2&gt;

&lt;p&gt;The initial approach to making AI agents functional relied heavily on prompt engineering by crafting specific instructions to guide LLM agents. This involved techniques like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Role-Based Prompts: Instructing agents to follow predefined roles or personas to simulate specific behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Few-Shot Prompting: Providing examples within prompts to teach agents how to use tools or perform complex reasoning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Output Formatting: Using tricks to ensure models generate structured outputs, such as JSON responses.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While these techniques are effective in prototyping agent systems, they come with significant limitations that hindered robustness, adaptability, and scalability. Prompt-based agents often fail when encountering complex or unforeseen scenarios. Their rigid behavior patterns make them ill-suited for tasks requiring dynamic decision-making. Prompts can unintentionally introduce biases or lead to hallucinated outputs, especially when interacting with tools or external components. Crafting effective prompts for increasingly complex tasks requires significant expertise, time, and trial-and-error, making it difficult to scale across diverse applications.&lt;/p&gt;

&lt;p&gt;These challenges underscore the need for a paradigm shift—moving away from reliance on pure prompt engineering toward end-to-end reinforcement learning for LLM agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Prompt Engineering to End-to-End Autonomy
&lt;/h2&gt;

&lt;p&gt;End-to-end RL for LLM agents has been considered a promising direction for addressing the shortcomings of prompt engineering. These agents are trained holistically on tasks, rather than relying on manually crafted prompts for every scenario.&lt;/p&gt;

&lt;p&gt;Recent advancements in RL for LLM agents have emerged from leading research labs and startups. Notable examples include OpenAI's Operator and Deep Research, xAI's Grok 3, and DeepSeek's R1. OpenAI's Operator combines GPT-4o's vision capabilities with reinforcement learning, allowing it to interpret screenshots and interact with GUIs effectively and perform web-based tasks such as ordering groceries, booking reservations, and creating memes without requiring custom API integrations. OpenAI's Deep Research leverages reinforcement learning to autonomously navigate complex browsing and reasoning tasks across diverse domains. Trained with end-to-end reinforcement learning, it plans and executes multi-step trajectories, backtracking and adapting to real-time information as necessary. xAI's Grok 3 trained on the Colossus supercluster with ten times the computational power of previous models, Grok 3 (Think) was trained using reinforcement learning to refine its chain-of-thought reasoning. It refines its problem-solving strategies by thinking for seconds to minutes, correcting errors, exploring alternatives, and delivering accurate answers across various tasks, including mathematics, coding, and world knowledge. DeepSeek's R1 series models utilize RL to develop advanced reasoning capabilities. Initially, DeepSeek-R1-Zero demonstrated that complex reasoning behaviors, such as extended chain-of-thought and self-correction, could emerge purely through RL without supervised fine-tuning. Building upon this foundation, DeepSeek-R1 incorporates a small "cold-start" dataset alongside iterative RL and supervised fine-tuning to enhance output coherence and user-friendliness while maintaining state-of-the-art reasoning performance.&lt;/p&gt;

&lt;p&gt;As the field continues to evolve, we foresee an increasing number of vertical agent startups incorporating reinforcement learning to train LLM agents to tackle specific industry challenges. For instance, a recent post from the Cursor team, creators of an AI-powered code editor, indicates that Cursor AI is working on building RL models in real-world coding environments to automate coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment is the Missing “Data” for Agents
&lt;/h2&gt;

&lt;p&gt;We are excited about the future of RL for LLM agents, as AI already matches human capabilities in many tasks. RL offers a promising path to achieving superhuman intelligence, and we may witness more "Lee Sedol moments," like AlphaGo’s historic victory, in the area of LLM agents across different domains. However, its full potential remains unrealized because the critical “data” for effective agent training is missing: realistic, standardized environments. While internet data may offer vast amounts of information, it lacks the interactive, adaptive, and diverse settings required for an agent to learn long-term decision-making through trial and error. Agents trained solely on static internet data struggle to understand temporal dynamics and complex cause-and-effect relationships in the real world.&lt;/p&gt;

&lt;p&gt;Equally challenging is the design of robust reward functions. Without carefully crafted reward signals, it becomes difficult to train agents to exhibit desired behaviors. Developing dedicated verifiers to assess LLM responses can be instrumental in defining reward functions that ensure reward signals remain reliable and aligned with long-term objectives.&lt;/p&gt;

&lt;p&gt;At &lt;a href="http://camel-ai.org/" rel="noopener noreferrer"&gt;CAMEL-AI.org&lt;/a&gt;, we believe that overcoming the challenges of reinforcement learning for LLM agents requires a community-driven approach. Our open-source framework is designed to facilitate global collaboration among researchers and developers, enabling the creation of scalable environments and robust reward mechanisms. Thanks to our contributors, we already have the foundational building blocks in place, including &lt;a href="https://github.com/camel-ai/camel/tree/master/camel/environments" rel="noopener noreferrer"&gt;environments&lt;/a&gt;, &lt;a href="https://github.com/camel-ai/camel/tree/master/camel/verifiers" rel="noopener noreferrer"&gt;verifiers&lt;/a&gt;, &lt;a href="https://github.com/camel-ai/camel/tree/master/camel/datagen" rel="noopener noreferrer"&gt;data generation pipelines&lt;/a&gt;, and &lt;a href="https://github.com/camel-ai/camel/tree/master/camel/toolkits" rel="noopener noreferrer"&gt;toolkits&lt;/a&gt; that are essential for further development.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fill out this &lt;a href="https://www.camel-ai.org/launchweek-environments" rel="noopener noreferrer"&gt;form&lt;/a&gt; and join us in shaping a future where reinforcement learning reaches its full potential&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://www.camel-ai.org/launchweek-environments#Initiative" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqtz9ylvzjv414o0q28uk.png" alt="Image description" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>tutorial</category>
      <category>openai</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>What’s Inside the Best Open-Source General AI Agent?</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Fri, 21 Mar 2025 08:47:58 +0000</pubDate>
      <link>https://forem.com/camelai/whats-inside-the-best-open-source-general-ai-agent-433f</link>
      <guid>https://forem.com/camelai/whats-inside-the-best-open-source-general-ai-agent-433f</guid>
      <description>&lt;p&gt;Last week felt like a wild for AI agents. If you’ve been following the space, you probably saw the buzz around &lt;a href="https://manus.im/" rel="noopener noreferrer"&gt;MANUS&lt;/a&gt;. Manus AI grabbed everyone’s attention. A general AI agent system (impressive, no doubt). But there was a catch: it wasn’t open-source, and you needed an invite just to try it out. Cool tech, but limited access.&lt;/p&gt;

&lt;p&gt;We wanted to change that.&lt;br&gt;
&lt;strong&gt;So we did.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We rolled out &lt;strong&gt;&lt;a href="https://github.com/camel-ai/owl" rel="noopener noreferrer"&gt;OWL&lt;/a&gt;&lt;/strong&gt;, an &lt;strong&gt;autonomous&lt;/strong&gt;, open-source general AI agent built on top of the CAMEL-AI framework. No paywalls.  100% open and ready to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And in just 5 days?&lt;/strong&gt;&lt;br&gt;
→ 11.2K+ GitHub stars&lt;br&gt;
→ Ranked #1 on GAIA among open source general agents&lt;br&gt;
→ A community that’s already building, testing, and scaling with it&lt;/p&gt;

&lt;p&gt;This is more than a project. OWL is** our answer to the need for accessible, scalable, and autonomous agent frameworks**. We’ve made some real advancements in pushing the boundaries of what autonomous AI agents can do, without the barriers of closed systems.&lt;/p&gt;

&lt;p&gt;Let’s take a closer look at why OWL is making waves and why it might be exactly what you’ve been looking for.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Modern, Modular Tech Stack
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqkojs1xv20bvsblw4bm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqkojs1xv20bvsblw4bm.png" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At CAMEL-AI, we’re all about making life easier for developers, AI researchers, and anyone exploring multi-agent systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With OWL, you get:&lt;/strong&gt;&lt;br&gt;
✅ Seamless multi-agent orchestration, thanks to the CAMEL-AI framework&lt;br&gt;
✅ Built-in Docker support for easy deployment—whether you’re on cloud or local&lt;br&gt;
✅ A clean, modular Python setup for flexibility and fast prototyping&lt;/p&gt;

&lt;p&gt;👉 Ready to try OWL? Jump straight to &lt;a href="https://github.com/camel-ai/owl" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or keep reading ↓&lt;/p&gt;

&lt;h2&gt;
  
  
  State-of-the-Art Model Support
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1hli61b5ldbo9eua3s17.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1hli61b5ldbo9eua3s17.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With OWL, you’re not tied to one model. We built it to be flexible, adaptable, and compatible with the best AI has to offer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud-based &amp;amp; Local Models&lt;/strong&gt;&lt;br&gt;
→ Supports &lt;a href="https://openai.com/index/hello-gpt-4o/" rel="noopener noreferrer"&gt;GPT-4o&lt;/a&gt;, &lt;a href="https://chat.qwen.ai/" rel="noopener noreferrer"&gt;Qwen&lt;/a&gt;, &lt;a href="https://mistral.ai/" rel="noopener noreferrer"&gt;Mistral&lt;/a&gt;, &lt;a href="https://claude.ai/" rel="noopener noreferrer"&gt;Claude 3.5 Sonnet&lt;/a&gt;, &lt;a href="https://www.deepseek.com/" rel="noopener noreferrer"&gt;DeepSeek&lt;/a&gt;, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run Locally (Privacy-First)&lt;/strong&gt;&lt;br&gt;
→ Use Ollama, vLLM, and SGLang for on-premises deployments—no cloud needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blazing-Fast Inference&lt;/strong&gt;&lt;br&gt;
→ Works with &lt;a href="https://groq.com/" rel="noopener noreferrer"&gt;Groq&lt;/a&gt; and &lt;a href="https://sambanova.ai/" rel="noopener noreferrer"&gt;SambaNova&lt;/a&gt; backends for lightning-fast performance.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://docs.camel-ai.org/key_modules/models.html" rel="noopener noreferrer"&gt;See Supported Models&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Toolkits That Does It All
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff72v4u0gckhx2npk23gs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff72v4u0gckhx2npk23gs.png" alt="Image description" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We built a full autonomous multi-agent system, packed with &lt;strong&gt;30+ toolkits&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-Time Search &amp;amp; Extraction&lt;/strong&gt;&lt;br&gt;
→ Pull data from Google, Wikipedia, and scrape at scale with Firecrawl.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multimodal Processing&lt;/strong&gt;&lt;br&gt;
→ Analyze images, videos, and audio files effortlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Browser Automation&lt;/strong&gt;&lt;br&gt;
→ Automate browser tasks using Playwright, Zapier, and Browseruse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Document Parsing &amp;amp; Code Execution&lt;/strong&gt;&lt;br&gt;
→ Handle Word, Excel, PDF files via Chunkr. Run Python code natively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP Integration&lt;/strong&gt;&lt;br&gt;
→ Built-in support for Anthropic’s Model Context Protocol (MCP) for seamless tool interoperability.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://docs.camel-ai.org/key_modules/tools.html#built-in-toolkits" rel="noopener noreferrer"&gt;See the Full Toolkit List&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why OWL Is Different (And Why It Matters)
&lt;/h2&gt;

&lt;p&gt;We’re not here to compete on hype. We’re here to offer a fully autonomous, open-source alternative that anyone can build with.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;100% Open-Source&lt;/strong&gt; → no fees, no invite codes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runs Locally or in the Cloud&lt;/strong&gt; → privacy &amp;amp; scalability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ranks #1 on GAIA Benchmark&lt;/strong&gt; → among open-source agent frameworks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backed by an Active Community&lt;/strong&gt; → join us on Discord, Reddit, and WeChat&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;They promised the future of AI agents, &lt;strong&gt;We open-sourced it.&lt;/strong&gt; 🦉&lt;/p&gt;

&lt;p&gt;It’s clear the AI community has been waiting for something like this that anyone can build on, without gatekeeping.&lt;/p&gt;

&lt;p&gt;OWL is just our first step, and we’re beyond excited to see what you create with it.&lt;/p&gt;

&lt;p&gt;👉 Try OWL today → &lt;a href="https://github.com/camel-ai/owl" rel="noopener noreferrer"&gt;GitHub Link&lt;/a&gt;&lt;br&gt;
👉 Join the community → CAMEL-AI Discord&lt;/p&gt;

&lt;p&gt;From everyone at CAMEL-AI, thank you for your amazing support.&lt;br&gt;
Let’s keep building the future of open-source AI, together! 🐫🦉🚀&lt;/p&gt;

&lt;p&gt;Massive thanks to our incredible community! Because of your support. Let’s keep building the future of open-source AI together!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>javascript</category>
      <category>python</category>
    </item>
    <item>
      <title>How Data Drives LLM Pretraining: Methods, Tips, and Best Practices</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Thu, 06 Mar 2025 07:21:41 +0000</pubDate>
      <link>https://forem.com/camelai/how-data-drives-llm-pretraining-methods-tips-and-best-practices-4pj</link>
      <guid>https://forem.com/camelai/how-data-drives-llm-pretraining-methods-tips-and-best-practices-4pj</guid>
      <description>&lt;h2&gt;
  
  
  How Data Fuels LLM Pretraining
&lt;/h2&gt;

&lt;p&gt;Data serves as the lifeblood of LLM pretraining, determining the extent of the model’s language understanding and its ability to generalize across tasks. The quality, diversity, and scale of the data directly influence the model’s performance. By processing billions of words from varied sources, LLMs learn to recognize patterns, interpret nuances, and adapt to different linguistic contexts.  &lt;/p&gt;

&lt;p&gt;Without rich and diverse data, the model’s capabilities are inherently limited, as it would struggle to generalize beyond the patterns seen during training.  &lt;/p&gt;

&lt;p&gt;For instance, a lack of diversity in data can lead to &lt;strong&gt;overfitting&lt;/strong&gt;, where the model excels in specific contexts but performs poorly in others.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Exploring Data Types for LLM Pretraining
&lt;/h2&gt;

&lt;p&gt;LLMs primarily rely on &lt;strong&gt;unstructured textual data&lt;/strong&gt;, such as books, articles, and online content. These sources offer a wide range of language styles and topics, making them ideal for building general-purpose models. Web scraping is a common method to collect such data, often pulling from websites, blogs, forums, and other user-generated content.  &lt;/p&gt;

&lt;p&gt;While structured data such as tables or spreadsheets is less commonly used due to its lack of linguistic richness, some specific use cases may incorporate structured data when it’s highly relevant to a particular domain (e.g., &lt;strong&gt;medical records, scientific datasets&lt;/strong&gt;). These are typically less abundant in comparison to unstructured text data.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Effective Data Collection and Preparation for LLMs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgss7ftwsgbl2hxu11sdv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgss7ftwsgbl2hxu11sdv.png" alt="Image description" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The data collection process begins with clear objectives. For &lt;strong&gt;general-purpose LLMs&lt;/strong&gt;, the goal is to gather diverse and representative text data that covers a wide range of topics and styles. Web scraping from multiple sources ensures that this data is varied and can reflect different contexts, linguistic features, and domains.  &lt;/p&gt;

&lt;p&gt;The raw data often contains noise, irrelevant information, or repeated content, which must be filtered out to maintain quality.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.camel-ai.org" rel="noopener noreferrer"&gt;CAMEL-AI&lt;/a&gt; offers convenient integrations with &lt;strong&gt;popular extraction and data ingestion tools like &lt;a href="https://github.com/camel-ai/camel/blob/master/camel/toolkits/mineru_toolkit.py" rel="noopener noreferrer"&gt;MinerU&lt;/a&gt;, &lt;a href="https://docs.camel-ai.org/_modules/camel/loaders/unstructured_io.html" rel="noopener noreferrer"&gt;UIO&lt;/a&gt;, &lt;a href="https://github.com/camel-ai/camel/blob/master/camel/loaders/jina_url_reader.py" rel="noopener noreferrer"&gt;Jina Reader&lt;/a&gt;,  &lt;a href="https://github.com/camel-ai/camel/blob/master/camel/loaders/apify_reader.py" rel="noopener noreferrer"&gt;Apify&lt;/a&gt;&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;These tools help streamline the data collection process, reducing manual effort and enhancing data quality.  &lt;/p&gt;

&lt;p&gt;While bad sources can be discarded using heuristics (e.g., filtering out overly repetitive or obviously irrelevant text), irrelevant information is more challenging to remove on a large scale. A common approach involves &lt;strong&gt;monitoring the loss plot&lt;/strong&gt; during training.  &lt;/p&gt;

&lt;p&gt;When a sharp spike occurs, it often indicates problematic data. At this point, the dataset is revisited, and specific data points (e.g., content from subreddits like &lt;em&gt;&lt;a href="https://www.reddit.com/r/mmmmmmmmm/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/mmmmmmmmm/&lt;/a&gt;&lt;/em&gt;) are removed, as they confuse the model and degrade its learning.  &lt;/p&gt;

&lt;p&gt;In the case of the subreddit mentioned, the repetitive content (e.g., dozens of “m’s” in a row) conflicts with the model’s learned pattern of language, leading to inefficiencies in training.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Key steps include:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Define Clear Objectives&lt;/strong&gt;: Establish what topics and styles are needed.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Utilize Diverse Sources&lt;/strong&gt;: Collect data from websites, blogs, forums, and social media.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filter Out Noise&lt;/strong&gt;: Remove irrelevant, repetitive, or low-quality content.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When using platforms like &lt;strong&gt;&lt;a href="https://www.camel-ai.org" rel="noopener noreferrer"&gt;CAMEL-AI&lt;/a&gt;&lt;/strong&gt;, data preparation becomes straightforward. CAMEL's integrated &lt;strong&gt;&lt;a href="https://docs.camel-ai.org/key_modules/retrievers.html" rel="noopener noreferrer"&gt;Retrievers&lt;/a&gt; and &lt;a href="https://docs.camel-ai.org/key_modules/memory.html" rel="noopener noreferrer"&gt;Memory Management techniques&lt;/a&gt;&lt;/strong&gt; allow developers to filter out noise, irrelevant information, and repetitive content to maintain dataset quality.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Data Preprocessing and Tokenization Techniques
&lt;/h2&gt;

&lt;p&gt;Once the data is cleaned, it undergoes &lt;strong&gt;preprocessing&lt;/strong&gt;, which primarily involves &lt;strong&gt;tokenization&lt;/strong&gt;. Tokenization is the process of breaking down text into smaller, manageable units (&lt;strong&gt;tokens&lt;/strong&gt;), such as words or subwords.  &lt;/p&gt;

&lt;p&gt;These tokens are initially represented as &lt;strong&gt;one-hot encoded vectors&lt;/strong&gt;, where every entry is &lt;code&gt;0&lt;/code&gt;, except for one which is &lt;code&gt;1&lt;/code&gt;. The position of the &lt;code&gt;1&lt;/code&gt; in the vector corresponds to a specific token, allowing us to map the textual representation of a token to its vector representation.  &lt;/p&gt;

&lt;p&gt;Once the tokens are ready, they are passed through the model, where &lt;strong&gt;embedding representations&lt;/strong&gt; are learned during the training process. These embeddings capture the &lt;strong&gt;semantic properties&lt;/strong&gt; of tokens, but this occurs only after the initial tokenization and vectorization process.  &lt;/p&gt;

&lt;p&gt;Common techniques for tokenization include &lt;a href="https://towardsdatascience.com/wordpiece-subword-based-tokenization-algorithm-1fbd14394ed7/" rel="noopener noreferrer"&gt;WordPiece&lt;/a&gt; or &lt;a href="https://towardsdatascience.com/wordpiece-subword-based-tokenization-algorithm-1fbd14394ed7/" rel="noopener noreferrer"&gt;Byte-Pair Encoding (BPE)&lt;/a&gt;, which break down words into smaller, more granular subword units to handle rare or unseen words more effectively. &lt;/p&gt;

&lt;p&gt;These methods break down words into smaller, more granular &lt;strong&gt;subword units&lt;/strong&gt; to handle rare or unseen words more effectively.  &lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://www.camel-ai.org" rel="noopener noreferrer"&gt;&lt;strong&gt;CAMEL-AI ecosystem&lt;/strong&gt;&lt;/a&gt;, you can efficiently experiment with various &lt;strong&gt;tokenization and embedding techniques&lt;/strong&gt; detailed in the &lt;strong&gt;&lt;a href="https://docs.camel-ai.org/key_modules/embeddings.html" rel="noopener noreferrer"&gt;Embeddings Module documentation&lt;/a&gt;&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Ensuring Quality Control and Dataset Balance in LLM Pretraining
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3h04b11putjwssn9dln5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3h04b11putjwssn9dln5.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;To ensure the model performs well across a variety of tasks, dataset quality control measures are essential. These include removing harmful or nonsensical text (such as hate speech, misinformation, or irrelevant content), ensuring diverse linguistic features, and de-duplicating content.  &lt;/p&gt;

&lt;p&gt;Balancing the dataset is crucial to ensure that it’s not &lt;strong&gt;overrepresented by any single type of text&lt;/strong&gt;.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Quality Control Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remove Harmful Content&lt;/strong&gt;: Filter out hate speech, misinformation, and irrelevant text.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;De-duplicate Data&lt;/strong&gt;: Ensure each piece of content is unique.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain Genre Balance&lt;/strong&gt;: Combine informal social media posts with formal academic articles.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ensure Demographic Representation&lt;/strong&gt;: Actively include content from underrepresented groups to prevent bias.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data is at the heart of training &lt;strong&gt;large language models&lt;/strong&gt;, shaping how they learn, adapt, and perform across different tasks. A well-curated dataset—rich in &lt;strong&gt;quality, diversity, and balance&lt;/strong&gt;—can make all the difference in achieving a powerful and reliable model.  &lt;/p&gt;




&lt;h2&gt;
  
  
  If this article helped you, let us know!
&lt;/h2&gt;

&lt;p&gt;Your feedback means a lot and helps us create even better content.  &lt;/p&gt;

&lt;p&gt;We’re also kicking off a &lt;strong&gt;Data Generation Blog Series&lt;/strong&gt;, where we’ll explore topics like &lt;strong&gt;Data Collection&lt;/strong&gt;, &lt;strong&gt;Post-Training&lt;/strong&gt;, &lt;strong&gt;Pretraining Data&lt;/strong&gt;, &lt;strong&gt;CoT Reasoning Data Generation&lt;/strong&gt; and more &lt;/p&gt;

&lt;p&gt;Stay tuned for what’s coming next!  &lt;/p&gt;




&lt;h2&gt;
  
  
  That's Everything 🚀
&lt;/h2&gt;

&lt;p&gt;Got questions about 🐫 CAMEL-AI? Join us on &lt;a href="https://discord.com/invite/CNcNpquyDc" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;!  &lt;/p&gt;

&lt;p&gt;Whether you want to share feedback, explore the latest in multi-agent systems, get support, or connect with others on exciting projects, we’d love to have you in the community! 🤝  &lt;/p&gt;

&lt;h3&gt;
  
  
  Check out some of our other work:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;🐫 &lt;strong&gt;Creating Your First CAMEL Agent&lt;/strong&gt; – &lt;a href="http://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agent.html" rel="noopener noreferrer"&gt;Free Colab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Graph RAG Cookbook&lt;/strong&gt; – &lt;a href="https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_rag.html" rel="noopener noreferrer"&gt;Free Colab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🧑‍⚖️ &lt;strong&gt;Create A Hackathon Judge Committee with Workforce&lt;/strong&gt; – &lt;a href="https://docs.camel-ai.org/cookbooks/multi_agent_society/workforce_judge_committee.html" rel="noopener noreferrer"&gt;Free Colab  &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🔥 &lt;strong&gt;3 Ways to Ingest Data from Websites with Firecrawl &amp;amp; CAMEL&lt;/strong&gt; – &lt;a href="https://docs.camel-ai.org/cookbooks/data_processing/ingest_data_from_websites_with_Firecrawl.html" rel="noopener noreferrer"&gt;Free Colab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🦥 &lt;strong&gt;Agentic SFT Data Generation with CAMEL and Mistral Models, Fine-Tuned with Unsloth&lt;/strong&gt; – &lt;a href="https://colab.research.google.com/drive/1lYgArBw7ARVPSpdwgKLYnp_NEXiNDOd-?usp=sharingg" rel="noopener noreferrer"&gt;Free Colab &lt;/a&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thanks from everyone at 🐫 &lt;strong&gt;&lt;a href="https://www.camel-ai.org/" rel="noopener noreferrer"&gt;CAMEL-AI!&lt;/a&gt;&lt;/strong&gt; 🎉  &lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__2728501"&gt;
    &lt;a href="/camel-ai" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2728501%2F9d02f1ae-563b-4f1a-aa3d-975e00afeeb9.png" alt="camel-ai image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/camel-ai"&gt;Camel ai&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/camel-ai"&gt;https://camel-ai.org is working on finding the scaling laws of agents. The first and the best multi-agent framework. Discord: http://discord.camel-ai.org.&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Agents with Human in the Loop : Everything You Need to Know</title>
      <dc:creator>Nomadev</dc:creator>
      <pubDate>Thu, 27 Feb 2025 10:21:25 +0000</pubDate>
      <link>https://forem.com/camelai/agents-with-human-in-the-loop-everything-you-need-to-know-3fo5</link>
      <guid>https://forem.com/camelai/agents-with-human-in-the-loop-everything-you-need-to-know-3fo5</guid>
      <description>&lt;p&gt;The rapid advancement of deep learning and Large Language Models (LLMs) has propelled AI agents from specialized tools to autonomous systems capable of handling complex, multi-step tasks. These agents demonstrate remarkable capabilities in language understanding, decision-making, and self-refinement. However, challenges such as hallucinated results, unreliable predictions, and lack of oversight limit their trustworthiness, particularly in high-stakes domains like robotics, software development, and decision automation.&lt;/p&gt;

&lt;p&gt;To enhance AI reliability, researchers have developed Human-in-the-Loop (HITL) frameworks, which integrate human expertise at key decision points to improve efficiency, accuracy, and accountability. HITL systems strike a balance between automation and human judgment, ensuring that AI escalates uncertain or critical decisions to experts while efficiently handling routine tasks autonomously. Conformal prediction, iterative feedback loops, and interactive validation are among the core techniques that empower HITL frameworks to minimize errors and increase adaptability in dynamic environments.&lt;/p&gt;

&lt;p&gt;This review explores the latest advancements in HITL techniques for multi-agent LLM systems, focusing on both research innovations and industrial applications. We examine state-of-the-art frameworks that implement human oversight mechanisms, as well as real-world deployments where HITL solutions enhance AI-driven workflows in robotics [1], software engineering [2], and autonomous agents. By analyzing these developments, we highlight the evolving role of human-AI collaboration in building more robust, transparent, and responsible AI systems.&lt;/p&gt;

&lt;h1&gt;
  
  
  Authors
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/drzekunguo" rel="noopener noreferrer"&gt;Zekun Guo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nitpicker55555" rel="noopener noreferrer"&gt;Xiandan Zhang&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mugglejinx" rel="noopener noreferrer"&gt;Xiaotian Jin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/shuolucs" rel="noopener noreferrer"&gt;Shuo Lu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/VC7100" rel="noopener noreferrer"&gt;Weisi Dai&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nuerjibieke" rel="noopener noreferrer"&gt;Nujibieke&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/CharliGuo" rel="noopener noreferrer"&gt;Lanping Guo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Wendong-Fan" rel="noopener noreferrer"&gt;Wendong Fan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/lightaime" rel="noopener noreferrer"&gt;Guohao Li&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Table of Contents
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Outline&lt;/li&gt;
&lt;li&gt;AI Agents / Human-in-the-loop background&lt;/li&gt;
&lt;li&gt;Human-In-The-Loop inf Research Literature&lt;/li&gt;
&lt;li&gt;Current Human-in-the-loop solutions&lt;/li&gt;
&lt;li&gt;Summary of Human-in-the-loop&lt;/li&gt;
&lt;li&gt;Looking Ahead: The Future of Human-in-the-Loop AI&lt;/li&gt;
&lt;li&gt;Reference&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Human-In-The-Loop in Research Literature
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://robot-help.github.io" rel="noopener noreferrer"&gt;KnowNO Framework&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In dynamic and unfamiliar environments, large models and robots often face a common problem: making overly confident yet incorrect predictions. A team of researchers from Princeton University and Google DeepMind addressed this issue by introducing the &lt;a href="https://arxiv.org/abs/2307.01928v2" rel="noopener noreferrer"&gt;KnowNo&lt;/a&gt; framework [1]. This system helps robots recognize when they’re uncertain and allows them to ask for help from humans when necessary, using a concept called conformal prediction (CP).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Does KnowNo Work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The KnowNo framework integrates large language models (LLMs) and conformal prediction techniques in a structured pipeline. Here’s how it operates step by step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ofus4gdk1ol71d9wxs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ofus4gdk1ol71d9wxs.png" alt="Image description" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Generating Candidate Plans:&lt;/strong&gt; The process begins with an LLM creating a list of possible action plans. These are presented as a multiple-choice question (MCQ) format, including an “E” option for "none of the above." To come up with these options, the LLM considers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The robot’s observations (e.g., what it “sees” or detects in the environment).&lt;/li&gt;
&lt;li&gt;The task instructions provided by the user.&lt;/li&gt;
&lt;li&gt;Examples of how similar problems were solved before.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By combining these inputs, the LLM builds a rich context and generates a list of possible actions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Assessing Uncertainty and Narrowing Down Choices:&lt;/strong&gt; Using conformal prediction, the system evaluates the confidence level for each candidate plan. The goal is to identify a set of plausible actions while filtering out those deemed too uncertain. If the system narrows down to a single, high-confidence option, it proceeds to execute it. Otherwise, it knows it’s unsure and triggers the next step.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Seeking Human Help:&lt;/strong&gt; When the robot’s prediction isn’t confident enough, it asks a human for assistance. This ensures that even in ambiguous scenarios, the robot can rely on human expertise to move forward.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Executing the Plan:&lt;/strong&gt; Once the robot has a clear next step—whether determined autonomously or with human input—it executes the action.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqxuc5v2oroy4fs9a0m5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqxuc5v2oroy4fs9a0m5.png" alt="Image description" width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Insights from KnowNo:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smart Use of Uncertainty&lt;/strong&gt;: The framework transforms robot planning into a question‐answering format in which the LLM generates plans and CP techniques determine which ones are reliable. By explicitly handling uncertainty, the system can decide when it is safe to act independently and when to involve humans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handling Complex Tasks&lt;/strong&gt;: KnowNo doesn’t stop at single decisions. For multi-step tasks, it aligns uncertainty across the entire sequence. This involves recalibrating predictions step by step to ensure consistency and minimize human intervention while maintaining accuracy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In terms of the experiment, in scenarios such as simulated tabletop rearrangement, multi-step tabletop rearrangement on hardware, and hardware-based mobile robotic arm kitchen tasks, comparisons were made with baseline methods like Simple Set and Ensemble Set. The results demonstrate that &lt;strong&gt;KnowNo&lt;/strong&gt; consistently achieves the target task success rate. Under varying error rate settings, it achieves higher success rates with less human assistance and shows adaptability to different LLMs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Experiment Highlights:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The researchers tested KnowNo in various scenarios, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simulated tabletop object rearrangement.&lt;/li&gt;
&lt;li&gt;Physical robots performing multi-step object manipulation.&lt;/li&gt;
&lt;li&gt;A mobile robotic arm operating in a kitchen setting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compared to baseline methods like Simple Set and Ensemble Set, KnowNo stood out by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Achieving target success rates even in challenging conditions.&lt;/li&gt;
&lt;li&gt;Reducing the need for human help without compromising task performance.&lt;/li&gt;
&lt;li&gt;Adapting well to different LLMs and task complexities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Some Thoughts and Suggestions:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While KnowNo is an impressive step forward, a few areas could be improved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Handling Human Error&lt;/strong&gt;: The system assumes humans always provide accurate help, which may not hold true in real-world scenarios. Introducing a model to simulate or account for human mistakes could make the framework more robust.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency Concerns&lt;/strong&gt;: Generating and calibrating prediction sets for complex, multi-step tasks can be computationally expensive. Exploring more efficient calibration methods, such as hierarchical or incremental strategies, could significantly reduce the runtime costs.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://arxiv.org/abs/2411.12924" rel="noopener noreferrer"&gt;&lt;strong&gt;The HULA framework: Bridging Automation and Human Expertise in Software Development&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://arxiv.org/pdf/2411.12924" rel="noopener noreferrer"&gt;HULA&lt;/a&gt; (Human-in-the-loop LLM-based Agents) framework [2], proposed by researcher from Monash University and The University of Melbourne, enables software engineers to guide intelligent agents in software development tasks. By balancing automation with human expertise, HULA incorporates human feedback at every stage, improving the quality and efficiency of software development. The authors also showcase the integrations of the HULA framework into Atlassian JIRA.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsrn7qy7myvsuasoy19b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsrn7qy7myvsuasoy19b.png" alt="Image description" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The HULA framework consists of three main agents that collaborate to enhance the software development process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AI Planner Agent&lt;/strong&gt;: This agent identifies files related to the issue and formulates a coding plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Coding Agent&lt;/strong&gt;: Based on the coding plan, this agent generates code changes that address the specified problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human Agent&lt;/strong&gt;: This role is fulfilled by software engineers who provide feedback on the performance of the AI agents and collaborate throughout the process.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The workflow of the HULA framework can be broken down into several key stages:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03d6s85rvj22stfd1im0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03d6s85rvj22stfd1im0.png" alt="Image description" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Setting up a Task&lt;/strong&gt;: The software engineer selects a task and links it to the relevant code repository. Each task is accompanied by descriptive information that outlines its requirements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Planning&lt;/strong&gt;: The AI Planner Agent uses the task description to understand the work and its context. It identifies relevant files for the task, which the software engineer can review, edit, and confirm. After identifying the files, the AI Planner creates a coding plan to modify them and resolve the issue. The Human Agent then reviews this plan, provides additional instructions, and may regenerate it if needed. The Human Agent can also modify the list of relevant files and adjust the change plan. After several iterations, the Human Agent confirms the plan, allowing the process to proceed to the next stage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coding&lt;/strong&gt;: Once the software engineer approves the coding plan, the AI Coding Agent generates code changes for each file. The Human Agent reviews these changes and can provide further instructions if they don't meet expectations, prompting the AI Coding Agent to regenerate them. The AI agent also uses additional tools to optimize the code. This iterative process continues until the code passes validation or reaches the maximum number of attempts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Raising a Pull Request&lt;/strong&gt;: Once the Human Agent agrees with the code changes, the generated code modifications are submitted as a pull request for review by other developers or processed as appropriate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The team evaluate the HULA framework in three stages to measure its effectiveness:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(1) An offline evaluation&lt;/strong&gt; of HULA without human feedback to fully &lt;strong&gt;automate&lt;/strong&gt; the process using SWE-Bench and internal dataset of JIRA issues. It is also known as a &lt;strong&gt;pre-deployment&lt;/strong&gt; evaluation to ensure the HULA framework achieves an acceptable performance before deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(2) An online evaluation&lt;/strong&gt; of HULA augmented by human feedback using &lt;strong&gt;real-world&lt;/strong&gt; JIRA issues. This is conducted in the actual development practice with 45 software engineers at Atlassian, it provides further insights into HULA’s performance from &lt;strong&gt;actual usage conditions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(3) An investigation&lt;/strong&gt; of the practitioners' perceptions on the benefits and challenges of using HULA. The team conducted an online survey, which included of 8 questions focusing on HULA's performance and 3 questions about user feedback.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;offline evaluation&lt;/strong&gt;, the performance of HULA for SWE-Bench is &lt;strong&gt;comparable to SWE-agent Claude&lt;/strong&gt;, which ranks 6th on the SEW-Bench leaderboard. However, the authors found HULA achieves a &lt;strong&gt;lower accuracy on the JIRA dataset&lt;/strong&gt; compared to the SWE-Bench dataset. This suboptimal performance could be due to the increased diversity of input, both in programming languages and repositories. &lt;/p&gt;

&lt;p&gt;For the SWE-Bench dataset, issues typically had &lt;strong&gt;detailed descriptions with key information&lt;/strong&gt;, like module names or code snippets. However, real-world JIRA issues usually consist of &lt;strong&gt;informal knowledge transfer&lt;/strong&gt;, like meetings or chats, instead of detailed documentation in the internal dataset. Therefore, in the &lt;strong&gt;online evaluation&lt;/strong&gt; with Human Agent,  &lt;strong&gt;8% of the JIRA issues had successfully merged HULA-assisted PRs&lt;/strong&gt; containing the HULA-generated code ****into the code repositories.&lt;/p&gt;

&lt;p&gt;By comparing the offline and online evaluations, we conclude that the &lt;strong&gt;detail of input can highly affect the performance of LLM-based software development agents&lt;/strong&gt;. However, practitioners highly agree when they can engage in the process by reviewing and enriching the issue descriptions. Furthermore, in the investigation, most participants agreed that the coding plan was accurate and the generated code was easy to read and modify, which helped &lt;strong&gt;reduce their initial development time and effort&lt;/strong&gt;. Also, a few participants acknowledged that &lt;strong&gt;HULA’s workflow could promote good documentation&lt;/strong&gt;, but it requires more effort to provide detailed issue descriptions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Current Human-in-the-loop solutions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.humanlayer.dev" rel="noopener noreferrer"&gt;&lt;strong&gt;HumanLayer&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2xmh9jps9oyil1z2d9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2xmh9jps9oyil1z2d9t.png" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HumanLayer is a YC-backed company in F24 batch raised $500K in its pre-seed round. They are working on providing an API and SDK that integrates human decision-making with AI agent workflow. With HumanLayer, AI agent is able to request human approval at any step in its execution, as the product handles routing of requests or messages to the designated group through their preferred channel. It is framework agnostic and can be easily integrated into any agent frameworks that has tool-calling functions.&lt;/p&gt;

&lt;p&gt;HumanLayer is designed to revolutionize the future of AI by empowering the next generation of Autonomous Agents. These agents are no longer reliant on human initiation; instead, they operate independently in what we call the “outer loop,” actively working toward their goals by utilizing a variety of tools and functions. Communication between humans and agents is now agent-initiated, occurring only when a critical function requires human approval or feedback. This shift unlocks a new level of efficiency and autonomy, allowing AI to evolve in ways that were once unimaginable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key features&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Approval Workflows&lt;/strong&gt;: Rapidly launch the SDK to ensure human oversight for critical function calls. Denied messages will be fed back to agent context window, allowing agents to learn and conduct automatic approval/deny based on past human interactions.&lt;/p&gt;

&lt;p&gt;What elements can be controlled by a human in this workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creation of approval request&lt;/li&gt;
&lt;li&gt;Pausing AI workflow until reaching decision outcome&lt;/li&gt;
&lt;li&gt;Execution of pre-defined tasks for rejection cases&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dks4itrpleo5m747ywt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dks4itrpleo5m747ywt.png" alt="Image description" width="800" height="152"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
    HumanLayer cloud for receiving approvals&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For this part of functionality, HumanLayer backend is responsible for handling of approval requests and routing to target groups for decision outcome.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Humans as Tools&lt;/strong&gt;: Integrate multiple human contact channels into agent's toolchain for AI agent to review human feedback &lt;strong&gt;(not approval)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What elements can be controlled by a human in this workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creation of approval request&lt;/li&gt;
&lt;li&gt;Pausing AI workflow until reaching decision outcome&lt;/li&gt;
&lt;li&gt;Passing the response back to the LLM&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HumanLayer SDK handles message routing and collecting response/input from human.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Custom Responses and Escalation&lt;/strong&gt;: Pre-fill response prompts for seamless human-machine interaction and coordinated approvals across multiple teams and individuals&lt;/p&gt;

&lt;p&gt;Users can define structured response options to guide or format human inputs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;HumanLayer currently supports these channels of communication in dashboard settings: Slacks, email, SMS, WhatsApp. Users are able to configure advanced options such as direction integration with react applications or composite channels with custom rules.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;a href="https://www.gotohuman.com" rel="noopener noreferrer"&gt;&lt;strong&gt;GotoHuman&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1e24l7404qor22wumo86.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1e24l7404qor22wumo86.jpg" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GotoHuman is a human-in-the-loop solution designed to integrate human oversight into AI-driven workflows, ensuring accurate and context-aware decision-making.&lt;/p&gt;

&lt;p&gt;Some of the features are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Custom Review Forms:&lt;/strong&gt; Quickly create tailored forms to display content or capture human input, allowing your team to review AI-generated content, approve workflow steps, or provide necessary input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human Review Requests:&lt;/strong&gt; Utilize Python or TypeScript SDKs, or directly call the API, to request human reviews when AI-generated content or workflow steps require approval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human Decision Awaiting:&lt;/strong&gt; Review requests are automatically shared with your team in an authenticated environment. Short-lived public links can also be activated for external reviewers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Response Reception:&lt;/strong&gt; Upon completion of a review, results are sent to your custom webhook, allowing your workflow to proceed seamlessly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;gotoHuman is designed to work with any AI framework, library, or model, providing flexibility in integration.  It offers SDKs for Python and TypeScript. By integrating gotoHuman, teams can maintain human supervision within AI workflows, enhancing safety, compliance, and precision.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;a href="https://www.redouble.ai" rel="noopener noreferrer"&gt;Redouble AI&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0lwykjnywucndtetwxje.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0lwykjnywucndtetwxje.png" alt="Image description" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Redouble AI is a young, YC-backed company that raised $500K in September 2024. Publicly available information about the company is limited. Currently, there are no published papers, open-source code, or user feedback accessible.&lt;/p&gt;

&lt;p&gt;Redouble AI is the solution to scale human-in-the-loop for AI workflows in regulated industries.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Dynamically learns from your unique domain-specific human feedback data.&lt;/li&gt;
&lt;li&gt;Provides recommendations on whether to send the output of your LLM pipeline to a human for review.&lt;/li&gt;
&lt;li&gt;Monitor the insights from your human reviewers at scale while also flagging suspicious reviews to ensure consistent final outputs.&lt;/li&gt;
&lt;li&gt;Integrate easily with your existing pipeline with just a couple of simple API calls.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  &lt;a href="https://modelcontextprotocol.io/introduction" rel="noopener noreferrer"&gt;Model Context Protocol (MCP)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8i3i8rpphlplmiez7gtf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8i3i8rpphlplmiez7gtf.png" alt="Image description" width="800" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MCP (Model Context Protocol) is an open standard proposed by Anthropic, designed to provide a unified interface for AI assistants to interact with external systems (such as files, APIs, and databases), similar to how USB-C serves as a universal standard in hardware.&lt;/p&gt;

&lt;p&gt;It addresses the challenges of integrating AI models with heterogeneous data sources and tools, improving response accuracy and relevance through a standardized communication mechanism.&lt;/p&gt;

&lt;p&gt;In a human-in-the-loop setup, an AI agent can leverage MCP servers as integration tools within platforms like Slack to send notifications and seek human guidance before executing critical actions. &lt;/p&gt;

&lt;p&gt;For example, if the agent detects a potential scheduling conflict in an automated calendar update, it can use the Slack MCP server to send a message asking a human operator for suggestions or explicit approval before proceeding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP’s implementation involves in:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By deploying MCP servers (such as &lt;code&gt;read_file&lt;/code&gt; and &lt;code&gt;read_dir&lt;/code&gt; functions), AI can directly invoke external functions without repeatedly writing adapter code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supports bidirectional communication&lt;/strong&gt;: AI can access data as well as respond to tool-triggered actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why we need MCP? Because we have the following industry challenges:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Silos&lt;/strong&gt;: AI models are constrained by fragmented data sources, making cross-system collaboration difficult.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inefficient Development&lt;/strong&gt;: Different systems require custom integrations (e.g., API variations, authentication methods), leading to redundant code and high maintenance costs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Risks&lt;/strong&gt;: Separate security protocols for each platform complicate access management.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;To address these challenges, MCP provides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unified Interface&lt;/strong&gt;: Standardized tool invocation processes reduce the technical barriers for developers. Providing a universal specification supporting mainstream programming languages (such as Python and TypeScript), enabling developers to quickly build MCP clients or servers. For example, Claude’s desktop application includes built-in MCP support for "plug-and-play" functionality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-Term Compatibility&lt;/strong&gt;: Abstracting the protocol layer minimizes maintenance burden due to system API changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bidirectional data interaction&lt;/strong&gt;: AI can read/write external systems (e.g., database queries, file editing) via MCP. Some use cases are: Enterprise tools (Slack, Google Drive), development environments (Git, VS Code extensions), etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A tool ecosystem:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anthropic provides SDKs and open-source libraries&lt;/strong&gt; (e.g., &lt;code&gt;@mcp-foundation/*&lt;/code&gt;) to accelerate enterprise system integration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensibility&lt;/strong&gt;: Supports custom feature extensions to accommodate private deployments.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;By using MCP, we can achieve:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost Reduction&lt;/strong&gt;: Cuts over 60% of custom integration development time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Security&lt;/strong&gt;: Centralized access management reduces data leakage risks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem Collaboration&lt;/strong&gt;: Drives AI evolution from "closed inference" to "open system agents," laying the foundation for AGI deployment.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  CAMEL with Human-In-The-Loop
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7rloh95nv1bctzwazub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7rloh95nv1bctzwazub.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/camel-ai/camel" rel="noopener noreferrer"&gt;&lt;strong&gt;CAMEL-AI&lt;/strong&gt;&lt;/a&gt; is an open-source community dedicated to finding the scaling laws of agents. CAMEL framework implements and supports various types of agents, tasks, prompts, models, and simulated environments. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Human-In-The-Loop&lt;/strong&gt; features in CAMEL facilitates collaborative interactions between AI agents and human participants. It is designed to simulate dynamic exchanges where AI agents take on specific roles (e.g., AI Assistant and AI User) to complete tasks, while a human acts as a critic or supervisor to guide the process. This framework is ideal for tasks requiring creativity, problem-solving, or iterative refinement.&lt;/p&gt;

&lt;p&gt;In current version of CAMEL, it supports two important ability:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Human-In-The-Loop&lt;/strong&gt;: The ability for agent to consult human during the execution of the task (by using HumanToolkit)&lt;/p&gt;

&lt;p&gt;This ability provides agents the ability to consult human, the basic use case is like a chatbot:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;camel.toolkits&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HumanToolkit&lt;/span&gt;
&lt;span class="n"&gt;human_toolkit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HumanToolkit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ChatAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;system_message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You are a helpful assistant.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;human_toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_tools&lt;/span&gt;&lt;span class="p"&gt;()],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;step&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Test me on the capital of some country, and comment on my answer.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The basic examples turns our agent into an interactive chatbot. The true power of &lt;strong&gt;Human-in-loop&lt;/strong&gt; shows when making use of multiple agents (&lt;a href="https://docs.camel-ai.org/key_modules/workforce.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Workforce&lt;/strong&gt;&lt;/a&gt; module in Camel). For example, this use case shows how to use agents to help design a travel plan, and ask the user for the feedback to modify the plan.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ignoring imports...
&lt;/span&gt;&lt;span class="n"&gt;human_toolkit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HumanToolkit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;search_toolkit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SearchToolkit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Make a travel plan for a 2-day trip to Paris. Let user decide the final schedule in the end.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# This agent researches and designs the travel plan.
&lt;/span&gt;&lt;span class="n"&gt;activity_research_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ChatAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;system_message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    You are a travel planner. You are given a task to make a travel plan for a 2-day trip to Paris.
    You need to research the activities and attractions in Paris and provide a travel plan.
    You should make a list of activities and attractions for each day.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;openai_model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;search_toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_tools&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# This agent reviews the plan, and consults user for feedback!
&lt;/span&gt;&lt;span class="n"&gt;review_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ChatAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;system_message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    You are a reviewer. You are given a travel plan and a budget. 
    You need to review the travel plan and budget and provide a review. 
    You should make comments and ask the user to adjust the travel plan and budget.
    You should ask the user to give suggestions for the travel plan and budget.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;openai_model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;human_toolkit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_tools&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt; 
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;workforce&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_single_agent_worker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;An agent that can do web searches&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;worker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;activity_research_agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;add_single_agent_worker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A reviewer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;worker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;review_agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;workforce&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;process_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Human approval&lt;/strong&gt;: The ability for the agent ask approval to execute some tasks. The following example demonstrates how to define two tools for agents to execute, one is normal, the other one is more sensitive, which requires user approval.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;humanlayer.core.approval&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HumanLayer&lt;/span&gt;
&lt;span class="n"&gt;hl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HumanLayer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;humanlayer_api_key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;verbose&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# add can be called without approval
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;normal_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Normal tasks for agent to execute&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
        &lt;span class="bp"&gt;...&lt;/span&gt;

&lt;span class="c1"&gt;# but multiply must be approved by a human
&lt;/span&gt;&lt;span class="nd"&gt;@hl.require_approval&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;sensitive_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt; Sensitive task that requires user approval&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
        &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;For more details, you can check with the CAMEL cookbook &lt;a href="https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_human_in_loop_and_tool_approval.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary of Human-in-the-loop
&lt;/h2&gt;

&lt;p&gt;This post presents a comprehensive overview of recent developments in human-in-the-loop (HITL) approaches for multi-agent frameworks, highlighting their significance in enhancing AI decision-making by integrating human expertise. It covers a variety of methodologies that address different AI challenges, particularly in uncertainty management, software development, AI workflow oversight, and autonomous agents.&lt;/p&gt;

&lt;p&gt;Specifically, we reviewed the &lt;a href="https://arxiv.org/abs/2307.01928v2" rel="noopener noreferrer"&gt;KnowNo&lt;/a&gt; framework, a conformal prediction-based system for robotic planning that enables LLMs to assess uncertainty and request human intervention when necessary, reducing reliance on incorrect high-confidence predictions. We then examined the HULA framework, a human-in-the-loop LLM agent designed to assist in software development, particularly in issue tracking and code generation, by iteratively refining AI-generated outputs with human feedback. Additionally, we discussed HumanLayer, GotoHuman, and Redouble AI, which provide solutions for integrating human oversight into AI workflows, ensuring that AI agents consult humans for approvals or corrections before executing critical actions. Another key development is the Model Context Protocol (MCP) by Anthropic, which establishes a standardized interface for AI models to seamlessly interact with external data sources, addressing interoperability challenges in AI-driven workflows.&lt;/p&gt;

&lt;p&gt;The CAMEL framework, an open-source multi-agent framework, has integrated human-in-the-loop decision-making and human approval processes for AI agents, enhancing the adaptability and accountability of multi-agent systems. This approach shifts AI systems away from static, rule-based automation toward adaptive, self-correcting agents that engage humans strategically to improve decision-making.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking Ahead: The Future of Human-in-the-Loop AI
&lt;/h2&gt;

&lt;p&gt;Moving forward, we can expect the human-in-the-loop paradigm to become increasingly central to AI system design and deployment. Below are some key trends and possibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scaling HITL for Large-Scale Deployment:&lt;/strong&gt; Implementing HITL solutions across industries (e.g., law, healthcare, and finance) requires efficient human-AI collaboration models that balance automation with oversight. Existing frameworks must evolve to support more dynamic, real-time decision-making environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beyond Human Approval—Towards Human-AI Synergy:&lt;/strong&gt; Current frameworks mostly involve humans in a corrective or oversight role, but future advancements could explore proactive collaboration, where humans and AI co-create solutions in real time, functioning as co-pilots to each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning from Human Feedback:&lt;/strong&gt; Future HITL systems should not only rely on human oversight but also learn from human decision-making patterns, expertise, and contextual judgments. By modeling human preference, AI can better anticipate when intervention is needed and reinforce its decision-making processes to align with human expertise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The evolution of human-in-the-loop AI will drive greater autonomy, accountability, flexibility, and ethical alignment in AI systems. By leveraging the best of both worlds—high-speed, data-driven AI processing and carefully integrated human judgment—we can pave the way for more effective, trustworthy, and sustainable AI adoption.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Reference&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ren, A. Z., Dixit, A., Bodrova, A., Singh, S., Tu, S., Brown, N., Xu, P., Takayama, L., Xia, F., Varley, J., Xu, Z., Sadigh, D., Zeng, A., &amp;amp; Majumdar, A. (2023). Robots That Ask For Help: Uncertainty Alignment for Large Language Model Planners. &lt;em&gt;arXiv preprint arXiv:2307.01928v2&lt;/em&gt;. Retrieved from &lt;a href="https://arxiv.org/abs/2307.01928v2" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2307.01928v2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Takerngsaksiri, W., Pasuksmit, J., Thongtanunam, P., Tantithamthavorn, C., Zhang, R., Jiang, F., Li, J., Cook, E., Chen, K., &amp;amp; Wu, M. (2024). Human-In-the-Loop Software Development Agents. &lt;em&gt;arXiv preprint arXiv:2411.12924&lt;/em&gt;. Retrieved from &lt;a href="https://arxiv.org/pdf/2411.12924" rel="noopener noreferrer"&gt;https://arxiv.org/pdf/2411.12924&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Robots That Ask For Help: &lt;a href="https://arxiv.org/abs/2307.01928" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2307.01928&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Human-In-the-Loop Software Development Agents: &lt;a href="https://arxiv.org/pdf/2411.12924" rel="noopener noreferrer"&gt;https://arxiv.org/pdf/2411.12924&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;HumanLayer: &lt;a href="https://www.humanlayer.dev/" rel="noopener noreferrer"&gt;https://www.humanlayer.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gotohuman: &lt;a href="https://www.gotohuman.com/" rel="noopener noreferrer"&gt;https://www.gotohuman.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Redouble AI: &lt;a href="https://www.ycombinator.com/companies/redouble-ai" rel="noopener noreferrer"&gt;https://www.ycombinator.com/companies/redouble-ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Model Context Protocol (MCP): &lt;a href="https://www.anthropic.com/news/model-context-protocol" rel="noopener noreferrer"&gt;https://www.anthropic.com/news/model-context-protocol&lt;/a&gt;, &lt;a href="https://x.com/alexalbert__/status/1861079762506252723" rel="noopener noreferrer"&gt;https://x.com/alexalbert__/status/1861079762506252723&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CAMEL: critic of Human in the loop: &lt;a href="https://github.com/camel-ai/camel/blob/master/examples/ai_society/role_playing_with_human.py" rel="noopener noreferrer"&gt;https://github.com/camel-ai/camel/blob/master/examples/ai_society/role_playing_with_human.py&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Camel human-in-loop cookbook: &lt;a href="https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_human_in_loop_and_tool_approval.html" rel="noopener noreferrer"&gt;https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_human_in_loop_and_tool_approval.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  That's Everything 🚀
&lt;/h2&gt;

&lt;p&gt;Got questions about 🐫 CAMEL-AI? Join us on Discord!  &lt;/p&gt;

&lt;p&gt;Whether you want to share feedback, explore the latest in multi-agent systems, get support, or connect with others on exciting projects, we’d love to have you in the community! 🤝  &lt;/p&gt;

&lt;h3&gt;
  
  
  Check out some of our other work:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;🐫 &lt;strong&gt;Creating Your First CAMEL Agent&lt;/strong&gt; – &lt;a href="http://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agent.html" rel="noopener noreferrer"&gt;Free Colab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Graph RAG Cookbook&lt;/strong&gt; – &lt;a href="https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_rag.html" rel="noopener noreferrer"&gt;Free Colab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🧑‍⚖️ &lt;strong&gt;Create A Hackathon Judge Committee with Workforce&lt;/strong&gt; – &lt;a href="https://docs.camel-ai.org/cookbooks/multi_agent_society/workforce_judge_committee.html" rel="noopener noreferrer"&gt;Free Colab  &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🔥 &lt;strong&gt;3 Ways to Ingest Data from Websites with Firecrawl &amp;amp; CAMEL&lt;/strong&gt; – &lt;a href="https://docs.camel-ai.org/cookbooks/data_processing/ingest_data_from_websites_with_Firecrawl.html" rel="noopener noreferrer"&gt;Free Colab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🦥 &lt;strong&gt;Agentic SFT Data Generation with CAMEL and Mistral Models, Fine-Tuned with Unsloth&lt;/strong&gt; – &lt;a href="https://colab.research.google.com/drive/1lYgArBw7ARVPSpdwgKLYnp_NEXiNDOd-?usp=sharingg" rel="noopener noreferrer"&gt;Free Colab &lt;/a&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thanks from everyone at 🐫 &lt;strong&gt;&lt;a href="https://www.camel-ai.org/" rel="noopener noreferrer"&gt;CAMEL-AI!&lt;/a&gt;&lt;/strong&gt; 🎉  &lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__2728501"&gt;
    &lt;a href="/camel-ai" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2728501%2F9d02f1ae-563b-4f1a-aa3d-975e00afeeb9.png" alt="camel-ai image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/camel-ai"&gt;Camel ai&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/camel-ai"&gt;https://camel-ai.org is working on finding the scaling laws of agents. The first and the best multi-agent framework. Discord: http://discord.camel-ai.org.&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>tutorial</category>
      <category>openai</category>
    </item>
  </channel>
</rss>
