All Products
Search
Document Center

AgentBay:Manage policies

Last Updated:Dec 05, 2025

A policy is a collection of rules that controls the behavior of an API key. You can create custom policies and associate them with an API key.

Create a policy

  1. Log on to the AgentBay console.

  2. In the navigation pane on the left, click Policy Management.

  3. On the Policy Management page, click Create Policy.

    image

  4. On the Policy Management page, configure the following parameters and then click Confirm.

    Parameter

    Description

    Basic Information

    Policy Name

    Enter a custom policy name. The name can contain up to 128 characters.

    Connection Settings

    Release Inactive Desktop

    If enabled, the system automatically releases an inactive desktop when the stop times for both MCP and user interaction are met.

    Release Desktop after MCP Interaction Terminates

    Enter the time in minutes to wait before releasing the desktop after MCP interaction stops. The value must be between 1 and 1,000.

    Note

    The desktop is released only when the stop times for both MCP and user interaction are met.

    Release Desktop after User Interaction Terminates

    Enter the time in minutes to wait before releasing the desktop after user interaction stops. The value must be between 3 and 1,000.

    Note

    The desktop is released only when the stop times for both MCP and user interaction are met.

    Max Runtime for a Single Session

    Enter the maximum runtime for a single desktop session in minutes. The value must be between 1 and 1,000.

    Auto-creation Settings

    Max. Cloud Desktops in Pool

    Enter the maximum number of cloud desktops that can be created in the pool.

    Note

    If the number of automatically created cloud desktops reaches the configured limit, no more desktops will be created. The limit for trial accounts is 10.

Modify a policy

You can modify existing policies as needed.

  1. On the Policy Management page, find the target policy and click Modify Policy in the Actions column.

  2. On the Modify Policy page, modify the parameter values as needed and then click Confirm.

    Note

    Default system policies cannot be modified.

View associated API KEYs

View the API keys associated with a policy using one of the following methods:

Method 1:

  1. On the Policy Management page, find the target policy and click Associated API Key in the Actions column.

  2. In the dialog box that appears, view the API Key Name and API Key Value.

Method 2:

  1. On the Policy Management page, click the policy ID of the target policy.

  2. On the Policy Details page, view the associated API KEYs.

Delete a policy

Delete policies that you no longer need.

  1. On the Policy Management page, find the target policy and click Delete in the Actions column.

  2. In the dialog box that appears, click OK.

    Important

    Default system policies or policies that are associated with an API KEY cannot be deleted.