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

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

Đang mở
#2,230 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
15.9k
Fork
1.4k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
163

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.