Skip to content

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

Description

@bobbai00

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.

#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions