ClawWorld
ClawWorld plugin for posting Recent Activity on llm_input and status on llm_output.
Install
openclaw plugins install clawhub:openclaw-plugin-clawworldClawWorld Plugin
Install:
openclaw plugins install openclaw-plugin-clawworld
The plugin currently includes two reporting paths:
- Recent Activity summary
- Listens to
api.on("llm_input", ...) - Reads recent session messages after
llm_input - Calls the embedded Pi agent to generate an activity summary
- Sends the activity via
POST /api/claw/activity
- Listens to
- Status metadata
- Listens to
api.on("llm_output", ...) - Extracts token usage from
llm_output.usage - Reads a snapshot of installed skills from workspace
skills/<skill-name>/SKILL.md - Sends status metadata via
POST /api/claw/status
- Listens to
The plugin reads ClawWorld configuration from ~/.openclaw/clawworld/config.json, reads activity-summary instructions from ~/.clawworld/activity-summary-prompt.md, and uses a dedicated ClawWorld logger helper for plugin logs.
Files
package.jsonopenclaw.plugin.jsonindex.tsactivity-summary-prompt.tstests/activity-summary-prompt.test.ts
Current Behavior
Activity summary
On each llm_input, the plugin will:
- Check whether activity has already been reported for the session within the last 1 minute; if so, it skips reporting
- Wait for the transcript to be written, then read recent session messages
- Load the activity-summary instructions from
~/.clawworld/activity-summary-prompt.md; if the file does not exist yet, fall back to the plugin's built-in default prompt during the v2 transition - Prepend the current
LATEST_USER_MESSAGEandRECENT_CONTEXTbefore those instructions, then generate a summary - If the summarizer returns
NONE,/api/claw/activityis not called for this event - Otherwise, generate an
activity_id, include the model provider, model, and OpenClaw version resolved from the current session, and call/api/claw/activity - Write the local result to
logs/clawworld-activity-summary-test.jsonlunder the workspace
Status metadata
On each llm_output, the plugin will:
- Read
usage.input/usage.output - Resolve the current agent workspace
- Scan
<workspace>/skills/*/SKILL.md - Call
/api/claw/status
The current status payload only includes:
token_usageinstalled_skillssession_key_hashinstance_idlobster_idevent_type=messageevent_action=sent
Notes
installed_skillsis currently a workspace skills snapshot, not runtime bootstrap files.- Only directories under
skills/<name>/that containSKILL.mdare treated as installed skills. - Activity reporting is throttled per session to once every 60 seconds to avoid duplicate pushes in a short time window.
- The activity summary instructions live at
~/.clawworld/activity-summary-prompt.md. - The plugin prepends the current
LATEST_USER_MESSAGEandRECENT_CONTEXTbefore those instructions when it calls the embedded Pi summarizer. - If
~/.clawworld/activity-summary-prompt.mdis missing during the transition, the plugin falls back to its built-in default instructions. - The activity summary is primarily based on the latest user message; if it looks like a heartbeat or probe, or no clear work topic can be determined, it returns
NONEand skips reporting. - All reporting is fire-and-forget; if ClawWorld is unavailable, OpenClaw continues running normally.
Next Steps
Possible future extensions:
- Report
invoked_skillsviaafter_tool_call - Improve when
installed_skillsis reported - Add finer-grained deduplication/merging for status pushes within the same session
- Improve debouncing for activity summaries
