-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Feature requestNew feature requestNew feature request
Description
Description
The new run_ag_ui()
and handle_ag_ui_request()
methods solve the issues around configuring agents per request (TY!), but there is currently no easy way to access the agents output after the run completes.
We can't await
the run and access all_messages()
as we need to start the response event stream immediately.
One solution might be to add middleware or a callback that could be registered to receive messages as they are generated (or just called when done).
References
https://bb687e8b-pydantic-ai-previews.pydantic.workers.dev/ag-ui/#design
https://ai.pydantic.dev/message-history/#accessing-messages-from-results
Metadata
Metadata
Assignees
Labels
Feature requestNew feature requestNew feature request