This project is not covered by Drupal’s security advisory policy.
Connects a JavaScript chat frontend built with the Vercel AI SDK to Drupal's AI assistants. The module adds one HTTP endpoint that runs an assistant and streams its answer in the format the AI SDK expects, for example for useChat.
Features
- One endpoint,
POST /vercel-ai/chat, streaming AI SDK UI-message parts as server-sent events. - The turn is a
ChatProcessorplugin over the AI Assistant API, so it uses the assistant's provider, model and system prompt. - Tool calls before the answer: up to three rounds of Tool API tools, each call streamed to the client.
- The request names the AI Assistant to run. Other modules (or site builders) provide the assistants.
- Same-origin cookie authentication: the frontend forwards the Drupal session.
Post-Installation
- Create an AI Assistant (Configuration → AI → AI Assistants).
- Grant the permission use vercel ai sdk chat to the roles that may chat.
- From the frontend,
POSTto/vercel-ai/chatwithagentId(the assistant's machine name) andmessages, sending the session cookie. - Optionally limit the tools an assistant may offer in its settings.
Additional Requirements
- Drupal 11.1 or later
- AI, with the AI Assistant API submodule and a configured AI provider
- A frontend using the AI SDK
Recommended modules/libraries
- Tool API: provides the tools an assistant can call.
- AI RAG Citations: grounds answers in site content and returns the cited sources.
Similar projects
AI Decoupled covers the same need with configurable endpoints, executor plugins and rate limiting. It does not speak the AI SDK stream format and does not accept same-origin cookie authentication on its write routes. The aim is to converge by contributing both there.
Developed as part of OpenKnowledgebase and released on its own so that other Drupal sites can use it without OpenKB.
Status: the code currently ships inside OpenKnowledgebase and will be moved here before the first release.
Project information
- Project categories: Artificial Intelligence (AI), Decoupled, Integrations
- By jjchinquist on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.

