Description
Please read this first
- Have you read the docs?Agents SDK docs
Yes - Have you searched for related issues? Others may have had similar requests
No, nothing about gradio framework.
Describe the feature
What is the feature you're requesting? How would it work? Please provide examples and details if possible.
When I create an streaming-output Planer + Multi-Actor App with agent sdk and gradio,I found that the process of handoff and tool calling is invisible to user, and there is no interface to get the details or auto-output. (run_streamed is the top interface of all process, and we need to process different StreamEvent, which nothing example show how to do).
I think we need a example to show how to integrating Gradio's agent handoff or tool calling, like the example of https://huggingface.co/spaces/ysharma/Gemini2-Flash-Thinking/blob/main/app.py, which will show a ChatMessage with thinking output.
Obviously, smolagents was a better choice to integrating Gradio, but smolagents doesn't support async function and is CodeAct mode no Loop pattern, which CodeAct easily missing mcp tool calling.
当我构建一个流式输出的Planer + Multi-Actor的应用基于Agent SDK时,Agent SDK框架内部handoff和工具调用并没有很友好的接口可以获取或自动输出。
需要有一个example,展示如何集成integrating Gradio's Agent and Tool 的卡片输出,像是这个例子https://huggingface.co/spaces/ysharma/Gemini2-Flash-Thinking/blob/main/app.py 会输出 思考过程的卡片一样。
必须承认的是 smolagents + gradio 的集成比较好,但是smolagents是非异步的,而且是codeact,而非loop pattern,很容易就识别不到mcp工具。