Streamed turns write the whole task to Postgres once per chunk
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 49/100
调研方向
Start with go/adk/pkg/taskstore/store.go lines 95–127, which the issue identifies as the synchronous task write path. Trace how streamed events call UpdateTask and where task state changes are represented before evaluating the suggested timer and state-change saves. Done means streamed chunks still reach the client while database updates are coalesced and state changes are persisted; the issue names no tests to run.
由索引模型根据 Issue 内容生成。
描述
With a streaming ModelConfig, the Go runtime saves every streamed event as its own synchronous UpdateTask carrying the whole task (store.go:95-127 at alpha17). So a reply's database cost grows with its chunk count rather than once per turn.
We measured on kind with kagent 1.0.0-alpha16 and Substrate 0.6.0-alpha3 (the store's write path is the same in alpha17): 20 sequential turns per agent, against a mock model that replies with 363 bytes in 121 chunks.
| Per turn | Streamed | stream: false |
|---|---|---|
| kagent rows inserted / updated | 126 / 256 | 8.8 / 20 |
UpdateTask calls |
129 | — |
| Postgres commits | ≈2,095 | ≈330 |
| WAL | ≈427 KB | ≈40 KB |
| Later-turn latency | 4.8 s | 3.6 s |
The commits and WAL cover the whole Postgres instance, Substrate's side included; the row counts and calls are kagent's own. With a handful of concurrent streamed Sessions the per-chunk round trips add up, because they run one after another within a turn.
Could updates be coalesced while a model streams? For example, save on a short timer and on every state change (working, input-required, completed, failed), and keep streaming each chunk to the client.
For now we've set stream: false on our ModelConfigs. We're running on AKS and happy to help with this, whether that's design input or a PR.
- 主要语言
- Go
- 星标
- 4.2k
- 派生
- 890
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 189
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kagent-dev/kagent 的其他 Issue
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)可能已有人在做 @talcoh2x 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 84/100
kagent-dev/kagent#3571 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Gemini catalogs omit gemini-4-argon and gemini-3.8-flash可能已有人在做 @jayunit100 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
kagent-dev/kagent#3524 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Don't add the provider's public host to egress when a ModelConfig sets baseUrl可能已有人在做 @lakshyab20 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 81/100
kagent-dev/kagent#3507 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[BUG] OpenAI and Ollama adapters send an empty tool message when a tool returns a dict可能已有人在做 @helloxjade 于 8 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
kagent-dev/kagent#3462 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
kagent-dev/kagent#3428 · 1 条评论 ·
维护者通常 1 天内回复
查看 kagent-dev/kagent 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 78/100
fabriziosalmi/secure-proxy-manager#619 ·
维护者通常 1 天内回复
-
bug needs-triage P1 tier:1-mechanical
难度 1/5 1 小时以内 新手友好度 88/100
krakenhavoc/cmd_and_ctrl#5434 ·
维护者通常 1 天内回复
-
go good first issue help wanted up-for-grabs
难度 2/5 1-3 小时 新手友好度 76/100
andrewsiah/agentswarm-data-tasks#117 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
C:dataplane
难度 2/5 1-3 小时 新手友好度 76/100
yanet-platform/yanet2#3395 ·
维护者通常 1 天内回复