Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI How-Tos

Dify Tutorial: Combining Tencent MetaWare to Build a Private Networked Search Tool at Zero Cost

2025-07-25 40

When building advanced AI applications, real-time networked search is a key feature for synchronizing information. However, using the platform's official search plugin directly may run into network limitations or high API fees.

This paper offers a cost-effective alternative: by Dify 's HTTP request functionality, combined with the Tencent MetaWare platform, to build a privatized, free, networked search tool. This approach not only bypasses dependency restrictions, but also allows you to Agent Strong access to real-time information.Dify is an open source LLMOps platform designed to help developers rapidly build and operate AI applications based on large language models.

Architecture Analysis

The principle of this scheme can be understood as a "service broker".

We use Tencent MetaWare as a provider of external search services. Tencent MetaWare is an AI application development platform that can encapsulate complex search logic into a standard API interface through its workflow feature.

afterwards Dify in which the HTTP request node is used as a client to invoke this interface. Eventually, publish the entire HTTP call flow as a Dify tool so that it can be used by any Agent or workflow modularly invoked.

The advantages of the architecture are clear:

  1. decoupled: Implementation of search services with Dify The application logic is separated to facilitate independent maintenance and upgrades.
  2. cost control: Leverage the resources of a free platform to achieve zero API cost.
  3. privatization: The tools are built and controlled by yourself, with clear data links and higher security.

What do I need to prepare?

Before you begin, please prepare the following environment and credentials:

  1. Tencent Yuanqi Platform Access: Register and Login at https://yuanqi.tencent.com/The
  2. Dify Operating Environment: Either the Community Edition or the Cloud Service Edition is available.
  3. Large Model API Key (optional): Tencent MetaWare's workflows use its built-in model by default, but some advanced features or custom configurations may require the user to provide their own model API Key (such as the DeepSeek etc.). They are not covered in this basic search tutorial and can be left unprepared for now.

Action steps: from service build to tool integration

Follow the steps below to complete the entire build process in stages.

Stage 1: Build and Publish Search Service in Tencent MetaWare

  1. Creating Workflows
    Login to Tencent MetaWare, create a new Intelligence, and select "Workflow" as the creation mode.
    photograph
  2. Add Search Plugin
    In the workflow canvas, find and add the official "Search" plugin from the plugin library on the left.
    photograph
    photograph
  3. Configuration parameters
    Configure the plugin's input parameters to ensure that it receives external incoming query variables (Query).
    photograph
  4. Test and Release
    Perform a trial run in the workflow interface to verify that the search function is working correctly. After verifying that there are no errors, publish the workflow and associate it to the smart body, and finally publish the smart body.
    photograph
  5. Getting API Credentials
    Go to the Intelligent Body management page, find the "Interface Call" section in "Publishing Information", and get the URL of the API,Authorization and the Headers information required for signing. These are the information needed to connect the Dify with the key to the meta-artifacts.
    photograph

Stage 2: Creating and Wrapping HTTP Tools in Dify

  1. Initializing a workflow
    exist Dify in a file, create a file containing the Start -> HTTP Request -> End node's workflow.
    photograph
  2. Configuring the HTTP Request Node
    This is the core aspect of integration.

    • MethodPOST
    • Request URL: Fill in the API URL obtained from Tencent MetaTool.
    • Headers: Accurately fill in all authentication headers obtained from the meta ware, such as AuthorizationX-TC-Timestamp etc.
    • Body: Select raw-textThe format is application/jsonand construct the request body as {"query": "{{query}}"}. Here. {{query}} be Dify The variable placeholders for the
      photograph
  3. unit test
    Within the HTTP node, use the "Run This Step" function to enter a test query to verify that the interface is able to return the status 200 of the success status code.
  4. Publish as a tool
    Once validated, save and publish the workflow. The most critical step is to click on "Publish as Tool" in the upper right corner and give it a clear name, such as Internal_Search_EngineThe
    photograph
    photograph

Stage 3: Validating the tool in the Agent

  1. Creating a Test Agent
    Create a new Agent The application is used for testing.
  2. loading tool
    exist Agent in the "Tools" configuration item, add the just created Internal_Search_Engine Tools.
  3. End-to-end testing
    In the Debug and Preview screen, send a message to the Agent Ask a question that requires real-time information. Observe whether it is able to call the tool correctly and generate an answer using the returned search results.
    photograph

Troubleshooting and Optimization

  • commonly seen 400 Bad Request incorrect
    This issue is usually a construction error in the HTTP request. Please focus on checking this:

    1. Headers whether the authentication information in it is complete and error-free, in particular Authorization and timestamp related fields. Note that some signature credentials are time-sensitive, so you can try to regenerate them if the call fails.
    2. Body The JSON formatting in the
    3. Content-Type Is the header set to application/jsonThe
  • performance optimization
    Tencent MetaWare's search plugin support limit parameter, which allows you to control the number of results returned (default is 10). You can set this parameter to a variable in the meta ware workflow as well, and then set it in the Dify is dynamically passed into the HTTP request body to adjust the information density according to different scenarios and optimize the processing efficiency.

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

inbox

Contact Us

Top

en_USEnglish