Managed Agent
Bailian CLI command reference for managing Managed Agent lifecycle, projects, sessions, state, and all AgentStudio resources.
Manage the full Managed Agent lifecycle from the terminal: deploy Agents as infrastructure-as-code, initialize and build local projects, manage sessions and state, and directly operate Agents, Environments, Skills, Vaults, Deployments, Sessions, and Files in AgentStudio.
NoteManaged Agent capabilities are currently available only to China site (aliyun.com) accounts.
ImportantAppend --help to any command for full parameter details, e.g. bl managed-agent apply --help.
See the Managed Agent quick start for feature-page usage.
One-click Agent creation & deployment
Lifecycle
bl managed-agent init: Create a YAML configuration template with Agent and Environment resource examples by default; optionally include Skill, Vault (with Credential), File, and Deployment (scheduled task) resourcesbl managed-agent validate: Validate the resource configurationbl managed-agent plan: Preview resource changesbl managed-agent apply: Read resource configuration from YAML; by default refresh the cloud state of managed resources first, then compute a change plan; create or update resources in dependency order, delete cloud resources that were removed from the configuration and are managed by the current project, and sync the local state records. Use --file to specify a configuration file; preview changes withplanfirst, then add --yes to apply after confirmationbl managed-agent destroy: Destroy all cloud resources tracked in the local state
Local resource state
bl managed-agent state list: List local resource state recordsbl managed-agent state show: Show the local state of a specific resourcebl managed-agent state import: Import an existing cloud resource into the local statebl managed-agent state rm: Remove a local state record without deleting the cloud resource
Session preview
bl managed-agent playground: Launch an online session debug preview in the browser
Local project management
Project init
bl managed-agent project init: Create a directory-style project; use--project .to initialize in the current directory
Project validation
bl managed-agent project validate: Validate the project directory structure and resource configuration
Project build
bl managed-agent project build: Organize and write back local directory source files, and generate an immutable Publish Build; use--dry-runto preview
Project publish
bl managed-agent project publish: Publish the current Build and record a version; add--yesto confirm the publish
Project workbench
bl managed-agent project workbench: Launch the Config UI Workbench for a directory-style project to edit and debug visually
Project versions
bl managed-agent project version list: List local project snapshot versionsbl managed-agent project version enable: Enable local project version managementbl managed-agent project version disable: Disable local project version managementbl managed-agent project version status: Show local project version management statusbl managed-agent project version preview: Preview a historical project versionbl managed-agent project version restore: Restore a historical version to the project working directory
Resource operations
Query, create, and run resources by resource type. The create commands for Agent, Environment, Skill, Vault, and Deployment can generate resource declarations from parameters; add --yes to confirm, write them to the configuration, and create the resources.
Agent
bl managed-agent agent create: Create an Agentbl managed-agent agent list: List remote Agentsbl managed-agent agent get: Get Agent details, optionally for a specific versionbl managed-agent agent search: Search Agents by ID, name, or descriptionbl managed-agent agent versions: List Agent versions
Environment
bl managed-agent environment list: List remote environmentsbl managed-agent environment get: Get environment detailsbl managed-agent environment search: Search environments by ID, name, or descriptionbl managed-agent environment create: Create a cloud environment
Skill
bl managed-agent skill list: List remote custom or official Skillsbl managed-agent skill get: Get Skill detailsbl managed-agent skill search: Search Skills by ID, name, or descriptionbl managed-agent skill create: Create a custom Skillbl managed-agent skill versions: List Skill versionsbl managed-agent skill download: Download a Skill locally, optionally a specific version
Vault
bl managed-agent vault list: List remote vaultsbl managed-agent vault get: Get vault detailsbl managed-agent vault search: Search vaults by ID, name, or metadatabl managed-agent vault create: Create an empty vaultbl managed-agent vault credential create: Create an environment-variable credential in a tracked Vault
Deployment
bl managed-agent deployment list: List remote deploymentsbl managed-agent deployment get: Get deployment detailsbl managed-agent deployment search: Search deployments by keywordbl managed-agent deployment create: Create a deployment, optionally with a schedulebl managed-agent deployment run: Trigger a deployment run immediatelybl managed-agent deployment pause: Pause a deployment and its schedulebl managed-agent deployment unpause: Resume a deployment and its schedulebl managed-agent deployment runs list: List runs for a deploymentbl managed-agent deployment runs get: Get details of a single deployment run
Session
bl managed-agent session create: Create a sessionbl managed-agent session run: Create a session, send a prompt, and stream the responsebl managed-agent session send: Send a text message to an existing session and stream the responsebl managed-agent session list: List remote sessionsbl managed-agent session get: Get session detailsbl managed-agent session search: Search sessions by ID, title, status, or Agent IDbl managed-agent session update: Update a session title or metadatabl managed-agent session archive: Archive a sessionbl managed-agent session delete: Delete a sessionbl managed-agent session event list: List historical session eventsbl managed-agent session event send: Send a raw event object or an array of events to a sessionbl managed-agent session event stream: Stream session events, optionally resuming after a specific eventbl managed-agent session debug: Aggregate session, event, and file metadata diagnosticsbl managed-agent session export: Export masked session diagnostics as a ZIP (without file contents)
File
bl managed-agent file list: List remote filesbl managed-agent file get: Get file metadatabl managed-agent file search: Search files by ID, filename, or MIME typebl managed-agent file upload: Upload a local filebl managed-agent file download: Download remote file content locallybl managed-agent file delete: Delete a remote file
Examples
bl managed-agent session run --prompt "Analyze the Q3 sales trend in sales.csv"
bl managed-agent project init
bl managed-agent project build
bl managed-agent project publish