The new Agent application (Agent 2.0) unifies capabilities such as knowledge bases and MCPs into tools, which the agent autonomously plans and invokes through reasoning to solve complex tasks.
Version Comparison and Selection Guidance
The new Agent delivers superior performance and developer experience for most use cases. Unless you have dependencies on the legacy version, we recommend adopting Agent 2.0.
| Comparison Dimension | Legacy Version (Agent 1.0) | New Version (Agent 2.0) |
|---|---|---|
| Planning & Orchestration | The agent first retrieves from the knowledge base, then decides whether to invoke other tools (e.g., MCPs). | Knowledge bases and MCPs are unified as tools; the agent autonomously plans when and in what order to invoke them. |
| Process Transparency | Only the final result is shown; intermediate decisions cannot be fully traced. | Fully displays the end-to-end “Plan → Execute → Reflect” chain for each step. |
| Suitable Scenarios | Best for simple, single-intent, fixed-flow tasks. | Handles diverse tasks—from basic Q&A to complex multi-step planning. |
Quick Start: Create a Basic Agent
- Go to the Alibaba Cloud Bailian Console Application Management and click Create Agent (this creates an Agent 2.0 application by default; for the legacy version (Agent 1.0), click the Legacy Agent creation link at the bottom of the dialog — the page will redirect to the legacy Bailian console).
- Enter an application name and click Create Now. After creation, you’ll be automatically redirected to the configuration page.
- From the model selector dropdown, choose a model—e.g.,
Qwen-Plus-Latest. - In the right-hand chat panel, enter the question:
Who are you?.
Capability Configuration
Model Selection
The model selector dropdown offers two kinds of options:
- Smart Mode: The platform automatically balances cost and quality—no need to pick a model manually.
- A specific model: Select a particular model directly. To ensure robust multi-step planning, we recommend models with strong tool-calling capabilities such as the
Qwen-Maxseries; click More Models to browse additional options.
| Mode | Positioning | Highlights |
|---|---|---|
| AUTO | Auto-routing, multi-model, context-adaptive | Intelligently matches the optimal reasoning depth and model |
| Performance | High-quality models balancing speed and quality | Fast response, 1M context, tool calling |
| Balanced | Advanced reasoning with high-quality output | Enhanced reasoning, 256K context, stable output |
| Economy | Standard reasoning with strong cost efficiency | Standard reasoning, 256K context, cost-effective |
- Simple tasks (single-step, short Q&A, casual chat, etc.) → Economy
- Medium tasks (single-file code, medium-length writing, multi-step reasoning, etc.) → Balanced
- Complex tasks (multi-file architecture, long-form writing, multi-tool orchestration, etc.) → Performance
Complexity assessment considers both the latest user message and the current context length: when the context exceeds 200K tokens, the request is routed to at least the Performance tier to ensure quality on long-context tasks.
- Maximum Response Length: Limits the number of tokens generated by the model (excluding prompt tokens).
- Temperature: Controls output randomness and diversity—higher values increase variability.
- enable_thinking: Enables thinking mode, which enhances the agent’s reflection capability; unavailable for models that do not support thinking mode.
Prompt Engineering
System prompts define the agent’s role, behavioral instructions, and capability boundaries—ensuring consistency, controllability, and task compliance throughout interactions.
-
Configure System Prompt: For example, set the system prompt to
Please answer my questions in the style of *One Hundred Years of Solitude*—the model will reply in the specified style; without a system prompt, the model replies using its default persona. -
Use Variables in System Prompts (Optional): In addition to static text, system prompts support embedded variables.
- Click Create Variable (top-right corner of the Prompt editor), define your variables, and click OK to save.
- Type
/to insert a configured variable.
Pre-parsing Files
The pre-parsing files feature controls how uploaded files are processed.
- Disable Pre-parsing: Files won’t be parsed automatically. Their URLs are passed directly as context to the agent, which may later decide to invoke a tool and pass the URL as a parameter.
- Enable Pre-parsing: The system uses built-in parsers to process uploaded documents, images, videos, and audio files—and returns extracted text content to the model for reference.
Qwen-VL series models possess multimodal capabilities and can directly parse images and videos—even when pre-parsing is disabled.
Built-in Tools
Built-in tools run in an isolated sandbox environment and provide code execution and file manipulation capabilities. All tools are disabled by default and must be explicitly enabled.
| Tool | Description |
|---|---|
bash | Executes shell commands—including bash, python3, pip, etc. |
write | Creates or overwrites files; parent directories are auto-created. |
read | Reads file contents—including partial reads (by line range) for large files. |
edit | Performs precise text replacement (find-and-replace) within files. |
glob | Searches for files matching a pattern; returns matched file paths. |
grep | Searches file contents using regular expressions. |
download_file | Exports files generated during execution as downloadable links. |
Knowledge Base
A knowledge base enables the agent to query external information and use retrieved content to generate answers. This proactive knowledge acquisition significantly improves answer accuracy and reduces hallucination—especially for private or domain-specific Q&A. To create and manage knowledge bases, see Knowledge Base.
Agent 2.0 applications use knowledge bases by associating a knowledge retrieval service. A knowledge retrieval service can contain one or more knowledge bases and supports both single-knowledge-base retrieval and multi-knowledge-base joint retrieval. An application can be associated with only one knowledge retrieval service at a time; associating another service replaces the existing one. Before you associate a service, make sure that you have created a knowledge retrieval service, added the required knowledge bases to the service, and published the service. See Knowledge Retrieval.
Enabling Show Source in Response (under Response Settings) displays knowledge sources and original file/webpage URLs.
Associate a Knowledge Retrieval Service
- Go to the configuration page of the Agent 2.0 application and find the Retrieval Strategy area under Knowledge Base. On first configuration, the page indicates that no knowledge retrieval service is associated. Click Configure Now to open the service selection panel. You can also click Configure in the upper-right corner of the area.
- In the Configure Retrieval Service panel, find the target service. You can use the search box to find published retrieval services, and confirm the target based on the service name, version, included knowledge bases, and the number of knowledge bases.
- Click Associate on the right of the target service to associate the knowledge retrieval service with the current application.
Adjust Invocation Settings
You can adjust Invocation Method and Multi-turn Rewrite on the service card to control how the application uses the retrieval service:
| Item | Option | Description |
|---|---|---|
| Invocation method | Intelligent invocation | The model autonomously decides whether to invoke the knowledge retrieval service based on the question and conversation context |
| Invocation method | Always invoke | In each request, a knowledge retrieval is performed before the model's first inference |
| Multi-turn rewrite | On | When the model autonomously invokes the knowledge retrieval service, it generates a retrieval query based on the current question and conversation context |
| Multi-turn rewrite | Off | The original input is used for retrieval, and the rewritten query generated by the model is not used |
Manage the Associated Service
The upper-right corner of the service card provides the following actions:
- Settings: Click the gear icon to go to the corresponding knowledge retrieval service page and modify the knowledge bases included in the service and the retrieval strategy.
- Delete: Click the delete icon to remove the association between the current application and the knowledge retrieval service. This removes the association in the application only, not the knowledge retrieval service or the knowledge bases themselves.
Modify the Retrieval Service Configuration and Publish
After you click Settings on the service card, you are directed to the Service Configuration page of the corresponding knowledge retrieval service.
- Add a knowledge base: Click Add in the upper-right corner of the knowledge base area to add a new knowledge base to the service.
- Adjust the retrieval strategy: Adjust the knowledge base weights, knowledge base routing, hybrid ranking model, and other settings as needed. The available settings are subject to the service page.
- Publish the changes: After the configuration is complete, click Publish in the upper-right corner of the page to publish the knowledge retrieval service configuration. Make sure you complete this step after modifying the configuration.
- Return to the application to confirm: Return to the Agent 2.0 application page and click the refresh icon in the upper-right corner of the Retrieval Strategy area to confirm that the knowledge bases included in the service and the related information have been updated.
Legacy knowledge bases are integrated as MCP tools and appear under Tools → MCP Services on the new Model Studio page. To add a legacy knowledge base, go to the legacy Model Studio page.
MCP (Model Control Protocol)
In Agent 2.0, all external tools integrate via the MCP protocol and join the agent’s orchestration system—including official MCPs from the MCP Plaza and custom MCP services. The agent dynamically invokes MCPs in non-fixed, multi-step reasoning chains to tackle complex tasks. Plugins can also be converted to MCP services with one click.
Data Connectors
Data connectors serve as bridges for agents, workflows, and knowledge bases on the Alibaba Cloud Model Studio platform to access external data. By configuring data connectors, agents can directly query and operate on data from external data sources.
Application Components
You can integrate previously created agents or workflows as tools—provided they’ve first been published as components.
Skills
Skills are reusable capability packages that empower agents to automatically handle specific task types during conversations. Once added, the agent detects matching intents and invokes the corresponding skill—no custom code required.
Memory
- Short-term Memory: Agent 2.0 supports short-term memory—providing contextual history across multi-turn conversations. You can configure context length from 0 to 30 turns (0 means no conversation history is passed). More turns improve coherence but increase input token count.
- Long-term Memory: Planned for future iterations.
Environment
Environment settings let you configure authentication keys and environment variables needed for skill invocation. Once set, credentials and parameters are automatically injected at runtime—eliminating the need to hardcode sensitive info in skill code.
Response
Response settings support displaying answer sources. When enabled, source references appear as footnotes—including knowledge base entries and original file/webpage URLs. We recommend combining this with knowledge bases and web-search MCPs.
Execution & Result Analysis
After configuring your application, test it in the right-hand chat panel. For complex, multi-step requests, Agent 2.0 visualizes its decision-making process and execution trace as a card-based flow—comprising two core steps:
- Thinking: Shows the model’s internal reasoning logic—helpful for analyzing decision paths and diagnosing unexpected behavior. (Appears only when using a model that supports thinking mode.)
- Tool Invocation: Logs the exact tool call inputs and returned outputs.
Application Publishing & Integration
Publishing an Application
From the application configuration page, click Publish (top-right corner). A modal will display configuration changes since your last publish. Verify the details and click Confirm Publish to complete publishing.
Calling via API
On your agent application’s Distribution Channels tab, click View API (next to API Call) to see how to invoke your Agent 2.0 application programmatically.
Application Management
Version Management
Version management lets you edit historical version descriptions or roll back to previously published versions.
- On the application configuration page, click Version Management (top-right navigation bar).
- Hover over the target historical version card and click the edit icon (✎) in the top-right corner. In the Edit Version Info dialog, make your changes and click OK to update the description. Click Overwrite Current Draft to roll back to that version.
Billing Overview
Agent functionality incurs charges across several dimensions:
- Model Invocation
- Each agent invocation consumes model credits—cost depends on model type and input/output token count.
- Refer to the model list for pricing details per model. For Smart Mode tier list prices, see the breakdown below.
- Knowledge Base
- Knowledge bases are billed on a pay-as-you-go basis.
- Retrieved text chunks increase input token count—and thus raise model inference costs.
- MCP
- Some official MCPs (e.g., text-to-image, text-to-video, speech synthesis) are billed per model invocation.
- Third-party MCPs may incur separate fees via their own APIs—charged directly by the third party; Bailian does not bill for these.
| Mode | Input | Output |
|---|---|---|
| AUTO | ¥3 | ¥12 |
| Performance | ¥6.4 | ¥22.4 |
| Balanced | ¥1.6 | ¥6.4 |
| Economy | ¥0.5 | ¥2 |
| Mode | Implicit Cache Hit | Explicit Cache Write | Explicit Cache Hit |
|---|---|---|---|
| AUTO | ¥0.75 | — | — |
| Performance | ¥1.6 | — | — |
| Balanced | ¥0.32 | ¥2.5 | ¥0.2 |
| Economy | ¥0.12 | ¥0.75 | ¥0.06 |
Frequently Asked Questions
Can I upgrade a legacy Agent to Agent 2.0?
Can I upgrade a legacy Agent to Agent 2.0?
No. Legacy and Agent 2.0 are built on fundamentally different architectures and are incompatible. Direct version switching, upgrading, or downgrading is unsupported.If you’re currently using the legacy Agent and wish to try Agent 2.0, please create a new Agent 2.0 application in the console.
Why isn’t my agent invoking a configured tool as expected?
Why isn’t my agent invoking a configured tool as expected?
Investigate across four layers:
- Skill Configuration & Mounting: Confirm the skill was successfully created and correctly mounted to your agent application.
- System Prompt Clarity: Ensure your system prompt clearly describes the skill’s purpose, parameters, and applicable scenarios—the model relies on this to decide when to invoke it.
- Intent–Skill Alignment: Assess whether the user query clearly expresses intent aligned with the skill’s function. Ambiguous or mismatched queries may lead the model to skip invocation.
- ReAct Round Limit: Check if the maximum ReAct rounds have been exhausted. The agent may have planned the tool call—but terminated early due to round exhaustion.
Does the Agent application support context caching?
Does the Agent application support context caching?
It supports implicit caching, but not configurable explicit caching.
- Implicit Caching: Automatically activated when calling models that support it—requires no setup and cannot be disabled. The system identifies and caches common prefixes (e.g., identical system prompts, multi-turn history, retrieved knowledge snippets). Cached input tokens are billed at 20% of standard input pricing—reducing overall model costs.
- Explicit Caching: Requires manually specifying cache keys in model requests. Since Bailian constructs model requests internally, explicit caching is not currently supported in Agent applications.