Connect the Knowledge Base to Dify, Coze, n8n, LangChain, and other platforms.
The 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 Knowledge 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 Knowledge 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 Knowledge retrieval endpoint through its HTTP Request node:
- Add an HTTP Request node.
- Set the method to POST and enter the retrieval endpoint URL from the options below.
- In Headers, add
Authorization: Bearer <API-Key>. - In Body, set the parameters for the selected endpoint.
- Knowledge Search (application-level, recommended):
https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/knowledge/search. Passqueryandagent_id; retrieval strategy is driven by the knowledge retrieval service configuration. - Low-level retrieval:
https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/retrieve. Passindex_id,query, andtop_kto retrieve directly from a single Knowledge Base by its ID.
LangChain
Wire it in as a custom retriever:
The code above is illustrative — add error handling and retry logic before using it in production.