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
Console output prettier
magmueller1093b4896d82
diff --git a/src/agent/service.py b/src/agent/service.pyindex 2e69b6143..3d9804139 100644--- a/src/agent/service.py+++ b/src/agent/service.py@@ -99,7 +99,8 @@ class AgentService:history_new_message = AgentMessagePrompt(state).get_message_for_history()self.messages.append(history_new_message)self.messages.append(AIMessage(content=response.model_dump_json()))-+ print(f'current state\n: {response.current_state.model_dump_json(indent=4)}')+ print(f'action\n: {response.action.model_dump_json(indent=4)}')self._save_conversation(input_messages, response)# try:diff --git a/src/tests/test_kayak_search.py b/src/tests/test_kayak_search.pyindex f1374044e..408572d3a 100644--- a/src/tests/test_kayak_search.py+++ b/src/tests/test_kayak_search.py@@ -65,8 +65,8 @@ async def test_kayak_flight_search():print(f'\n📍 Step {i+1}')action, result = await agent.step()- print('action:\n', action)- print('result:\n', result)+ # print('action:\n', action)+ print('result:\n', result.model_dump_json(indent=4))# current_state = agent.get_current_state()# save_formatted_html(