All Products
Search
Document Center

Alibaba Cloud Model Studio:Agent application

Last Updated:Aug 07, 2025

You can quickly create agent applications in the Model Studio console with zero code, and integrate RAG (Retrieval-Augmented Generation) and plug-in capabilities. After creating an application, you can use it through the console or API.

Important

Why use agent applications

Large language models (LLMs) have powerful language understanding and generation capabilities but also limitations, such as:

  • Cannot answer private domain questions, such as company policies or personnel information.

  • Cannot access real-time information, such as real-time weather or sports scores.

  • Cannot provide accurate answers to specialized questions, such as complex math calculations or image generation.

An agent application overcomes these challenges by leveraging an LLM integrated with tailored external capabilities.

External capabilities refer to functions not inherent to the LLM, such as querying real-time data or answering private domain questions.

You can quickly create an agent application by using the Model Studio console without coding, incorporating external capabilities to address your business needs.

Typical scenarios for agent applications include:

  • Private domain knowledge Q&A

    Prepare your knowledge base file and swiftly create a private domain Q&A application in the console. The application is suitable for queries about company policies, employee information, and more.

  • Intelligent assistant

    Incorporate RAG and custom plug-ins to build an intelligent assistant that boosts work efficiency in tasks such as email management and report writing.

Step 1: Create an agent application

1. Create an application

Go to My Applications, click Create Application, on the Agent Application tab, click Create Now.

If you already have applications, click Create Application in the upper right corner.

image

2. Select a model and configure parameters

In the configuration page, choose a model and configure parameters. Click Settings, and select a model from the Select Model box. Here, we select Qwen-Max.

Configure the parameters. For details, hover over the image icon. If you have no specific need, use the default settings.

image

3. Test the application

After you choose a model, the agent application is ready for use. Enter your questions to test it.

image

Step 2: Extend the capabilities of the application

In the application configuration page, add prompts, RAG, and plug-ins to extend your application's capabilities.

System prompt: Guides the direction of generation

Enter prompt to guide the direction of the response. For example, enter the following prompt:

Please imitate the tone of William Shakespeare.

Input "Hello", and the application returns the following response.

image

image

RAG: Introduces private domain knowledge

Retrieval-augmented generation (RAG) is a retrieval technique that automatically retrieves relevant document content and uses this information as contextual input for the agent, thereby improving the accuracy of the agent's responses. In case of private knowledge or domain-specific Q&A, RAG can significantly enhance the performance of the agent.

Note: The text retrieved by RAG occupies the context window length of the model. Therefore, you need to adjust the retrieval strategy and text length to make full use of the context window and avoid exceeding the limit.

1. Upload data

Go to Application Data, click Import Data. In this case, Bailian Phones Specifications.docx is used as a sample file. On the Import Data page, select Upload Local File.

image

2. Create a knowledge base

  1. Go to Knowledge Base, click Create Knowledge Base. In the Create Knowledge Base interface, enter the Name and Description. Here we set the name to: Product Introduction, and the description to: This knowledge base contains detailed information of Bailian phone products. Keep other options as default and click Next Step.

  2. Choose Select File, select Default Category. Then, select Bailian Phones Specifications and click Next Step.

  3. For data processing, use the default Intelligent Splitting and click Import.

  4. When the status shows Parsing Completed, it means the knowledge base has been created.

image

image

image

3. Integrate RAG into the application

  1. Go to My Applications, click Manage on the created application card. Turn on Knowledge Base, and correspounding instructions will be automatically filled in the Prompt. Click + Knowledge Base and select Phone Introduction from the list. Keep other options as default.

  2. Retrieve Configuration (optional):

    If you need to configure assembly strategy, set knowledge scope, display answer sources, you can further modify the configurations, see Step 4: Use the knowledge base.

  3. Sample Library (optional):

    When enabled, the ${samples} variable is added to the prompt, introducing few-shot prompt examples to improve generation results.

    • Sample Library: Add samples.

    • Configuration: Set the number of chunks to retrieve.

  4. Enter a question in the input box:

    I like playing games, which phone do you recommend?

    The application can now answer your question based on the provided document.

    Currently, agent applications can only generate text content.

image

image

Plug-ins: More efficiency tools

Plug-ins can enhance the efficiency and professional capabilities of agent applications in your business scenarios. On the configuration page of the application, you can click + Plug-in to select one or more plug-ins in the Select Plug-in panel.

You can also add custom plug-ins, see Plug-in overview.

1. Add a plug-in

Taking the Image Generation plug-in as an example, click Add to Agent.

image

2. Test the plug-in

After adding the plug-in, enter the following in the input box:

Please draw a cat.

The agent application calls the image generation plug-in (text_to_image).

image

3. Use more plug-ins

You can select up to 10 plug-ins in the same agent application. The agent application will choose to use one or more plug-ins based on the input. For example, ask:

Check the weather in Hangzhou tomorrow, and draw West Lake with this weather.

The agent application will output content as shown in the image on the right.

image

Step 3: Experience the application

Currently, you can only experience the agent application through text.

Step 4: Publish the agent application

Publish your application to make it accessible through API or through a web page for RAM users under the same main account. Click Publish in the top-right corner of the configuration page.

If your application has been published before, a dialog box appears to display changes since the last version. Confirm these changes and click Confirm Publish.

Note

If you created the application as a RAM user, make sure you have the ram:CreateServiceLinkedRole permission before you publish the application. For more information, see Service-linked roles.

image

The dialog box does not appear when your application is published for the first time.

Use API

Click View API to the right of API Call in the Publish Channel tab to see API references.

Note: You need to replace YOUR_API_KEY with your API KEY to initiate the call.

image

Use Official Sharing Method

Click Generate Sharing Link to the right of Official Sharing Method. You can share this link with RAM users under the same Alibaba Cloud account.

image

Step 5: Rename, copy, and delete an application

Find the application card in My Applications. Choose More > Rename/Copy/Delete Application.

image

Step 7: Version management

Take the following steps to edit the description of historical versions or switch to published historical versions:

  1. On the Application Configuration tab, click Version Management on the right side of the top navigation bar.image

  2. Select a version in the historical version list:image

    • If you need to edit the version description, hover your curosr over the image icon and click it. In the Edit Version Description dialog box, make the necessary modifications and click OK.

    • If you need to use this version, click Overwrite Current Draft, and click Confirm in the dialog box.

      If you confirm, the selected version will overwrite the current draft version.

FAQ

  • Does knowledge base retrieval incurs extra fees?

    The feature itself is free to use. However, the recalled content is used as model input, and is billed based on the price of input tokens.

  • Does custom plug-ins have timeout limit?

    Yes, the timeout limit is 5 seconds.

  • Can I use the API to create agent applications?

    You can use the Assistant API to create LLM applications, whose capabilities are similar to agent applications.

    Note: You cannot manage applications created by Assistant API in the console. For more information, see Assistant API.