Skip to content

Add AI SDK relay message-array injection and example app#580

Merged
khaliqgant merged 3 commits intomainfrom
feat/ai-sdk-on-relay-workflows
Mar 17, 2026
Merged

Add AI SDK relay message-array injection and example app#580
khaliqgant merged 3 commits intomainfrom
feat/ai-sdk-on-relay-workflows

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 17, 2026

Summary

  • extend the AI SDK communicate adapter so message-array call sites get synthetic relay system injection in addition to string system prompts
  • add a compact end-to-end Next.js helpdesk example that uses AI SDK + Relay communicate and escalates to a Relay workflow
  • update AI SDK and workflow docs to show messages-based usage and point to the example

Testing

  • npm run check (packages/sdk)
  • npx tsx --test packages/sdk/src/__tests__/communicate/adapters/ai-sdk.test.ts

Notes

  • the new middleware behavior preserves existing system injection while also prepending a synthetic system message for messages arrays
  • example app is intentionally small and illustrative rather than production-complete

Open with Devin

devin-ai-integration[bot]

This comment was marked as resolved.

@khaliqgant khaliqgant merged commit 0e3564a into main Mar 17, 2026
33 of 34 checks passed
@khaliqgant khaliqgant deleted the feat/ai-sdk-on-relay-workflows branch March 17, 2026 12:29
khaliqgant added a commit that referenced this pull request Mar 25, 2026
* Add AI SDK relay adapter and workflow docs

* Add AI SDK message-array relay injection example

* fix(sdk): avoid duplicating relay context in ai sdk
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.

1 participant