showcase/shell-docs/src/content/ag-ui/tutorials/debugging.mdx
Debugging agent-based applications can be challenging, especially when working with real-time, event-driven protocols like AG-UI. This guide introduces you to the AG-UI Dojo, a powerful tool for learning, testing, and debugging your AG-UI implementations.
The AG-UI Dojo is the best way to bring AG-UI to a new surface, and is also an excellent resource for learning about the protocol's basic capabilities. It provides a structured environment where you can test and validate each component of the AG-UI protocol.
The Dojo consists of a series of "hello world"-sized demonstrations for the different building blocks available via AG-UI. Each demonstration:
When working on bringing AG-UI to a new surface or platform, you can use the Dojo as a comprehensive "todo list":
This methodical approach ensures you've covered all the necessary functionality required for a complete AG-UI implementation.
For developers new to AG-UI, the Dojo serves as an interactive learning resource:
When using the Dojo for debugging your AG-UI implementation, keep these patterns in mind:
Event Sequence Issues: Verify that events are being emitted in the
correct order and with proper nesting (e.g., TEXT_MESSAGE_START before
TEXT_MESSAGE_CONTENT)
Data Format Problems: Ensure your event payloads match the expected structure for each event type
Transport Layer Debugging: Check that your chosen transport mechanism (SSE, WebSockets, etc.) is correctly delivering events
State Synchronization: Confirm that state updates are correctly applied using snapshots and deltas
Tool Execution: Verify that tool calls and responses are properly formatted and processed
To start using the AG-UI Dojo:
The Dojo's structured approach makes it an invaluable resource for both learning AG-UI and ensuring your implementation meets all requirements.