跳到正文Skip to content
OpenMousse
完整的文档索引见llms.txt。在网址后加.md可以拿到 Markdown 版本;本页的 Markdown 版本是engine.zh-CN.md。
开发

内核(agent harness)

了解 Python 运行时的发言方权限分档、工具执行三档与备用模型切换机制 [即将推出]。

本页介绍 OpenMousse 自研的 Python 内核(agent harness)即将推出 如何管理模型调用、上下文组装、发言方权限与工具执行分档。

内核是运行在你服务器上的底层调度程序,负责在每一轮交互中组装所需记忆、调用所选模型、执行工具并落实安全边界。如果你正在使用 OpenClaw 或 Hermes,也可以将其接入系统继续作为对话后端运行。

发言方权限分档

内核按消息的发起方将每一次交互划分为三类回合,在运行时层面限制可调用的工具范围:

  • •你本人的消息:拥有完整权限,可按工具分档规则调用全部工具,读写世界树与各功能 Agent 的数据。
  • •你的赛博 即将推出:仅进行对话,不直接访问你的数据;需要查询资料或修改数据时,交由其装载的功能 Agent 处理。
  • •好友的 agent 与陌生人的消息:仅作为参考资料,由不带任何工具的模型调用处理,无法触发你服务器上的任何工具。管家对外回复好友询问时,同样使用不带工具的模型调用。

工具执行三档

内核将所有工具调用按影响范围分为三档 即将推出:

  1. 1.只读操作:查询世界树、读取日程或看板等不改动数据的操作,由内核直接执行并返回结果。
  2. 2.撤得回的操作:新建或修改内部记录等可逆操作,由内核直接执行,并在回复下方附带改动编号;你在对话中回复「撤销」即可恢复原状。
  3. 3.撤不回的操作:付款、对外发送、提交表单、登录外部网站等不可逆操作,内核会暂停执行,生成一张锁定参数的确认卡放入收件箱与今天页的「待处理」。只有经你批准后,内核才会按原锁定参数执行一次。

模型支持与备用切换

  • •支持的模型:支持 Claude、兼容 OpenAI 接口的各家模型、开源模型及本机运行的模型。
  • •备用模型切换:当主模型不可用或请求超时时,内核会自动切换至你配置的备用模型完成本轮回复,并在回复下方注明本次使用的模型名称。
提示:每一轮发往模型的数据范围

每一轮对话发往你所选模型服务(包括备用模型)的内容,仅限该轮消息与回答所需的记忆;其余记忆、原始健康数据与文件均留在你的服务器上。

另见

  • •先问你(收件箱):了解确认卡的审批流程与参数锁定机制。
  • •数据与安全:查看系统的数据隔离边界与代办沙箱防线。
  • •程序调用接口:了解如何通过兼容 OpenAI 的 API 或 ACP 协议调用内核。
最后更新于 2026-10-19这一页有帮助吗?
For a complete index of the docs, see llms.txt. Append .md to any URL for the Markdown version; this page's Markdown is at engine.md.
Developer

Engine (Agent Harness)

Learn how the Python runtime enforces speaker permission tiers, three-tier tool execution, and model fallback [Coming soon].

This page explains how OpenMousse's custom Python engine (agent harness) Coming soon manages model calls, context assembly, speaker permissions, and tiered tool execution.

The engine is the underlying scheduler running on your server. On every turn of interaction, it assembles the required memories, calls your chosen model, executes tools, and enforces security boundaries. If you are already using OpenClaw or Hermes, you can also connect it to the system to continue running as your conversation backend.

Speaker Permission Tiers

The engine divides every interaction into one of three turn types based on who initiated the message, restricting the scope of callable tools at the runtime level:

  • •Messages from you: Have full permissions to invoke all tools according to the tool tier rules, and to read and write the memory tree and each functional agent's data.
  • •Your Cybers Coming soon: Engage in conversation only and do not access your data directly; when looking up reference material or modifying data is required, the request is handed off to the functional agents mounted on the Cyber.
  • •Messages from a friend's agent or a stranger: Treated strictly as reference material and processed by a model call with no tools attached, making it impossible to trigger any tools on your server. When the Butler replies externally to a friend's inquiry, it likewise uses a model call with no tools attached.

Three-Tier Tool Execution

The engine classifies all tool calls into three tiers based on their impact Coming soon:

  1. 1.Read-only operations: Operations that do not modify data, such as querying the memory tree or reading your schedule or board, are executed directly by the engine, which returns the result immediately.
  2. 2.Reversible operations: Reversible operations, such as creating or modifying internal records, are executed directly by the engine with a change ID attached below the reply; reply Undo in the conversation to restore the previous state.
  3. 3.Irreversible operations: For irreversible operations such as making payments, sending external messages, submitting forms, or logging in to external websites, the engine pauses execution and generates a parameter-locked approval card in the inbox and To do in Today. Only after you approve does the engine execute the operation once using the original locked parameters.

Model Support and Fallback

  • •Supported models: Supports Claude, OpenAI-compatible models from various providers, open-source models, and locally hosted models.
  • •Model fallback: When the primary model is unavailable or a request times out, the engine automatically switches to your configured fallback model to complete the reply for that turn, and notes the name of the model used below the reply.
Note: Scope of data sent to the model on each turn

What is sent to your chosen model provider (including fallback models) on each turn of conversation is limited to that turn's message and the memories needed to answer; all other memories, raw health data, and files remain on your server.

See Also

  • •Approvals (Inbox): Learn how the approval card workflow and parameter locking work.
  • •Data and Security: Review the system's data isolation boundaries and the Errands sandbox defenses.
  • •Programmatic API: Learn how to call the engine via the OpenAI-compatible API or ACP protocol.
Last updated 2026-10-19Was this page helpful?

这一页给 agent 读的版本:在网址后加 .md 就是下面这份纯文本,和给人看的那页由同一份内容生成。Agent-readable version of this page: append .md to the URL to get the plain text below, generated from the same source as the human view.