Flow Agent

更新时间: 2026-11-14 01:50:30

Bailian CLI command reference for managing agent applications and workflows.

Manage Bailian agent applications and workflows from the terminal: create, query, update, publish, delete, copy, and manage workflow canvases.

NoteApplication management capabilities are currently available only to China site (aliyun.com) accounts.

ImportantAppend --help to any command for full parameter details, e.g. bl flow-agent create --help. Command details on this page are verified against bl 2.10.0.

For usage in context, see Call an Agent Application.

Command reference

bl flow-agent call

Call a Bailian application (agent or workflow). Requires API Key authentication.

Usage

bl flow-agent call --app-id <id> --prompt <text> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--prompt <text>stringyesInput prompt text
--image <url>arraynoImage URL(s) to pass to the app (repeatable)
--file-id <id>arraynoPre-uploaded file ID(s) (repeatable)
--session-id <id>stringnoSession ID for multi-turn conversation
--streamswitchnoStream response (default: on in TTY)
--pipeline-ids <ids>stringnoKnowledge base pipeline IDs (comma-separated)
--memory-id <id>stringnoMemory ID for long-term memory
--biz-params <json>stringnoBusiness parameters JSON (workflow variables)
--has-thoughtsswitchnoShow agent thinking process

Example: Call an application with a prompt

bl flow-agent call --app-id abc123 --prompt "Hello"

bl flow-agent list

List Bailian applications. Requires Console authentication.

Usage

bl flow-agent list [flags]
ParameterTypeRequiredDescription
--name <name>stringnoFilter by app name (keyword search)
--page <n>numbernoPage number (default: 1)
--page-size <n>numbernoResults per page (default: 30)
--type <agent|workflow>stringnoApplication type: agent (default), workflow
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: List applications filtered by name

bl flow-agent list --name customer service

Example: List workflows

bl flow-agent list --type workflow

bl flow-agent get

Get Bailian application details (agent or workflow). Requires Console authentication.

Usage

bl flow-agent get --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--type <agent|workflow>stringnoApplication type: agent (default), workflow
--scope <draft|publish>stringnoData scope: draft (default), publish
--agent-version <n>numbernoAgent version number (agent only; implies published scope by default)
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Get application details

bl flow-agent get --app-id abc123

bl flow-agent create

Create a Bailian application (agent or workflow). Requires Console authentication.

Usage

bl flow-agent create --name <name> [flags]
ParameterTypeRequiredDescription
--name <name>stringyesApplication name
--type <agent|workflow>stringnoApplication type: agent (default), workflow
--description <text>stringnoApplication description
--icon <key>stringnoApplication icon key
--model <model>stringnoAgent model ID (default: auto; agent only)
--config-json <json>stringnoConfig JSON string (mutually exclusive with --config-file)
--config-file <path>stringnoPath to a config JSON file (mutually exclusive with --config-json)
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Create an agent application

bl flow-agent create --name "Customer service" --model qwen3-max --description "After-sales bot"

Example: Create a workflow application

bl flow-agent create --name "Order flow" --type workflow
  • Agent creation uses the app-control 2.0 API with a default config (model auto, dialog_round 3). --config-json / --config-file shallow-merges over the default config; --model overrides config.model.
  • Workflow creation creates an empty draft canvas; edit it with flow-agent workflow save and publish with flow-agent workflow publish.

bl flow-agent update

Update a Bailian application (agent config or workflow metadata). Requires Console authentication.

Usage

bl flow-agent update --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--type <agent|workflow>stringnoApplication type: agent (default), workflow
--name <name>stringnoNew application name
--description <text>stringnoNew application description
--icon <key>stringnoNew application icon key
--model <model>stringnoAgent model ID (agent only; sets config.model)
--instructions <text>stringnoAgent instructions (agent only; sets config.instruction)
--config-json <json>stringnoConfig JSON string (mutually exclusive with --config-file)
--config-file <path>stringnoPath to a config JSON file (mutually exclusive with --config-json)
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Update agent model and instructions

bl flow-agent update --app-id abc123 --model qwen3-max --instructions "You are a helpful assistant"
  • Reads the current draft first, then merges: current config → --config-json / --config-file (shallow) → --model / --instructions. Only changed fields are sent. Requires a console token even for --dry-run (read-only planning).
  • Agent updates use app-control 2.0. Workflow updates only change metadata (name/description/icon); edit the canvas with flow-agent workflow save.

bl flow-agent publish

Publish a Bailian agent application. Requires Console authentication.

Usage

bl flow-agent publish --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--description <text>stringnoVersion description
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Publish an agent application

bl flow-agent publish --app-id abc123 --description "Release v2"
  • Publishes the current agent draft via app-control 2.0. To publish a workflow, use flow-agent workflow publish.

bl flow-agent delete

Delete a Bailian application (agent or workflow). Requires Console authentication.

Usage

bl flow-agent delete --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--yesswitchnoConfirm this high-risk operation
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

WarningThis permanently deletes the application and its configuration. Confirm the app ID with flow-agent list or flow-agent get before proceeding.

Example: Delete an application

bl flow-agent delete --app-id abc123 --yes

bl flow-agent copy

Copy a Bailian application (agent or workflow). Requires Console authentication.

Usage

bl flow-agent copy --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Copy an application

bl flow-agent copy --app-id abc123

bl flow-agent versions

List published versions of a Bailian application. Requires Console authentication.

Usage

bl flow-agent versions --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--type <agent|workflow>stringnoApplication type: agent (default), workflow
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: List published versions of an application

bl flow-agent versions --app-id abc123

Workflow canvas management

bl flow-agent workflow get

Get a workflow canvas (draft or a published version). Requires Console authentication.

Usage

bl flow-agent workflow get --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--flow-version <version>stringnoPublished version to read (default: current draft)
--scope <draft|publish>stringnoData scope: draft (default), publish
--output-file <path>stringnoWrite the canvas config JSON to this file (overwrites)
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Get the current draft canvas

bl flow-agent workflow get --app-id abc123

Example: Export canvas to a file

bl flow-agent workflow get --app-id abc123 --output-file ./canvas.json
  • Without --flow-version, reads the current draft canvas (config + version). With --flow-version, reads a published version (scope defaults to publish). The canvas config is a JSON string; --output-file writes it parsed and pretty-printed.

bl flow-agent workflow save

Save a workflow canvas (replaces the current draft). Requires Console authentication.

Usage

bl flow-agent workflow save --app-id <id> (--config-json <json> | --config-file <path>) [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--config-json <json>stringnoConfig JSON string (mutually exclusive with --config-file)
--config-file <path>stringnoPath to a config JSON file (mutually exclusive with --config-json)
--flow-version <version>stringnoExpected current version for optimistic locking (default: read from server)
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Save a workflow canvas from a file

bl flow-agent workflow save --app-id abc123 --config-file ./canvas.json
  • The canvas config is a whole-document replacement of the draft. Export it first with flow-agent workflow get --output-file, edit, then save. Without --flow-version the current version is read from the server (requires a console token, also for --dry-run).

bl flow-agent workflow publish

Publish a workflow (publishes the current draft canvas). Requires Console authentication.

Usage

bl flow-agent workflow publish --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--description <text>stringnoVersion description
--trigger-list <json>stringnoTrigger list JSON array (default: read from the current draft)
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Publish a workflow

bl flow-agent workflow publish --app-id abc123 --description "Release v2"
  • Reads the current draft canvas and version, then publishes. Triggers are taken from the draft (applicationConfigDTO.triggerList, falling back to the Start node) unless --trigger-list is given; 'none' triggers are dropped. Requires a console token even for --dry-run (read-only planning).

bl flow-agent workflow export

Export a workflow as a DSL schema (download URL). Requires Console authentication.

Usage

bl flow-agent workflow export --app-id <id> [flags]
ParameterTypeRequiredDescription
--app-id <id>stringyesApplication ID
--flow-version <version>stringnoPublished version to export (default: current draft)
--output-file <path>stringnoDownload the DSL to this file instead of printing the URL
--workspace-id <id>stringnoWorkspace ID (env: BAILIAN_WORKSPACE_ID)

Example: Export a workflow DSL

bl flow-agent workflow export --app-id abc123 --output-file ./flow.dsl

Deprecated commands

WarningThe following commands are deprecated and will be removed in a future release. Use the corresponding bl flow-agent commands instead.

Deprecated commandReplacement
bl app callbl flow-agent call
bl app listbl flow-agent list
上一篇: Managed Agent 下一篇: RAG
阿里云首页 大模型服务平台百炼 相关技术圈