Integrate event logging into Engine.hs

t-197.3·WorkTask·
·
·
·Omni/Agent.hs
Parent:t-197·Created3 months ago·Updated3 months ago

Dependencies

Description

Edit

Update Engine.hs to emit events via callbacks:

1. Add new callbacks to EngineConfig:

  • engineOnAssistant :: Text -> IO ()
  • engineOnToolCall :: Text -> Value -> IO ()
  • engineOnToolResult :: Text -> Bool -> Text -> IO ()
  • engineOnComplete :: IO ()
  • engineOnError :: Text -> IO ()

2. Call these at appropriate points in runAgent loop:

  • After receiving assistant message
  • Before executing each tool call
  • After each tool result
  • On completion or error

3. Update Worker.hs to wire callbacks to EventStore.insertEvent

The callbacks should be optional (default to no-op) to avoid breaking existing usage.

Timeline (0)

No activity yet.