| name | hypercode-redis-pubsub |
| description | Manages Redis pub/sub channels, streams, and memory for HyperCode inter-agent communication. Use when inspecting agent messages, publishing system events, debugging communication between agents, or wiring new agents into the event bus. Knows all HyperCode channel naming conventions. |
HyperCode Redis Pub/Sub
Channel naming convention
hypercode:system → system-wide broadcast
hypercode:agents:<name> → agent-specific messages
hypercode:teams:<id> → agent team coordination
hypercode:guardian:blocks → blocked actions log
hypercode:health → health pulse events
hypercode:broski$ → BROski coin economy events
Quick operations
import redis
r = redis.Redis(host='localhost', port=6379)
r.publish('hypercode:system', '{"event": "agent_started", "name": "agent-x"}')
pubsub = r.pubsub()
pubsub.subscribe('hypercode:health')
for msg in pubsub.listen():
print(msg)
r.xadd('hypercode:events', {'type': 'startup', 'service': 'core'})
r.xrevrange('hypercode:events', count=10)
Debug inter-agent comms
redis-cli MONITOR
redis-cli SUBSCRIBE hypercode:system
redis-cli XLEN hypercode:events