ag-ui protocol error - payload is not compliant with RunAgentInputSchema
Maintainer thường phản hồi trong vòng 1 ngày
@abhithesys đang làm issue này rồi.
Từ ngày 8/6/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
I came across your work today and it does make sense to me to avoid using json and having a custom DSL is the right approach. Thanks for this great effort!
Bug - A server using ag-ui protocol rejects the message sent by openui
My setup:
- A FastAPI backend that has an endpoint that uses RunAgentInput type for the input_data
- An openui based application that uses
apiUrland not custom adapters/messageformats etc
Below is the zod definition from https://github.com/ag-ui-protocol/ag-ui/blob/88ce4bca9f6fec6d778367fc7c197c262ffbcf61/sdks/typescript/packages/core/src/types.ts#L209-L219
export const RunAgentInputSchema = z.object({
threadId: z.string(),
runId: z.string(),
parentRunId: z.string().optional(),
state: z.any(),
messages: z.array(MessageSchema),
tools: z.array(ToolSchema),
context: z.array(ContextSchema),
forwardedProps: z.any(),
resume: z.array(ResumeEntrySchema).optional(),
});
Here is a sample payload received by my FastAPI server from OpenUI client
{'threadId': 'ephemeral', 'messages': [{'role': 'user', 'content': 'Hi', 'id': '5ac6b8f0-a17d-4208-a30b-65f8b2637086'}]}
As you can see the payload is missing many required fields (e.g. state, tools, context, forwardedProps)
All the samples in the repo, have following use case
<FullScreen
processMessage={async ({ messages, abortController }) => {
return fetch("/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: openAIMessageFormat.toApi(messages),
}),
signal: abortController.signal,
});
}}
The documentation says you can use either apiUrl or processMessage
Use apiUrl when your server is compliant with ag-ui
Mine is
<FullScreen
apiUrl="/simple_agent"
/>
I believe processMessage in createChatStore here https://github.com/thesysdev/openui/blob/1f7c9cbc91e660c9598012733237be358792629d/packages/react-headless/src/store/createChatStore.ts#L209
is not respecting the ag-ui protocol and hence the issue
I am just few hours old with your framework (and even with ag-ui as such) so chances of misunderstanding are there.
Thanks again!
Regards
Kapil
- Ngôn ngữ chính
- TypeScript
- Star
- 10k
- Fork
- 698
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 158
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của thesysdev/openui
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
thesysdev/openui#1445 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add dataInvention flag to PromptOptions to disable the 'generate realistic/plausible data' ruleĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
thesysdev/openui#959 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Community project: OpenUI SportsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của thesysdev/openui
Issue tương tự
-
Add: Shop On TV SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug implicit-state
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
book-layout.spec fails when the similar-books rail holds other projects' booksCó thể đã có người làm @praetorianer777 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
praetorianer777/GoTome#373 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Tencent/tdesign-react#4465 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cards enhancement ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
fil-donadoni/tolaria#8883 ·
Maintainer thường phản hồi trong vòng 1 ngày