Skip to main content

Agent Tool Configuration

Managed Agents provide nine built-in tools covering command execution, file operations, network access, and result artifacts—all executed within the session-bound runtime environment.

Available Tools

Select tools as needed in the Tools section of the Agent Editor page. Selected tools apply to all sessions of that agent.
ToolPurposeTypical Use Cases
bashExecute shell commands inside the sandboxRun scripts, install packages, invoke CLI tools
writeWrite content to filesGenerate reports, save intermediate results
readRead file contentsInspect mounted CSVs, logs, or configuration files
editModify files via string replacementSafer for small changes than full-file overwrites
globFind files using glob patternsLocate target files, e.g., *.csv
grepSearch text within filesDebug logs, locate keywords
web_searchSearch the internet and return the title, link, and content summary of relevant pagesLook up real-time information (such as weather and news) and external resources
web_fetchRead the main content of a given web page and convert it to textRead pages in depth after a search, extract page content
mark_artifactsMark files produced by the agent as result artifacts and return their file_idDownload or display the final deliverables on the business side
web_search and web_fetch are billed separately: web_search is billed per call (CNY 0.03 per call); web_fetch is free of charge for a limited time—future pricing is subject to the console. For billing details, see Billing.

Execution Mechanism

All built-in tools execute within the session-bound runtime environment. Files created and dependencies installed by these tools persist for the duration of the session. The agent autonomously decides which tool to invoke based on system prompts and the current message. Tool invocations are visible in real time via the Events panel.

Approval Policy

In the Agent Editor's Tools section, expand a tool to set its own approval policy, controlling whether a call requires human confirmation before it runs:
PolicyBehavior
Always allowDefault. The agent runs the tool directly without interrupting the flow
Always askPauses before each call and waits for the user to confirm in the session before continuing
For high-risk tools (such as bash), set Always ask to keep a human gate on sensitive operations while retaining automation elsewhere. When a tool is set to Always ask, the agent pauses and waits for confirmation each time it calls that tool during a session. When integrating via the API, see Session Event Stream for how to receive and respond to approval requests in the event stream.

Scope of Approval

Tool approval is supported only for the main agent and is not supported for subagents.
Client-side tools (function / custom, etc.) do not participate in this approval mechanism; their execution is controlled by the client.
In addition, a session locks in the Agent version at creation time. Changing an Agent's approval policy does not retroactively affect existing sessions — you must create a new session for the new configuration to take effect.

Configuring Approval Policy via the API

Beyond the console, you can declare the approval policy through the tools field when creating or updating an Agent. Set the toolkit-level default in the default_config of a builtin_toolkit entry, and override it per tool in configs[]:
{
  "tools": [
    {
      "type": "builtin_toolkit",
      "default_config": {
        "enabled": true,
        "permission_policy": {"type": "always_allow"}
      },
      "configs": [
        {
          "name": "bash",
          "enabled": true,
          "permission_policy": {"type": "always_ask"}
        }
      ]
    }
  ]
}
Configuration rules:
  • permission_policy only accepts the object form {"type": "always_allow"} or {"type": "always_ask"}. Passing a string returns a parameter error.
  • A per-tool policy in configs[] overrides the same field in default_config; a tool not listed in configs[] inherits default_config.
  • The approval policy for MCP tools is configured in the default_config / configs of the tools[] entry whose type is mcp_toolkit — not in mcp_servers[].
  • When omitted entirely, the default policy is always_allow.
For full field definitions, see the Create Agent API.

Next Steps

  • Define an Agent: Select required tools in the Agent Editor.
  • Agent MCP: Extend functionality by integrating additional external tools via the MCP protocol.
  • Start a Session: Observe tool invocations in action during a session.
Agent Development
Agent Context
Agent Governance & Evolution
Store
Application Marketplace