web-ui icon indicating copy to clipboard operation
web-ui copied to clipboard

Error: Agent Stuck on Step 1 During Task Execution

Open sergeyhatunzev opened this issue 10 months ago • 2 comments

I encountered an issue while using the browser_use library in conjunction with g4f to execute a task. When running the code, the agent gets stuck on step 1 and does not progress further. Here is the code that triggers the error:


from g4f.integration.langchain import ChatAI

from g4f import Client

import asyncio


llm = ChatAI(model="deepseek-v3")


from browser_use import Agent


async def main():

    agent = Agent(

        task="Compare prices for GPT-4o and DeepSeek-V3",

        llm=llm,  

    )

    await agent.run()


asyncio.run(main())

Error Message

Upon executing the code, I receive the following console messages:

INFO [browser_use] BrowserUse logging setup complete with level info

INFO [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information.

C:\Users\Morty\AppData\Local\Programs\Python\Python312\Lib\site-packages\browser_use\agent\message_manager\views.py:59: LangChainBetaWarning: The function load is in beta. It is actively being worked on, so the API may change.

value['message'] = load(value['message'])

INFO [agent] 🚀 Starting task: Compare prices for GPT-4o and DeepSeek-V3

INFO [agent] 📍 Step 1

...

INFO [agent] 📍 Step 1

Expected Behavior

I expect the agent to complete the task and provide results comparing the prices of GPT-4o and DeepSeek-V3. Additional Information

Python Version: 3.12

Steps to Reproduce

Copy the code provided above.
Run it in a Python 3.12 environment.
Observe that the agent gets stuck on step 1.

Notes

If there are any additional logs or information that could assist in diagnosing the issue, please let me know. ### Title Error: Agent Stuck on Step 1 During Task Execution Description

I encountered an issue while using the browser_use library in conjunction with g4f to execute a task. When running the code, the agent gets stuck on step 1 and does not progress further. Here is the code that triggers the error:


from g4f.integration.langchain import ChatAI

from g4f import Client

import asyncio


llm = ChatAI(model="deepseek-v3")


from browser_use import Agent


async def main():

    agent = Agent(

        task="Compare prices for GPT-4o and DeepSeek-V3",

        llm=llm,  

    )

    await agent.run()


asyncio.run(main())

Error Message

Upon executing the code, I receive the following console messages:

INFO [browser_use] BrowserUse logging setup complete with level info

INFO [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information.

C:\Users\Morty\AppData\Local\Programs\Python\Python312\Lib\site-packages\browser_use\agent\message_manager\views.py:59: LangChainBetaWarning: The function load is in beta. It is actively being worked on, so the API may change.

value['message'] = load(value['message'])

INFO [agent] 🚀 Starting task: Compare prices for GPT-4o and DeepSeek-V3

INFO [agent] 📍 Step 1

...

INFO [agent] 📍 Step 1

Expected Behavior

I expect the agent to complete the task and provide results comparing the prices of GPT-4o and DeepSeek-V3. Additional Information

Python Version: 3.12

Steps to Reproduce

Copy the code provided above.
Run it in a Python 3.12 environment.
Observe that the agent gets stuck on step 1.

Notes

If there are any additional logs or information that could assist in diagnosing the issue, please let me know.

sergeyhatunzev avatar Mar 18 '25 14:03 sergeyhatunzev

same issue

tmiai avatar Mar 27 '25 06:03 tmiai

same here

finley0066 avatar Apr 10 '25 06:04 finley0066