Flow Agent
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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--prompt <text> | string | yes | Input prompt text |
--image <url> | array | no | Image URL(s) to pass to the app (repeatable) |
--file-id <id> | array | no | Pre-uploaded file ID(s) (repeatable) |
--session-id <id> | string | no | Session ID for multi-turn conversation |
--stream | switch | no | Stream response (default: on in TTY) |
--pipeline-ids <ids> | string | no | Knowledge base pipeline IDs (comma-separated) |
--memory-id <id> | string | no | Memory ID for long-term memory |
--biz-params <json> | string | no | Business parameters JSON (workflow variables) |
--has-thoughts | switch | no | Show 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--name <name> | string | no | Filter by app name (keyword search) |
--page <n> | number | no | Page number (default: 1) |
--page-size <n> | number | no | Results per page (default: 30) |
--type <agent|workflow> | string | no | Application type: agent (default), workflow |
--workspace-id <id> | string | no | Workspace 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--type <agent|workflow> | string | no | Application type: agent (default), workflow |
--scope <draft|publish> | string | no | Data scope: draft (default), publish |
--agent-version <n> | number | no | Agent version number (agent only; implies published scope by default) |
--workspace-id <id> | string | no | Workspace 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--name <name> | string | yes | Application name |
--type <agent|workflow> | string | no | Application type: agent (default), workflow |
--description <text> | string | no | Application description |
--icon <key> | string | no | Application icon key |
--model <model> | string | no | Agent model ID (default: auto; agent only) |
--config-json <json> | string | no | Config JSON string (mutually exclusive with --config-file) |
--config-file <path> | string | no | Path to a config JSON file (mutually exclusive with --config-json) |
--workspace-id <id> | string | no | Workspace 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-fileshallow-merges over the default config;--modeloverrides config.model. - Workflow creation creates an empty draft canvas; edit it with
flow-agent workflow saveand publish withflow-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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--type <agent|workflow> | string | no | Application type: agent (default), workflow |
--name <name> | string | no | New application name |
--description <text> | string | no | New application description |
--icon <key> | string | no | New application icon key |
--model <model> | string | no | Agent model ID (agent only; sets config.model) |
--instructions <text> | string | no | Agent instructions (agent only; sets config.instruction) |
--config-json <json> | string | no | Config JSON string (mutually exclusive with --config-file) |
--config-file <path> | string | no | Path to a config JSON file (mutually exclusive with --config-json) |
--workspace-id <id> | string | no | Workspace 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--description <text> | string | no | Version description |
--workspace-id <id> | string | no | Workspace 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--yes | switch | no | Confirm this high-risk operation |
--workspace-id <id> | string | no | Workspace 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--workspace-id <id> | string | no | Workspace 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--type <agent|workflow> | string | no | Application type: agent (default), workflow |
--workspace-id <id> | string | no | Workspace 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--flow-version <version> | string | no | Published version to read (default: current draft) |
--scope <draft|publish> | string | no | Data scope: draft (default), publish |
--output-file <path> | string | no | Write the canvas config JSON to this file (overwrites) |
--workspace-id <id> | string | no | Workspace 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-filewrites 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--config-json <json> | string | no | Config JSON string (mutually exclusive with --config-file) |
--config-file <path> | string | no | Path to a config JSON file (mutually exclusive with --config-json) |
--flow-version <version> | string | no | Expected current version for optimistic locking (default: read from server) |
--workspace-id <id> | string | no | Workspace 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-versionthe 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--description <text> | string | no | Version description |
--trigger-list <json> | string | no | Trigger list JSON array (default: read from the current draft) |
--workspace-id <id> | string | no | Workspace 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-listis 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--app-id <id> | string | yes | Application ID |
--flow-version <version> | string | no | Published version to export (default: current draft) |
--output-file <path> | string | no | Download the DSL to this file instead of printing the URL |
--workspace-id <id> | string | no | Workspace 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 command | Replacement |
|---|---|
bl app call | bl flow-agent call |
bl app list | bl flow-agent list |