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
added langfuse
Gregor Žunič4b1d6f48d76d
diff --git a/requirements.txt b/requirements.txtindex f43d37271..d01670165 100644--- a/requirements.txt+++ b/requirements.txt@@ -3,7 +3,6 @@ Screenshot==1.0.0Selenium-Screenshot==2.1.0beautifulsoup4==4.12.3langchain==0.3.7-# langchain-core==0.3.15langchain-openai==0.2.5pydantic==2.9.2pytest==8.3.3@@ -12,4 +11,5 @@ python-dotenv==1.0.1requests==2.32.3selenium==4.26.1tokencost==0.1.16-webdriver-manager==4.0.2\ No newline at end of file+webdriver-manager==4.0.2+langfuse==2.53.5 # TODO: remove in prod\ No newline at end of filediff --git a/src/tests/test_kayak_search.py b/src/tests/test_kayak_search.pyindex db86af236..10174601d 100644--- a/src/tests/test_kayak_search.py+++ b/src/tests/test_kayak_search.py@@ -4,10 +4,18 @@ import osimport pytestfrom langchain_anthropic import ChatAnthropicfrom langchain_openai import ChatOpenAI+from langfuse import Langfuse+from langfuse.decorators import observefrom src.agent.service import AgentServicefrom src.controller.service import ControllerService+langfuse = Langfuse(+ secret_key=os.getenv('LANGFUSE_SECRET_KEY'),+ public_key=os.getenv('LANGFUSE_PUBLIC_KEY'),+ host=os.getenv('LANGFUSE_HOST'),+)+def setup_run_folder(timestamp_prefix: str) -> str:timestamp = f'{timestamp_prefix}_{datetime.datetime.now().strftime("%Y-%m-%d")}'@@ -26,6 +34,7 @@ def setup_run_folder(timestamp_prefix: str) -> str:# run with pytest src/tests/test_kayak_search.py -v -s# @pytest.mark.skip@pytest.mark.asyncio+@observe()async def test_kayak_flight_search():task = 'go to kayak.com andfind a flight from Bali to Kirgistan on 2024-11-25 for 2 people one way.'run_folder = setup_run_folder('kayak_com_flight_search2')