Replies: 2 comments 1 reply
-
|
In my view, a potential approach to integrate AG-UI would be to post-process the content blocks within the generated Msg objects and wrap them with their corresponding AG-UI event types, such as text block, tool_use, and tool_result block. For example: @app.endpoint()
async def agent_endpoint() -> AsyncGenerator[Msg, None]:
...
yield msgIn the However, there are some challenges with this approach:
|
Beta Was this translation helpful? Give feedback.
-
|
There are two problems to be solved
Could it be considered to add an external type of tool that is not actually executed in the agent? If Msg is tool_use, it indicates that the current tool call has ended, If possible, I am willing to submit a PR - source: Literal["function", "mcp_server", "function_group"]
+ source: Literal["function", "mcp_server", "function_group", "external"]For example, registering external tools toolkit.register_tool_function(
json_schema={
"type": "function",
"function": {
"name": "change_background",
"parameters": {
"type": "object",
"properties": {
"background": {
"type": "string",
"description": "background color",
}
},
"required": ["background"],
},
"description": "Change the background color of the chat. Can be anything that the CSS background attribute accepts. Regular colors, linear of radial gradients etc.",
},
}
) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We've reviewed the AG-UI protocol as mentioned, but the integration advantages remain unclear. With my frontend design expertise, I'd like to propose a community-wide discussion to explore this together.
Beta Was this translation helpful? Give feedback.
All reactions