Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Fix: display Chinese characters correctly in conversation logs by using ensure_ascii=False

skools-heref8686f401217
diff --git a/browser_use/agent/message_manager/utils.py b/browser_use/agent/message_manager/utils.py
index f83eba735..1fc25e534 100644
--- a/browser_use/agent/message_manager/utils.py
+++ b/browser_use/agent/message_manager/utils.py
@@ -42,8 +42,7 @@ async def _format_conversation(messages: list[BaseMessage], response: Any) -> st
lines.append('') # Empty line after each message
# Format response
- lines.append(' RESPONSE')
- lines.append(json.dumps(json.loads(response.model_dump_json(exclude_unset=True)), indent=2))
+ lines.append(json.dumps(json.loads(response.model_dump_json(exclude_unset=True)), indent=2, ensure_ascii=False))
return '\n'.join(lines)