ag-ui-protocol / ag-ui-protocol/ag-ui

Unable to Render UI Resource from MCP Response via Agno Agent - JSON Response Always Formatted as Sentence

Aperta
#736 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
Integration question
Lingua principale
Python
Stelle
15.9k
Fork
1.4k
Merge medio
1g 17h
PR unite (30g)
163

Descrizione

We are using the agno integration with ag-ui for creating an agent in Python. On the client side, we use `@ag-ui/agno` to interact with the agno Python agent.

We have a use case involving [mcp-ui](https://www.npmjs.com/package/@mcp-ui/client), where one of the tool calls returns a UI resource that needs to be rendered by the client. A sample response from MCP is:

```
{
"content": [
{
"type": "resource",
"resource": {
"uri": "ui://wave-templates/list",
"mimeType": "text/html",
"text": "hello world!"
}
}
]
}
```

This response is sent to the agno agent. However, even when we explicitly prompt the agent not to format the response, the agent does not return the raw JSON. Instead, it always returns a formatted sentence, which prevents us from rendering the UI component as intended.

#### Question:
Is there a recommended way to handle this scenario so that the agent returns the raw JSON response (or at least the `resource` object) without formatting it as a sentence? Any guidance or best practices would be appreciated.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.