54 lines
2.8 KiB
Markdown
54 lines
2.8 KiB
Markdown
---
|
||
title: 万字讲透OpenClaw-Workspace深度解析
|
||
type: source
|
||
tags: [OpenClaw, Agent, Workspace, AGENTS.md, SOUL.md]
|
||
date: 2026-03-21
|
||
---
|
||
|
||
## Source File
|
||
- [[raw/Agent/万字讲透OpenClaw-Workspace深度解析-2026-03-21.md]]
|
||
|
||
## Summary
|
||
- 核心主题:OpenClaw workspace 文件体系深度解析
|
||
- 问题域:AI Agent 个性化配置与长期记忆
|
||
- 方法/机制:workspace 目录结构、各文件职责(AGENTS.md、SOUL.md、USER.md、IDENTITY.md、TOOLS.md、BOOTSTRAP.md、memory/)
|
||
- 结论/价值:workspace 是让 Agent 从"能工作"变成"好用"的关键,通过固化用户偏好、Agent 性格和长期记忆实现个性化
|
||
|
||
## Key Claims
|
||
- workspace 是 OpenClaw 中决定 Agent 如何工作的核心文件体系
|
||
- AGENTS.md 是岗位说明书,SOUL.md 是性格档案,两者分工明确不应混写
|
||
- USER.md 作用是固化用户偏好,减少重复交代
|
||
- TOOLS.md 规范工具使用,减少误操作
|
||
- BOOTSTRAP.md 是一次性引导,完成初始化后应删除
|
||
- memory/ 目录是 Agent 的长期记忆机制
|
||
|
||
## Key Quotes
|
||
> "workspace 是 Agent 的'工作台'(决定怎么工作),agentDir 是 openclaw.json 里的一个配置字段(指向存放运行状态的目录),sessions 是'工作日志'(记对话历史)。三者职责不同,不要混为一谈。"
|
||
> "一个没有 SOUL.md 的 Agent,每次对话都像第一次见面——它不记得自己是谁,说话没有固定风格,遇到同样的问题今天这么说、明天那么说。"
|
||
> "300-500 字的 AGENTS.md,比 2000 字的更有效。"
|
||
> "SOUL.md 是新来的助理的个人简历,USER.md 是 HR 给这位助理写的'关于你的上司,你需要提前知道的事'。"
|
||
|
||
## Key Concepts
|
||
- [[Workspace]]:OpenClaw 中 Agent 的工作台目录,包含行为规则、性格设定、用户偏好等配置文件
|
||
- [[AGENTS.md]]:Agent 的行为规则与多 Agent 协调文件,相当于岗位说明书
|
||
- [[SOUL.md]]:Agent 的叙事性格设定文件,相当于人物小传
|
||
- [[USER.md]]:用户画像与偏好固化文件
|
||
- [[IDENTITY.md]]:Agent 的结构化身份元数据
|
||
- [[TOOLS.md]]:工具权限声明与使用规范
|
||
- [[BOOTSTRAP.md]]:首次启动引导文件,一次性使用后应删除
|
||
- [[Memory 目录]]:Agent 的长期记忆机制,按日期滚动存储
|
||
|
||
## Key Entities
|
||
- [[OpenClaw]]:AI Agent 管理工具,支持 workspace 个性化配置
|
||
- [[DracoVibeCoding]]:本文作者,公众号「Draco正在VibeCoding」
|
||
|
||
## Connections
|
||
- [[OpenClaw]] ← contains ← [[Workspace]]
|
||
- [[Workspace]] ← manages ← [[AGENTS.md]]
|
||
- [[Workspace]] ← manages ← [[SOUL.md]]
|
||
- [[Workspace]] ← manages ← [[USER.md]]
|
||
- [[SOUL.md]] ← complements ← [[IDENTITY.md]]
|
||
- [[BOOTSTRAP.md]] ← initializes ← [[IDENTITY.md]], [[USER.md]], [[SOUL.md]]
|
||
|
||
## Contradictions
|
||
- (暂无) |