SherpaMind
Use SherpaMind as the OpenClaw query/action layer over the local SherpaDesk dataset prepared by the backend service.
Repo root and stable entrypoint
Work from the repo root:
CODEBLOCK0
When the repo is installed under an OpenClaw skills/ directory, SherpaMind automatically uses the parent workspace as SHERPAMIND_WORKSPACE_ROOT, so runtime state stays in workspace-level .SherpaMind/ rather than inside the skill checkout.
Use the stable runner:
CODEBLOCK1
Do not invent alternate runtime paths.
Do not treat OpenClaw as the background scheduler for this backend.
Transparency and operator expectations
SherpaMind is not an instruction-only skill.
When installed and configured for live use, it can:
- - create workspace-local runtime state under INLINECODE3
- create staged runtime dirs under
.SherpaMind/private/config/, .SherpaMind/private/secrets/, .SherpaMind/private/data/, .SherpaMind/private/state/, .SherpaMind/private/logs/, .SherpaMind/private/runtime/, and INLINECODE10 - create a local SQLite database and generated public artifacts
- create a Python runtime venv under INLINECODE11
- install Python dependencies from PyPI during bootstrap
- store the SherpaDesk API key locally in INLINECODE12
- optionally store a SherpaDesk API user hint in INLINECODE13
- store non-secret connection/runtime settings in INLINECODE14
- optionally install and run a user-level
systemd background service
Required live staged credentials/config for real SherpaDesk use:
- - staged API key under INLINECODE16
- staged org/instance settings in INLINECODE17
If the user only wants query guidance or offline inspection of an existing local dataset, do not imply that fresh credentials or service installation are unnecessary for live sync.
Choose the lightest path that answers the question
Exact facts, counts, status, and workload
Start with structured commands:
- - INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
- INLINECODE26
- INLINECODE27
- INLINECODE28
- INLINECODE29
- INLINECODE30
- INLINECODE31
- INLINECODE32
- INLINECODE33
- INLINECODE34
Examples:
- - open-ticket count → INLINECODE35
- technician backlog/load → INLINECODE36
- account snapshot → INLINECODE37
- ticket inspection / retrieval-ready context → INLINECODE38
Fuzzy investigation, prior-art lookup, and support-history recall
Use retrieval commands:
- - INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
- INLINECODE43
- INLINECODE44
- INLINECODE45
- INLINECODE46
- INLINECODE47
Default retrieval workflow:
- 1. Start with keyword/text search when the issue words are concrete.
- Widen to vector search when wording may vary or keyword recall looks thin.
- Use account/technician/status/priority/category/department/class/submission/resolution filters when they materially narrow the search.
- Answer from retrieved evidence instead of jumping to canned conclusions.
Quick factual context from generated artifacts
Read these when a concise derived artifact is enough:
- - INLINECODE48
- INLINECODE49
- INLINECODE50
- INLINECODE51
- INLINECODE52
- INLINECODE53
- INLINECODE54
- INLINECODE55
- INLINECODE56
- INLINECODE57
- INLINECODE58
- INLINECODE59
Preferred answer flow
For broad questions like “what’s been going on with account X lately?” or “have we seen this before?”:
- 1. Pull one structural summary first.
- Pull retrieval evidence second.
- Use generated public docs only when they add concise context.
- Give the user an answer grounded in the retrieved evidence.
Prefer factual retrieval over hand-authored interpretation.
End-to-end install and onboarding on another OpenClaw instance
If the user asks to install SherpaMind properly end-to-end into an OpenClaw instance, first check the host prerequisites and report any missing pieces plainly before continuing.
Minimum prerequisites to check:
- -
python3 is present - Python venv/pip bootstrap works on that host
- the host has network access for Python package installation
- INLINECODE61 is available if background service mode is expected
If any prerequisite is missing, stop and tell the user exactly what is missing and what needs to be fixed.
Then use this flow from the installed skill bundle root:
- 1. audit bootstrap/readiness first
-
python3 scripts/run.py bootstrap-audit
- 2. bootstrap the skill-local runtime
-
python3 scripts/bootstrap.py
- 3. run the setup flow
-
python3 scripts/run.py setup
- 4. verify runtime state
-
python3 scripts/run.py doctor
- 5. stage the SherpaDesk API key
-
python3 scripts/run.py stage-api-key --from-file <path-to-token-file>
- 6. discover organizations/instances
-
python3 scripts/run.py discover-orgs
- 7. write the chosen org/instance into non-secret settings
-
python3 scripts/run.py configure --org-key <org> --instance-key <instance>
- 8. seed the local dataset
-
python3 scripts/run.py seed
- 9. generate/refine the derived artifacts if needed
-
python3 scripts/run.py generate-public-snapshot
-
python3 scripts/run.py generate-runtime-status
- 10. confirm the install is actually usable
-
python3 scripts/run.py dataset-summary
-
python3 scripts/run.py insight-snapshot
-
python3 scripts/run.py report-vector-index-status
- 11. only then decide whether unattended background mode is wanted
-
python3 scripts/run.py install-service
- INLINECODE76
Default expectation on Linux is that setup initializes the DB, cleans up any old SherpaMind cron jobs, and can generate an initial public snapshot. Treat user-level systemd installation as a later, explicit operator choice rather than part of the earliest bootstrap steps.
If service installation fails because the target host lacks usable systemctl --user, continue the bootstrap/config/seed flow anyway, report the service limitation clearly, and use python3 scripts/run.py service-run-once or python3 scripts/run.py service-run as the fallback operational mode instead of pretending the service installed.
If install/runtime/use issues or meaningful feature gaps are discovered while operating SherpaMind, check . If a matching issue exists, add supporting detail; otherwise open a new issue with clear reproduction/context. Keep issue content anonymized and public-safe.
Lifecycle and maintenance commands
Use these for setup/maintenance, not routine user queries:
- - INLINECODE82
- INLINECODE83
- INLINECODE84
- INLINECODE85
- INLINECODE86
- INLINECODE87
- INLINECODE88
- INLINECODE89
- INLINECODE90
- INLINECODE91
- INLINECODE92
- INLINECODE93
- INLINECODE94
- INLINECODE95
- INLINECODE96
- INLINECODE97
- INLINECODE98
- INLINECODE99
Boundaries
- - Treat SherpaMind as read-only unless the project explicitly grows write behavior later.
- Keep attachment handling metadata-only by default.
- Do not auto-download attachment bodies by default.
- Treat docs, chunks, vector rows, and public Markdown artifacts as replaceable derived caches.
- Let SherpaMind prepare and expose data; let OpenClaw interpret it at answer time.
References
Read these only when needed. Keep the action layer in this file lean; use the reference files for deeper architecture, retrieval, automation, and API details.
- -
{baseDir}/README.md — current live project overview and command surface - INLINECODE101 — query/retrieval model
- INLINECODE102 — backend vs skill-front boundary
- INLINECODE103 — retrieval and vector design
- INLINECODE104 — audit-first install/onboarding model
- INLINECODE105 — service/install/update model
- INLINECODE106 — hot/warm/cold sync behavior
- INLINECODE107 — verified API/auth behavior
SherpaMind
将SherpaMind作为OpenClaw查询/操作层,用于后端服务准备的本地SherpaDesk数据集。
仓库根目录与稳定入口
从仓库根目录开始工作:
bash
cd {baseDir}
当仓库安装在OpenClaw的skills/目录下时,SherpaMind会自动将父工作区作为SHERPAMINDWORKSPACEROOT,因此运行时状态会保留在工作区级别的.SherpaMind/目录中,而不是技能检出目录内。
使用稳定运行器:
bash
python3 scripts/run.py [args...]
不要发明替代的运行时路径。
不要将OpenClaw视为此后台服务的后台调度器。
透明度与操作员预期
SherpaMind不仅仅是一个指令型技能。
当安装并配置为实时使用时,它可以:
- - 在.SherpaMind/下创建工作区本地运行时状态
- 在.SherpaMind/private/config/、.SherpaMind/private/secrets/、.SherpaMind/private/data/、.SherpaMind/private/state/、.SherpaMind/private/logs/、.SherpaMind/private/runtime/和.SherpaMind/public/下创建分阶段运行时目录
- 创建本地SQLite数据库并生成公开产物
- 在.SherpaMind/private/runtime/venv下创建Python运行时虚拟环境
- 在引导期间从PyPI安装Python依赖项
- 将SherpaDesk API密钥本地存储在.SherpaMind/private/secrets/sherpadeskapikey.txt中
- 可选地将SherpaDesk API用户提示存储在.SherpaMind/private/secrets/sherpadeskapiuser.txt中
- 将非秘密的连接/运行时设置存储在.SherpaMind/private/config/settings.env中
- 可选地安装并运行用户级systemd后台服务
实际SherpaDesk使用所需的实时分阶段凭据/配置:
- - 在.SherpaMind/private/secrets/sherpadeskapikey.txt下的分阶段API密钥
- 在.SherpaMind/private/config/settings.env中的分阶段组织/实例设置
如果用户只需要查询指导或离线检查现有本地数据集,不要暗示实时同步不需要新的凭据或服务安装。
选择回答问题的轻量级路径
精确事实、计数、状态和工作负载
从结构化命令开始:
- - python3 scripts/run.py dataset-summary
- python3 scripts/run.py report-api-usage
- python3 scripts/run.py report-enrichment-coverage
- python3 scripts/run.py insight-snapshot
- python3 scripts/run.py report-ticket-counts
- python3 scripts/run.py report-status-counts
- python3 scripts/run.py report-priority-counts
- python3 scripts/run.py report-technician-counts
- python3 scripts/run.py report-ticket-log-types
- python3 scripts/run.py report-attachment-summary
- python3 scripts/run.py recent-tickets
- python3 scripts/run.py open-ticket-ages
- python3 scripts/run.py recent-account-activity
- python3 scripts/run.py recent-technician-load
- python3 scripts/run.py account-summary
- python3 scripts/run.py technician-summary
- python3 scripts/run.py ticket-summary
示例:
- - 开放工单计数 → report-status-counts
- 技术人员积压/负载 → technician-summary
- 账户快照 → account-summary
- 工单检查/检索就绪上下文 → ticket-summary
模糊调查、先前案例查找和支持历史回忆
使用检索命令:
- - python3 scripts/run.py search-ticket-docs
- python3 scripts/run.py search-ticket-docs --account --status Open --department
- python3 scripts/run.py search-ticket-chunks
- python3 scripts/run.py search-ticket-chunks --account --status Open --technician
- python3 scripts/run.py search-ticket-chunks --priority High --category --class-name
- python3 scripts/run.py search-vector-index
- python3 scripts/run.py search-vector-index --account --status Open
- python3 scripts/run.py search-vector-index --technician --priority High --category
- python3 scripts/run.py search-vector-index --department --class-name --submission-category --resolution-category
默认检索工作流程:
- 1. 当问题词汇具体时,从关键词/文本搜索开始。
- 当措辞可能变化或关键词召回率较低时,扩展到向量搜索。
- 当账户/技术人员/状态/优先级/类别/部门/类别/提交/解决方案过滤器能实质性缩小搜索范围时使用它们。
- 根据检索到的证据回答,而不是跳到预设结论。
从生成产物中获取快速事实上下文
当简洁的派生产物足够时,阅读这些:
- - {baseDir}/.SherpaMind/public/docs/index.md
- {baseDir}/.SherpaMind/public/docs/insight-snapshot.md
- {baseDir}/.SherpaMind/public/docs/stale-open-tickets.md
- {baseDir}/.SherpaMind/public/docs/recent-account-activity.md
- {baseDir}/.SherpaMind/public/docs/recent-technician-load.md
- {baseDir}/.SherpaMind/public/docs/runtime/status.md
- {baseDir}/.SherpaMind/public/docs/accounts/index.md
- {baseDir}/.SherpaMind/public/docs/technicians/index.md
- {baseDir}/.SherpaMind/public/docs/tickets/index.md
- {baseDir}/.SherpaMind/public/docs/accounts/.md
- {baseDir}/.SherpaMind/public/docs/technicians/.md
- {baseDir}/.SherpaMind/public/docs/tickets/ticket_*.md
首选回答流程
对于广泛的问题,如最近账户X发生了什么?或我们以前见过这个吗?:
- 1. 首先提取一个结构摘要。
- 其次提取检索证据。
- 仅在生成公开文档能提供简洁上下文时使用它们。
- 给用户一个基于检索证据的回答。
优先选择事实检索而非手动编写的解释。
在另一个OpenClaw实例上的端到端安装和引导
如果用户要求将SherpaMind正确端到端安装到OpenClaw实例中,首先检查主机先决条件,并在继续之前明确报告任何缺失的部分。
要检查的最低先决条件:
- - python3存在
- Python venv/pip引导在该主机上工作
- 主机具有用于Python包安装的网络访问权限
- 如果期望后台服务模式,systemctl --user可用
如果缺少任何先决条件,停止并明确告知用户缺少什么以及需要修复什么。
然后从已安装的技能包根目录使用以下流程:
- 1. 首先审计引导/就绪状态
- python3 scripts/run.py bootstrap-audit
- 2. 引导技能本地运行时
- python3 scripts/bootstrap.py
- 3. 运行设置流程
- python3 scripts/run.py setup
- 4. 验证运行时状态
- python3 scripts/run.py doctor
- 5. 分阶段设置SherpaDesk API密钥
- python3 scripts/run.py stage-api-key --from-file
- 6. 发现组织/实例
- python3 scripts/run.py discover-orgs
- 7. 将所选组织/实例写入非秘密设置
- python3 scripts/run.py configure --org-key --instance-key
- 8. 种子化本地数据集
- python3 scripts/run.py seed
- 9. 如果需要,生成/优化派生产物
- python3 scripts/run.py generate-public-snapshot
- python3 scripts/run.py generate-runtime-status
- 10. 确认安装实际可用
- python3 scripts/run.py dataset-summary
- python3 scripts/run.py insight-snapshot
- python3 scripts/run.py report-vector-index-status
- 11. 然后才决定是否需要无人值守后台模式
- python3 scripts/run.py install-service
- python3 scripts/run.py service-status
在Linux上的默认期望是setup初始化数据库,清理任何旧的SherpaMind cron