How to create AI agent using Alibaba LLM (Qwen-plus)

Describe the problem/error/question

Can I create AI agent using Alibaba LLM? I am able to call the Qwen-plus by using http request. However, I dont know how to set up with AI agent node. Anyone try before and how to do the setting in n8n AI agent node particually in the model setting. Thank you.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Ken_Chan1,

You should be able to use the OpenRouter model and then selecting the qwen version you need.

If “Alibaba LLM” is an OpenAI-compatible API which I guess it is, then you can use the AI Agent node with OpenAI node credentials after editing the Base URL here with the endpoint for Alibaba:

Note this example is using cerebras, which is OpenAI-compatible API.

Then, turn off the option “Use Responses API” and write the model name:

1 Like

You can create an AI agent using Alibaba’s LLM (Qwen) by using Alibaba Cloud Model Studio / DashScope API. First, create an Alibaba Cloud account, enable the Qwen model, and get your API key. Then use the DashScope SDK (Python or Java) to call the model, define system prompts, and add tools or memory logic if needed. For advanced agents, you can integrate Qwen with frameworks like LangChain or build custom workflows around the API.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.