Auto Session Labels
Automatically generates concise LLM-based labels for OpenClaw conversations.
Install
openclaw plugins install clawhub:@finia2na/auto-session-labelsAuto Session Labels
An OpenClaw native plugin that gives completed, unlabeled conversations concise LLM-generated titles. It uses OpenClaw's supported session, transcript, configuration, and model APIs and never writes session storage directly.
Automatic passes preserve useful existing labels. A session is eligible after it contains both a user message and an assistant reply. Subagent sessions receive a Subagent — <task summary> label.
Install
Auto Session Labels is available on ClawHub:
openclaw plugins install clawhub:@finia2na/auto-session-labels
openclaw plugins enable auto-session-labels
The first automatic pass runs after the configured interval (two minutes by default). Managed Gateways restart automatically when installation requires it; restart an unmanaged Gateway manually.
The plugin uses the target agent's default model unless another model is selected. To authorize and use a cheaper dedicated model in one owner/admin-only command:
/auto-labels model provider/cheap-model
Return to the agent default with:
/auto-labels model default
Commands
All plugin commands require an OpenClaw owner or a Gateway client with operator.admin scope. Normal users' conversations are still labeled automatically, but normal users cannot change settings or trigger rebuilds.
/auto-labels status
/auto-labels model [provider/model | default]
/auto-labels config show
/auto-labels config help
/auto-labels config set <setting> <value>
/auto-labels rebuild
/auto-labels rebuild --apply
/auto-labels rebuild --all
/auto-labels rebuild --all --overwrite
/auto-labels rebuild --all --overwrite --apply
Rebuilds are previews unless --apply is present. --all bypasses the configured recent-session window and per-pass limit. --overwrite requires --all; it is the only mode that may replace a useful or manually assigned label.
Configuration
The short chat helper validates, saves, and applies settings live:
/auto-labels config set intervalMs 300000
/auto-labels config set updatedWithinSeconds 86400
/auto-labels config set maxSessionsPerRun 50
/auto-labels config set maxHistoryMessages 4
/auto-labels config set maxLabelLength 60
/auto-labels config set maxTokens 32
/auto-labels config set dryRun true
Available settings:
| Setting | Default | Range or behavior |
|---|---|---|
intervalMs | 120000 | 60,000–3,600,000 ms |
updatedWithinSeconds | 604800 | 60–31,536,000 seconds |
maxSessionsPerRun | 50 | 1–200 scheduled candidates |
maxHistoryMessages | 4 | 2–4 recent messages |
maxLabelLength | 60 | 12–100 characters |
model | agent default | Optional canonical provider/model |
maxTokens | 32 | 16–64 output tokens |
dryRun | false | Preview scheduled labels without writing |
The standard OpenClaw config surface remains available as a fallback:
openclaw config get plugins.entries.auto-session-labels.config --json
openclaw config set plugins.entries.auto-session-labels.config.intervalMs 300000 --strict-json
Selecting a custom model also grants this plugin narrowly scoped permission to use that exact model through plugins.entries.auto-session-labels.llm. The plugin never grants itself wildcard model access.
Incomplete sessions and failures
Scheduled passes only change sessions with no label, or with a label exactly equal to the raw session key. Each candidate must contain at least one user message and one assistant message; incomplete or malformed conversations are skipped and can be reconsidered on a later pass.
Transcript-read or session-patch errors are logged for the affected session and the pass continues. Empty, generic, or unsafe model output is ignored. A provider/model error stops the rest of the current pass so a failing provider is not called repeatedly; eligible sessions are retried after the next interval. The final patch rechecks the current label atomically, so a meaningful label assigned while generation was running is preserved.
Updates
openclaw plugins update auto-session-labels
Local development
npm ci
npm test
npm run build
openclaw plugins install --link .
openclaw plugins enable auto-session-labels
Useful checks:
npm run plugin:validate
openclaw plugins inspect auto-session-labels --runtime --json
npm pack --dry-run
Publishing updates
The initial release is live on ClawHub. Maintainer releases remain manual:
npm install -g clawhub
clawhub login
clawhub package validate .
clawhub package publish . --dry-run
clawhub package publish .
Update the package version and changelog before publishing a new immutable release.
License
MIT
