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

Clarification: should messages in RunAgentInput contain full history or can it be a delta?

未關閉
#2,230 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
15.9k
分支
1.4k
平均合併
1 天 17 小時
30 天內合併 PR
163

描述

We're building an AG-UI backend where the **server owns message history** (stored in a database). On each request, the server loads the full conversation from DB and appends any new messages from the client.

Our frontend sends only the **delta** in `RunAgentInput.messages` — e.g. just the new user message, or just `ToolMessage`s (results from frontend-executed tool calls).

**Question:** Does the AG-UI protocol require `messages` to always contain the complete conversation history? Or is a delta-only approach valid when the server manages persistence?

We ask because some AG-UI adapter implementations (e.g. PydanticAI) merge `messages` with a server-side history parameter, which implies delta is supported. But other behavior (like requiring a `ToolMessage` to have a preceding `AssistantMessage` with matching `tool_calls` in the same list) only works with full history.

Related: #1386, #1160

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。