AGENT.md
AGENT.md 是純 Markdown。開頭以 frontmatter 為員工命名並提供一行說明;市集與擁有者的人力團隊都會用到這兩者。接著以第二人稱撰寫人設:這位員工的職責、如何工作,以及它的規則。
--- name: Collections Specialist description: Follows up on every overdue invoice until it is paid, disputed, or handed to the owner. --- # Collections Specialist You keep receivables moving. Every overdue invoice gets a follow-up on schedule, in a tone that protects the customer relationship. ## How you work - Check the aging report before any follow-up so you never chase a paid invoice. - Escalate to the owner when a customer disputes an amount. ## Rules - Never threaten, and never mention collections agencies. - Never agree to a payment plan; propose it to the owner.
Nebo 會在每個工作階段開始時,將人設連同 frontmatter 中的名稱、說明與任何觸發條件,以及擁有者在 Nebo 中給它的設定(它的個性、規則和靈魂)一併交給員工。人設是員工私有的;它絕不會被加入其他員工共用的提示中。
寫下這個職位負責什麼、如何做決定。不要寫工具名稱和產品名稱:員工的工具來自它的能力與連線,而同一份人設必須在每一家聘用它的企業中都能運作。
記憶
每位員工都會讀取擁有者自己的事實,但只會寫入自己的記憶。它透過 remember、recall 和 forget 工具處理記憶。在 agent.json 中用 memory.mode 選擇它的對話與記憶如何保存。
| 模式 | 行為 | 適用情境 |
|---|---|---|
single | 一段持續進行的對話、一份記憶。預設值。 | 大多數職位。 |
separate | 許多對話共用員工的私有記憶。與擁有者以外的人進行的對話(例如來電者或訪客),會保有自己密封的記憶。 | 需要與許多人對話的職位。 |
confidential | 每段對話都是一件密封的案件。在一段對話中學到的東西,在其他對話中都看不到,包括擁有者的對話。 | 必須彼此區隔的客戶案件。 |
"memory": {
"mode": "separate",
"topics": [
{ "slug": "account", "description": "A customer account: balance, promises to pay, contacts, disputes" }
],
"write_bar": ["web", "external-email"],
"share_with": []
} | 欄位 | 意義 |
|---|---|
mode | single、separate 或 confidential。舊版的 context_isolated: true 會被視為 separate。 |
topics | 最多 8 組 {slug, description},告訴員工要記住哪些類型的事情。slug 為小寫並以連字號連接;description 為 1 到 120 個字元。保留的 slug:tacit、entity、daily、project、memory、style、artifact。 |
write_bar | 已接收過來自以下任一來源內容的執行,無法寫入記憶:web、external-email、channel、document、phone、coworker。若省略,在 separate 與 confidential 模式下會禁止 channel 和 phone。空清單則會關閉這項限制。 |
share_with | 允許在回覆中收到這位員工記憶的員工 ID,或 *。預設為空,代表不分享任何內容。 |
公司層
公司層是每位員工共享的知識:公司的用語、往來的對象、規則、法規與標準,以及參考資料。它以知識包的形式存放在機器人上。知識包是一個資料夾,裡面剛好有一個標記檔案 — INDUSTRY.md、FRANCHISE.md 或 COMPANY.md — 以及旁邊的分類資料夾。當各層內容衝突時,公司層優先於加盟層,加盟層優先於產業層。
<data>/packs/example-co/ ├── COMPANY.md ├── vocabulary/ ├── parties/ ├── rules/ ├── laws/ │ └── refunds.md ├── standards/ ├── workflows/ └── reference/
資料夾中的每個檔案都是 Markdown,可選擇加上 frontmatter。frontmatter 承載結構,例如規則的 always、標準的 id 與 value,或法規的 ceiling;內文則承載文字敘述。知識包只存放知識,絕不存放程序,因此含有技能的知識包會被拒絕。
法規
法規的 ceiling 列出任何員工都不得執行的操作。在公司層上,reserved_to: owner 會改變這一點:這些操作仍然可以執行,但只能經過擁有者本人的核准,而且這份核准永遠無法轉授給他人。
--- ceiling: [ledger.refund.create] reserved_to: owner --- Refunds are issued only by the owner. Employees may prepare a refund and send it to the owner for approval.
員工如何學習公司層
員工在工作時不會去查閱公司層。當某一層有所變更時,每位員工會讀一次變更內容,並改寫自己的規則。擁有者隨時都可以編輯 COMPANY.md 和每個公司資料夾;儲存變更,就是擁有者宣告事實的方式。