Event Service¶
The event service is an asyncio-based pub/sub runtime for agent workflows.
What It Does¶
- Listens to Telegram bot updates (long polling)
- Emits cron-style interval events
- Projects source-specific events into normalized
workflow.requestevents - Writes events to stdout and/or JSONL for traceability
Event Flow¶
- Source emits event (
telegram.message,cron.tick) - Event bus routes by wildcard patterns
- Projectors transform source events into
workflow.request - Sinks write events to stdout and/or JSONL
Running¶
Cron only:
bof service run --cron market_scan=15m
Telegram + cron:
bof service run --telegram --cron watchlist_refresh=30m
With audit log:
bof service run --telegram --cron watchlist_refresh=30m --event-log logs/events.jsonl
Options¶
| Flag | Description |
|---|---|
--telegram / --no-telegram |
Enable Telegram polling |
--telegram-token |
Bot token (falls back to TELEGRAM_BOT_TOKEN) |
--telegram-poll-timeout |
Poll timeout in seconds |
--cron NAME=INTERVAL |
Repeatable cron spec (e.g. brief=30m) |
--event-log <path> |
JSONL trace output path |
--quiet |
Disable stdout event stream |
Full help:
bof service run --help