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

Ouverte
#736 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Integration question
Langage dominant
Python
Étoiles
15.9k
Forks
1.4k
Merge moyen
1 j 17 h
PR mergées (30 j)
163

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.