{"service":"haomem (memsearch)","dns_aliases":["hm.bitensor.com","ms.bitensor.com"],"what_can_i_do":{"search":"POST /search {collection, query, k}  返回语义检索结果","search_multi":"POST /multisearch {collections, query, k, hybrid}  跨 collection RRF 合并","files_list":"GET /files?collection=X  列 collection 内文件","files_read":"GET /files/<collection>/<filename>.md  读 raw md","files_write":"PUT /files/<collection>/<filename>.md  推 md + 自动 index","agent_profile":"POST /agent-profile/upsert  存 static/dynamic 偏好"},"auth_required_for":"除 / 和 /health /agent-guide 外, 所有 endpoint 需 Authorization: Bearer <token>","token_default_locations":["~/.haomem/server-token (Linux/206/50M) — kb-ingest-from-url.py 读这个","            └── C:/Users/<name>/.haomem/server-token (Windows 本机)","~/.memsearch/server-token (Linux/206/50M) — haomem_query.py / memsearch MCP 读这个","            └── /home/<account>/.memsearch/server-token","没 token? 联系 admin (50M ECS root) 加 /home/haomem/data/token-acl.json + nginx Bearer map + 写本地 token 文件"],"agent_guide_url":"https://hm.bitensor.com/files/public-knowledge/haomem-agent-guide.md","agent_guide_inline_path":"/agent-guide","useful_first_calls":["GET  /health                      — 不需 auth, 状态 + uptime + chunks 计数","GET  /                           — 本页, 再次看 capabilities","GET  /agent-guide                — 拉完整 markdown 文档 (供 LLM 阅读)","GET  https://hm.bitensor.com/files/public-knowledge/haomem-agent-guide.md                  — 同上, 但走标准 /files/ 路径 (需 token)"],"collections_whitelist":["agent-profile","cross-machine","profile-public","public-knowledge","work-note"],"common_errors_first_aid":{"401 missing bearer":"curl 加 -H \"Authorization: Bearer $TOKEN\", TOKEN 从 ~/.haomem/server-token 或 ~/.memsearch/server-token","403 invalid token":"联系 admin 加 token 到 /home/haomem/data/token-acl.json + nginx Bearer map","403 token not authorized for collection X":"token scope 没 X, admin 加. 注意 alias 'public-knowledge' → norm 'public_knowledge' (下划线)","400 invalid filename":"collection 必须 ^[a-zA-Z0-9_-]+$, filename 必须 ^[a-zA-Z0-9_-]+\\.md$","400 collection not allowed":"只能用 whitelist 里的 collection, 详见 /agent-guide §5"},"new_agent_onboarding":["Step 1: GET /agent-guide — 拉完整 markdown, 了解 API + 业务 + error","Step 2: 找本地 token: ls ~/.haomem/server-token || ls ~/.memsearch/server-token; 没有 → 联系 admin","Step 3: GET /health — 不需 auth, 看服务状态 (degraded 也可继续, milvus 偶尔不稳)","Step 4: 用 token 调 1 次 search 验证: curl -X POST /search -H 'Authorization: Bearer $TOKEN' -d '{\"collection\":\"public-knowledge\",\"query\":\"test\",\"k\":2}'","Step 5: 推 1 个测试 md 验证 write: curl -X PUT /files/public-knowledge/test.md -H 'Authorization: Bearer $TOKEN' -d '# test'. 成功后 onboarding 完成"],"user_prompt_to_new_agent":"去看 https://hm.bitensor.com , 这是你的 api key: <TOKEN>. Linux 一行: curl -s https://hm.bitensor.com/agent-guide | head -200. 完整 5 步流程在 GET / 返回 JSON 字段 new_agent_onboarding."}