Tools
Output Metrics Footer
OpenClaw plugin that appends compact token, context, quota, fallback, and subagent metrics to outgoing messages.
Configuration Example
{
"plugins": {
"allow": [
"openclaw-output-metrics-footer"
],
"entries": {
"openclaw-output-metrics-footer": {
"enabled": true,
"hooks": {
"allowConversationAccess": true
},
"config": {
"enabledChannels": [],
"appendSubagents": true,
"cacheMs": 120000,
"quotaCacheMs": 60000
}
}
},
"load": {
"paths": [
"/Users/evan/.openclaw/extensions/openclaw-output-metrics-footer"
]
}
}
}
README
# OpenClaw Output Metrics Footer
OpenClaw plugin that appends compact model usage, context occupancy, quota, fallback, and subagent metrics to outgoing channel messages.
Example footer:
```text
🟡 ↑154k ↓112 · ctx 166k/272k 61% · openai/gpt-5.5
```
With model fallback:
```text
⚠️ 降级:newapi-anthropic-vip/glm-latest-cloud → openai/gpt-5.5(provider error/timeout) · 🟡 ↑154k ↓112 · ctx 166k/272k 61% · openai/gpt-5.5
```
## Install
Clone the plugin into your OpenClaw extensions directory:
```bash
mkdir -p ~/.openclaw/extensions
git clone https://github.com/evan-zhang/openclaw-output-metrics-footer.git \
~/.openclaw/extensions/openclaw-output-metrics-footer
```
Enable it in `~/.openclaw/gateways/life/openclaw.json`:
```json
{
"plugins": {
"allow": [
"openclaw-output-metrics-footer"
],
"entries": {
"openclaw-output-metrics-footer": {
"enabled": true,
"hooks": {
"allowConversationAccess": true
},
"config": {
"enabledChannels": [],
"appendSubagents": true,
"cacheMs": 120000,
"quotaCacheMs": 60000
}
}
},
"load": {
"paths": [
"/Users/evan/.openclaw/extensions/openclaw-output-metrics-footer"
]
}
}
}
```
If you are installing on a different machine, change the `plugins.load.paths` entry to that machine's absolute plugin path.
Validate the config:
```bash
openclaw config validate
```
Restart the gateway from an external shell:
```bash
openclaw gateway restart
```
## Configuration
- `enabled`: set to `false` to disable the plugin.
- `enabledChannels`: optional allow-list of channel IDs. Empty means all channels.
- `disabledChannels`: optional block-list of channel IDs.
- `disabledConversations`: optional block-list of conversation IDs.
- `appendSubagents`: include nearby subagent usage when available. Defaults to `true`.
- `cacheMs`: time window for matching subagent usage. Defaults to `120000`.
- `quotaCacheMs`: cache window for quota lookup. Defaults to `60000`.
## Footer Fields
- `↑` / `↓`: input and output tokens for the latest model call.
- `ctx used/budget percent`: compiled context tokens divided by the runtime context budget.
- `降级`: shown when the actual model differs from the configured primary model.
- `sub ↑/↓`: nearby subagent token usage when enabled and detected.
tools
Comments
Sign in to leave a comment