Problem
When calling memos_search / memos_timeline / memos_skill_get etc. through the Hermes adapter, Chinese content in the returned JSON is rendered as \uXXXX unicode escapes instead of readable UTF-8 text.
Example — a memos_search hit snippet shows:
"reflection": "\u7528\u6237\u63d0\u4f9b\u4e86 Tushare KEY..."
instead of the actual Chinese characters. The data itself is correct in the DB; only the JSON returned to the host LLM is escaped.
Root cause
In the Hermes adapter adapters/hermes/memos_provider/__init__.py, the json.dumps(...) calls that serialize tool results to the LLM are missing ensure_ascii=False. Python's default is ensure_ascii=True, which escapes all non-ASCII characters to \uXXXX.
Affected lines (as of 2.0.15): memos_search (~1531), memos_get (~1580), memos_timeline (~1599), memos_skill_list (~1605), memos_environment (~1614 and ~1641), memos_skill_get (~1670).
Notably, a few other json.dumps calls in the same file DO already pass ensure_ascii=False (e.g. ~742, ~1015, ~1021), so this is just inconsistent — the tool-result serializers were missed.
Impact
For Chinese (and any non-ASCII) users, every memory retrieval result is hard to read and increases token/cognitive load on the host LLM. Functional correctness of retrieval is unaffected.
Suggested fix
Add ensure_ascii=False to the json.dumps(...) calls that serialize tool results back to the host (the ones listed above). One-line change each; verified it fixes the escape issue locally on 2.0.15.
Environment
- Plugin version: 2.0.15 (Hermes adapter)
- Host: Hermes Agent (Windows)
- Language: Chinese
Problem
When calling
memos_search/memos_timeline/memos_skill_getetc. through the Hermes adapter, Chinese content in the returned JSON is rendered as\uXXXXunicode escapes instead of readable UTF-8 text.Example — a
memos_searchhit snippet shows:instead of the actual Chinese characters. The data itself is correct in the DB; only the JSON returned to the host LLM is escaped.
Root cause
In the Hermes adapter
adapters/hermes/memos_provider/__init__.py, thejson.dumps(...)calls that serialize tool results to the LLM are missingensure_ascii=False. Python's default isensure_ascii=True, which escapes all non-ASCII characters to\uXXXX.Affected lines (as of 2.0.15):
memos_search(~1531),memos_get(~1580),memos_timeline(~1599),memos_skill_list(~1605),memos_environment(~1614 and ~1641),memos_skill_get(~1670).Notably, a few other
json.dumpscalls in the same file DO already passensure_ascii=False(e.g. ~742, ~1015, ~1021), so this is just inconsistent — the tool-result serializers were missed.Impact
For Chinese (and any non-ASCII) users, every memory retrieval result is hard to read and increases token/cognitive load on the host LLM. Functional correctness of retrieval is unaffected.
Suggested fix
Add
ensure_ascii=Falseto thejson.dumps(...)calls that serialize tool results back to the host (the ones listed above). One-line change each; verified it fixes the escape issue locally on 2.0.15.Environment