@moment-companion/openclaw-channel
v0.1.2
Published
OpenClaw channel plugin for Moment — delivers agent task results back to Moment Backend via callback API.
Readme
openclaw-moment-channel
OpenClaw channel plugin for Moment. When OpenClaw finishes an agent task with deliver=true and channel="moment", this plugin delivers the result to Moment Backend via the callback API.
Setup
1. Install plugin on OpenClaw host
# Copy to OpenClaw workspace
cp -r openclaw-moment-channel ~/.openclaw/workspace/
# Or clone directly
cd ~/.openclaw/workspace
git clone [email protected]:Pianke-Moment/openclaw-moment-channel.git2. Configure in openclaw.json
Add the plugin path and config:
{
"plugins": {
"load": {
"paths": [
"~/.openclaw/workspace/openclaw-moment-channel"
]
},
"entries": {
"moment": {
"enabled": true,
"config": {
"backendUrl": "https://your-moment-backend.com",
"callbackToken": "your-callback-token"
}
}
}
}
}backendUrl: Moment Backend base URLcallbackToken: must match theMOMENT_CALLBACK_TOKENenv var on the backend
3. Restart OpenClaw Gateway
launchctl stop ai.openclaw.gateway && sleep 2 && launchctl start ai.openclaw.gateway4. Verify
openclaw plugins list
# Should show "Moment" as loadedHow it works
Moment Backend
│ POST /hooks/agent
│ { message, deliver: true, channel: "moment", to: "<task_id>" }
▼
OpenClaw Gateway
│ Agent executes task
│ deliver=true → calls moment channel sendText()
▼
This Plugin (sendText)
│ POST <backendUrl>/api/v1/tasks/callback
│ { run_id: "<task_id>", text: "<result>" }
│ Authorization: Bearer <callbackToken>
▼
Moment Backend
│ Updates AgentTask status → completed
│ Pushes update to frontend via SSE
▼
Moment App (frontend)
└─ Slot card shows resultBackend integration note
The to parameter received by sendText() is whatever Moment Backend passes as to in the POST /hooks/agent call. The plugin forwards it as run_id in the callback payload.
For this to work, the backend must pass the AgentTask ID (not user_id) as the to parameter when dispatching tasks. See ADR-0010 for details.
