A navy bookmark projects above a linen page bearing a hand-drawn house.

Designing Agents forReal-World Spaces:Tools, Execution, andMemory at seenzus 为真实空间设计 Agent:seenzus 的工具、执行与记忆

A light-control request shows how seenzus prepares device parameters and explains execution results. We look at which model calls can be skipped, and how to remember a condition such as “only tonight.”我们从调灯说起,讲 seenzus 怎样把具体设备的参数准备好,按证据解释执行结果。再看哪些模型调用可以省,以及用户说的“只在今晚”该怎样记住。

A user asked seenzus to turn a light blue. Our tool didn’t yet support color parameters, so the model tried changing the brightness instead. Dimming a light won’t turn it blue.

Some lights only switch on and off; others support color. The agent needs to know which kind it’s dealing with. After it sends a command, the interface may accept it without confirming that the light has turned blue. Even if the operation works, should the color chosen for tonight’s party still apply tomorrow?

We changed the tools to take some of that guesswork out of the model’s job. They tell it what the device can do and which parameters to use, then report what the execution evidence confirms. The model still has to understand the request and choose an action. Code can handle device rules and parameter checks. Memory needs to keep conditions such as “only tonight” with the request.

A personal agent connected to HA can already do a lot. We read the implementations of REST skills for OpenClaw and Hermes’s built-in tools, along with ha-mcp’s search and control confirmation. ha-mcp has already done considerable work on the problems specific to home control.123

Tools should explain device capabilities and execution outcomes

Take “turn that light in the study blue.” Once device connections and space assignments are configured, the agent can locate the target by space, read its capabilities, and decide how to act. When the result comes back, it needs to decide what it can confirm to the user.

The model interprets the request. Tools locate the device and return state and action specifications. The executor validates and dispatches the chosen action, then returns evidence for an answer or further checks.
The model chooses actions; tools supply device facts, and the executor validates and dispatches calls. This illustrates a typical sequence in the implementation described here. Known devices can skip search; unknown outcomes need further checks.

Locate the device before reading its details

A home may contain dozens or hundreds of device entities. Finding a study light doesn’t require reading all their attributes. Search returns candidate locations and the identifiers needed for subsequent calls. Once the target is clear, the agent reads its state and action specifications.

If there are two lights in the study and nothing in the conversation identifies “that light,” the agent needs to ask. If the user explicitly requests all the study lights, it should use that scope. We’ve made this distinction in the tool descriptions and prompt so that multiple matches don’t automatically trigger a clarification question.

Let tools prepare the parameters each device supports

To control a light, the model needs to know what this particular one can do. Reading state in seenzus also returns the actions the device can currently execute, with parameter formats and valid ranges. If color control is available, the result includes color parameters. If the current integration only exposes on/off control, the result says so.

The capability description shown to the agent and the executor’s parameter checks use the same definitions. Before dispatch, the executor reads the device’s capabilities again and rejects unsupported operations with an explanation. We don’t want the tool to describe one set of rules while the executor checks another.

Hermes’s service lookup provides general field descriptions for a device category, and ha-mcp can expand full field specifications. The model still needs to check these against the individual device’s attributes to work out which parameters apply.23 seenzus does that comparison inside the tool and returns the device’s available actions, saving the model from assembling them again on each request.

General service lookup leaves the model to reconcile service descriptions and device attributes. seenzus prepares device-specific capabilities inside the tool before the model builds a call.
The general-service-lookup panel summarizes the Hermes and ha-mcp implementations cited in the text, alongside seenzus's device capabilities. Blue marks model work; sand marks tool work. This compares who prepares the parameters, not call counts or performance, and does not represent every HA integration.

A brightness value can be perfectly valid and still have nothing to do with the blue the user requested. The prompt has to address that too. We tell the agent to explain a capability limitation and obtain agreement before substituting a different action. Parameter validation checks whether a call is valid; it can’t decide whether the agent has departed from the user’s intent.

If an interface doesn’t report color control, the integration may simply not expose it. The agent shouldn’t tell the user the light’s hardware cannot change color on that evidence alone.

Sending the command doesn’t settle the result

After a control request, seenzus returns a result based on the execution evidence it has received.

  • Confirmed means state evidence confirms the target was reached, within the evidence the integration can provide.
  • Accepted means the integration accepted the request; whether the device reached the target is still unknown.
  • Timed out without confirmation means the command may have been sent, but the result is unknown.
  • Already satisfied means the device was already at the target state, so no duplicate command was sent.
  • Not sent means the device or connection was unavailable and the request wasn’t dispatched.

Confirming that a light is on isn’t enough to tell the user it’s blue. A timeout without confirmation calls for checking state before retrying. With a toggle operation, an extra call could switch the light straight back off. Whether the model should keep looking or finish the request depends on the evidence in that result.

ha-mcp already provides state confirmation, distinguishing dispatched, confirmed, and partially completed operations. That’s useful work to learn from.3 We also found a Hermes user report about a TV script that took 20 to 40 seconds. The tool timed out at 15 seconds, while HA subsequently completed execution.4 In that situation, the tool needs to say the result is still unknown. Otherwise, the model might assume nothing happened and try again.

Which tokens can we save?

We used to insert a device list into the context automatically. We thought knowing what was in the home would make later requests easier. But a request to turn on one air conditioner could give the model information about dozens of unrelated devices first.

We’ve removed that automatic injection. If the target is known, the agent can read its state directly; otherwise, it searches first. Tools for browsing a space or the full directory remain available when needed. Compared with our own earlier version, switching on one air conditioner no longer means sending the model unrelated device details through this path.

We went back over what each tool returns too. Location helps the model recognize a search candidate; the identifier needs to stay so it can make the next call. At the state-reading stage, it needs the action parameters. When deciding whether to keep a field, we ask whether the model will need it next.

We nearly cut too much from those results. A light can retain RGB values while operating in color-temperature mode. When compacting the state response, we omitted the current mode. Review caught the risk that the remaining values could mislead the model about the current color, so we put the field back. That low-level detail tells the model which values are actually in effect.

Action parameter formats and ranges are worth keeping for the same reason. The model needs them for its next step. Cutting them only to require another query may cost more tokens. We now consider the whole task, including additional queries and retries after mistakes.

Some decisions don’t need repeating at all. For “turn the light off in ten minutes,” the device and parameters can be settled in the conversation and saved as a fixed, authorized command. An executor runs it when it’s due. The model doesn’t need to decide again which light to switch off or which parameters to use. Tasks that still require judgment at execution time continue to use a model. Hermes also provides cron scheduling.5 In seenzus, we separate these two kinds of task. Running a settled command directly saves that model invocation.

We think this preparation matters more as the number and variety of devices grow. The model has less unrelated information to read and fewer device rules to assemble. A command that’s already settled doesn’t need another model decision. Those are specific places to save tokens and waiting time, though measuring the saving against another well-tuned setup still requires matched conditions.

Memory must preserve conditions and respond to corrections

Suppose the user adds, “Only for tonight’s party. I normally want warm light.” Memory needs to keep “tonight’s party” with the request. Retrieve “the user likes blue” next time without that condition, and you’ve remembered it incorrectly.

OpenClaw and Hermes also provide long-term memory and update mechanisms.6 In seenzus, we need to decide where personal preferences and room information belong, and whether a temporary request should apply later. Our memory read/write rules distinguish personal and environmental information and require the conditions to be kept with it.

“I get cold easily” can belong in personal memory. A resident’s statement that the study gets afternoon sun can belong in environmental memory, available to members with the appropriate access. Mentioning a room doesn’t make private information shareable. Using a personal preference to guide an authorized action in the living room doesn’t make that preference a rule for everyone either.

Who can read a memory is a question of privacy. Whether a bedroom temperature preference applies in the living room depends on its conditions. They’re different questions. Personal memory follows the user, but must retain those conditions; “a little cooler tonight” shouldn’t overwrite a standing preference.

When a user says, “I got that wrong earlier; I actually prefer warm light,” the old memory needs to change. Appending another sentence leaves the next conversation to reconcile two contradictory records. seenzus’s learning process can use execution records and user feedback to check and revise its understanding. A light turning blue establishes an execution result. Whether the user liked the outcome requires their feedback.

The learning process reviews those execution records and feedback, revises memory where needed, and leaves it available for later service. We want a correction to give the agent a basis for doing things differently, without making the user explain the history again. It can still miss information or get the interpretation wrong. Successful execution proves the device did something; it doesn’t prove the user prefers it that way.

Learning review checks execution records and user feedback and revises conditional personal or environmental memory when needed. Later service reads memory with the appropriate access. Memory does not grant execution permission.
Sand marks execution records and user feedback; blue marks conditional memory. The dashed link means review updates memory when needed. Later service can only read information it has permission to use. Learning can miss information or misinterpret it, and memory cannot authorize a new action.

Remembering a habit doesn’t give the agent permission to act on it. Repeatedly seeing someone turn the lights off at ten can support a suggestion. Turning them off every night at ten requires separate authorization; confirming the habit isn’t an execution permit.

Don’t ask the model to redo work code can handle

The model still makes mistakes after this work. In tests, it sometimes chooses a poor search term or stops before it has finished looking. Giving it a way to keep searching doesn’t guarantee it will use it. We still need to work on that.

We want to spend our time on these details. The model can interpret what someone asks and choose an action without having to reconstruct device rules on every request. seenzus’s tools handle the rules we can establish in code. Its memory keeps the conditions attached to a request, and execution records and feedback help correct what it has learned. That division of work is built into the Space Agent users get, rather than left for each conversation to work out again.

Notes and sources

  1. An OpenClaw community member's REST skill description, published on the Home Assistant forum on February 26, 2026. It instructs the agent to use credentials with HA GET/POST endpoints, rather than providing a separate typed tool implementation. The complete public example is an implementation sample, not a performance baseline.
  2. Hermes (NousResearch/hermes-agent), homeassistant_tool.py, inspected September 17, 2026. Tools include ha_list_entities (domain/area filtering and projection to identifier, state, and name), ha_get_state (full attributes for one entity), ha_list_services (domain-level service and field descriptions, with selector metadata omitted), and ha_call_service (format validation, a blocklist covering six domains including shell_command, and success/service/affected_entities output). Domain matching uses the entity-ID prefix; area matching uses name/attribute substrings rather than an area-registry lookup. The POST timeout constant is 15 seconds.
  3. ha-mcp (homeassistant-ai/ha-mcp), README.md, master snapshot 026647e, with pyproject.toml declaring 8.5.0; inspected September 17, 2026. Search supports area/floor/alias filtering and fuzzy matching in tools_search.py, plus limit/offset and result_fields projection. Service lookup can return full field schemas with detail_level=full in tools_services.py. Control results distinguish dispatched/confirmed/partial/transitions in tools_service.py. Approval policies include a Read Only mode and per-tool switches in middleware.py. ha-mcp is a community project, not HA's official MCP or an official OpenClaw plugin.
  4. Hermes issue #96121, reported August 27, 2026. The user described a TV/media-player script taking roughly 20 to 40 seconds, exceeding Hermes's 15-second timeout while HA subsequently completed execution. The issue was still open when inspected. This is one user's account, not a general benchmark; the 15-second POST timeout was verified in source.
  5. Hermes's official cron.md describes native scheduling for one-off and recurring tasks, with skill bindings. We did not audit its scheduled executor and make no claim that it must invoke a model at execution time. Inspected September 17, 2026.
  6. OpenClaw's official memory.md covers USER.md, MEMORY.md, dated notes, and background organization; skills.md describes skill creation and tool-use guidance. Hermes's official memory.md describes profile memory, session search, memory/skill updates after corrections, and write approval. These capabilities are documented by the projects; we did not audit their complete learning implementations. Inspected September 17, 2026.

这次改 seenzus 的工具,有个问题让人印象很深。用户要把灯调蓝,当时工具还不支持颜色参数,模型竟然试着用亮度去接近这个要求。调暗一盏灯,怎么也调不成蓝色。

同样叫灯,有的只能开关,有的能调色。Agent 得知道眼前这台属于哪一种。指令发出去以后,接口说接受了,也未必说明灯已经变蓝。即使这次做对了,用户今晚为了聚会选的颜色,明天还该不该沿用?

我们这次改工具,就是想让模型少猜这些事情。设备能做什么、参数该怎么填,工具先整理好;执行有没有到位,按拿到的证据告诉它。模型还得理解用户的要求,选择合适的动作,但设备规则和参数校验这些程序能做的事,就交给程序。至于“只在今晚”这样的条件,要留在记忆里,免得下一次用错。

自己接个人 Agent 也能做不少事。我们读过 Hermes、OpenClaw 的实际 HA 接法,从用 REST skill 调接口,到 Hermes 的内置工具,再到 ha-mcp 的搜索和控制确认,都有可用的方案。尤其是 ha-mcp,已经做了不少领域适配。123 seenzus 在这上面花的功夫,可以沿着一次调灯请求来看。

工具要说明设备能力,也要交代执行结果

拿“把书房那盏灯调成蓝色”走一遍。设备接入和空间归属配置好以后,Agent 可以按空间找到目标,读出这台设备的能力,再决定怎样执行。执行结果回来后,它还要判断能向用户确认什么。

模型理解要求后,工具搜索设备并返回状态与动作规格;模型选择动作,执行器校验和下发,回执供模型回答或继续核查。
模型选动作,工具提供设备事实,执行器负责校验和下发。按本文所述当前实现绘制,图中是一条典型调用顺序;目标已知时可跳过搜索,结果未知时还需核查。

先定位设备,再读取详情

家里有几十上百个设备实体,也不必为了找书房的灯,把所有设备的属性都读一遍。搜索阶段返回候选设备的位置,以及后续调用需要的标识。找到目标,再读它的状态和动作规格。

如果书房有两盏灯,对话里又没有线索能确定“那盏”指谁,就问一下用户。要是用户明确说书房所有灯,就按这个范围处理。我们也在工具描述和提示词里区分了这两种情况,避免一搜到多个设备就机械地追问。

由工具准备具体设备的可用参数

同样是调灯,模型需要知道眼前这台到底能调什么。seenzus 读状态时,一起返回这台设备当前能执行的动作,以及参数格式和有效范围。能调颜色,就给出颜色参数;当前接入只提供开关,就明确说明。

给 Agent 看的能力说明,和执行时检查参数的规则,来自同一套定义。执行前会再读一次设备能力,不支持的操作在下发前拦下,并说明原因。我们不想让工具说明写一套,执行器又按另一套判断。

Hermes 的服务查询给出设备类别的通用字段说明,ha-mcp 可以展开完整字段规格。模型拿到这些信息后,还需要结合具体设备的属性,判断哪些参数能用。23 seenzus 在工具里先做这一步对照,返回这台设备的可用动作,省得模型每次重新整理。

通用服务查询由模型对照服务说明和设备属性;seenzus 在工具中先整理实例能力,再交给模型组织调用。
通用服务查询概括本文引用的 Hermes、ha-mcp 实现,与 seenzus 的实例能力整理对照。淡蓝是模型工作,沙色是工具工作。比较的是谁来整理参数,不代表所有 HA 接法,也不表示调用次数或性能高低。

不过,一个亮度参数可以完全合法,却与用户要的蓝色毫无关系。这得靠提示词继续约束。我们要求 Agent 在能力不足时说明限制,换一种做法之前先征得用户同意。参数校验管调用是否合法,不能替它判断有没有偏离用户的目的。

解释限制也得准确。接口没有报告颜色控制,可能只是当前接入方式没有提供,不能因此断言这盏灯的硬件不支持变色。

指令发出去,还得知道结果

灯的指令发出去以后,seenzus 会按拿到的执行证据返回不同结果。

  • 已确认。状态证据确认设备达到目标,以接入方能提供的证据为限。
  • 已接受。请求被接入方接受,设备是否到位还不知道。
  • 超时未确认。指令可能已下发,结果未知。
  • 已满足。设备本来就处于目标状态,没有重复下发。
  • 未下发。设备或连接不可用,请求没有发出去。

如果只确认了灯已打开,还不能告诉用户已经调蓝。“超时未确认”则要先核查状态,不能直接重发。尤其是 toggle 这种切换操作,多发一次,刚打开的灯可能又关了。模型要不要继续查、能不能结束这次请求,都要看回执给了什么证据。

ha-mcp 已经有状态确认,区分已发出、已确认和部分完成,这一点值得借鉴。3 我们还看到过一条 Hermes 用户报告,电视脚本需要 20 到 40 秒,工具在 15 秒时超时,HA 随后仍执行完毕。4 这种时候,工具得说清楚结果暂时未知,否则模型可能按“没有执行”再来一遍。

哪些 token 可以省,哪些不能省

我们之前会自动把设备列表放进上下文。当时想的是,先让模型知道家里有什么,后面办事方便。可用户只是要开一台空调,它就可能先收到几十台无关设备的信息,平白多读了一遍。

现在我们撤掉了这条自动注入。目标明确就直接读状态,需要定位再搜索。按空间浏览和查完整目录的工具仍然在,需要时再用。相比我们自己的旧版本,至少不用在开一台空调之前,先把无关设备的资料也送给模型。

工具返回什么,我们也重新看了一遍。搜索结果里的位置能帮模型认出设备,标识要留着给下一次调用。到了读状态这一步,动作参数就该给全。判断一个字段该不该留,我们会看模型接下来用不用得上它。

删返回字段时,我们也差点删过头。灯可能保留着 RGB 数值,实际却正处于色温模式。我们精简读态结果时漏掉了当前模式,评审发现,剩下的数值会让模型有机会误读当前颜色,于是又把字段补了回来。这个看着很底层的参数,恰好是在告诉模型哪些值正在生效。

动作参数的格式和范围,也值得占这点篇幅。模型接下来就要用它,省掉以后再补查,可能更费 token。我们现在看整个任务的开销,连同多出来的查询和错误重试一起算。

有些判断可以直接省去。用户说“十分钟后把灯关掉”,目标和参数在对话中就确定了,经授权保存为固定命令,到点交给执行器。关哪盏灯、用什么参数,不用模型再想一遍。仍要临场判断的任务,继续用模型。Hermes 也有 cron 调度。5 我们在 seenzus 里把这两类任务分开,确定的命令到点直接执行,就省掉了那一次模型调用。

设备越多、能力差别越大,我们越觉得这些工作值得提前做。无关的信息少读,设备参数不用反复整理,确定的命令也不用再想一遍。少掉这些工作,才有机会少花 token、少等一会儿。和其他调好的方案比究竟能省多少,还需要同条件测量。

记忆要保留条件,也要接受修正

还是这盏灯。假如用户补充“只在今晚聚会时这样,平时还是暖色”,记忆就得连着“今晚聚会”一起记。少了这个条件,下次拿出一条“用户喜欢蓝色”,就把意思记错了。

OpenClaw 和 Hermes 也有长期记忆及更新机制。6 seenzus 要专门处理的是,个人偏好和房间情况分别记在哪里,临时要求以后还能不能用。我们在记忆读写规则里区分了个人与环境信息,也要求把适用条件一起留下。

“我怕冷”可以放在个人记忆里。住户说明书房下午西晒,这种可共享的房间情况可以放进环境记忆,供有相应权限的成员使用。个人内容即便提到了房间,也不能就此让其他人看到;用个人偏好指导已获授权的客厅服务,也不等于把它设成所有人的共同规则。

谁能看这条记忆,是私密性;卧室的温度要求到了客厅还适不适用,要看当时的条件。两件事不一样。个人记忆跟随用户,也得保留这些条件,“今晚凉一点”不能顺手覆盖长期偏好。

用户说“我之前说错了,其实喜欢暖色”,旧记忆就需要修改。只往后追加一句,下次还得在两条矛盾信息里猜。seenzus 的学习流程可以结合执行记录和用户反馈,核对、修正已有理解。设备确实调蓝了,只能说明操作结果;用户是否喜欢这次做法,还得看他的反馈。

这些执行记录和反馈会交给学习流程核对,需要改的记忆改掉,下次服务再读。我们希望用户纠正一次以后,Agent 能据此调整做法,少让人重复解释前因后果。当然,它仍可能漏记或判断错。执行成功只证明设备做了这件事,不能顺手记成用户就喜欢这样。

执行记录和用户反馈进入学习核对,必要时修正带适用条件的个人或环境记忆,后续服务按权限读取。记忆本身不授予执行权限。
沙色是执行记录与用户反馈,淡蓝是带条件的记忆。虚线表示核对后按需修正,后续服务只读取有权使用的内容。学习可能漏记或判断错;记忆也不能代替新的执行授权。

记住以后,也不能擅自开始做。多次看到用户晚上十点关灯,可以据此理解习惯、提出建议。以后每天十点都替他关灯,则需要另外的授权,确认习惯不能当成执行许可。

让模型少做一遍已经能确定的事

这轮改完,模型还没有变得百发百中。测试里仍会选错搜索词,或者没查完就提前收尾。工具给了继续查的办法,它未必用好,这些问题还要继续调。

我们做 seenzus,愿意把时间花在这些地方。模型擅长理解人说的话,也能结合情况选择做法,没必要让它每次顺带重做一遍设备规则的整理。工具先把能确定的事情做好,记忆把要求当时的条件留下,再用执行记录和反馈去纠正。用户拿到的,是默认就按这套分工工作的 Space Agent。这也是我们认为专门适配空间值得做的原因。

注释与来源

  1. OpenClaw 社区成员在 Home Assistant 论坛发布的 REST skill 工具说明,2026 年 2 月 26 日。实现方式是告诉 Agent 用凭据调用 HA 的 GET/POST 接口,没有独立的 typed 工具实现。该帖是公开可读的完整样本,不是性能基线。
  2. Hermes(NousResearch/hermes-agent)homeassistant_tool.py,查询于 2026 年 9 月 17 日。工具包括 ha_list_entities(按 domain/area 过滤,取回后压成标识、状态和名称)、ha_get_state(单实体全属性)、ha_list_services(按 domain 返回服务描述及字段说明,压掉字段 selector 等元数据)、ha_call_service(格式校验,阻止 shell_command 等六类 domain,回包压成 success/service/affected_entities)。domain 按实体标识前缀筛选,area 匹配为名称/属性子串,未查区域注册表。POST 超时常量 15 秒。
  3. ha-mcp(homeassistant-ai/ha-mcp)README.md,master 快照 026647e,pyproject.toml 标记 8.5.0,查询于 2026 年 9 月 17 日。搜索支持区域/楼层/别名过滤和模糊匹配(tools_search.py),结果 limit/offset 和 result_fields 投影;服务查询支持 detail_level=full 返回字段 schema(tools_services.py);控制确认区分 dispatched/confirmed/partial/transitions(tools_service.py);审批策略含 Read Only 模式和逐工具开关(middleware.py)。ha-mcp 是社区项目,不是 HA 官方 MCP,也不是 OpenClaw 官方插件。
  4. Hermes issue #96121,2026 年 8 月 27 日用户报告。电视与播放器脚本约 20 到 40 秒完成,Hermes 的 15 秒超时先到了,HA 随后仍执行完毕。该 issue 调研时未关闭。这是用户自述的单个场景,不是普遍基准;Hermes 源码中 POST 超时 15 秒已确认。
  5. Hermes 官方 cron.md 描述原生 cron 调度,支持单次和重复执行,可绑定 skill。这里未审计其调度执行器,不推断到点是否必然调用模型。查询于 2026 年 9 月 17 日。
  6. OpenClaw 官方 memory.md 覆盖 USER.md、MEMORY.md、日期笔记及后台整理;skills.md 描述技能创建与工具使用教学。Hermes 官方 memory.md 描述 profile 记忆、session search、纠错后 memory/skill 更新及写入审批。以上为官方文档声明的能力,本次未审计其完整学习实现。查询于 2026 年 9 月 17 日。