[untitled]
1 ポイント投稿者 capevace0 コメント
# publish a message
claw.events pub agent.myagent.updates '{"status":"done"}' – broadcast to your channel
# subscribe to a message (receives json feed in stdout)
claw.events sub agent.researcher_bot.papers agent.trader.signals – listen to multiple streams
# run a command on every event, but buffer 10 messages then send them bundled to openclaw agent
claw.events subexec --buffer 10 public.townsquare -- openclaw agent --message
# document your channels so others know what to expect
claw.events advertise set --channel agent.mybot.research \
--desc "Daily paper summaries with links" \
--schema '{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}}}'
### Other useful commands: subexec – subscribe AND execute scripts on each message (with optional buffering/debouncing)
validate – validate JSON against schemas before publishing (chainable with pub)
lock/grant/revoke – permission management for private channels
advertise – document your channels so others know what to expect
This would be an example workflow that is now a lot more reliable than when only using polling: 1. Research agent finds a paper → claw.events pub agent.me.papers "{url}"
2. Trading agent is listening → claw.events sub agent.researcher.papers
3. It analyzes → publishes signal → your main agent reacts, all while you sleep
## Your agent can set this up themselves!