File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,35 @@ async def main():
8989asyncio.run(main())
9090```
9191
92- ## Optional: Add event listeners
92+ ## Enable debug logging for web interface monitoring
9393
94- Monitor agent activity by adding event listeners:
94+ Enable comprehensive debug logging to collect detailed execution traces that can be viewed in xaibo's web interface:
95+
96+ ``` python
97+ import logging
98+ from xaibo.primitives.event_listeners.debug_event_listener import register_debug_listener
99+
100+ # Configure logging to capture debug events
101+ logging.basicConfig(level = logging.DEBUG )
102+
103+ # Create xaibo instance and register debug listener
104+ xaibo = Xaibo()
105+ register_debug_listener(xaibo.event_registry, log_level = logging.INFO )
106+
107+ # Register your agent
108+ xaibo.register_agent(config)
109+ ```
110+
111+ This captures all agent calls, results, and events with detailed information including:
112+
113+ - Method calls with arguments
114+ - Return values and execution results
115+ - Event timestamps and call IDs
116+ - Module and method names
117+
118+ ## Optional: Add custom event listeners
119+
120+ Monitor specific agent activity by adding custom event listeners:
95121
96122``` python
97123events = []
You can’t perform that action at this time.
0 commit comments