Skip to content

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

fix(agent): disable json escaping in conversation history (#3090)

sudhanshu112233shuklad864bd7a8efc
diff --git a/browser_use/agent/views.py b/browser_use/agent/views.py
index 2a7574b2c..c2f75d200 100644
--- a/browser_use/agent/views.py
+++ b/browser_use/agent/views.py
@@ -645,7 +645,7 @@ class AgentHistoryList(BaseModel, Generic[AgentStructuredOutput]):
Path(filepath).parent.mkdir(parents=True, exist_ok=True)
data = self.model_dump(sensitive_data=sensitive_data)
with open(filepath, 'w', encoding='utf-8') as f:
- json.dump(data, f, indent=2)
+ json.dump(data, f, indent=2, ensure_ascii=False)
except Exception as e:
raise e