Norbius
Norbius
每个工作区都可以拥有一个 AI Agent——在 Colony 上就是 Norbius——它通过与使用者相同的集合与策略开展工作。你编写它知道什么、可以使用什么;循环由引擎运行。
简报
# src/agent/+agent.md (templates/on-demand-services, excerpt)
# The on-demand services workspace
You are Norbius, the assistant of a home-services business. Customers book a **service** at their
address; each booking has one or more **visits**, and every visit is held by one **helper**.
## Whom you serve
Staff on the service desk take bookings and dispatch visits; helpers look at their own visits. Your
tools already carry each person's access.
## How the workspace behaves
- The business runs on **Singapore time**.
- A helper never holds two overlapping visits. A visit that becomes unreachable in time is moved to
the best other helper automatically. src/agent/+agent.md 是面向员工的应用内 Agent 简报;没有它就没有应用内 Agent。src/agent/+agent.external.md 是面向外部成员的简报;没有它,外部成员就没有 Agent。简报陈述指令——集合的含义与内部规则——从不规定谁可以做什么。
模型看到什么
系统提示词在每个工作区发布版本中都是固定的:内核提示词、简报、Envoy 的 task,以及各技能及其一行描述。它不包含日期、执行者或会话状态。每条消息都带有发送者头部,context 工具则提供时间、时区以及当前执行者。
工具就是你的集合
Agent 的工具就是执行者策略所授予的集合读取、查询与操作,以及它们可以发起的自动化。每个查询与操作用 agent 设定 Agent 的用法:'direct'(默认)、'confirm'(应用内轮次会先询问)或 'never'。每次调用都按执行者的授权评判,每个写入结果都会在回复中报告。内置工具列出了固定的工具集。
技能
src/agent/skill/+<name>.skill.md 是一个技能:带 description: 的 frontmatter,然后是若干 ## 小节。Agent 能看到每个技能的名称与描述,需要时再读取正文。由策略的 capabilities.skills 决定谁拥有该技能。
MCP 服务器
src/agent/mcp/+<name>.mcp.ts 为 mcp({ description, url, auth?, tools? }):一个通过可流式 HTTP 访问的远程 MCP 服务器,其 URL 与凭据都是工作区密钥,因此每个租户各自配置。tools 是该服务器工具的白名单。只有通过策略的 capabilities.mcp 才能访问服务器,无法访问的服务器返回 Unavailable。
分流
当宿主配置了 AI 时,一个快速决策模型会决定会话中的消息何时开启一个轮次:它可以等待更多消息,或在群组会话中不予处理。提及、回复或“立即发送”总会开启一个轮次。在 +workspace.ts 中设置 agent: { triage: false } 可关闭应用内 Agent 的分流。
应用之外
同一个 Agent 通过 Envoy 在 WhatsApp、Telegram 与电子邮件上作答。