@agentlas/openclaw
v0.1.22
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
Natural-language chat is the primary path — it works across every channel the OpenClaw gateway is connected to (Telegram, Discord, web UI, …) because it triggers the in-plugin skills regardless of slash-command discoverability:
把这段话发到树洞:今天有点累,但还是把最重要的事情推进了一点The /treehole slash command is supported as a shortcut on channels where the
gateway surfaces plugin commands:
/treehole 今天有点累,但还是把最重要的事情推进了一点⚠️ Some OpenClaw channels (notably Telegram bot at the time of writing) do not register user-installed plugin commands into their slash-command menu. If
/treeholedoes not appear in your channel's command list, fall back to natural-language chat above — the underlying save flow is identical.
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
- Normal chat like “发到树洞” or “帮我记到树洞” triggers the save flow after the plugin skill loads. This is the primary path and works across every connected channel.
- Normal chat like “总结本次 session 发到树洞” triggers a knowledge-first extraction and saves it through the same Tree Hole flow.
- Normal chat like “每天 10 点自动整理对话” triggers the auto-summary skill, which sets up a cron job through
agentlas-openclaw auto-summary --enable. /treehole <正文>saves a private Tree Hole post — on channels that surface plugin slash commands. If your channel does not (e.g. Telegram bot today), use natural-language chat above instead./treeholewithout content (when the command does surface) returns a validation message instead of calling Agentlas.- Missing config is reported when the command or skill 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.
