记录一下muse的内部推理服务的名称

这是沙盒内部通道:Muse agent 自己推理用的内部服务。如果能调通,等于白嫖一个 Muse 推理入口。
先介绍个小甜点
space-web-search.sock(搜索)、space-media.sock(图片):都能调通

  • space-inference.sock:能调通,是沙盒里唯一能调 Muse 的路。 但它不是聊天 API(complete 是固定 schema 的结构化输出;agent_send 是异步任务制),**
    space-inference.sock:唯一能调 Muse 的路

地址:/run/hatch/sandbox/space-inference.sock(Unix socket)。这是 Spaces(网页应用)用的推理后端

agent_send / agent_status 比 complete 通用得多:自由文本发过去,起一个完整 agent 任务(会读 goals、memory、chats,还能开页面多步浏览、用 agent 工具),最后拿 final_response。实测 3 次都 <10 秒,17×23 答对 391。但它是个异步任务制——发了只返回一个句柄,得轮询查状态;没有原生多轮、没有流式、不能选模型

两种调用

(1)complete —— 结构化输出,同步

请求:{"kind":"complete","request_id":"space-inference-<uuid>","slug":...,"prompt":...,"system":可选,"json_schema":必填,"timeout_secs":60}

回包:{"ok":true,"result":{"kind":"complete","content":{...按 schema...},"model":"Muse Spark","usage":{"input_tokens":N,"output_tokens":N,"total_tokens":N}}},失败是 {"ok":false,"error","error_code"}。

特点:

  • 只能输出符合 schema 的 JSON,不是自由文本聊天。
  • 模型固定 Muse Spark,没有 messages、多轮、流式、温度、选模型。
  • 几词提示也有 ~935–951 token 固定开销(内部 system prompt 很大)。
  • 实测 3 次全通(2.1s、2.8s、1.7s)。

(2)agent_send / agent_status —— 自由文本,异步任务制

  • agent_send:发一条自由文本 message,起一个完整 agent 循环(读 goals、tracked items、memory、chats,还能打开完整页面、多步浏览、用 agent 才能用的工具)。立刻只返回句柄 {task_id, agent_id, message_id}。
  • agent_status:轮询任务状态(queued / running / completed / failed / not_found),完成时有 final_response。
  • 实测 3 次,全 <10 秒:"Reply with exactly the word hello" → "hello";"What is 17 times 23?" → 答对 391;查不存在的 task_id → not_found。
  • 两个坑(实测确认):
    • 不要填 expected_action——填了不存在的 action,任务跑完了但状态变 failed,final_response 被安全提示替换,答案丢了。
    • 去重默认单飞——相同 Space action + 完全相同 message 返回已有任务句柄而不重跑;并行要传 allowParallel: true 或不同 dedupeKey。
  • 仍不是多轮对话 API:每次 agent_send 都是一条新消息,没有 messages 历史;想多轮只能自己把上轮答案拼进下条 message。

space-media.sock:图片

  • kind "generate_image",请求 {prompt, orientation},回包 data_base64。

  • 实测:"a small red circle on a plain white background",合法 WebP 18,480 字节,目视确认就是白底红圆,4.93s。

  • space-web-search.sock:搜索

  • kind "search",请求 {primary_query:{query, language_code?}, verticals?, timeout_secs?}。

  • 回包带 summary(markdown)+ top[](title / url / excerpt / domain / rank)+ search_engines。

  • 实测:搜 "Muse Spark",5 条真实结果(coursium、dataaihub、coursiv、zapier、scaler),search_engines:["MASE"],0.71s。

大佬牛啊

这么强