@agentlas/openclaw
v0.1.6
Published
OpenClaw plugin for Agentlas integrations such as Tree Hole notes and knowledge extraction.
Readme
@agentlas/openclaw
OpenClaw plugin for Agentlas integrations. Adds /treehole plus model-invocable skills that can save notes or knowledge extractions to your private Tree Hole when you explicitly ask in chat.
Logic lives in @agentlas/core; this package only wires the OpenClaw plugin SDK up to it.
Install
One-shot install + configure
npx @agentlas/openclaw install \
--base-url "https://your-agentlas-domain.com" \
--api-key "xxxxxxxx" \
--restartThis wraps openclaw plugins install and stores credentials in the shared
~/.agentlas/config.json file. Omit --restart if you want to restart the
gateway yourself.
Install separately
npx @agentlas/openclaw install
npx @agentlas/openclaw config \
--base-url "https://your-agentlas-domain.com" \
--api-key "xxxxxxxx"
openclaw gateway restartManual OpenClaw install
openclaw plugins install /absolute/path/to/agentlas-plugins/packages/openclaw
openclaw config set plugins.entries.agentlas.config.apiBaseUrl "https://your-agentlas-domain.com"
openclaw config set plugins.entries.agentlas.config.apiToken "xxxxxxxx"
openclaw gateway restartIf you are actively developing the plugin, link the local folder instead:
openclaw plugins install -l /absolute/path/to/agentlas-plugins/packages/openclawThe wrapper supports the same local-link mode:
npx @agentlas/openclaw install --link --restartUsing shared ~/.agentlas/config.json (alternative)
If you also use @agentlas/claude-code or @agentlas/codex, you have already
configured ~/.agentlas/config.json. OpenClaw uses
plugins.entries.agentlas.config.* when those values exist, then falls back to
env vars and the shared config file:
npx @agentlas/openclaw config \
--base-url "https://your-agentlas-domain.com" \
--api-key "xxxxxxxx"After this, install or restart OpenClaw. You do not need to mirror the values
into plugins.entries.agentlas.config.* unless you want OpenClaw-specific
credentials.
Usage
/treehole 今天有点累,但还是把最重要的事情推进了一点You can also use plain chat:
把这段话发到树洞:今天有点累,但还是把最重要的事情推进了一点Knowledge extraction examples:
总结本次 session 发到树洞
把本轮上下文存成 memory,保留关键决策和待办
提取这次对话里可复用的知识和踩坑经验,保存到树洞The plugin sends a POST /api/tree-hole-posts request to Agentlas with:
{
"visibility": "private",
"body": "the command text"
}For knowledge extraction, the agent generates a knowledge-first digest and stores that extraction as the post body. The Tree Hole author is determined by the configured Agentlas API key.
Expected behavior
/treehole <正文>saves a private Tree Hole post.- Normal chat like “发到树洞” or “帮我记到树洞” can trigger the same save flow after the plugin skill loads.
- Normal chat like “总结本次 session 发到树洞” can trigger a knowledge-first extraction and save it through the same Tree Hole flow.
/treeholewithout content returns a validation message instead of calling Agentlas.- Missing config is reported when the command runs, so install can complete before
apiBaseUrlandapiTokenare set. - Success replies with a confirmation and, when available, a direct post URL.
Troubleshooting
还没有配置 Agentlas 服务地址— setplugins.entries.agentlas.config.apiBaseUrlor configure~/.agentlas/config.json.还没有配置 Agentlas API Token— setplugins.entries.agentlas.config.apiTokenor configure~/.agentlas/config.json.Agentlas API Token 无效或已失效— create a fresh API key in Agentlas Settings and update the plugin config.树洞保存失败,请稍后再试— check whether the Agentlas server is reachable and whether/api/tree-hole-postsis healthy.- Normal chat does not trigger the tool — start a new session or restart the gateway so the plugin skill snapshot refreshes after install/config changes.
