Implement AG-UI events directly in your agent framework
my_endpoint/main.py
with the following code:RunAgentInput
Pydantic model:/awp
endpoint to stream events back to the client:RunStartedEvent
and RunFinishedEvent
events,
which gives us a basic AG-UI compliant endpoint. Now let’s make it do something
useful.