Skip to main content
Applications

New Agent Application (Agent 2.0)

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 DimensionLegacy Version (Agent 1.0)New Version (Agent 2.0)
Planning & OrchestrationThe 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 TransparencyOnly 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 ScenariosBest 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

  1. Go to the Alibaba Cloud Bailian Console Application Management, click Create Application, and select Agent Application > Agent 2.0.
  2. Enter an application name and click Create Now. After creation, you’ll be automatically redirected to the configuration page.
  3. From the model selector dropdown, choose a model—e.g., Qwen-Plus-Latest.
  4. 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-Max series; click More Models to browse additional options.
Among these, Smart Mode offers four tiers—AUTO, Performance, Balanced, and Economy—all of which you select manually. The difference is that once AUTO is selected, the platform automatically assesses task complexity and dynamically routes to the appropriate tier; selecting any of the other three locks in that specific tier.
ModePositioningHighlights
AUTOAuto-routing, multi-model, context-adaptiveIntelligently matches the optimal reasoning depth and model
PerformanceHigh-quality models balancing speed and qualityFast response, 1M context, tool calling
BalancedAdvanced reasoning with high-quality outputEnhanced reasoning, 1M context, stable output
EconomyStandard reasoning with strong cost efficiencyStandard reasoning, 1M context, cost-effective
Among these, AUTO assesses task complexity on each request and dynamically routes to the appropriate performance tier:
  • 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.
When AUTO is selected, billing follows a unified list price regardless of the model actually routed to; when you select the Performance / Balanced / Economy tier directly, billing follows that tier. See Billing Overview. Click the Settings icon (⚙️) next to the model selector to configure the following parameters:
  • 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.
  1. Configure System Prompt: Set the system prompt to Please answer my questions in the style of *One Hundred Years of Solitude*. Here's how it affects output:
    • Without system prompt: Model replies using its default persona.
    • With system prompt: Model replies in the specified literary style.
  2. Use Custom Variables in System Prompts (Optional): In addition to static text, system prompts support embedded custom variables.
    1. Click Custom Variables (top-right corner of the Prompt editor), define your variables, and click OK to save.
    2. 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.
ToolDescription
bashExecutes shell commands—including bash, python3, pip, etc.
writeCreates or overwrites files; parent directories are auto-created.
readReads file contents—including partial reads (by line range) for large files.
editPerforms precise text replacement (find-and-replace) within files.
globSearches for files matching a pattern; returns matched file paths.
grepSearches file contents using regular expressions.
download_fileExports 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. In Agent 2.0, the knowledge base functions as a skill—treated as a tool that the agent autonomously plans and invokes. This proactive knowledge acquisition significantly improves answer accuracy and reduces hallucination—especially for private or domain-specific Q&A. See Knowledge Base for details.
Enabling Show Source in Response (under Response Settings) displays knowledge sources and original file/webpage URLs.
Agent 2.0 supports tagging knowledge base files to constrain search scope. By assigning tags to files and defining usage rules in the system prompt, you guide the agent to retrieve from smaller, more relevant subsets—dramatically improving answer accuracy and relevance.

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.

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:
  1. 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.)
  2. Tool Invocation: Logs the exact tool call inputs and returned outputs.
Maximum ReAct Rounds (range: 1–50) limits how many times the agent may invoke tools in a single session. Upon hitting this limit, the agent exits the tool chain and generates its final response.

Application Publishing & Integration

Publishing your application is mandatory before it can be invoked or integrated elsewhere.

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.
  1. On the application configuration page, click Version Management (top-right navigation bar).
  2. 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:
  1. 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.
  2. 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.
  3. 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.
Smart Mode Pricing Details The price unit is CNY / million tokens. AUTO is billed at a unified price regardless of the model actually routed to; when you select the Performance / Balanced / Economy tier directly, billing follows that tier. The price breakdown is as follows:
ModeInputOutput
AUTO¥3¥12
Performance¥6.4¥22.4
Balanced¥1.6¥6.4
Economy¥0.5¥2
Cache prices for each tier are as follows (same unit: CNY / million tokens):
ModeImplicit Cache HitExplicit Cache WriteExplicit 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?

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?

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?

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.