Telegram: stream agent events as buttons via structured logging

t-343·WorkTask·
·
·
Created1 month ago·Updated1 month ago

Dependencies

Description

Edit

Once t-338 adds structured logging to Engine, update Telegram to:

1. Subscribe to the agent event stream instead of using individual callbacks 2. Render tool call events as Telegram buttons with trace links 3. Remove the current callback soup (engineOnToolCall, engineOnToolResult, engineOnToolTrace, etc.)

This unifies logging across all consumers (CLI, Telegram, file, web) and simplifies the Engine API.

Current state: Telegram.hs has a custom engineOnToolTrace callback that sends buttons. This should become a generic event handler.

Files:

  • Omni/Agent/Engine.hs - Will have AgentEvent type from t-338
  • Omni/Agent/Telegram.hs - Update to use event stream

Timeline (2)

🔄[human]Open → InProgress1 month ago
🔄[human]InProgress → Done1 month ago