with one click
bub-events
// Event-driven channel for the Bub framework. Use when processing HTTP events from external systems (webhooks, cron jobs, monitoring alerts) via the bub-events channel.
// Event-driven channel for the Bub framework. Use when processing HTTP events from external systems (webhooks, cron jobs, monitoring alerts) via the bub-events channel.
| name | bub-events |
| description | Event-driven channel for the Bub framework. Use when processing HTTP events from external systems (webhooks, cron jobs, monitoring alerts) via the bub-events channel. |
The bub-events channel receives HTTP POST events from external systems and converts them into agent messages.
Unlike chat channels (Telegram, CLI), the events channel is designed for machine-to-machine notifications:
Events arrive at POST /event and are processed as a single agent turn with bidirectional response.
Events carry a topic field that references topic-specific documentation:
Location: {workspace}/event_prompts/{topic}.md
Example: An event with topic=disk-alert references {workspace}/event_prompts/disk-alert.md
Purpose: Topic docs provide comprehensive handling instructions for specific event types, including:
Agent behavior: When a topic doc exists, follow its instructions precisely. It takes precedence over general event handling guidance.
Create a systemd timer that calls the events endpoint on schedule:
# /etc/systemd/system/bub-cron-@NAME@.timer
[Unit]
Description=Bub cron timer for @NAME@
[Timer]
OnCalendar=@SCHEDULE@
Persistent=true
[Install]
WantedBy=timers.target
# /etc/systemd/system/bub-cron-@NAME@.service
[Unit]
Description=Bub cron job for @NAME@
[Service]
Type=oneshot
ExecStart=/usr/bin/curl -X POST http://localhost:8000/event \
-d "content=@CONTENT@" \
-d "sender=cron" \
-d "topic=@TOPIC@" \
-d "chat_id=cron-@NAME@"
# Install timer
sudo systemctl enable bub-cron-backup.timer
sudo systemctl start bub-cron-backup.timer
# Event arrives with:
# content="Daily backup completed"
# sender="cron"
# topic="backup-status"
# chat_id="cron-backup"
Topic doc: {workspace}/event_prompts/backup-status.md would instruct the agent to verify backup integrity and notify on failure.
| Field | Purpose | Example |
|---|---|---|
content | Event payload | "Disk usage 95%" |
sender | Source system | "cron", "monitoring" |
topic | Topic identifier | "disk-alert" |
chat_id | Session grouping | "alerts", "cron-backup" |
meta | Extra key-value pairs | {"severity": "critical"} |
When handling events:
Events are not conversational—focus on action and resolution.
[HINT] Download the complete skill directory including SKILL.md and all related files