-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Problem Description
Currently there is no easy and straight forward way to make good UI frontends for AI Agents. AI-SDK makes really good UI components specifically for AI agents. If Agno could be the backend for these UI components that would make it a great overall solution. Most of what is needed for this already included in AgentOS with endpoints that stream the agents events. If this also could be in a format that the AI-SDK UI components expects it would be very easy to integrate.
https://ai-sdk.dev/elements/overview
The response stream just needs to look something like this for it to be in the expected format as easily consumed in the frontend.
data: {"type":"start"}
data: {"type":"start-step"}
data: {"type":"tool-input-start","toolCallId":"chatcmpl-tool-5763e139442944aba4e78284fcb3b954","toolName":"multiply"}
data: {"type":"tool-input-delta","toolCallId":"chatcmpl-tool-5763e139442944aba4e78284fcb3b954","inputTextDelta":"{"a": 3"}
data: {"type":"tool-input-delta","toolCallId":"chatcmpl-tool-5763e139442944aba4e78284fcb3b954","inputTextDelta":", "b": 4}"}
data: {"type":"tool-input-available","toolCallId":"chatcmpl-tool-5763e139442944aba4e78284fcb3b954","toolName":"multiply","input":{"a":3,"b":4}}
data: {"type":"tool-output-available","toolCallId":"chatcmpl-tool-5763e139442944aba4e78284fcb3b954","output":{"status":"loading","text":"Multiplying 3 × 4..."},"preliminary":true}
data: {"type":"tool-output-available","toolCallId":"chatcmpl-tool-5763e139442944aba4e78284fcb3b954","output":{"status":"success","text":"The product of 3 × 4 = 12","result":12},"preliminary":true}
data: {"type":"tool-output-available","toolCallId":"chatcmpl-tool-5763e139442944aba4e78284fcb3b954","output":{"status":"success","text":"The product of 3 × 4 = 12","result":12}}
data: {"type":"finish-step"}
data: {"type":"start-step"}
data: {"type":"text-start","id":"txt-0"}
data: {"type":"text-delta","id":"txt-0","delta":"The"}
data: {"type":"text-delta","id":"txt-0","delta":" product"}
data: {"type":"text-delta","id":"txt-0","delta":" of"}
data: {"type":"text-delta","id":"txt-0","delta":" "}
data: {"type":"text-delta","id":"txt-0","delta":"3"}
data: {"type":"text-delta","id":"txt-0","delta":" ×"}
data: {"type":"text-delta","id":"txt-0","delta":" "}
data: {"type":"text-delta","id":"txt-0","delta":"4"}
data: {"type":"text-delta","id":"txt-0","delta":" is"}
data: {"type":"text-delta","id":"txt-0","delta":" "}
data: {"type":"text-delta","id":"txt-0","delta":"1"}
data: {"type":"text-delta","id":"txt-0","delta":"2"}
data: {"type":"text-delta","id":"txt-0","delta":"."}
data: {"type":"text-end","id":"txt-0"}
data: {"type":"finish-step"}
data: {"type":"finish"}
data: [DONE]
It should preferably also support reasoning stream like this:
data: {"type":"start"}
data: {"type":"start-step"}
data: {"type":"reasoning-start","id":"reasoning-0"}
data: {"type":"reasoning-delta","id":"reasoning-0","delta":"Okay"}
data: {"type":"reasoning-delta","id":"reasoning-0","delta":", let"}
data: {"type":"reasoning-delta","id":"reasoning-0","delta":"'s see. The"}
data: {"type":"reasoning-delta","id":"reasoning-0","delta":" user is asking for"}
...
Proposed Solution
This can just be a endpoint that can be enabled in the AgentOS fastAPI app.
Alternatives Considered
No response
Additional Context
No response
Would you like to work on this?
- Yes, I’d love to work on it!
- I’m open to collaborating but need guidance.
- No, I’m just sharing the idea.