Use the AI SDK's native message history in the agent

Aperta
#9,455 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@bobbai00 ci sta già lavorando.

Dal 16/11/2026.

  • #9494 di @bobbai00 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
scala
Ambito
ai, backend

Direzione di ricerca

Start by finding the service that builds the single summary message before every model call, and the point where tool calls are flattened to just a name and status. Read the referenced threads #9119, #9120, #9244 and #9259 to see what the summary currently drops, and where #9423's last-execution report and #9424's docs section would move. Done means the SDK's own message history is kept as-is with one dataflow block appended, and the rendered chat looks the same as today; compare the agent's existing chat output before and after.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Task Summary

Before every model call, the service drops the message history and writes one summary message instead. Since #9244, a past tool call also shows its summary and the first line of its result, but not its other arguments or the rest of the result, and the whole summary message is written again before every call. Every new tool also needs its own section in that summary, and the system prompt spends 1.4 KB describing its format.

Keep the SDK's messages as they happen, and append one block with the current dataflow. The chat should look the same as today.

  • Run the loop as the SDK's ToolLoopAgent, and pass only the enabled tools with activeTools (what #9149 does by hand).
  • Build each step from initialMessages, responseMessages and the dataflow block. In AI SDK 7, messages returned from prepareStep carry over to later steps, so returning them would stack one block per step.
  • Drop the description of the context format from the system prompt.
  • The same message list is what the chat loads when it opens (#9482).

#9244 and #9259 fix the summary; this replaces it. #9423's report on the user's last execution moves into the dataflow block, and the docs section that #9424 adds is no longer needed.

What the model receives, today and after
Task Type
  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other
Lingua principale
Scala
Stelle
333
Fork
202
Merge medio
3g 11h
PR unite (30g)
185

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/texera

Tutte le issue di apache/texera

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.