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.
When working on bringing AG-UI to a new surface or platform, you can use the
Dojo as a comprehensive “todo list”:
Work through each demonstration one by one
Implement and test each AG-UI building block in your environment
When all demonstrations work correctly in your implementation, you can be
confident that full-featured copilots and agent-native applications can be
built on your new surface
This methodical approach ensures you’ve covered all the necessary functionality
required for a complete AG-UI implementation.
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