ag-ui protocol error - payload is not compliant with RunAgentInputSchema
维护者通常 1 天内回复
@abhithesys 已经在做这个了。
开始于 2026年6月8日。
评估
这个 Issue 还没有评估数据。
描述
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
- 主要语言
- TypeScript
- 星标
- 10k
- 派生
- 698
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 158
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
thesysdev/openui 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
thesysdev/openui#1445 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
thesysdev/openui#959 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 15/100
维护者通常 1 天内回复
相似的 Issue
-
area:cards enhancement ready-for-agent
难度 2/5 1-3 小时 新手友好度 66/100
fil-donadoni/tolaria#8883 ·
维护者通常 1 天内回复
-
bug 🐛
难度 2/5 1-3 小时 新手友好度 78/100
comunica/comunica#1960 · 1 条评论 ·
维护者通常 1 天内回复
-
Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 76/100
getsentry/sentry-javascript#26203 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
bytedance/flowgram.ai#1235 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
devswha/herdr-web-ui#3325 ·