Connect the RAG Knowledge Base to Dify, Coze, n8n, LangChain, and other platforms.
The RAG Knowledge Base exposes standard APIs and the MCP protocol, so it integrates with the major AI application platforms.
Dify supports External Knowledge integration.
Coze supports both MCP and custom API plugins.
Option 1: MCP
Add an MCP tool to your Coze bot's settings:
n8n can call the RAG retrieval endpoint through its HTTP Request node:
Wire it in as a custom retriever:
Dify
Dify supports External Knowledge integration.
1
Get the API details
On the Service Channels page in the RAG console, copy the Dash API endpoint and API Key.
2
Configure Dify
Open Dify's Knowledge Base settings, pick External Knowledge, and enter:
- API Endpoint: the DashScope retrieval endpoint URL.
- API Key: your DashScope API Key.
- Knowledge Base ID: the target Knowledge Base ID.
3
Use it in a workflow
In a Dify workflow or chat app, pick the external Knowledge Base as the retrieval source.
Coze
Coze supports both MCP and custom API plugins.
Option 1: MCP
Add an MCP tool to your Coze bot's settings:
- Click Add MCP Tool.
- Enter the MCP Server URL and auth info (from the Service Channels page in the console).
- Pick the retrieval / Q&A capabilities to expose.
- Create a custom plugin in Coze.
- Point the HTTP request at the DashScope retrieval endpoint.
- Map the input parameters (query, top_k) and output parameters (Chunk list).
n8n
n8n can call the RAG retrieval endpoint through its HTTP Request node:
- Add an HTTP Request node.
- Set the method to POST and the URL to
https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/retrieve. - In Headers, add
Authorization: Bearer <API-Key>. - In Body, set the retrieval parameters (index_id, query, top_k).
LangChain
Wire it in as a custom retriever:
The code above is illustrative — add error handling and retry logic before using it in production.