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

Offen
#736 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Integration question
Vorherrschende Sprache
Python
Sterne
15.9k
Forks
1.4k
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
163

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.