An OpenClaw agent template for creating and maintaining a local market research vault.
一个用于 OpenClaw 的市场研究 Agent 模板,帮助用户在自己的本地目录中创建、维护和迭代交易复盘与市场认知库。
Compatibility baseline: OpenClaw 2026.5.19.
Market Thesis Agent 是一个给 OpenClaw 使用的 agent 项目。
它提供:
- 一份可复用的 OpenClaw agent 指令
- 一套市场研究 vault 目录模板
- 日常复盘、交易案例、认知卡片、错误复盘等 Markdown 模板
- 一个让用户自行设置本地数据目录的配置方式
这个仓库本身就是 OpenClaw agent workspace,不应该包含用户真实交易记录。用户安装后,需要:
- 将仓库下载为独立的 OpenClaw workspace
- 用该 workspace 创建
market-thesisagent - 设置独立的本地 vault 数据目录
- 将
template-vault/初始化到 vault 中
Market Thesis Agent is an OpenClaw agent project for maintaining a local market research vault.
It provides:
- reusable OpenClaw agent instructions
- a market research vault directory template
- Markdown templates for daily reviews, trade cases, principle cards, and error reviews
- a configurable local vault path
This repository is the OpenClaw agent workspace and should not contain private trading records. The user's vault is a separate data directory initialized from template-vault/.
market-thesis-agent/
README.md
AGENTS.md
SOUL.md
TOOLS.md
IDENTITY.md
USER.md
HEARTBEAT.md
config.example.json
template-vault/
00-Inbox/
00-首页/
01-市场观/
02-日常复盘/
03-交易案例/
04-认知卡片/
05-待验证假设/
06-错误与偏差/
07-专题研究/
08-周报月报/
09-模板/
10-索引/
99-附件/
The repository root is the agent workspace. template-vault/ is only the clean data-vault skeleton.
git clone \
https://github.com/<your-name>/market-thesis-agent.git \
"$HOME/.openclaw/workspace-market-thesis"
cd "$HOME/.openclaw/workspace-market-thesis"Or download and unzip the project manually.
Point OpenClaw at the cloned repository, not at the data vault:
export MARKET_THESIS_WORKSPACE="$HOME/.openclaw/workspace-market-thesis"
openclaw agents add market-thesis \
--workspace "$MARKET_THESIS_WORKSPACE" \
--non-interactive \
--jsonLoad the identity declared in IDENTITY.md:
openclaw agents set-identity \
--agent market-thesis \
--from-identityRunning openclaw agents add market-thesis without --workspace starts the interactive agent setup flow.
This is the private directory where your research notes will be created.
Example:
mkdir -p "$HOME/Documents/market-thesis"
export MARKET_THESIS_VAULT="$HOME/Documents/market-thesis"For long-term use, add the export line to your shell profile, such as ~/.zshrc.
Create the agent-local configuration:
cp config.example.json config.local.jsonThen edit config.local.json and set:
{
"vaultRoot": "/path/to/your/market-thesis"
}config.local.json belongs to the agent workspace, is local-only, and must not be committed.
You can alternatively set MARKET_THESIS_VAULT in the environment used to start the OpenClaw Gateway. A shell-only export may not reach a Gateway launched by another process, so config.local.json is the most portable default.
From the agent workspace, copy the template into the vault:
cp -R template-vault/. "$MARKET_THESIS_VAULT"/If your vault already contains notes, do not overwrite it blindly. Ask the agent to merge missing folders and templates incrementally.
Verify the result:
find "$MARKET_THESIS_VAULT" -maxdepth 2 -type d | sortDo not hard-code local paths in the open source project.
Bad:
/absolute/path/to/a/user-specific/vault
Good:
<VAULT_ROOT>
Resolution order:
config.local.jsonin the agent workspaceMARKET_THESIS_VAULTenvironment variable- Ask the user
The OpenClaw workspace and the vault root are intentionally different:
| Location | Purpose |
|---|---|
| Agent workspace | Instructions, identity, local configuration, memory, skills, vault template |
| Vault root | User-owned market notes, reviews, cases, hypotheses, and attachments |
The agent must not treat its workspace as the user's vault or edit vault files until the vault root is known.
The basic setup assumes the agent can access the configured host vault path.
When OpenClaw sandboxing is enabled, an external vault is not automatically
visible inside the sandbox. Add the vault as an explicit read/write bind mount
and configure vaultRoot to the container path.
Example:
{
agents: {
list: [
{
id: "market-thesis",
sandbox: {
mode: "all",
scope: "agent",
workspaceAccess: "ro",
docker: {
binds: ["/absolute/host/vault:/market-thesis-vault:rw"]
}
}
}
]
}
}In this example, use /market-thesis-vault as vaultRoot for sandboxed runs.
Bind mounts expose the selected host directory to the sandbox, so keep the
source path narrow and never mount credential directories.
Talk to the market-thesis agent in OpenClaw.
Example prompts:
初始化我的 market thesis vault。
请根据今天的交易记录生成表格版日常复盘。
把这次错误整理成错误复盘,并链接到相关认知卡片。
根据本周复盘,提炼可以进入认知卡片的规则。
Default knowledge flow:
observation
-> 00-Inbox/ or 02-日常复盘/
-> 03-交易案例/
-> 04-认知卡片/ or 05-待验证假设/ or 06-错误与偏差/
-> 08-周报月报/
-> 01-市场观/
Public repository content:
- agent instructions
- tool/path rules
- vault folder skeleton
- reusable Markdown templates
- sanitized examples, if needed
Private user content:
- real daily reviews
- real trade records
- portfolio values
- screenshots and attachments
- memory files
- account-specific data
Suggested .gitignore:
.DS_Store
.obsidian/workspace.json
.obsidian/cache/
config.local.json
memory/
MEMORY.md
*.csv
*.xlsx
*.pdf
99-附件/private/The agent workspace should generally be treated as private because OpenClaw may write memory/ and MEMORY.md there. Publish changes from a clean development checkout, not from a workspace containing personal memory.
openclaw agents list
openclaw config validate
openclaw doctorConfirm that:
- the agent workspace points to the cloned repository
config.local.jsonpoints to the separate vault- the vault contains the initialized template
HEARTBEAT.mdhas no tasks unless periodic checks are intended
Choose a license before publishing.
Recommended:
- MIT for agent instructions, scripts, and templates
- CC BY 4.0 for documentation-oriented publishing
- CC BY-NC 4.0 if you want to disallow commercial use