Create a PolarDB Agent Flow

Updated at:

This topic describes how to create a PolarDB Agent Flow by using an existing cluster.

Create a PolarDB Agent Flow

  1. Log in to the PolarDB console. In the left-side navigation pane, choose PolarDB AI > PolarDB Agent Flow. In the top navigation bar, select the region for your application.

  2. On the PolarDB Agent Flow page, on the PolarDB Agent Flow List tab, click Create PolarDB Agent Flow.

  3. On the purchase page, configure the application parameters.

  4. Parameter

    Description

    Billing Method

    • Subscription: A prepaid billing method where you pay for resources of a fixed specification in advance. This method is suitable for services with stable, long-term workloads. The longer the subscription duration, the greater the discount.

    • Pay-As-You-Go: A postpaid billing method where you are charged based on actual usage. This method is ideal for services with flexible workloads.

    Region

    Select the region and zone where the application will be located.

    Note
    • The region cannot be changed after you purchase the application.

    • The application must be in the same region as your PolarDB for PostgreSQL cluster.

    • We recommend that you create the application in the same region as the ECS instance you want to connect to. Otherwise, they can communicate only over the public network.

    Engine

    Select PostgreSQL.

    AI Application

    Fixed to PolarHermes.

    Component Set

    The component set for PolarDB Agent Flow is fixed to the Agent component. For more information about billing, see What is PolarDB Agent Flow.

    AI Application Name

    Enter a custom name for the application.

    Note

    The name cannot start with http:// or https:// and must be 2 to 256 characters in length.

    Model source

    • Model Studio

      • Model Studio model list: For more information about selecting a model, see Select Model. Example: qwen3.5-plus.

      • Model Studio API key: Enter the API Key. Example: sk-***.

      • Model Studio model protocol: Select the model protocol. Examples: openai-completions or anthropic-messages.

      • Model Studio base URL: Enter the base URL for the model. Example: https://dashscope.aliyuncs.com/compatible-mode/v1.

    • Model operator

      • Select model: You can select an Existing Model or click Create Model.

      • Source LLM model list / LLM model: Select the model you want to use.

    • Custom model

      • Custom model name: Enter an easy-to-identify name for the model.

      • Custom model API key: Enter the authentication key required for the model.

      • Custom model API: Enter the full model inference endpoint.

      • Custom model base URL: Enter the base URL of the model service.

      Note

      By using the custom model feature, you agree to the following terms:

      • Compliance responsibility: You must ensure that your custom model complies with the laws, regulations, and regulatory requirements of the People's Republic of China, including but not limited to requirements related to data security, algorithm recommendations, and generative AI.

      • Assumption of risk: You assume full responsibility for compliance risks, data leaks, and non-compliant outputs from using overseas models or models that are not filed as required.

      • Platform disclaimer: PolarDB Agent Flow provides only model integration capabilities and makes no warranties regarding the output content, security, or compliance of your custom model.

    Network type

    Fixed to VPC.

    VPC

    Automatically populated with the VPC of the source PolarDB cluster.

    Zone and vSwitch

    Configure the vSwitch for the VPC. For optimal network performance, select a vSwitch in the same primary zone as your PolarDB for PostgreSQL cluster. If the existing vSwitches do not meet your requirements, you can create or delete VPCs and vSwitches.

    Storage type

    Supports Cloud Disk and AI Cache.

    Data disk

    If you set Cloud Disk to cloud disk, the storage space defaults to 20 GB and the disk type defaults to PL0 storage.

    AI Cache instance ID/name

    If you set AI Cache to AI Cache, associate an existing PolarDB Agent Lakebase instance.

    Security group

    Configure a security group for the application.

    Quantity

    Select the number of applications to purchase.

    Note

    This parameter is available only when Billing Method is set to Subscription.

    Subscription duration

    Select the subscription duration for the application.

    Note

    This parameter is available only when Billing Method is set to Subscription.

    Auto-renewal

    Enable or disable auto-renewal. We recommend enabling this feature to prevent service interruptions caused by an expired subscription.

    Note

    This parameter is available only when Billing Method is set to Subscription.

  5. Once the purchase is complete, return to the AI application page of your cluster to view the new application.

    Note

    The application takes 3 to 5 minutes to create.