System messages in AG-UI

In the code, when passing system messages, they appear to be filtered out by the convert_agui_messages_to_agno_messages function - pasted below.

def convert_agui_messages_to_agno_messages(messages: List[AGUIMessage]) -> List[Message]:
    """Convert AG-UI messages to Agno messages."""
    result = []
    for msg in messages:
        if msg.role == "tool":
            result.append(Message(role="tool", tool_call_id=msg.tool_call_id, content=msg.content))
        elif msg.role == "assistant":
            tool_calls = None
            if msg.tool_calls:
                tool_calls = [call.model_dump() for call in msg.tool_calls]
            result.append(
                Message(
                    role="assistant",
                    content=msg.content,
                    tool_calls=tool_calls,
                )
            )
        elif msg.role == "user":
            result.append(Message(role="user", content=msg.content))
    return result

Is this a feature or a bug? Any help greatly appreciated, thanks

Hi @fc445, thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon. If it’s urgent, please let us know. We appreciate your patience!

1 Like

This is good insight, and would also explain the bug report I just sent in here:

If the system prompt is set properly with the standard agent API (which it is), but not with the ag-ui interface, that would explain my issues.

Hello, I might be running into a similar issue. I tried sending a file message through AGUI, but it was eventually filtered out by get_text_from_message.