Extract last artifact from startAgentEvent to simplify contract #150

Open
opened 2026-02-15 19:16:20 -05:00 by yindo · 0 comments
Owner

Originally created by @marcusschiesser on GitHub (May 16, 2025).

Originally assigned to: @marcusschiesser on GitHub.

extractLastArtifact should not be extracted from the reqBody, but instead from the passed UI messages in the startAgentEvent.

The problem here is that the reqBody contains the annotations (having the artifact), whereas the chatHistory in the startAgentEvent doesn't contain them.

We'll touch this after upgrading to AI SDK 5

Originally created by @marcusschiesser on GitHub (May 16, 2025). Originally assigned to: @marcusschiesser on GitHub. `extractLastArtifact` should not be extracted from the reqBody, but instead from the passed UI messages in the `startAgentEvent`. The problem here is that the reqBody contains the annotations (having the artifact), whereas the `chatHistory` in the `startAgentEvent` doesn't contain them. We'll touch this after upgrading to AI SDK 5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/create-llama#150