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

Ouverte
#9,455 1 commentaire 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@bobbai00 y travaille déjà.

Depuis le 16/11/2026.

  • #9494 par @bobbai00 — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
scala
Domaine
ai, backend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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
Langage dominant
Scala
Étoiles
333
Forks
202
Merge moyen
3 j 11 h
PR mergées (30 j)
185

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/texera

Toutes les issues de apache/texera

Issues similaires

Plus d'issues Scala

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.