Skip to content

feat(ai-sdk): Add Workflow Agent instrumentation#2177

Merged
Luca Forstner (lforst) merged 13 commits into
mainfrom
lforst/workflow-agent-instrumentation
Jul 6, 2026
Merged

feat(ai-sdk): Add Workflow Agent instrumentation#2177
Luca Forstner (lforst) merged 13 commits into
mainfrom
lforst/workflow-agent-instrumentation

Conversation

@lforst

@lforst Luca Forstner (lforst) commented Jul 1, 2026

Copy link
Copy Markdown
Member

Fixes #2167

@lforst Luca Forstner (lforst) marked this pull request as ready for review July 2, 2026 17:09

const sanitized: Record<string, unknown> = {};
for (const [key, nested] of Object.entries(value)) {
if (key.toLowerCase() === "headers") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems pretty aggressive. Can't we do similar logic to what we have in sanitizeAISDKMetadataValue?

});

await agent.stream({
messages: [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also add a test for something like

await agent.stream({                                                                                      
   system: "You are a helpful weather assistant.",                                                         
   prompt: "What's the weather in Paris?",                                                                 
 })

From what I can see I don't think we extract the prompt properly for that.

@lforst Luca Forstner (lforst) merged commit faed6b0 into main Jul 6, 2026
48 checks passed
@lforst Luca Forstner (lforst) deleted the lforst/workflow-agent-instrumentation branch July 6, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support AI SDK v7 (WorkflowAgent)

2 participants