Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
run ruff on the entire codebase
Nick Sweetingec56bfe81bff
diff --git a/browser_use/controller/service.py b/browser_use/controller/service.pyindex aba24e750..1827fd7b6 100644--- a/browser_use/controller/service.py+++ b/browser_use/controller/service.py@@ -22,7 +22,6 @@ from browser_use.controller.views import (CloseTabAction,DoneAction,GoToUrlAction,- GroupTabsAction,InputTextAction,NoParamsAction,OpenTabAction,@@ -31,7 +30,6 @@ from browser_use.controller.views import (SendKeysAction,SwitchTabAction,WaitForElementAction,- UngroupTabsAction,)from browser_use.utils import time_execution_sync@@ -176,7 +174,7 @@ class Controller(Generic[Context]):try:await element_node.scroll_into_view_if_needed()await element_node.click(timeout=1500, force=True)- except Exception as e:+ except Exception:try:# Handle with js evaluate if fails to click using playwrightawait element_node.evaluate('el => el.click()')@@ -197,7 +195,7 @@ class Controller(Generic[Context]):try:await element_node.scroll_into_view_if_needed()await element_node.click(timeout=1500, force=True)- except Exception as e:+ except Exception:try:# Handle with js evaluate if fails to click using playwrightawait element_node.evaluate('el => el.click()')@@ -223,7 +221,7 @@ class Controller(Generic[Context]):try:await element_node.scroll_into_view_if_needed()await element_node.click(timeout=1500, force=True)- except Exception as e:+ except Exception:try:# Handle with js evaluate if fails to click using playwrightawait element_node.evaluate('el => el.click()')diff --git a/browser_use/dom/history_tree_processor/view.py b/browser_use/dom/history_tree_processor/view.pyindex e970ad5b5..250a64903 100644--- a/browser_use/dom/history_tree_processor/view.py+++ b/browser_use/dom/history_tree_processor/view.py@@ -1,5 +1,5 @@from dataclasses import dataclass-from typing import TYPE_CHECKING, Optional+from typing import Optionalfrom pydantic import BaseModeldiff --git a/eval/grok.py b/eval/grok.pyindex 6a32669c7..6f986aff8 100644--- a/eval/grok.py+++ b/eval/grok.py@@ -1,9 +1,12 @@+import asyncioimport os++from dotenv import load_dotenvfrom langchain_openai import ChatOpenAIfrom pydantic import SecretStr+from browser_use import Agent-import asyncio-from dotenv import load_dotenv+load_dotenv()api_key = os.getenv('GROK_API_KEY', '')diff --git a/examples/custom-functions/clipboard.py b/examples/custom-functions/clipboard.pyindex e06d3e5de..8d8e8725a 100644--- a/examples/custom-functions/clipboard.py+++ b/examples/custom-functions/clipboard.py@@ -1,6 +1,5 @@import osimport sys-from pathlib import Pathfrom browser_use.agent.views import ActionResult@@ -39,7 +38,7 @@ async def paste_from_clipboard(browser: BrowserContext):async def main():- task = f'Copy the text "Hello, world!" to the clipboard, then go to google.com and paste the text'+ task = 'Copy the text "Hello, world!" to the clipboard, then go to google.com and paste the text'model = ChatOpenAI(model='gpt-4o')agent = Agent(task=task,diff --git a/examples/custom-functions/custom_hooks_before_after_step.py b/examples/custom-functions/custom_hooks_before_after_step.pyindex c61d24b4e..8c2e6f5a4 100644--- a/examples/custom-functions/custom_hooks_before_after_step.py+++ b/examples/custom-functions/custom_hooks_before_after_step.py@@ -21,6 +21,7 @@ Feedback is appreciated!import base64+def b64_to_png(b64_string: str, output_file):"""Convert a Base64-encoded string to a PNG file.@@ -47,8 +48,8 @@ def b64_to_png(b64_string: str, output_file):import jsonfrom pathlib import Path-from fastapi import FastAPI, Requestimport prettyprinter+from fastapi import FastAPI, Requestprettyprinter.install_extras()@@ -112,13 +113,14 @@ gracefully handling circular references.# ! pip install -U pyobjtojson# ! pip install -U prettyprinter-from langchain_openai import ChatOpenAI-from browser_use import Agent-from dotenv import load_dotenv-from pyobjtojson import obj_to_jsonimport asyncioimport requests+from dotenv import load_dotenv+from langchain_openai import ChatOpenAI+from pyobjtojson import obj_to_json++from browser_use import Agent# import prettyprinterdiff --git a/examples/custom-functions/group_ungroup.py b/examples/custom-functions/group_ungroup.pyindex ab59f5e20..b494ddcbb 100644--- a/examples/custom-functions/group_ungroup.py+++ b/examples/custom-functions/group_ungroup.py@@ -1,14 +1,12 @@import osimport sys-from pathlib import Pathfrom browser_use.agent.views import ActionResultfrom browser_use.browser.views import GroupTabsAction, UngroupTabsActionsys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))import asyncio-import loggingfrom langchain_openai import ChatOpenAI@@ -101,7 +99,7 @@ async def ungroup_tabs(params: UngroupTabsAction, browser: BrowserContext):return ActionResult(error=f"Failed to ungroup tabs: {str(e)}")async def main():- task = f'Group tabs 1 and 2 into a "Research" group, then ungroup them.'+ task = 'Group tabs 1 and 2 into a "Research" group, then ungroup them.'diff --git a/examples/custom-functions/hover_element.py b/examples/custom-functions/hover_element.pyindex e770f2362..a697d4e3b 100644--- a/examples/custom-functions/hover_element.py+++ b/examples/custom-functions/hover_element.py@@ -1,6 +1,5 @@import osimport sys-from pathlib import Pathfrom typing import Optionalfrom pydantic import BaseModel@@ -16,6 +15,7 @@ from browser_use import Agent, Controllerfrom browser_use.browser.browser import Browser, BrowserConfigfrom browser_use.browser.context import BrowserContext+class HoverAction(BaseModel):index: Optional[int] = Nonexpath: Optional[str] = Nonediff --git a/examples/custom-functions/notification.py b/examples/custom-functions/notification.pyindex 56a8bfede..3f73b9640 100644--- a/examples/custom-functions/notification.py+++ b/examples/custom-functions/notification.py@@ -7,7 +7,6 @@ import asynciofrom dotenv import load_dotenvfrom langchain_openai import ChatOpenAI-from pydantic import BaseModelfrom browser_use import ActionResult, Agent, Controllerdiff --git a/examples/custom-functions/save_to_file_hugging_face.py b/examples/custom-functions/save_to_file_hugging_face.pyindex 9c332a408..96434b05c 100644--- a/examples/custom-functions/save_to_file_hugging_face.py+++ b/examples/custom-functions/save_to_file_hugging_face.py@@ -4,7 +4,7 @@ import syssys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))import asyncio-from typing import List, Optional+from typing import Listfrom langchain_openai import ChatOpenAIfrom pydantic import BaseModel@@ -36,7 +36,7 @@ def save_models(params: Models):# video: https://preview.screen.studio/share/EtOhIk0Pasync def main():- task = f'Look up models with a license of cc-by-sa-4.0 and sort by most likes on Hugging face, save top 5 to file.'+ task = 'Look up models with a license of cc-by-sa-4.0 and sort by most likes on Hugging face, save top 5 to file.'model = ChatOpenAI(model='gpt-4o')agent = Agent(task=task, llm=model, controller=controller)diff --git a/examples/features/click_fallback_options.py b/examples/features/click_fallback_options.pyindex 4721bba9a..ef8fb1f8a 100644--- a/examples/features/click_fallback_options.py+++ b/examples/features/click_fallback_options.py@@ -1,10 +1,11 @@+import asyncioimport osimport sys-import asynciofrom aiohttp import web # make sure to install aiohttp: pip install aiohttpfrom dotenv import load_dotenvfrom langchain_openai import ChatOpenAI+# from langchain_google_genai import ChatGoogleGenerativeAIdiff --git a/examples/features/multiple_agents_same_browser.py b/examples/features/multiple_agents_same_browser.pyindex 013b33ff3..dd48e99fa 100644--- a/examples/features/multiple_agents_same_browser.py+++ b/examples/features/multiple_agents_same_browser.py@@ -7,7 +7,7 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))import asyncio-from browser_use import Agent, Browser, Controller+from browser_use import Agent, Browser# Video: https://preview.screen.studio/share/8Elaq9smdiff --git a/examples/features/planner.py b/examples/features/planner.pyindex 37f595375..85bd23c8f 100644--- a/examples/features/planner.py+++ b/examples/features/planner.py@@ -4,7 +4,6 @@ from langchain_openai import ChatOpenAIfrom browser_use import Agent-llm = ChatOpenAI(model='gpt-4o', temperature=0.0)planner_llm = ChatOpenAI(model='o3-mini',diff --git a/examples/features/restrict_urls.py b/examples/features/restrict_urls.pyindex e7b7b7adf..2f4ce0952 100644--- a/examples/features/restrict_urls.py+++ b/examples/features/restrict_urls.py@@ -1,18 +1,15 @@import osimport sys-from langchain_anthropic import ChatAnthropicfrom langchain_openai import ChatOpenAIfrom browser_use.browser.context import BrowserContextConfigsys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))-import argparseimport asynciofrom browser_use import Agentfrom browser_use.browser.browser import Browser, BrowserConfig-from browser_use.controller.service import Controllerllm = ChatOpenAI(model='gpt-4o', temperature=0.0)task = (diff --git a/examples/features/small_model_for_extraction.py b/examples/features/small_model_for_extraction.pyindex e86e0235b..859050a2a 100644--- a/examples/features/small_model_for_extraction.py+++ b/examples/features/small_model_for_extraction.py@@ -4,7 +4,6 @@ from dotenv import load_dotenvfrom langchain_openai import ChatOpenAIfrom browser_use import Agent-from browser_use.controller.service import Controllerload_dotenv()diff --git a/examples/integrations/slack/slack_api.py b/examples/integrations/slack/slack_api.pyindex 3df930a89..21fb056b3 100644--- a/examples/integrations/slack/slack_api.py+++ b/examples/integrations/slack/slack_api.py@@ -1,12 +1,14 @@import logging-from browser_use import BrowserConfig-from fastapi import FastAPI, Request, HTTPException, Depends+from dotenv import load_dotenv-from slack_sdk.web.async_client import AsyncWebClient+from fastapi import Depends, FastAPI, HTTPException, Request+from langchain_core.language_models.chat_models import BaseChatModelfrom slack_sdk.errors import SlackApiErrorfrom slack_sdk.signature import SignatureVerifier+from slack_sdk.web.async_client import AsyncWebClient++from browser_use import BrowserConfigfrom browser_use.agent.service import Agent, Browser-from langchain_core.language_models.chat_models import BaseChatModelfrom browser_use.logging_config import setup_loggingload_dotenv()diff --git a/examples/models/azure_openai.py b/examples/models/azure_openai.pyindex b594592a2..1cb936c3f 100644--- a/examples/models/azure_openai.py+++ b/examples/models/azure_openai.py@@ -6,6 +6,7 @@ Simple try of the agent.import osimport sys+from dotenv import load_dotenvsys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))diff --git a/examples/models/claude-3.7-sonnet.py b/examples/models/claude-3.7-sonnet.pyindex a2b8f4f0b..8e885435d 100644--- a/examples/models/claude-3.7-sonnet.py+++ b/examples/models/claude-3.7-sonnet.py@@ -5,6 +5,7 @@ Simple script that runs the task of opening amazon and searching.import osimport sys+from dotenv import load_dotenvfrom langchain_anthropic import ChatAnthropicdiff --git a/examples/models/ollama.py b/examples/models/ollama.pyindex a824cb405..792e73b67 100644--- a/examples/models/ollama.py+++ b/examples/models/ollama.py@@ -7,9 +7,11 @@# os.environ["OLLAMA_HOST"] = "http://x.x.x.x:11434"import asyncio++from langchain_ollama import ChatOllama+from browser_use import Agentfrom browser_use.agent.views import AgentHistoryList-from langchain_ollama import ChatOllamaasync def run_search() -> AgentHistoryList:diff --git a/examples/models/qwen.py b/examples/models/qwen.pyindex e31316fc8..9bddec952 100644--- a/examples/models/qwen.py+++ b/examples/models/qwen.py@@ -1,5 +1,4 @@import asyncio-import osfrom langchain_ollama import ChatOllamadiff --git a/examples/notebook/agent_browsing.ipynb b/examples/notebook/agent_browsing.ipynbindex 2b5ae837d..ff1ff8762 100644--- a/examples/notebook/agent_browsing.ipynb+++ b/examples/notebook/agent_browsing.ipynb@@ -1,760 +1,760 @@{- "nbformat": 4,- "nbformat_minor": 0,- "metadata": {- "colab": {- "provenance": []- },- "kernelspec": {- "name": "python3",- "display_name": "Python 3"- },- "language_info": {- "name": "python"- }+ "cells": [+ {+ "cell_type": "code",+ "execution_count": 2,+ "metadata": {+ "id": "ZRGlUb8O4fPV"+ },+ "outputs": [],+ "source": [+ "\n",+ "%pip install -U langgraph langchain_google_genai langchain_community langgraph-checkpoint-postgres openai langchain_groq"+ ]},- "cells": [- {- "cell_type": "code",- "execution_count": 2,- "metadata": {- "id": "ZRGlUb8O4fPV"- },- "outputs": [],- "source": [- "\n",- "%pip install -U langgraph langchain_google_genai langchain_community langgraph-checkpoint-postgres openai langchain_groq"- ]- },- {- "cell_type": "code",- "source": [- "%%capture --no-stderr\n",- "%pip install --upgrade --quiet playwright > /dev/null\n",- "%pip install --upgrade --quiet lxml browser-use langchain_openai"- ],- "metadata": {- "id": "cMfPUmHIxqTi"- },- "execution_count": 3,- "outputs": []- },- {- "cell_type": "code",- "source": [- "!playwright install"- ],- "metadata": {- "id": "kkZ7jVUOUV7Q"- },- "execution_count": null,- "outputs": []- },- {- "cell_type": "code",- "source": [- "!pip install \"anyio<4\""- ],- "metadata": {- "id": "-_T1MhnGUl2q"- },- "execution_count": null,- "outputs": []- },- {- "cell_type": "code",- "source": [- "# This import is required only for jupyter notebooks, since they have their own eventloop\n",- "import nest_asyncio\n",- "\n",- "nest_asyncio.apply()"- ],- "metadata": {- "id": "yARYirp1UhDR"- },- "execution_count": null,- "outputs": []- },- {- "cell_type": "code",- "source": [- "from langchain_openai import ChatOpenAI\n",- "from google.colab import userdata\n",- "\n",- "\n",- "llm = ChatOpenAI(model=\"gpt-4o-mini\", temperature=0, api_key=userdata.get('Open_api_key'))\n",- "\n",- "\n",- "\n"- ],- "metadata": {- "id": "jyVP10O_5Qck"- },- "execution_count": 4,- "outputs": []+ {+ "cell_type": "code",+ "execution_count": 3,+ "metadata": {+ "id": "cMfPUmHIxqTi"+ },+ "outputs": [],+ "source": [+ "%%capture --no-stderr\n",+ "%pip install --upgrade --quiet playwright > /dev/null\n",+ "%pip install --upgrade --quiet lxml browser-use langchain_openai"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": null,+ "metadata": {+ "id": "kkZ7jVUOUV7Q"+ },+ "outputs": [],+ "source": [+ "!playwright install"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": null,+ "metadata": {+ "id": "-_T1MhnGUl2q"+ },+ "outputs": [],+ "source": [+ "!pip install \"anyio<4\""+ ]+ },+ {+ "cell_type": "code",+ "execution_count": null,+ "metadata": {+ "id": "yARYirp1UhDR"+ },+ "outputs": [],+ "source": [+ "# This import is required only for jupyter notebooks, since they have their own eventloop\n",+ "import nest_asyncio\n",+ "\n",+ "nest_asyncio.apply()"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": 4,+ "metadata": {+ "id": "jyVP10O_5Qck"+ },+ "outputs": [],+ "source": [+ "from google.colab import userdata\n",+ "from langchain_openai import ChatOpenAI\n",+ "\n",+ "llm = ChatOpenAI(model=\"gpt-4o-mini\", temperature=0, api_key=userdata.get('Open_api_key'))\n",+ "\n",+ "\n",+ "\n"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": 5,+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"},+ "id": "e9duizdv5cOH",+ "outputId": "a07b1702-d485-4641-c307-601e6ab34b9b"+ },+ "outputs": [{- "cell_type": "code",- "source": [- "llm.invoke(\"hi\")"- ],- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"- },- "id": "e9duizdv5cOH",- "outputId": "a07b1702-d485-4641-c307-601e6ab34b9b"- },- "execution_count": 5,- "outputs": [- {- "output_type": "execute_result",- "data": {- "text/plain": [- "AIMessage(content='Hello! How can I assist you today?', additional_kwargs={'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 10, 'prompt_tokens': 8, 'total_tokens': 18, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_bd83329f63', 'finish_reason': 'stop', 'logprobs': None}, id='run-28a9088f-7539-412a-aa80-1663be40e74f-0', usage_metadata={'input_tokens': 8, 'output_tokens': 10, 'total_tokens': 18, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}})"- ]- },- "metadata": {},- "execution_count": 5- }+ "data": {+ "text/plain": [+ "AIMessage(content='Hello! How can I assist you today?', additional_kwargs={'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 10, 'prompt_tokens': 8, 'total_tokens': 18, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_bd83329f63', 'finish_reason': 'stop', 'logprobs': None}, id='run-28a9088f-7539-412a-aa80-1663be40e74f-0', usage_metadata={'input_tokens': 8, 'output_tokens': 10, 'total_tokens': 18, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}})"]+ },+ "execution_count": 5,+ "metadata": {},+ "output_type": "execute_result"+ }+ ],+ "source": [+ "llm.invoke(\"hi\")"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": 32,+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"},+ "id": "wS8ouhiVQ2dL",+ "outputId": "653879a8-b3ac-4178-edee-5cd834e3404a"+ },+ "outputs": [{- "cell_type": "code",- "source": [- "from browser_use import Agent, Browser\n",- "from browser_use import BrowserConfig\n",- "from langchain_openai import ChatOpenAI\n",- "import asyncio\n",- "\n",- "# Basic configuration for the browser\n",- "config = BrowserConfig(\n",- " headless=True, # Run in headless mode\n",- " # disable_security=True # Uncomment if you want to disable security\n",- ")\n",- "\n",- "# Initialize the browser with the specified configuration\n",- "browser = Browser(config=config)\n",- "\n",- "async def main():\n",- " # Initialize the agent with the task and language model\n",- " agent = Agent(\n",- " task=\"What is Langgraph\",\n",- " llm=llm, # Replace with your LLM configuration\n",- " browser=browser,\n",- " generate_gif=False # Disable GIF generation\n",- " )\n",- "\n",- " # Run the agent and get results asynchronously\n",- " result = await agent.run()\n",- "\n",- " # Process results token-wise\n",- " for action in result.action_results():\n",- " print(action.extracted_content,end=\"\\r\",flush=True)\n",- " print(\"\\n\\n\")\n",- " # if action.is_done:\n",- " # print(action.extracted_content)\n",- "\n",- " # Close the browser after completion\n",- " await browser.close()\n",- "\n",- "# Run the asynchronous main function\n",- "asyncio.run(main())\n"- ],- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"- },- "id": "wS8ouhiVQ2dL",- "outputId": "653879a8-b3ac-4178-edee-5cd834e3404a"- },- "execution_count": 32,- "outputs": [- {- "output_type": "stream",- "name": "stdout",- "text": [- "🔍 Searched for \"What is Langgraph?\" in Google\n",- "\n",- "\n",- "\n",- "\n",- "\n",- "📄 Extracted page as markdown\n",- ": \n",- "\n",- "\n",- "\n",- "\n",- "\n",- "## Controllable cognitive architecture for any task\n",- "\n",- "LangGraph's flexible framework supports diverse control flows – single agent,\n",- "multi-agent, hierarchical, sequential – and robustly handles realistic,\n",- "complex scenarios. \n",- " \n",- "Ensure reliability with easy-to-add moderation and quality loops that prevent\n",- "agents from veering off course. \n",- " \n",- "Use LangGraph Platform to templatize your cognitive architecture so that\n",- "tools, prompts, and models are easily configurable with LangGraph Platform\n",- "Assistants.\n",- "\n",- "[See the docs ](https://langchain-ai.github.io/langgraph/)\n",- "\n",- "## Designed for human-agent collaboration\n",- "\n",- "With built-in statefulness, LangGraph agents seamlessly collaborate with\n",- "humans by writing drafts for review and awaiting approval before acting.\n",- "Easily inspect the agent’s actions and \"time-travel\" to roll back and take a\n",- "different action to correct course.\n",- "\n",- "[Read a conceptual guide ](https://langchain-\n",- "ai.github.io/langgraph/concepts/agentic_concepts/#human-in-the-loop)\n",- "\n",- ".gif)\n",- "\n",- "\n",- "\n",- "## First class streaming support for better UX design\n",- "\n",- "Bridge user expectations and agent capabilities with native token-by-token\n",- "streaming and streaming of intermediate steps, helpful for showing agent\n",- "reasoning and actions back to the user as they happen. Use LangGraph\n",- "Platform's API to deliver dynamic and interactive user experiences.\n",- "\n",- "[Learn more ](https://langchain-ai.github.io/langgraph/how-tos/streaming-\n",- "tokens/)\n",- "\n",- "## Why choose LangGraph?\n",- "\n",- "### Control, moderate, and guide your agent’s actions.\n",- "\n",- "Prevent agents from veering off course and ensure reliability with easy-to-add\n",- "moderation and quality loops. Add human-in-the-loop to steer and approve agent\n",- "actions.\n",- "\n",- "### Expressive and customizable agent and multi-agent workflows.\n",- "\n",- "LangGraph’s low level abstractions offer the flexibility needed to create\n",- "sophisticated agents. Design diverse control flows – single, multi-agent,\n",- "hierarchical, sequential – all with one framework.\n",- "\n",- "### Persisted context for long-term interactions.\n",- "\n",- "With its stateful design, LangGraph stores conversation histories and session\n",- "data to maintain context over time and ensure smooth handoffs in agentic\n",- "systems.\n",- "\n",- "### First-class streaming support for better UX design.\n",- "\n",- "Bridge user expectations and agent capabilities with native token-by-token\n",- "streaming of intermediate steps, helpful for showing agent reasoning and\n",- "actions back to the user as they happen.\n",- "\n",- "## LangGraph Platform: \n",- "Deploy & develop agents at scale\n",- "\n",- "Craft agent-appropriate UXs using LangGraph Platform's APIs. Quickly deploy\n",- "and scale your agent with purpose-built infrastructure. Choose from multiple\n",- "deployment options.\n",- "\n",- "\n",- "\n",- "## Dynamic APIs for designing agent UXs.\n",- "\n",- "Craft personalized experiences with the long-term memory API to recall\n",- "information across conversation sessions. Expose, update, and rewind your\n",- "app's state for better user visibility, steering, and interaction. Kick off\n",- "long-running background jobs for research-style or multi-step work.\n",- "\n",- "[See the docs ](https://langchain-ai.github.io/langgraph/how-tos/streaming-\n",- "tokens/)\n",- "\n",- "\n",- "\n",- "## Fault-tolerant scalability.\n",- "\n",- "Handle large workloads gracefully with horizontally-scaling servers, task\n",- "queues, and built-in persistence. Enhance resilience with intelligent caching\n",- "and automated retries.\n",- "\n",- "[Learn more in the blog ](https://langchain-ai.github.io/langgraph/how-\n",- "tos/streaming-tokens/)\n",- "\n",- ".gif)\n",- "\n",- "## An end-to-end agent experience.\n",- "\n",- "Simplify prototyping, debugging, and sharing of agents in our visual LangGraph\n",- "Studio. Deploy your application with 1-click deploy with our SaaS offering or\n",- "within your own VPC. Then, monitor app performance with LangSmith.\n",- "\n",- "[Discover LangGraph Studio ](https://langchain-ai.github.io/langgraph/how-\n",- "tos/streaming-tokens/)\n",- "\n",- "\n",- "\n",- "## Introduction to LangGraph\n",- "\n",- "Learn the basics of LangGraph in this LangChain Academy Course. You'll learn\n",- "how to build agents that automate real-world tasks with LangGraph\n",- "orchestration.\n",- "\n",- "[Enroll for free](https://academy.langchain.com/courses/intro-to-\n",- "langgraph)[Book enterprise\n",- "training](https://airtable.com/appGjCAN6126Jm7K8/pagNAp7niHQzRH8zk/form)\n",- "\n",- "\n",- "\n",- "## Deploy agents at scale, monitor carefully, iterate boldly\n",- "\n",- "Design agent-driven user experiences with LangGraph Platform's APIs. Quickly\n",- "deploy and scale your application with infrastructure built for agents. Choose\n",- "from multiple deployment options.\n",- "\n",- "### Fault-tolerant scalability\n",- "\n",- "Handle large workloads gracefully with horizontally-scaling servers, task\n",- "queues, and built-in persistence. Enhance resilience with intelligent caching\n",- "and automated retries.\n",- "\n",- "### Dynamic APIs for designing agent experience\n",- "\n",- "Craft personalized user experiences with APIs featuring long-term memory to\n",- "recall information across conversation sessions. Track, update, and rewind\n",- "your app's state for easy human steering and interaction. Kick off long-\n",- "running background jobs for research-style or multi-step work.\n",- "\n",- "### Integrated developer experience\n",- "\n",- "Simplify prototyping, debugging, and sharing of agents in our visual LangGraph\n",- "Studio. Deploy your application with 1-click deploy with our SaaS offering or\n",- "within your own VPC. Then, monitor app performance with LangSmith.\n",- "\n",- "### Trusted by companies taking agency in AI innovation:\n",- "\n",- "LangGraph helps teams of all sizes, across all industries, from ambitious\n",- "startups to established enterprises.\n",- "\n",- "\n",- "\n",- "“LangChain is streets ahead with what they've put forward with LangGraph.\n",- "LangGraph sets the foundation for how we can build and scale AI workloads —\n",- "from conversational agents, complex task automation, to custom LLM-backed\n",- "experiences that 'just work'. The next chapter in building complex production-\n",- "ready features with LLMs is agentic, and with LangGraph and LangSmith,\n",- "LangChain delivers an out-of-the-box solution to iterate quickly, debug\n",- "immediately, and scale effortlessly.”\n",- "\n",- "\n",- "\n",- "Garrett Spong\n",- "\n",- "Principal SWE\n",- "\n",- "\n",- "\n",- "“LangGraph has been instrumental for our AI development. Its robust framework\n",- "for building stateful, multi-actor applications with LLMs has transformed how\n",- "we evaluate and optimize the performance of our AI guest-facing solutions.\n",- "LangGraph enables granular control over the agent's thought process, which has\n",- "empowered us to make data-driven and deliberate decisions to meet the diverse\n",- "needs of our guests.”\n",- "\n",- "\n",- "\n",- "Andres Torres\n",- "\n",- "Sr. Solutions Architect\n",- "\n",- "\n",- "\n",- "“It's easy to build the prototype of a coding agent, but deceptively hard to\n",- "improve its reliability. Replit wants to give a coding agent to millions of\n",- "users — reliability is our top priority, and will remain so for a long time.\n",- "LangGraph is giving us the control and ergonomics we need to build and ship\n",- "powerful coding agents.”\n",- "\n",- "“As Ally advances its exploration of Generative AI,\n",- "\n",- "%201.webp)\n",- "\n",- "Michele Catasta\n",- "\n",- "President\n",- "\n",- "\n",- "\n",- "“As Ally advances its exploration of Generative AI, our tech labs is excited\n",- "by LangGraph, the new library from LangChain, which is central to our\n",- "experiments with multi-actor agentic workflows. We are committed to deepening\n",- "our partnership with LangChain.”\n",- "\n",- "“As Ally advances its exploration of Generative AI,\n",- "\n",- "\n",- "\n",- "Sathish Muthukrishnan\n",- "\n",- "Chief Information, Data and Digital Officer\n",- "\n",- "\n",- "\n",- "“LangChain is streets ahead with what they've put forward with LangGraph.\n",- "LangGraph sets the foundation for how we can build and scale AI workloads —\n",- "from conversational agents, complex task automation, to custom LLM-backed\n",- "experiences that 'just work'. The next chapter in building complex production-\n",- "ready features with LLMs is agentic, and with LangGraph and LangSmith,\n",- "LangChain delivers an out-of-the-box solution to iterate quickly, debug\n",- "immediately, and scale effortlessly.”\n",- "\n",- "\n",- "\n",- "Garrett Spong\n",- "\n",- "Principal SWE\n",- "\n",- "\n",- "\n",- "“LangGraph has been instrumental for our AI development. Its robust framework\n",- "for building stateful, multi-actor applications with LLMs has transformed how\n",- "we evaluate and optimize the performance of our AI guest-facing solutions.\n",- "LangGraph enables granular control over the agent's thought process, which has\n",- "empowered us to make data-driven and deliberate decisions to meet the diverse\n",- "needs of our guests.”\n",- "\n",- "\n",- "\n",- "Andres Torres\n",- "\n",- "Sr. Solutions Architect\n",- "\n",- "\n",- "\n",- "“It's easy to build the prototype of a coding agent, but deceptively hard to\n",- "improve its reliability. Replit wants to give a coding agent to millions of\n",- "users — reliability is our top priority, and will remain so for a long time.\n",- "LangGraph is giving us the control and ergonomics we need to build and ship\n",- "powerful coding agents.”\n",- "\n",- "“As Ally advances its exploration of Generative AI,\n",- "\n",- "%201.webp)\n",- "\n",- "Michele Catasta\n",- "\n",- "President\n",- "\n",- "\n",- "\n",- "“As Ally advances its exploration of Generative AI, our tech labs is excited\n",- "by LangGraph, the new library from LangChain, which is central to our\n",- "experiments with multi-actor agentic workflows. We are committed to deepening\n",- "our partnership with LangChain.”\n",- "\n",- "“As Ally advances its exploration of Generative AI,\n",- "\n",- "\n",- "\n",- "Sathish Muthukrishnan\n",- "\n",- "Chief Information, Data and Digital Officer\n",- "\n",- "## LangGraph FAQs\n",- "\n",- "Do I need to use LangChain to use LangGraph? What’s the difference?\n",- "\n",- "No. LangGraph is an orchestration framework for complex agentic systems and is\n",- "more low-level and controllable than LangChain agents. LangChain provides a\n",- "standard interface to interact with models and other components, useful for\n",- "straight-forward chains and retrieval flows.\n",- "\n",- "How is LangGraph different from other agent frameworks?\n",- "\n",- "Other agentic frameworks can work for simple, generic tasks but fall short for\n",- "complex tasks bespoke to a company’s needs. LangGraph provides a more\n",- "expressive framework to handle companies’ unique tasks without restricting\n",- "users to a single black-box cognitive architecture.\n",- "\n",- "Does LangGraph impact the performance of my app?\n",- "\n",- "LangGraph will not add any overhead to your code and is specifically designed\n",- "with streaming workflows in mind.\n",- "\n",- "Is LangGraph open source? Is it free?\n",- "\n",- "Yes. LangGraph is an MIT-licensed open-source library and is free to use.\n",- "\n",- "How are LangGraph and LangGraph Platform different?\n",- "\n",- "LangGraph is a stateful, orchestration framework that brings added control to\n",- "agent workflows. LangGraph Platform is a service for deploying and scaling\n",- "LangGraph applications, with an opinionated API for building agent UXs, plus\n",- "an integrated developer studio.\n",- "\n",- "LangGraph (open source)\n",- "\n",- "LangGraph Platform\n",- "\n",- "Features\n",- "\n",- "Stateful orchestration framework for agentic applications\n",- "\n",- "Scalable infrastructure for deploying LangGraph applications \n",- "\n",- "Python and JavaScript\n",- "\n",- "Python and JavaScript \n",- "\n",- "None\n",- "\n",- "Yes - useful for retrieving & updating state or long-term memory, or creating\n",- "a configurable assistant \n",- "\n",- "Basic\n",- "\n",- "Dedicated mode for token-by-token messages \n",- "\n",- "Community contributed\n",- "\n",- "Supported out-of-the-box \n",- "\n",- "Self-managed\n",- "\n",- "Managed Postgres with efficient storage \n",- "\n",- "Self-managed\n",- "\n",- "\\- Cloud SaaS \n",- "\\- Free self-hosted \n",- "\\- Enterprise \n",- "(BYOC or paid self-hosted) \n",- "\n",- "Self-managed\n",- "\n",- "Auto-scaling of task queues and servers \n",- "\n",- "Self-managed\n",- "\n",- "Automated retries \n",- "\n",- "Simple threading\n",- "\n",- "Supports double-texting \n",- "\n",- "None\n",- "\n",- "Cron scheduling \n",- "\n",- "None\n",- "\n",- "Integrated with LangSmith for observability \n",- "\n",- "LangGraph Studio for Desktop\n",- "\n",- "LangGraph Studio for Desktop & Cloud \n",- "\n",- "What are my deployment options for LangGraph Platform?\n",- "\n",- "We currently have the following deployment options for LangGraph applications: \n",- " \n",- "**Self-Hosted Lite** : A free (up to 1M nodes executed), limited version of\n",- "LangGraph Platform that you can run locally or in a self-hosted manner. This\n",- "version requires a LangSmith API key and logs all usage to LangSmith. Fewer\n",- "features are available than in paid plans. \n",- "**Cloud SaaS:** Fully managed and hosted as part of LangSmith, with automatic\n",- "updates and zero maintenance. \n",- "**Bring Your Own Cloud (BYOC):** Deploy LangGraph Platform within your VPC,\n",- "provisioned and run as a service. Keep data in your environment while\n",- "outsourcing the management of the service. \n",- "**Self-Hosted Enterprise:** Deploy LangGraph entirely on your own\n",- "infrastructure.\n",- "\n",- "Is LangGraph Platform open source?\n",- "\n",- "No. LangGraph Platform is proprietary software. \n",- " \n",- "There is a free, self-hosted version of LangGraph Platform with access to\n",- "basic features. The Cloud SaaS deployment option is free while in beta, but\n",- "will eventually be a paid service. We will always give ample notice before\n",- "charging for a service and reward our early adopters with preferential\n",- "pricing. The Bring Your Own Cloud (BYOC) and Self-Hosted Enterprise options\n",- "are also paid services. [Contact our sales team](/contact-sales) to learn\n",- "more. \n",- " \n",- "For more information, see our [LangGraph Platform pricing page](/pricing-\n",- "langgraph-platform).\n",- "\n",- "## Ready to start shipping reliable GenAI apps faster?\n",- "\n",- "Get started with LangChain, LangSmith, and LangGraph to enhance your LLM app\n",- "development, from prototype to production.\n",- "\n",- "[Contact Us](/contact-sales)[Sign Up](https://smith.langchain.com/)\n",- "\n",- "\n",- "\n",- "\n",- "\n",- "LangGraph is a flexible framework designed for building and scaling agentic applications. It allows for complex task handling and human-agent collaboration, supporting various control flows such as single-agent, multi-agent, hierarchical, and sequential. Key features include:\n",- "\n",- "- **Statefulness**: LangGraph agents maintain context over time, enabling smooth interactions.\n",- "- **Streaming Support**: It provides native token-by-token streaming for better user experience.\n",- "- **Moderation and Quality Loops**: These features ensure agents remain reliable and on course.\n",- "- **Dynamic APIs**: LangGraph offers APIs for crafting personalized user experiences and managing long-term memory.\n",- "- **Deployment Options**: It supports various deployment methods, including self-hosted and cloud solutions.\n",- "\n",- "\n",- "\n",- "\n"- ]- }- ]+ "name": "stdout",+ "output_type": "stream",+ "text": [+ "🔍 Searched for \"What is Langgraph?\" in Google\n",+ "\n",+ "\n",+ "\n",+ "\n",+ "\n",+ "📄 Extracted page as markdown\n",+ ": \n",+ "\n",+ "\n",+ "\n",+ "\n",+ "\n",+ "## Controllable cognitive architecture for any task\n",+ "\n",+ "LangGraph's flexible framework supports diverse control flows – single agent,\n",+ "multi-agent, hierarchical, sequential – and robustly handles realistic,\n",+ "complex scenarios. \n",+ " \n",+ "Ensure reliability with easy-to-add moderation and quality loops that prevent\n",+ "agents from veering off course. \n",+ " \n",+ "Use LangGraph Platform to templatize your cognitive architecture so that\n",+ "tools, prompts, and models are easily configurable with LangGraph Platform\n",+ "Assistants.\n",+ "\n",+ "[See the docs ](https://langchain-ai.github.io/langgraph/)\n",+ "\n",+ "## Designed for human-agent collaboration\n",+ "\n",+ "With built-in statefulness, LangGraph agents seamlessly collaborate with\n",+ "humans by writing drafts for review and awaiting approval before acting.\n",+ "Easily inspect the agent’s actions and \"time-travel\" to roll back and take a\n",+ "different action to correct course.\n",+ "\n",+ "[Read a conceptual guide ](https://langchain-\n",+ "ai.github.io/langgraph/concepts/agentic_concepts/#human-in-the-loop)\n",+ "\n",+ ".gif)\n",+ "\n",+ "\n",+ "\n",+ "## First class streaming support for better UX design\n",+ "\n",+ "Bridge user expectations and agent capabilities with native token-by-token\n",+ "streaming and streaming of intermediate steps, helpful for showing agent\n",+ "reasoning and actions back to the user as they happen. Use LangGraph\n",+ "Platform's API to deliver dynamic and interactive user experiences.\n",+ "\n",+ "[Learn more ](https://langchain-ai.github.io/langgraph/how-tos/streaming-\n",+ "tokens/)\n",+ "\n",+ "## Why choose LangGraph?\n",+ "\n",+ "### Control, moderate, and guide your agent’s actions.\n",+ "\n",+ "Prevent agents from veering off course and ensure reliability with easy-to-add\n",+ "moderation and quality loops. Add human-in-the-loop to steer and approve agent\n",+ "actions.\n",+ "\n",+ "### Expressive and customizable agent and multi-agent workflows.\n",+ "\n",+ "LangGraph’s low level abstractions offer the flexibility needed to create\n",+ "sophisticated agents. Design diverse control flows – single, multi-agent,\n",+ "hierarchical, sequential – all with one framework.\n",+ "\n",+ "### Persisted context for long-term interactions.\n",+ "\n",+ "With its stateful design, LangGraph stores conversation histories and session\n",+ "data to maintain context over time and ensure smooth handoffs in agentic\n",+ "systems.\n",+ "\n",+ "### First-class streaming support for better UX design.\n",+ "\n",+ "Bridge user expectations and agent capabilities with native token-by-token\n",+ "streaming of intermediate steps, helpful for showing agent reasoning and\n",+ "actions back to the user as they happen.\n",+ "\n",+ "## LangGraph Platform: \n",+ "Deploy & develop agents at scale\n",+ "\n",+ "Craft agent-appropriate UXs using LangGraph Platform's APIs. Quickly deploy\n",+ "and scale your agent with purpose-built infrastructure. Choose from multiple\n",+ "deployment options.\n",+ "\n",+ "\n",+ "\n",+ "## Dynamic APIs for designing agent UXs.\n",+ "\n",+ "Craft personalized experiences with the long-term memory API to recall\n",+ "information across conversation sessions. Expose, update, and rewind your\n",+ "app's state for better user visibility, steering, and interaction. Kick off\n",+ "long-running background jobs for research-style or multi-step work.\n",+ "\n",+ "[See the docs ](https://langchain-ai.github.io/langgraph/how-tos/streaming-\n",+ "tokens/)\n",+ "\n",+ "\n",+ "\n",+ "## Fault-tolerant scalability.\n",+ "\n",+ "Handle large workloads gracefully with horizontally-scaling servers, task\n",+ "queues, and built-in persistence. Enhance resilience with intelligent caching\n",+ "and automated retries.\n",+ "\n",+ "[Learn more in the blog ](https://langchain-ai.github.io/langgraph/how-\n",+ "tos/streaming-tokens/)\n",+ "\n",+ ".gif)\n",+ "\n",+ "## An end-to-end agent experience.\n",+ "\n",+ "Simplify prototyping, debugging, and sharing of agents in our visual LangGraph\n",+ "Studio. Deploy your application with 1-click deploy with our SaaS offering or\n",+ "within your own VPC. Then, monitor app performance with LangSmith.\n",+ "\n",+ "[Discover LangGraph Studio ](https://langchain-ai.github.io/langgraph/how-\n",+ "tos/streaming-tokens/)\n",+ "\n",+ "\n",+ "\n",+ "## Introduction to LangGraph\n",+ "\n",+ "Learn the basics of LangGraph in this LangChain Academy Course. You'll learn\n",+ "how to build agents that automate real-world tasks with LangGraph\n",+ "orchestration.\n",+ "\n",+ "[Enroll for free](https://academy.langchain.com/courses/intro-to-\n",+ "langgraph)[Book enterprise\n",+ "training](https://airtable.com/appGjCAN6126Jm7K8/pagNAp7niHQzRH8zk/form)\n",+ "\n",+ "\n",+ "\n",+ "## Deploy agents at scale, monitor carefully, iterate boldly\n",+ "\n",+ "Design agent-driven user experiences with LangGraph Platform's APIs. Quickly\n",+ "deploy and scale your application with infrastructure built for agents. Choose\n",+ "from multiple deployment options.\n",+ "\n",+ "### Fault-tolerant scalability\n",+ "\n",+ "Handle large workloads gracefully with horizontally-scaling servers, task\n",+ "queues, and built-in persistence. Enhance resilience with intelligent caching\n",+ "and automated retries.\n",+ "\n",+ "### Dynamic APIs for designing agent experience\n",+ "\n",+ "Craft personalized user experiences with APIs featuring long-term memory to\n",+ "recall information across conversation sessions. Track, update, and rewind\n",+ "your app's state for easy human steering and interaction. Kick off long-\n",+ "running background jobs for research-style or multi-step work.\n",+ "\n",+ "### Integrated developer experience\n",+ "\n",+ "Simplify prototyping, debugging, and sharing of agents in our visual LangGraph\n",+ "Studio. Deploy your application with 1-click deploy with our SaaS offering or\n",+ "within your own VPC. Then, monitor app performance with LangSmith.\n",+ "\n",+ "### Trusted by companies taking agency in AI innovation:\n",+ "\n",+ "LangGraph helps teams of all sizes, across all industries, from ambitious\n",+ "startups to established enterprises.\n",+ "\n",+ "\n",+ "\n",+ "“LangChain is streets ahead with what they've put forward with LangGraph.\n",+ "LangGraph sets the foundation for how we can build and scale AI workloads —\n",+ "from conversational agents, complex task automation, to custom LLM-backed\n",+ "experiences that 'just work'. The next chapter in building complex production-\n",+ "ready features with LLMs is agentic, and with LangGraph and LangSmith,\n",+ "LangChain delivers an out-of-the-box solution to iterate quickly, debug\n",+ "immediately, and scale effortlessly.”\n",+ "\n",+ "\n",+ "\n",+ "Garrett Spong\n",+ "\n",+ "Principal SWE\n",+ "\n",+ "\n",+ "\n",+ "“LangGraph has been instrumental for our AI development. Its robust framework\n",+ "for building stateful, multi-actor applications with LLMs has transformed how\n",+ "we evaluate and optimize the performance of our AI guest-facing solutions.\n",+ "LangGraph enables granular control over the agent's thought process, which has\n",+ "empowered us to make data-driven and deliberate decisions to meet the diverse\n",+ "needs of our guests.”\n",+ "\n",+ "\n",+ "\n",+ "Andres Torres\n",+ "\n",+ "Sr. Solutions Architect\n",+ "\n",+ "\n",+ "\n",+ "“It's easy to build the prototype of a coding agent, but deceptively hard to\n",+ "improve its reliability. Replit wants to give a coding agent to millions of\n",+ "users — reliability is our top priority, and will remain so for a long time.\n",+ "LangGraph is giving us the control and ergonomics we need to build and ship\n",+ "powerful coding agents.”\n",+ "\n",+ "“As Ally advances its exploration of Generative AI,\n",+ "\n",+ "%201.webp)\n",+ "\n",+ "Michele Catasta\n",+ "\n",+ "President\n",+ "\n",+ "\n",+ "\n",+ "“As Ally advances its exploration of Generative AI, our tech labs is excited\n",+ "by LangGraph, the new library from LangChain, which is central to our\n",+ "experiments with multi-actor agentic workflows. We are committed to deepening\n",+ "our partnership with LangChain.”\n",+ "\n",+ "“As Ally advances its exploration of Generative AI,\n",+ "\n",+ "\n",+ "\n",+ "Sathish Muthukrishnan\n",+ "\n",+ "Chief Information, Data and Digital Officer\n",+ "\n",+ "\n",+ "\n",+ "“LangChain is streets ahead with what they've put forward with LangGraph.\n",+ "LangGraph sets the foundation for how we can build and scale AI workloads —\n",+ "from conversational agents, complex task automation, to custom LLM-backed\n",+ "experiences that 'just work'. The next chapter in building complex production-\n",+ "ready features with LLMs is agentic, and with LangGraph and LangSmith,\n",+ "LangChain delivers an out-of-the-box solution to iterate quickly, debug\n",+ "immediately, and scale effortlessly.”\n",+ "\n",+ "\n",+ "\n",+ "Garrett Spong\n",+ "\n",+ "Principal SWE\n",+ "\n",+ "\n",+ "\n",+ "“LangGraph has been instrumental for our AI development. Its robust framework\n",+ "for building stateful, multi-actor applications with LLMs has transformed how\n",+ "we evaluate and optimize the performance of our AI guest-facing solutions.\n",+ "LangGraph enables granular control over the agent's thought process, which has\n",+ "empowered us to make data-driven and deliberate decisions to meet the diverse\n",+ "needs of our guests.”\n",+ "\n",+ "\n",+ "\n",+ "Andres Torres\n",+ "\n",+ "Sr. Solutions Architect\n",+ "\n",+ "\n",+ "\n",+ "“It's easy to build the prototype of a coding agent, but deceptively hard to\n",+ "improve its reliability. Replit wants to give a coding agent to millions of\n",+ "users — reliability is our top priority, and will remain so for a long time.\n",+ "LangGraph is giving us the control and ergonomics we need to build and ship\n",+ "powerful coding agents.”\n",+ "\n",+ "“As Ally advances its exploration of Generative AI,\n",+ "\n",+ "%201.webp)\n",+ "\n",+ "Michele Catasta\n",+ "\n",+ "President\n",+ "\n",+ "\n",+ "\n",+ "“As Ally advances its exploration of Generative AI, our tech labs is excited\n",+ "by LangGraph, the new library from LangChain, which is central to our\n",+ "experiments with multi-actor agentic workflows. We are committed to deepening\n",+ "our partnership with LangChain.”\n",+ "\n",+ "“As Ally advances its exploration of Generative AI,\n",+ "\n",+ "\n",+ "\n",+ "Sathish Muthukrishnan\n",+ "\n",+ "Chief Information, Data and Digital Officer\n",+ "\n",+ "## LangGraph FAQs\n",+ "\n",+ "Do I need to use LangChain to use LangGraph? What’s the difference?\n",+ "\n",+ "No. LangGraph is an orchestration framework for complex agentic systems and is\n",+ "more low-level and controllable than LangChain agents. LangChain provides a\n",+ "standard interface to interact with models and other components, useful for\n",+ "straight-forward chains and retrieval flows.\n",+ "\n",+ "How is LangGraph different from other agent frameworks?\n",+ "\n",+ "Other agentic frameworks can work for simple, generic tasks but fall short for\n",+ "complex tasks bespoke to a company’s needs. LangGraph provides a more\n",+ "expressive framework to handle companies’ unique tasks without restricting\n",+ "users to a single black-box cognitive architecture.\n",+ "\n",+ "Does LangGraph impact the performance of my app?\n",+ "\n",+ "LangGraph will not add any overhead to your code and is specifically designed\n",+ "with streaming workflows in mind.\n",+ "\n",+ "Is LangGraph open source? Is it free?\n",+ "\n",+ "Yes. LangGraph is an MIT-licensed open-source library and is free to use.\n",+ "\n",+ "How are LangGraph and LangGraph Platform different?\n",+ "\n",+ "LangGraph is a stateful, orchestration framework that brings added control to\n",+ "agent workflows. LangGraph Platform is a service for deploying and scaling\n",+ "LangGraph applications, with an opinionated API for building agent UXs, plus\n",+ "an integrated developer studio.\n",+ "\n",+ "LangGraph (open source)\n",+ "\n",+ "LangGraph Platform\n",+ "\n",+ "Features\n",+ "\n",+ "Stateful orchestration framework for agentic applications\n",+ "\n",+ "Scalable infrastructure for deploying LangGraph applications \n",+ "\n",+ "Python and JavaScript\n",+ "\n",+ "Python and JavaScript \n",+ "\n",+ "None\n",+ "\n",+ "Yes - useful for retrieving & updating state or long-term memory, or creating\n",+ "a configurable assistant \n",+ "\n",+ "Basic\n",+ "\n",+ "Dedicated mode for token-by-token messages \n",+ "\n",+ "Community contributed\n",+ "\n",+ "Supported out-of-the-box \n",+ "\n",+ "Self-managed\n",+ "\n",+ "Managed Postgres with efficient storage \n",+ "\n",+ "Self-managed\n",+ "\n",+ "\\- Cloud SaaS \n",+ "\\- Free self-hosted \n",+ "\\- Enterprise \n",+ "(BYOC or paid self-hosted) \n",+ "\n",+ "Self-managed\n",+ "\n",+ "Auto-scaling of task queues and servers \n",+ "\n",+ "Self-managed\n",+ "\n",+ "Automated retries \n",+ "\n",+ "Simple threading\n",+ "\n",+ "Supports double-texting \n",+ "\n",+ "None\n",+ "\n",+ "Cron scheduling \n",+ "\n",+ "None\n",+ "\n",+ "Integrated with LangSmith for observability \n",+ "\n",+ "LangGraph Studio for Desktop\n",+ "\n",+ "LangGraph Studio for Desktop & Cloud \n",+ "\n",+ "What are my deployment options for LangGraph Platform?\n",+ "\n",+ "We currently have the following deployment options for LangGraph applications: \n",+ " \n",+ "**Self-Hosted Lite** : A free (up to 1M nodes executed), limited version of\n",+ "LangGraph Platform that you can run locally or in a self-hosted manner. This\n",+ "version requires a LangSmith API key and logs all usage to LangSmith. Fewer\n",+ "features are available than in paid plans. \n",+ "**Cloud SaaS:** Fully managed and hosted as part of LangSmith, with automatic\n",+ "updates and zero maintenance. \n",+ "**Bring Your Own Cloud (BYOC):** Deploy LangGraph Platform within your VPC,\n",+ "provisioned and run as a service. Keep data in your environment while\n",+ "outsourcing the management of the service. \n",+ "**Self-Hosted Enterprise:** Deploy LangGraph entirely on your own\n",+ "infrastructure.\n",+ "\n",+ "Is LangGraph Platform open source?\n",+ "\n",+ "No. LangGraph Platform is proprietary software. \n",+ " \n",+ "There is a free, self-hosted version of LangGraph Platform with access to\n",+ "basic features. The Cloud SaaS deployment option is free while in beta, but\n",+ "will eventually be a paid service. We will always give ample notice before\n",+ "charging for a service and reward our early adopters with preferential\n",+ "pricing. The Bring Your Own Cloud (BYOC) and Self-Hosted Enterprise options\n",+ "are also paid services. [Contact our sales team](/contact-sales) to learn\n",+ "more. \n",+ " \n",+ "For more information, see our [LangGraph Platform pricing page](/pricing-\n",+ "langgraph-platform).\n",+ "\n",+ "## Ready to start shipping reliable GenAI apps faster?\n",+ "\n",+ "Get started with LangChain, LangSmith, and LangGraph to enhance your LLM app\n",+ "development, from prototype to production.\n",+ "\n",+ "[Contact Us](/contact-sales)[Sign Up](https://smith.langchain.com/)\n",+ "\n",+ "\n",+ "\n",+ "\n",+ "\n",+ "LangGraph is a flexible framework designed for building and scaling agentic applications. It allows for complex task handling and human-agent collaboration, supporting various control flows such as single-agent, multi-agent, hierarchical, and sequential. Key features include:\n",+ "\n",+ "- **Statefulness**: LangGraph agents maintain context over time, enabling smooth interactions.\n",+ "- **Streaming Support**: It provides native token-by-token streaming for better user experience.\n",+ "- **Moderation and Quality Loops**: These features ensure agents remain reliable and on course.\n",+ "- **Dynamic APIs**: LangGraph offers APIs for crafting personalized user experiences and managing long-term memory.\n",+ "- **Deployment Options**: It supports various deployment methods, including self-hosted and cloud solutions.\n",+ "\n",+ "\n",+ "\n",+ "\n"+ ]+ }+ ],+ "source": [+ "import asyncio\n",+ "\n",+ "from langchain_openai import ChatOpenAI\n",+ "\n",+ "from browser_use import Agent, Browser, BrowserConfig\n",+ "\n",+ "# Basic configuration for the browser\n",+ "config = BrowserConfig(\n",+ " headless=True, # Run in headless mode\n",+ " # disable_security=True # Uncomment if you want to disable security\n",+ ")\n",+ "\n",+ "# Initialize the browser with the specified configuration\n",+ "browser = Browser(config=config)\n",+ "\n",+ "async def main():\n",+ " # Initialize the agent with the task and language model\n",+ " agent = Agent(\n",+ " task=\"What is Langgraph\",\n",+ " llm=llm, # Replace with your LLM configuration\n",+ " browser=browser,\n",+ " generate_gif=False # Disable GIF generation\n",+ " )\n",+ "\n",+ " # Run the agent and get results asynchronously\n",+ " result = await agent.run()\n",+ "\n",+ " # Process results token-wise\n",+ " for action in result.action_results():\n",+ " print(action.extracted_content,end=\"\\r\",flush=True)\n",+ " print(\"\\n\\n\")\n",+ " # if action.is_done:\n",+ " # print(action.extracted_content)\n",+ "\n",+ " # Close the browser after completion\n",+ " await browser.close()\n",+ "\n",+ "# Run the asynchronous main function\n",+ "asyncio.run(main())\n"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": 11,+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"},+ "id": "TFK-fNoLDFcF",+ "outputId": "d78fbeae-c8f0-4c26-e0e3-7a0a683d3fc1"+ },+ "outputs": [{- "cell_type": "code",- "source": [- "from browser_use import Agent, Browser\n",- "from playwright.async_api import BrowserContext\n",- "from browser_use import BrowserConfig\n",- "from langchain_openai import ChatOpenAI\n",- "# from browser_use import Agent\n",- "import asyncio\n",- "# Basic configuration\n",- "config = BrowserConfig(\n",- " headless=True,\n",- "\n",- " # disable_security=True\n",- ")\n",- "# Reuse existing browser\n",- "browser = Browser(config=config)\n",- "# async def main():\n",- "agent = Agent(\n",- " task=\"what is langchain\",\n",- " llm=llm,\n",- " browser=browser,\n",- " generate_gif = False # Browser instance will be reused\n",- " )\n",- "\n",- "result = await agent.run()\n",- "print(result)\n",- "# Manually close the browser\n",- "# asyncio.run(main())\n",- "await browser.close()\n"- ],- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"- },- "id": "TFK-fNoLDFcF",- "outputId": "d78fbeae-c8f0-4c26-e0e3-7a0a683d3fc1"- },- "execution_count": 11,- "outputs": [- {- "output_type": "stream",- "name": "stdout",- "text": [- "AgentHistoryList(all_results=[ActionResult(is_done=False, extracted_content='🔍 Searched for \"What is LangChain?\" in Google', error=None, include_in_memory=True), ActionResult(is_done=False, extracted_content=\"📄 Extracted page as markdown\\n: # Filters and Topics\\n\\n[All](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQIEhAB)\\n\\n[Images](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=2&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQtKgLegQIExAB)\\n\\n[Videos](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=7&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQtKgLegQIERAB)\\n\\n[Forums](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=18&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQs6gLegQIDxAB)\\n\\nWeb\\n\\n[Flights](/travel/flights?sca_esv=4c6b8dc13bab3e46&output=search&q=What+is+LangChain%3F&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&ved=1t:200715&ictx=111)\\n\\n[Finance](/finance?sca_esv=4c6b8dc13bab3e46&output=search&q=What+is+LangChain%3F&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQIDBAB)\\n\\nMore\\n\\n[Books](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=36&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQINxAB)\\n\\n[News](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&tbm=nws&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQINhAB)\\n\\n[Shopping](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=28&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&ved=1t:220175&ictx=111)\\n\\nTools\\n\\nAny time\\n\\nAny time\\n\\n[Past\\nhour](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:h&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAc)\\n\\n[Past 24\\nhours](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:d&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAg)\\n\\n[Past\\nweek](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:w&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAk)\\n\\n[Past\\nmonth](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:m&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAo)\\n\\n[Past\\nyear](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:y&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAs)\\n\\nCustom range...\\n\\nCustom date range\\n\\nFromTo\\n\\nGo\\n\\nAll results\\n\\nAll results\\n\\n[Verbatim](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=li:1&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEBM)\\n\\n[ Advanced Search\\n](https://www.google.com/advanced_search?q=What+is+LangChain%3F&udm=14)\\n\\nCtrl+Shift+X to select\\n\\n\\n\\n# Search settings\\n\\n[Search CustomizationOff](/history/optout?hl=en)\\n\\n[SafeSearchBlurring\\non](/safesearch?prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain?%26udm%3D14&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8JsIegQIChAH)\\n\\n[LanguageEnglish](/preferences?lang=1&hl=en&prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain%253F%26sca_esv%3D4c6b8dc13bab3e46%26udm%3D14#languages)\\n\\n[Dark themeDevice\\ndefault](/setprefs?hl=en&prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain?%26udm%3D14%26pccc%3D1&sig=0_jfSkJcafppJyKAIkCWZpHFXzfrs%3D&cs=2&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQqsEHegQIChAJ&ictx=1)\\n\\n[More\\nsettings](/preferences?hl=en&prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain%253F%26sca_esv%3D4c6b8dc13bab3e46%26udm%3D14)\\n\\nSend feedback\\n\\n[Help](https://support.google.com/websearch/?p=dsrp_search_hc&hl=en) •\\n[Privacy](https://policies.google.com/privacy?hl=en&fg=1) •\\n[Terms](https://policies.google.com/terms?hl=en&fg=1)\\n\\n# Search Results\\n\\n[ \\nLangChainLangChainhttps://www.langchain.com](https://www.langchain.com/)\\n\\nLangChain\\n\\nhttps://www.langchain.com\\n\\n _LangChain_ is a composable framework to build with LLMs. LangGraph is the\\norchestration framework for controllable agentic workflows. Run.\\n\\n\\u200e[Docs](https://python.langchain.com/docs/introduction/) ·\\n\\u200e[Products](https://www.langchain.com/langchain) · \\u200e[LangChain\\nAcademy](https://academy.langchain.com/) · \\u200e[Join the LangChain\\nCommunity](https://www.langchain.com/join-community)\\n\\n[ \\nWhat is\\nLangChain?Amazon\\nWeb Serviceshttps://aws.amazon.com › ... › Generative\\nAI](https://aws.amazon.com/what-is/langchain/)\\n\\nAmazon Web Services\\n\\nhttps://aws.amazon.com › ... › Generative AI\\n\\nLangChain _provides AI developers with tools to connect language models with\\nexternal data sources_. It is open-source and supported by an active\\ncommunity.\\n\\n[ \\nWhat Is LangChain and How to Use It: A\\nGuideTechTargethttps://www.techtarget.com\\n› definition ›\\nLangChain](https://www.techtarget.com/searchenterpriseai/definition/LangChain)\\n\\nTechTarget\\n\\nhttps://www.techtarget.com › definition › LangChain\\n\\n _LangChain is an open source framework_ that enables software developers\\nworking with artificial intelligence (AI) and its machine learning subset to\\ncombine ...\\n\\n[ \\nIntroduction | 🦜️ LangChainLangChainhttps://python.langchain.com › docs › introduction](https://python.langchain.com/docs/introduction/)\\n\\nLangChain\\n\\nhttps://python.langchain.com › docs › introduction\\n\\n _LangChain_ is a framework for developing applications powered by large\\nlanguage models (LLMs). LangChain simplifies every stage of the LLM\\napplication lifecycle.\\n\\n\\u200e[Introduction](https://python.langchain.com/v0.1/docs/get_started/introduction/)\\n·\\n\\u200e[Langchain.agents...](https://api.python.langchain.com/en/latest/agents/langchain.agents.tool_calling_agent.base.create_tool_calling_agent.html)\\n· \\u200e[LangChain v0.3](https://python.langchain.com/docs/versions/v0_3/) ·\\n\\u200e[Langchain_core.tools.](https://api.python.langchain.com/en/latest/tools/langchain_core.tools.tool.html)\\n\\n[ \\nWhat Is\\nLangChain?IBMhttps://www.ibm.com\\n› think › topics › langchain](https://www.ibm.com/think/topics/langchain)\\n\\nIBM\\n\\nhttps://www.ibm.com › think › topics › langchain\\n\\nLangChain is essentially _a library of abstractions for Python and Javascript_\\n, representing common steps and concepts necessary to work with language\\nmodels.\\n\\n[ \\nWhat is\\nLangChain?YouTube\\n· IBM Technology287.6K+ views · 10 months\\nago](https://www.youtube.com/watch?v=1bUy-1hGZpI)\\n\\nYouTube · IBM Technology\\n\\n287.6K+ views · 10 months ago\\n\\nLang chain is _an open-source orchestration framework_ for the development of\\napplications that use large language models.\\n\\n[ \\nWhat is Langchain and why should I care as a\\ndeveloper?Medium\\n· Logan Kilpatrick370+ likes · 1 year ago](https://medium.com/around-the-\\nprompt/what-is-langchain-and-why-should-i-care-as-a-developer-b2d952c42b28)\\n\\nMedium · Logan Kilpatrick\\n\\n370+ likes · 1 year ago\\n\\n _Langchain_ makes creating agents using large language models simple through\\ntheir agents API. Developers can use OpenAI functions or other means ...\\n\\n[ \\nLangChainWikipediahttps://en.wikipedia.org\\n› wiki › LangChain](https://en.wikipedia.org/wiki/LangChain)\\n\\nWikipedia\\n\\nhttps://en.wikipedia.org › wiki › LangChain\\n\\nLangChain is a software framework that helps facilitate the integration of\\nlarge language models (LLMs) into applications.\\n\\n\\u200e[History](https://en.wikipedia.org/wiki/LangChain#History) ·\\n\\u200e[Capabilities](https://en.wikipedia.org/wiki/LangChain#Capabilities) ·\\n\\u200e[LangChain tools](https://en.wikipedia.org/wiki/LangChain#LangChain_tools)\\n\\n[ \\nWhat Is LangChain? A Complete Comprehensive\\nOverviewDataStaxhttps://www.datastax.com\\n› guides › what-is-langchain](https://www.datastax.com/guides/what-is-\\nlangchain)\\n\\nDataStax\\n\\nhttps://www.datastax.com › guides › what-is-langchain\\n\\nNov 9, 2023 — LangChain is _a Python framework designed to streamline AI\\napplication development_ , focusing on real-time data processing and\\nintegration with ...\\n\\n[ \\nWhat Is\\nLangChain?Google\\nCloudhttps://cloud.google.com › use-cases ›\\nlangchain](https://cloud.google.com/use-cases/langchain)\\n\\nGoogle Cloud\\n\\nhttps://cloud.google.com › use-cases › langchain\\n\\n _LangChain_ is a programming language platform that lets developers construct\\nand connect models to access, transform, and share data seamlessly.\\n\\n\\u200e[Langchain And Ai](https://cloud.google.com/use-\\ncases/langchain#:~:text=LangChain%20and%20AI) · \\u200e[How Does Langchain\\nWork?](https://cloud.google.com/use-\\ncases/langchain#:~:text=How%20does%20LangChain%20work%3F) · \\u200e[Key Features Of\\nLangchain](https://cloud.google.com/use-\\ncases/langchain#:~:text=Key%20features%20of%20LangChain)\\n\\n# Page Navigation\\n\\n| 1|\\n[2](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=10&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAE)|\\n[3](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=20&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAG)|\\n[4](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=30&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAI)|\\n[5](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=40&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAK)|\\n[6](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=50&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAM)|\\n[7](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=60&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAO)|\\n[8](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=70&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAQ)|\\n[9](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=80&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAS)|\\n[10](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=90&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAU)|\\n[Next](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=10&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8NMDegQICBAW) \\n---|---|---|---|---|---|---|---|---|---|---|--- \\n \\n# Footer Links\\n\\nWasco County, Oregon \\\\- From your IP address\\n\\n\\\\-\\n\\nUpdate location\\n\\nCan't update your locationLearn more\\n\\nUpdating location...\\n\\n[Help](https://support.google.com/websearch/?p=ws_results_help&hl=en&fg=1)Send\\nfeedback[Privacy](https://policies.google.com/privacy?hl=en&fg=1)[Terms](https://policies.google.com/terms?hl=en&fg=1)\\n\\n\\n\", error=None, include_in_memory=False), ActionResult(is_done=True, extracted_content='LangChain is a composable framework designed for building applications with large language models (LLMs). It simplifies the integration of language models with external data sources and is open-source, supported by an active community. LangChain provides tools for developers to streamline the application lifecycle of LLMs.', error=None, include_in_memory=False)], all_model_outputs=[{'search_google': {'query': 'What is LangChain?'}}, {'extract_content': {'include_links': True}}, {'done': {'text': 'LangChain is a composable framework designed for building applications with large language models (LLMs). It simplifies the integration of language models with external data sources and is open-source, supported by an active community. LangChain provides tools for developers to streamline the application lifecycle of LLMs.'}}])\n"- ]- }- ]+ "name": "stdout",+ "output_type": "stream",+ "text": [+ "AgentHistoryList(all_results=[ActionResult(is_done=False, extracted_content='🔍 Searched for \"What is LangChain?\" in Google', error=None, include_in_memory=True), ActionResult(is_done=False, extracted_content=\"📄 Extracted page as markdown\\n: # Filters and Topics\\n\\n[All](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQIEhAB)\\n\\n[Images](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=2&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQtKgLegQIExAB)\\n\\n[Videos](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=7&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQtKgLegQIERAB)\\n\\n[Forums](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=18&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQs6gLegQIDxAB)\\n\\nWeb\\n\\n[Flights](/travel/flights?sca_esv=4c6b8dc13bab3e46&output=search&q=What+is+LangChain%3F&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&ved=1t:200715&ictx=111)\\n\\n[Finance](/finance?sca_esv=4c6b8dc13bab3e46&output=search&q=What+is+LangChain%3F&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQIDBAB)\\n\\nMore\\n\\n[Books](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=36&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQINxAB)\\n\\n[News](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&tbm=nws&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ0pQJegQINhAB)\\n\\n[Shopping](/search?sca_esv=4c6b8dc13bab3e46&q=What+is+LangChain%3F&udm=28&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkWd8nbOJfsBGGB5IQQO6L3JyWp6w6_rxLPe8F8fpm5a55blYtaduielx1say4YCS0EIyvBb6VkaLhDZSOnSC94tp-\\nJuFEDkvqUl_u6quB-Is11hrT6R6Y6jGPIGI0MqGRIdRYfHHK4Fm5f9UNWxYphEnPjChpmH-\\nusjmkJN6Sk444PHRuqJvihdKgoqwGrUjYjqVvmxA&ved=1t:220175&ictx=111)\\n\\nTools\\n\\nAny time\\n\\nAny time\\n\\n[Past\\nhour](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:h&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAc)\\n\\n[Past 24\\nhours](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:d&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAg)\\n\\n[Past\\nweek](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:w&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAk)\\n\\n[Past\\nmonth](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:m&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAo)\\n\\n[Past\\nyear](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=qdr:y&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEAs)\\n\\nCustom range...\\n\\nCustom date range\\n\\nFromTo\\n\\nGo\\n\\nAll results\\n\\nAll results\\n\\n[Verbatim](/search?q=What+is+LangChain%3F&sca_esv=4c6b8dc13bab3e46&udm=14&source=lnt&tbs=li:1&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQpwV6BAgGEBM)\\n\\n[ Advanced Search\\n](https://www.google.com/advanced_search?q=What+is+LangChain%3F&udm=14)\\n\\nCtrl+Shift+X to select\\n\\n\\n\\n# Search settings\\n\\n[Search CustomizationOff](/history/optout?hl=en)\\n\\n[SafeSearchBlurring\\non](/safesearch?prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain?%26udm%3D14&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8JsIegQIChAH)\\n\\n[LanguageEnglish](/preferences?lang=1&hl=en&prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain%253F%26sca_esv%3D4c6b8dc13bab3e46%26udm%3D14#languages)\\n\\n[Dark themeDevice\\ndefault](/setprefs?hl=en&prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain?%26udm%3D14%26pccc%3D1&sig=0_jfSkJcafppJyKAIkCWZpHFXzfrs%3D&cs=2&sa=X&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQqsEHegQIChAJ&ictx=1)\\n\\n[More\\nsettings](/preferences?hl=en&prev=https://www.google.com/search?q%3DWhat%2Bis%2BLangChain%253F%26sca_esv%3D4c6b8dc13bab3e46%26udm%3D14)\\n\\nSend feedback\\n\\n[Help](https://support.google.com/websearch/?p=dsrp_search_hc&hl=en) •\\n[Privacy](https://policies.google.com/privacy?hl=en&fg=1) •\\n[Terms](https://policies.google.com/terms?hl=en&fg=1)\\n\\n# Search Results\\n\\n[ \\nLangChainLangChainhttps://www.langchain.com](https://www.langchain.com/)\\n\\nLangChain\\n\\nhttps://www.langchain.com\\n\\n _LangChain_ is a composable framework to build with LLMs. LangGraph is the\\norchestration framework for controllable agentic workflows. Run.\\n\\n\\u200e[Docs](https://python.langchain.com/docs/introduction/) ·\\n\\u200e[Products](https://www.langchain.com/langchain) · \\u200e[LangChain\\nAcademy](https://academy.langchain.com/) · \\u200e[Join the LangChain\\nCommunity](https://www.langchain.com/join-community)\\n\\n[ \\nWhat is\\nLangChain?Amazon\\nWeb Serviceshttps://aws.amazon.com › ... › Generative\\nAI](https://aws.amazon.com/what-is/langchain/)\\n\\nAmazon Web Services\\n\\nhttps://aws.amazon.com › ... › Generative AI\\n\\nLangChain _provides AI developers with tools to connect language models with\\nexternal data sources_. It is open-source and supported by an active\\ncommunity.\\n\\n[ \\nWhat Is LangChain and How to Use It: A\\nGuideTechTargethttps://www.techtarget.com\\n› definition ›\\nLangChain](https://www.techtarget.com/searchenterpriseai/definition/LangChain)\\n\\nTechTarget\\n\\nhttps://www.techtarget.com › definition › LangChain\\n\\n _LangChain is an open source framework_ that enables software developers\\nworking with artificial intelligence (AI) and its machine learning subset to\\ncombine ...\\n\\n[ \\nIntroduction | 🦜️ LangChainLangChainhttps://python.langchain.com › docs › introduction](https://python.langchain.com/docs/introduction/)\\n\\nLangChain\\n\\nhttps://python.langchain.com › docs › introduction\\n\\n _LangChain_ is a framework for developing applications powered by large\\nlanguage models (LLMs). LangChain simplifies every stage of the LLM\\napplication lifecycle.\\n\\n\\u200e[Introduction](https://python.langchain.com/v0.1/docs/get_started/introduction/)\\n·\\n\\u200e[Langchain.agents...](https://api.python.langchain.com/en/latest/agents/langchain.agents.tool_calling_agent.base.create_tool_calling_agent.html)\\n· \\u200e[LangChain v0.3](https://python.langchain.com/docs/versions/v0_3/) ·\\n\\u200e[Langchain_core.tools.](https://api.python.langchain.com/en/latest/tools/langchain_core.tools.tool.html)\\n\\n[ \\nWhat Is\\nLangChain?IBMhttps://www.ibm.com\\n› think › topics › langchain](https://www.ibm.com/think/topics/langchain)\\n\\nIBM\\n\\nhttps://www.ibm.com › think › topics › langchain\\n\\nLangChain is essentially _a library of abstractions for Python and Javascript_\\n, representing common steps and concepts necessary to work with language\\nmodels.\\n\\n[ \\nWhat is\\nLangChain?YouTube\\n· IBM Technology287.6K+ views · 10 months\\nago](https://www.youtube.com/watch?v=1bUy-1hGZpI)\\n\\nYouTube · IBM Technology\\n\\n287.6K+ views · 10 months ago\\n\\nLang chain is _an open-source orchestration framework_ for the development of\\napplications that use large language models.\\n\\n[ \\nWhat is Langchain and why should I care as a\\ndeveloper?Medium\\n· Logan Kilpatrick370+ likes · 1 year ago](https://medium.com/around-the-\\nprompt/what-is-langchain-and-why-should-i-care-as-a-developer-b2d952c42b28)\\n\\nMedium · Logan Kilpatrick\\n\\n370+ likes · 1 year ago\\n\\n _Langchain_ makes creating agents using large language models simple through\\ntheir agents API. Developers can use OpenAI functions or other means ...\\n\\n[ \\nLangChainWikipediahttps://en.wikipedia.org\\n› wiki › LangChain](https://en.wikipedia.org/wiki/LangChain)\\n\\nWikipedia\\n\\nhttps://en.wikipedia.org › wiki › LangChain\\n\\nLangChain is a software framework that helps facilitate the integration of\\nlarge language models (LLMs) into applications.\\n\\n\\u200e[History](https://en.wikipedia.org/wiki/LangChain#History) ·\\n\\u200e[Capabilities](https://en.wikipedia.org/wiki/LangChain#Capabilities) ·\\n\\u200e[LangChain tools](https://en.wikipedia.org/wiki/LangChain#LangChain_tools)\\n\\n[ \\nWhat Is LangChain? A Complete Comprehensive\\nOverviewDataStaxhttps://www.datastax.com\\n› guides › what-is-langchain](https://www.datastax.com/guides/what-is-\\nlangchain)\\n\\nDataStax\\n\\nhttps://www.datastax.com › guides › what-is-langchain\\n\\nNov 9, 2023 — LangChain is _a Python framework designed to streamline AI\\napplication development_ , focusing on real-time data processing and\\nintegration with ...\\n\\n[ \\nWhat Is\\nLangChain?Google\\nCloudhttps://cloud.google.com › use-cases ›\\nlangchain](https://cloud.google.com/use-cases/langchain)\\n\\nGoogle Cloud\\n\\nhttps://cloud.google.com › use-cases › langchain\\n\\n _LangChain_ is a programming language platform that lets developers construct\\nand connect models to access, transform, and share data seamlessly.\\n\\n\\u200e[Langchain And Ai](https://cloud.google.com/use-\\ncases/langchain#:~:text=LangChain%20and%20AI) · \\u200e[How Does Langchain\\nWork?](https://cloud.google.com/use-\\ncases/langchain#:~:text=How%20does%20LangChain%20work%3F) · \\u200e[Key Features Of\\nLangchain](https://cloud.google.com/use-\\ncases/langchain#:~:text=Key%20features%20of%20LangChain)\\n\\n# Page Navigation\\n\\n| 1|\\n[2](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=10&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAE)|\\n[3](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=20&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAG)|\\n[4](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=30&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAI)|\\n[5](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=40&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAK)|\\n[6](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=50&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAM)|\\n[7](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=60&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAO)|\\n[8](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=70&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAQ)|\\n[9](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=80&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAS)|\\n[10](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=90&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8tMDegQICBAU)|\\n[Next](/search?q=What+is+LangChain?&sca_esv=4c6b8dc13bab3e46&udm=14&ei=e8iJZ425Mabg0PEP6LmQGQ&start=10&sa=N&sstk=ATObxK4t7c6xZe8J3zQzlUfrNV-\\nBchujCI0GxH83wgy_vu9jEqYrHuTxd0wVBzubCa-bn_k1uK_Zn1BBIfr2yh6eyUzMdvUxFJ-\\nmCw&ved=2ahUKEwjN4oy74vuKAxUmMDQIHegcJAMQ8NMDegQICBAW) \\n---|---|---|---|---|---|---|---|---|---|---|--- \\n \\n# Footer Links\\n\\nWasco County, Oregon \\\\- From your IP address\\n\\n\\\\-\\n\\nUpdate location\\n\\nCan't update your locationLearn more\\n\\nUpdating location...\\n\\n[Help](https://support.google.com/websearch/?p=ws_results_help&hl=en&fg=1)Send\\nfeedback[Privacy](https://policies.google.com/privacy?hl=en&fg=1)[Terms](https://policies.google.com/terms?hl=en&fg=1)\\n\\n\\n\", error=None, include_in_memory=False), ActionResult(is_done=True, extracted_content='LangChain is a composable framework designed for building applications with large language models (LLMs). It simplifies the integration of language models with external data sources and is open-source, supported by an active community. LangChain provides tools for developers to streamline the application lifecycle of LLMs.', error=None, include_in_memory=False)], all_model_outputs=[{'search_google': {'query': 'What is LangChain?'}}, {'extract_content': {'include_links': True}}, {'done': {'text': 'LangChain is a composable framework designed for building applications with large language models (LLMs). It simplifies the integration of language models with external data sources and is open-source, supported by an active community. LangChain provides tools for developers to streamline the application lifecycle of LLMs.'}}])\n"+ ]+ }+ ],+ "source": [+ "# from browser_use import Agent\n",+ "import asyncio\n",+ "\n",+ "from langchain_openai import ChatOpenAI\n",+ "\n",+ "from browser_use import Browser, BrowserConfig\n",+ "\n",+ "# Basic configuration\n",+ "config = BrowserConfig(\n",+ " headless=True,\n",+ "\n",+ " # disable_security=True\n",+ ")\n",+ "# Reuse existing browser\n",+ "browser = Browser(config=config)\n",+ "# async def main():\n",+ "agent = Agent(\n",+ " task=\"what is langchain\",\n",+ " llm=llm,\n",+ " browser=browser,\n",+ " generate_gif = False # Browser instance will be reused\n",+ " )\n",+ "\n",+ "result = await agent.run()\n",+ "print(result)\n",+ "# Manually close the browser\n",+ "# asyncio.run(main())\n",+ "await browser.close()\n"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": 27,+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"},+ "id": "nKGC936xODry",+ "outputId": "de70d715-c30a-4d5b-9d25-40bd79d410de"+ },+ "outputs": [{- "cell_type": "code",- "source": [- "# display(result.action_results())\n",- "for action in result.action_results():\n",- " if action.is_done:\n",- " print(action.extracted_content)\n",- ""- ],- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"- },- "id": "nKGC936xODry",- "outputId": "de70d715-c30a-4d5b-9d25-40bd79d410de"- },- "execution_count": 27,- "outputs": [- {- "output_type": "stream",- "name": "stdout",- "text": [- "LangChain is a composable framework designed for building applications with large language models (LLMs). It simplifies the integration of language models with external data sources and is open-source, supported by an active community. LangChain provides tools for developers to streamline the application lifecycle of LLMs.\n"- ]- }- ]+ "name": "stdout",+ "output_type": "stream",+ "text": [+ "LangChain is a composable framework designed for building applications with large language models (LLMs). It simplifies the integration of language models with external data sources and is open-source, supported by an active community. LangChain provides tools for developers to streamline the application lifecycle of LLMs.\n"+ ]}- ]+ ],+ "source": [+ "# display(result.action_results())\n",+ "for action in result.action_results():\n",+ " if action.is_done:\n",+ " print(action.extracted_content)\n"+ ]+ }+ ],+ "metadata": {+ "colab": {+ "provenance": []+ },+ "kernelspec": {+ "display_name": "Python 3",+ "name": "python3"+ },+ "language_info": {+ "name": "python"+ }+ },+ "nbformat": 4,+ "nbformat_minor": 0}\ No newline at end of filediff --git a/examples/ui/command_line.py b/examples/ui/command_line.pyindex 715bb1f09..12aed802f 100644--- a/examples/ui/command_line.py+++ b/examples/ui/command_line.py@@ -11,10 +11,10 @@ Example 3: Using Anthropic's Claude Model with a Custom Querypython command_line.py --query "find latest Python tutorials on Medium" --provider anthropic"""-import os-import sysimport argparseimport asyncio+import os+import sys# Ensure local repository (browser_use) is accessiblesys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))@@ -25,7 +25,6 @@ from browser_use import Agentfrom browser_use.browser.browser import Browser, BrowserConfigfrom browser_use.controller.service import Controller-load_dotenv()def get_llm(provider: str):diff --git a/examples/ui/gradio_demo.py b/examples/ui/gradio_demo.pyindex b67a88da1..da478025d 100644--- a/examples/ui/gradio_demo.py+++ b/examples/ui/gradio_demo.py@@ -1,5 +1,5 @@-import osimport asyncio+import osfrom dataclasses import dataclassfrom typing import List, Optionaldiff --git a/examples/ui/streamlit_demo.py b/examples/ui/streamlit_demo.pyindex 623d8811d..b266ebac3 100644--- a/examples/ui/streamlit_demo.py+++ b/examples/ui/streamlit_demo.py@@ -5,9 +5,10 @@ python -m streamlit run streamlit_demo.py"""+import asyncioimport osimport sys-import asyncio+import streamlit as stfrom dotenv import load_dotenvdiff --git a/examples/use-cases/captcha.py b/examples/use-cases/captcha.pyindex 784eb04ae..fb2fd2ed1 100644--- a/examples/use-cases/captcha.py+++ b/examples/use-cases/captcha.py@@ -14,9 +14,11 @@ import syssys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))import asyncio++from dotenv import load_dotenvfrom langchain_openai import ChatOpenAI+from browser_use import Agent-from dotenv import load_dotenv# Load environment variablesload_dotenv()diff --git a/examples/use-cases/find_and_apply_to_jobs.py b/examples/use-cases/find_and_apply_to_jobs.pyindex b6de15545..18385c4b7 100644--- a/examples/use-cases/find_and_apply_to_jobs.py+++ b/examples/use-cases/find_and_apply_to_jobs.py@@ -5,24 +5,24 @@ Goal: Searches for job listings, evaluates relevance based on a CV, and appliesAlso you have to install PyPDF2 to read pdf files: pip install PyPDF2"""+import asyncioimport csv+import loggingimport osimport sysfrom pathlib import Path-import logging-from typing import List, Optional-import asyncio+from typing import Optionalsys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))from dotenv import load_dotenv-from PyPDF2 import PdfReader-from langchain_openai import AzureChatOpenAI, ChatOpenAI+from langchain_openai import AzureChatOpenAIfrom pydantic import BaseModel, SecretStr+from PyPDF2 import PdfReaderfrom browser_use import ActionResult, Agent, Controller-from browser_use.browser.context import BrowserContextfrom browser_use.browser.browser import Browser, BrowserConfig+from browser_use.browser.context import BrowserContext# Validate required environment variablesload_dotenv()diff --git a/examples/use-cases/online_coding_agent.py b/examples/use-cases/online_coding_agent.pyindex 390adc0bc..0f8e233a2 100644--- a/examples/use-cases/online_coding_agent.py+++ b/examples/use-cases/online_coding_agent.py@@ -1,13 +1,13 @@# Goal: Implements a multi-agent system for online code editors, with separate agents for coding and execution.+import asyncioimport osimport sys-import asynciosys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))-from langchain_openai import ChatOpenAIfrom dotenv import load_dotenv+from langchain_openai import ChatOpenAIfrom browser_use import Agent, Browserdiff --git a/examples/use-cases/post-twitter.py b/examples/use-cases/post-twitter.pyindex e10c1d4f9..50d870b36 100644--- a/examples/use-cases/post-twitter.py+++ b/examples/use-cases/post-twitter.py@@ -19,19 +19,19 @@ reply_url="XXXXX"Any issues, contact me on X @defichemist95"""+import asyncioimport osimport sys-from typing import Optional-import asynciosys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))from dataclasses import dataclass+from dotenv import load_dotenvfrom langchain_openai import ChatOpenAI-from browser_use.browser.browser import Browser, BrowserConfigfrom browser_use import Agent, Controller+from browser_use.browser.browser import Browser, BrowserConfig# Load environment variablesload_dotenv()diff --git a/examples/use-cases/scrolling_page.py b/examples/use-cases/scrolling_page.pyindex 9bc358e1e..6ad0cfc6e 100644--- a/examples/use-cases/scrolling_page.py+++ b/examples/use-cases/scrolling_page.py@@ -1,15 +1,15 @@# Goal: Automates webpage scrolling with various scrolling actions and text search functionality.+import asyncioimport osimport sys-import asynciosys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))-from langchain_openai import ChatOpenAI-from browser_use import Agentfrom dotenv import load_dotenv+from langchain_openai import ChatOpenAI+from browser_use import Agentfrom browser_use.browser.browser import Browser, BrowserConfig# Load environment variablesdiff --git a/examples/use-cases/shopping.py b/examples/use-cases/shopping.pyindex b9aade68b..e8f930050 100644--- a/examples/use-cases/shopping.py+++ b/examples/use-cases/shopping.py@@ -1,6 +1,8 @@-from langchain_openai import ChatOpenAI-from browser_use import Agent, Browser, BrowserConfigfrom dotenv import load_dotenv+from langchain_openai import ChatOpenAI++from browser_use import Agent, Browser+load_dotenv()import asynciodiff --git a/examples/use-cases/web_voyager_agent.py b/examples/use-cases/web_voyager_agent.pyindex 0b0de9042..17859487b 100644--- a/examples/use-cases/web_voyager_agent.py+++ b/examples/use-cases/web_voyager_agent.py@@ -1,15 +1,15 @@# Goal: A general-purpose web navigation agent for tasks like flight booking and course searching.+import asyncioimport osimport sys-import asyncio# Adjust Python pathsys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))from dotenv import load_dotenv-from pydantic import SecretStrfrom langchain_openai import AzureChatOpenAI+from pydantic import SecretStrfrom browser_use.agent.service import Agentfrom browser_use.browser.browser import Browser, BrowserConfig, BrowserContextConfigdiff --git a/tests/test_browser.py b/tests/test_browser.pyindex 7784487e6..d8c5a000b 100644--- a/tests/test_browser.py+++ b/tests/test_browser.py@@ -1,10 +1,13 @@import asyncio+import subprocess+import pytestimport requests-import subprocess+from playwright._impl._api_structures import ProxySettings+from browser_use.browser.browser import Browser, BrowserConfigfrom browser_use.browser.context import BrowserContext, BrowserContextConfig-from playwright._impl._api_structures import ProxySettings+@pytest.mark.asyncioasync def test_standard_browser_launch(monkeypatch):diff --git a/tests/test_context.py b/tests/test_context.pyindex 385f70f48..711e44a21 100644--- a/tests/test_context.py+++ b/tests/test_context.py@@ -1,11 +1,12 @@-import asyncioimport base64-import os+from unittest.mock import Mock+import pytest+from browser_use.browser.context import BrowserContext, BrowserContextConfigfrom browser_use.browser.views import BrowserStatefrom browser_use.dom.views import DOMElementNode-from unittest.mock import Mock+def test_is_url_allowed():"""diff --git a/tests/test_dropdown.py b/tests/test_dropdown.pyindex 374d43227..a5fd1b297 100644--- a/tests/test_dropdown.py+++ b/tests/test_dropdown.py@@ -2,9 +2,11 @@Test dropdown interaction functionality."""import pytest+from browser_use.agent.service import Agentfrom browser_use.agent.views import AgentHistoryList+@pytest.mark.asyncioasync def test_dropdown(llm, browser_context):"""Test selecting an option from a dropdown menu."""diff --git a/tests/test_dropdown_complex.py b/tests/test_dropdown_complex.pyindex 774e34203..c036f1bca 100644--- a/tests/test_dropdown_complex.py+++ b/tests/test_dropdown_complex.py@@ -2,9 +2,11 @@Test complex dropdown interaction functionality."""import pytest+from browser_use.agent.service import Agentfrom browser_use.agent.views import AgentHistoryList+@pytest.mark.asyncioasync def test_dropdown_complex(llm, browser_context):"""Test selecting an option from a complex dropdown menu."""diff --git a/tests/test_wait_for_element.py b/tests/test_wait_for_element.pyindex b17a02f50..a716e05b0 100644--- a/tests/test_wait_for_element.py+++ b/tests/test_wait_for_element.py@@ -1,6 +1,6 @@+import asyncioimport osimport sys-import asyncioproject_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))if project_root not in sys.path:@@ -8,15 +8,14 @@ if project_root not in sys.path:import pytestfrom dotenv import load_dotenv+from langchain_openai import ChatOpenAI# Third-party imports-from playwright.async_api import async_playwright-from langchain_openai import ChatOpenAI+from browser_use import Agent, Controller# Local importsfrom browser_use.browser.browser import Browser, BrowserConfigfrom browser_use.browser.context import BrowserContext-from browser_use import Agent, Controller# Load environment variables.load_dotenv()