feat(agent): rename cli command to managed-agent

This commit is contained in:
chenanran555
2026-07-23 16:46:06 +08:00
parent 1da3367de8
commit 64335a6201
37 changed files with 377 additions and 346 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ defineCommand({ auth }) → runtime/authStage → ctx.client → command.run(ctx
### 例外:agent 命令的 SDK 凭证桥接
`bl agent *` 命令声明 `auth: "none"`,凭证由 `@openagentpack/sdk` 自主从 env 解析(agents.yaml 的 `${DASHSCOPE_API_KEY}` / `${BAILIAN_WORKSPACE_ID}` 插值)。为让 bl 登录态复用,`packages/commands/src/commands/agent/_engine/credentials.ts``bridgeBailianCredentials()` 会**直接 `readConfigFile()`**,把 config 的 `api_key` / `workspace_id` 作为最低优先级兜底填入对应 env,仅填空值,不覆盖已有。这是唯一允许命令层直接读 config 的场景(SDK 只认 env,不走 `ctx.client`);优先级链:`~/.agents/config.json` > shell env > `.env` > `~/.bailian/config.json`
`bl managed-agent *` 命令声明 `auth: "none"`,凭证由 `@openagentpack/sdk` 自主从 env 解析(agents.yaml 的 `${DASHSCOPE_API_KEY}` / `${BAILIAN_WORKSPACE_ID}` 插值)。为让 bl 登录态复用,`packages/commands/src/commands/managed-agent/_engine/credentials.ts``bridgeBailianCredentials()` 会**直接 `readConfigFile()`**,把 config 的 `api_key` / `workspace_id` 作为最低优先级兜底填入对应 env,仅填空值,不覆盖已有。这是唯一允许命令层直接读 config 的场景(SDK 只认 env,不走 `ctx.client`);优先级链:`~/.agents/config.json` > shell env > `.env` > `~/.bailian/config.json`
## 必查清单
+27
View File
@@ -0,0 +1,27 @@
version: "1"
providers:
bailian:
# bl auth login --api-key <key> sets DASHSCOPE_API_KEY; --agentstudio-base-url <url> sets BAILIAN_BASE_URL
api_key: ${DASHSCOPE_API_KEY}
base_url: ${BAILIAN_BASE_URL}
defaults:
provider: bailian
environments:
dev:
config:
type: cloud
networking:
type: unrestricted
agents:
assistant:
description: "General-purpose assistant"
model: qwen3.7-max
instructions: |
You are a helpful assistant.
environment: dev
tools:
builtin: [bash, read, glob, grep]
+32 -32
View File
@@ -89,22 +89,22 @@ import {
pluginLink,
pluginList,
pluginRemove,
agentInit,
agentValidate,
agentPlan,
agentApply,
agentDestroy,
agentStateList,
agentStateShow,
agentStateRm,
agentStateImport,
agentSessionCreate,
agentSessionList,
agentSessionGet,
agentSessionDelete,
agentSessionRun,
agentSessionSend,
agentSessionEvents,
managedAgentInit,
managedAgentValidate,
managedAgentPlan,
managedAgentApply,
managedAgentDestroy,
managedAgentStateList,
managedAgentStateShow,
managedAgentStateRm,
managedAgentStateImport,
managedAgentSessionCreate,
managedAgentSessionList,
managedAgentSessionGet,
managedAgentSessionDelete,
managedAgentSessionRun,
managedAgentSessionSend,
managedAgentSessionEvents,
} from "bailian-cli-commands";
// Full bailian-cli product: every command, exposed under the `bl` binary.
@@ -202,20 +202,20 @@ export const commands: Record<string, AnyCommand> = {
"plugin link": pluginLink,
"plugin list": pluginList,
"plugin remove": pluginRemove,
"agent init": agentInit,
"agent validate": agentValidate,
"agent plan": agentPlan,
"agent apply": agentApply,
"agent destroy": agentDestroy,
"agent state list": agentStateList,
"agent state show": agentStateShow,
"agent state rm": agentStateRm,
"agent state import": agentStateImport,
"agent session create": agentSessionCreate,
"agent session list": agentSessionList,
"agent session get": agentSessionGet,
"agent session delete": agentSessionDelete,
"agent session run": agentSessionRun,
"agent session send": agentSessionSend,
"agent session events": agentSessionEvents,
"managed-agent init": managedAgentInit,
"managed-agent validate": managedAgentValidate,
"managed-agent plan": managedAgentPlan,
"managed-agent apply": managedAgentApply,
"managed-agent destroy": managedAgentDestroy,
"managed-agent state list": managedAgentStateList,
"managed-agent state show": managedAgentStateShow,
"managed-agent state rm": managedAgentStateRm,
"managed-agent state import": managedAgentStateImport,
"managed-agent session create": managedAgentSessionCreate,
"managed-agent session list": managedAgentSessionList,
"managed-agent session get": managedAgentSessionGet,
"managed-agent session delete": managedAgentSessionDelete,
"managed-agent session run": managedAgentSessionRun,
"managed-agent session send": managedAgentSessionSend,
"managed-agent session events": managedAgentSessionEvents,
};
+6 -2
View File
@@ -21,7 +21,11 @@ export default defineCommand({
usageArgs:
"--api-key <key> | --console | --open-api --access-key-id <id> --access-key-secret <secret>",
flags: {
apiKey: { type: "string", valueHint: "<key>", description: "Model API key to store" },
apiKey: {
type: "string",
valueHint: "<key>",
description: "Model API key to store",
},
baseUrl: {
type: "string",
valueHint: "<url>",
@@ -31,7 +35,7 @@ export default defineCommand({
type: "string",
valueHint: "<url>",
description:
"Bailian AgentStudio base URL for `bl agent` commands (sets BAILIAN_BASE_URL; used with --api-key)",
"Bailian AgentStudio base URL for `bl managed-agent` commands (sets BAILIAN_BASE_URL; used with --api-key)",
},
console: {
type: "switch",
@@ -20,7 +20,7 @@ export const CREDENTIALS_NOTE = [
* the bailian provider. bl persists `api_key` / `agentstudio_base_url` in
* `~/.bailian/config.json` (via `bl auth login`); mirror them onto
* `DASHSCOPE_API_KEY` / `BAILIAN_BASE_URL` so users don't have to re-declare the
* same credentials for `bl agent *`. `workspace_id` is still bridged for configs
* same credentials for `bl managed-agent *`. `workspace_id` is still bridged for configs
* that predate the base_url flow (the SDK accepts either).
*
* Lowest priority: only fills a var that is still unset, so anything already in
@@ -95,7 +95,7 @@ export default defineCommand({
throw new BailianError(
`Refusing to apply ${actionable.length} change(s) (${creates} create, ${updates} update, ${deletes.length} destroy) without confirmation.`,
ExitCode.USAGE,
"Review with `bl agent plan`, then re-run with --yes to apply.",
"Review with `bl managed-agent plan`, then re-run with --yes to apply.",
);
}
@@ -140,7 +140,7 @@ export default defineCommand({
"Credentials: run `bl auth login --api-key <key> --agentstudio-base-url <url>`, or set DASHSCOPE_API_KEY / BAILIAN_BASE_URL.",
);
}
emitBare("Next: edit agents.yaml, then run `bl agent plan`.");
emitBare("Next: edit agents.yaml, then run `bl managed-agent plan`.");
}
},
});
+16 -16
View File
@@ -91,22 +91,22 @@ export { default as tokenPlanListSeats } from "./commands/token-plan/list-seats.
export { default as tokenPlanCreateKey } from "./commands/token-plan/create-key.ts";
export { default as tokenPlanAssignSeats } from "./commands/token-plan/assign-seats.ts";
export { default as tokenPlanAddMember } from "./commands/token-plan/add-member.ts";
export { default as agentInit } from "./commands/agent/init.ts";
export { default as agentValidate } from "./commands/agent/validate.ts";
export { default as agentPlan } from "./commands/agent/plan.ts";
export { default as agentApply } from "./commands/agent/apply.ts";
export { default as agentDestroy } from "./commands/agent/destroy.ts";
export { default as agentStateList } from "./commands/agent/state-list.ts";
export { default as agentStateShow } from "./commands/agent/state-show.ts";
export { default as agentStateRm } from "./commands/agent/state-rm.ts";
export { default as agentStateImport } from "./commands/agent/state-import.ts";
export { default as agentSessionCreate } from "./commands/agent/session-create.ts";
export { default as agentSessionList } from "./commands/agent/session-list.ts";
export { default as agentSessionGet } from "./commands/agent/session-get.ts";
export { default as agentSessionDelete } from "./commands/agent/session-delete.ts";
export { default as agentSessionRun } from "./commands/agent/session-run.ts";
export { default as agentSessionSend } from "./commands/agent/session-send.ts";
export { default as agentSessionEvents } from "./commands/agent/session-events.ts";
export { default as managedAgentInit } from "./commands/managed-agent/init.ts";
export { default as managedAgentValidate } from "./commands/managed-agent/validate.ts";
export { default as managedAgentPlan } from "./commands/managed-agent/plan.ts";
export { default as managedAgentApply } from "./commands/managed-agent/apply.ts";
export { default as managedAgentDestroy } from "./commands/managed-agent/destroy.ts";
export { default as managedAgentStateList } from "./commands/managed-agent/state-list.ts";
export { default as managedAgentStateShow } from "./commands/managed-agent/state-show.ts";
export { default as managedAgentStateRm } from "./commands/managed-agent/state-rm.ts";
export { default as managedAgentStateImport } from "./commands/managed-agent/state-import.ts";
export { default as managedAgentSessionCreate } from "./commands/managed-agent/session-create.ts";
export { default as managedAgentSessionList } from "./commands/managed-agent/session-list.ts";
export { default as managedAgentSessionGet } from "./commands/managed-agent/session-get.ts";
export { default as managedAgentSessionDelete } from "./commands/managed-agent/session-delete.ts";
export { default as managedAgentSessionRun } from "./commands/managed-agent/session-run.ts";
export { default as managedAgentSessionSend } from "./commands/managed-agent/session-send.ts";
export { default as managedAgentSessionEvents } from "./commands/managed-agent/session-events.ts";
export { default as workspaceInit } from "./commands/workspace/init.ts";
export { default as pluginInstall } from "./commands/plugin/install.ts";
export { default as pluginLink } from "./commands/plugin/link.ts";
@@ -2,7 +2,7 @@ import { mkdtempSync, rmSync, writeFileSync } from "fs";
import { tmpdir } from "os";
import { join } from "path";
import { expect, test } from "vite-plus/test";
import { bridgeBailianCredentials } from "../src/commands/agent/_engine/credentials.ts";
import { bridgeBailianCredentials } from "../src/commands/managed-agent/_engine/credentials.ts";
/**
* bridgeBailianCredentials ~/.bailian/config.json api_key / agentstudio_base_url
@@ -1,7 +1,7 @@
import { UserError } from "@openagentpack/sdk";
import { BailianError, ExitCode } from "bailian-cli-core";
import { expect, test } from "vite-plus/test";
import { withAgentErrors } from "../src/commands/agent/_engine/errors.ts";
import { withAgentErrors } from "../src/commands/managed-agent/_engine/errors.ts";
/**
* Structural stand-in for the SDK's internal `ApiError` (not exported by the
+1 -1
View File
@@ -28,7 +28,7 @@ export interface ConfigFile {
security_token?: string;
base_url?: string;
/**
* Bailian AgentStudio API base URL for `bl agent` commands, e.g.
* Bailian AgentStudio API base URL for `bl managed-agent` commands, e.g.
* `https://<workspace>.cn-beijing.maas.aliyuncs.com/api/v1/agentstudio`.
* Distinct from `base_url` (the DashScope model API): the agent path bridges
* this to the SDK's `BAILIAN_BASE_URL`, so a workspace_id is not required.
+10 -10
View File
@@ -48,16 +48,16 @@ bl auth generate-access-token --access-key-id LTAIxxxxx --access-key-secret xxxx
#### Flags
| Flag | Type | Required | Description |
| ------------------------------ | ------ | -------- | ------------------------------------------------------------------------------------------------- |
| `--api-key <key>` | string | no | Model API key to store |
| `--base-url <url>` | string | no | Model API base URL (used with --api-key for validation) |
| `--agentstudio-base-url <url>` | string | no | Bailian AgentStudio base URL for `bl agent` commands (sets BAILIAN_BASE_URL; used with --api-key) |
| `--console` | switch | no | Sign in via browser; use --console-site to choose domestic (default) or international |
| `--console-site <site>` | string | no | Console site: domestic, international |
| `--open-api` | switch | no | Store Alibaba Cloud OpenAPI AK/SK credentials |
| `--access-key-id <id>` | string | no | Alibaba Cloud Access Key ID to store |
| `--access-key-secret <secret>` | string | no | Alibaba Cloud Access Key Secret to store |
| Flag | Type | Required | Description |
| ------------------------------ | ------ | -------- | --------------------------------------------------------------------------------------------------------- |
| `--api-key <key>` | string | no | Model API key to store |
| `--base-url <url>` | string | no | Model API base URL (used with --api-key for validation) |
| `--agentstudio-base-url <url>` | string | no | Bailian AgentStudio base URL for `bl managed-agent` commands (sets BAILIAN_BASE_URL; used with --api-key) |
| `--console` | switch | no | Sign in via browser; use --console-site to choose domestic (default) or international |
| `--console-site <site>` | string | no | Console site: domestic, international |
| `--open-api` | switch | no | Store Alibaba Cloud OpenAPI AK/SK credentials |
| `--access-key-id <id>` | string | no | Alibaba Cloud Access Key ID to store |
| `--access-key-secret <secret>` | string | no | Alibaba Cloud Access Key Secret to store |
#### Examples
+137 -137
View File
@@ -8,146 +8,146 @@ Use this index for the full quick index and global flags.
## Quick index
| Command | Description | Detail |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| `bl advisor recommend` | Recommend the best models for your use case (intent analysis → candidate recall → LLM ranking) | [advisor.md](advisor.md) |
| `bl agent apply` | Apply planned changes to create/update/delete agent resources | [agent.md](agent.md) |
| `bl agent destroy` | Destroy all managed agent resources tracked in state | [agent.md](agent.md) |
| `bl agent init` | Create a new agents.yaml template | [agent.md](agent.md) |
| `bl agent plan` | Show what changes would be applied to agent infrastructure | [agent.md](agent.md) |
| `bl agent session create` | Create a new session for an agent | [agent.md](agent.md) |
| `bl agent session delete` | Delete a session | [agent.md](agent.md) |
| `bl agent session events` | List event history for a session | [agent.md](agent.md) |
| `bl agent session get` | Get details of a session | [agent.md](agent.md) |
| `bl agent session list` | List sessions from the provider | [agent.md](agent.md) |
| `bl agent session run` | Create a session, send a message, and stream the response | [agent.md](agent.md) |
| `bl agent session send` | Send a message to an existing session and stream the response | [agent.md](agent.md) |
| `bl agent state import` | Import an existing remote resource into agents state | [agent.md](agent.md) |
| `bl agent state list` | List resources tracked in agents state | [agent.md](agent.md) |
| `bl agent state rm` | Remove a resource from state without destroying it remotely | [agent.md](agent.md) |
| `bl agent state show` | Show details of a resource in agents state | [agent.md](agent.md) |
| `bl agent validate` | Validate an agents.yaml configuration (offline) | [agent.md](agent.md) |
| `bl app call` | Call a Bailian application (agent or workflow) | [app.md](app.md) |
| `bl app list` | List Bailian applications | [app.md](app.md) |
| `bl auth generate-access-token` | Generate a CLI access token using OpenAPI AK/SK | [auth.md](auth.md) |
| `bl auth login` | Authenticate with API key, console browser login, or OpenAPI AK/SK (credentials can coexist) | [auth.md](auth.md) |
| `bl auth logout` | Clear stored credentials; full logout also clears the model Base URL | [auth.md](auth.md) |
| `bl auth status` | Show current authentication state | [auth.md](auth.md) |
| `bl config agent` | Configure a coding agent to use DashScope API | [config.md](config.md) |
| `bl config list` | List config profiles and show the active profile | [config.md](config.md) |
| `bl config set` | Set a config value | [config.md](config.md) |
| `bl config show` | Display current configuration | [config.md](config.md) |
| `bl config ui` | Open a local web UI to manage config profiles | [config.md](config.md) |
| `bl config use` | Set the active config profile | [config.md](config.md) |
| `bl console call` | Call a Bailian console API via the CLI gateway | [console.md](console.md) |
| `bl dataset delete` | Delete a dataset file by ID | [dataset.md](dataset.md) |
| `bl dataset get` | Get details of a single dataset file | [dataset.md](dataset.md) |
| `bl dataset list` | List uploaded dataset files | [dataset.md](dataset.md) |
| `bl dataset upload` | Upload a dataset file (.jsonl or .zip) to Bailian | [dataset.md](dataset.md) |
| `bl dataset validate` | Locally validate a dataset file (.jsonl or .zip) without uploading | [dataset.md](dataset.md) |
| `bl deploy audio create` | Create an audio (TTS) model deployment | [deploy.md](deploy.md) |
| `bl deploy delete` | Delete a model deployment (must be STOPPED or FAILED) | [deploy.md](deploy.md) |
| `bl deploy get` | Get details of a single model deployment | [deploy.md](deploy.md) |
| `bl deploy image create` | Create an image generation model deployment | [deploy.md](deploy.md) |
| `bl deploy list` | List model deployments | [deploy.md](deploy.md) |
| `bl deploy models` | List models available for deployment | [deploy.md](deploy.md) |
| `bl deploy scale` | Scale a deployment's capacity | [deploy.md](deploy.md) |
| `bl deploy text create` | Create a text model deployment | [deploy.md](deploy.md) |
| `bl deploy update` | Update a deployment's rate limits (rpm_limit / tpm_limit) | [deploy.md](deploy.md) |
| `bl file upload` | Upload a local file to DashScope temporary storage (48h) | [file.md](file.md) |
| `bl finetune audio create` | Create an audio TTS model fine-tune job (sft-lora) | [finetune.md](finetune.md) |
| `bl finetune cancel` | Cancel a running fine-tune job | [finetune.md](finetune.md) |
| `bl finetune capability` | Query fine-tune training capability — by model (which training types it supports) or by training type (which models support it) | [finetune.md](finetune.md) |
| `bl finetune checkpoints` | List checkpoints produced by a fine-tune job | [finetune.md](finetune.md) |
| `bl finetune delete` | Delete a fine-tune job record | [finetune.md](finetune.md) |
| `bl finetune export` | Publish a checkpoint as a deployable model | [finetune.md](finetune.md) |
| `bl finetune get` | Get details of a single fine-tune job | [finetune.md](finetune.md) |
| `bl finetune image create` | Create an image generation model fine-tune job (sft-lora) | [finetune.md](finetune.md) |
| `bl finetune list` | List fine-tune jobs | [finetune.md](finetune.md) |
| `bl finetune logs` | Fetch training logs for a fine-tune job | [finetune.md](finetune.md) |
| `bl finetune text create` | Create a text model fine-tune job (sft \| sft-lora \| dpo \| dpo-lora \| cpt) | [finetune.md](finetune.md) |
| `bl finetune watch` | Probe a fine-tune job's status (default: single non-blocking fetch). Pass --follow to poll until terminal. | [finetune.md](finetune.md) |
| `bl image edit` | Edit an existing image with text instructions (Qwen-Image / Wan 2.7) | [image.md](image.md) |
| `bl image generate` | Generate images (Qwen-Image / wan2.x) | [image.md](image.md) |
| `bl knowledge chat` | Chat with a Bailian knowledge base (RAG Q&A with streaming) | [knowledge.md](knowledge.md) |
| `bl knowledge retrieve` | Retrieve from a Bailian knowledge base (deprecated, use `search` instead) | [knowledge.md](knowledge.md) |
| `bl knowledge search` | Search a Bailian knowledge base (RAG semantic retrieval) | [knowledge.md](knowledge.md) |
| `bl mcp call` | Call a tool on an MCP server (tools/call) | [mcp.md](mcp.md) |
| `bl mcp list` | List MCP servers activated under your Bailian account | [mcp.md](mcp.md) |
| `bl mcp tools` | List tools exposed by an MCP server (tools/list) | [mcp.md](mcp.md) |
| `bl memory add` | Add memory from messages or custom content | [memory.md](memory.md) |
| `bl memory delete` | Delete a memory node | [memory.md](memory.md) |
| `bl memory list` | List memory nodes for a user | [memory.md](memory.md) |
| `bl memory profile create` | Create a user profile schema for memory profiling | [memory.md](memory.md) |
| `bl memory profile get` | Get user profile by schema ID and user ID | [memory.md](memory.md) |
| `bl memory search` | Search memory nodes by query or messages | [memory.md](memory.md) |
| `bl memory update` | Update a memory node content | [memory.md](memory.md) |
| `bl model list` | Browse model families or show detailed model info in the Bailian model marketplace | [model.md](model.md) |
| `bl omni` | Multimodal chat with text + audio output (Qwen-Omni) | [omni.md](omni.md) |
| `bl pipeline run` | Run a pipeline workflow definition | [pipeline.md](pipeline.md) |
| `bl pipeline validate` | Validate a pipeline definition without executing | [pipeline.md](pipeline.md) |
| `bl plugin install` | Install or upgrade an allowlisted Command Pack | [plugin.md](plugin.md) |
| `bl plugin link` | Link an allowlisted local Command Pack for development | [plugin.md](plugin.md) |
| `bl plugin list` | List installed Command Packs and their load status | [plugin.md](plugin.md) |
| `bl plugin remove` | Remove an installed Command Pack | [plugin.md](plugin.md) |
| `bl quota check` | Check current usage against rate limits | [quota.md](quota.md) |
| `bl quota history` | View quota change history | [quota.md](quota.md) |
| `bl quota list` | View model RPM/TPM rate limits | [quota.md](quota.md) |
| `bl quota request` | Request a temporary quota increase | [quota.md](quota.md) |
| `bl search web` | Search the web using DashScope MCP WebSearch service | [search.md](search.md) |
| `bl speech recognize` | Recognize speech from audio files (FunAudio-ASR) | [speech.md](speech.md) |
| `bl speech synthesize` | Synthesize speech from text (CosyVoice TTS) | [speech.md](speech.md) |
| `bl text chat` | Send a chat completion (OpenAI compatible, DashScope) | [text.md](text.md) |
| `bl token-plan add-member` | Add a member to a Token Plan organization | [token-plan.md](token-plan.md) |
| `bl token-plan assign-seats` | Batch assign Token Plan seats to members | [token-plan.md](token-plan.md) |
| `bl token-plan create-key` | Create a Token Plan API key for a seat | [token-plan.md](token-plan.md) |
| `bl token-plan list-seats` | List Token Plan subscription seat details | [token-plan.md](token-plan.md) |
| `bl update` | Update the CLI to the latest version | [update.md](update.md) |
| `bl usage free` | Query free-tier quota for models (all models if --model is omitted) | [usage.md](usage.md) |
| `bl usage freetier` | Enable or disable auto-stop for free-tier models. Enables by default; use --off to disable | [usage.md](usage.md) |
| `bl usage stats` | Query model usage statistics | [usage.md](usage.md) |
| `bl usage summary` | Show a unified usage summary: free-tier quota and recent usage overview | [usage.md](usage.md) |
| `bl video download` | Download a completed video by task ID | [video.md](video.md) |
| `bl video edit` | Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.) | [video.md](video.md) |
| `bl video generate` | Generate a video from text or image (happyhorse-1.1-t2v / happyhorse-1.1-i2v / wan2.6-t2v) | [video.md](video.md) |
| `bl video ref` | Reference-to-video generation (happyhorse-1.1-r2v / wan2.6-r2v): multi-subject, multi-shot with voice | [video.md](video.md) |
| `bl video task get` | Query async task status | [video.md](video.md) |
| `bl vision describe` | Describe an image or video using Qwen-VL | [vision.md](vision.md) |
| `bl workspace init` | Initialize Bailian workspace and activate postpaid services | [workspace.md](workspace.md) |
| `bl workspace list` | List all workspaces | [workspace.md](workspace.md) |
| Command | Description | Detail |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `bl advisor recommend` | Recommend the best models for your use case (intent analysis → candidate recall → LLM ranking) | [advisor.md](advisor.md) |
| `bl app call` | Call a Bailian application (agent or workflow) | [app.md](app.md) |
| `bl app list` | List Bailian applications | [app.md](app.md) |
| `bl auth generate-access-token` | Generate a CLI access token using OpenAPI AK/SK | [auth.md](auth.md) |
| `bl auth login` | Authenticate with API key, console browser login, or OpenAPI AK/SK (credentials can coexist) | [auth.md](auth.md) |
| `bl auth logout` | Clear stored credentials; full logout also clears the model Base URL | [auth.md](auth.md) |
| `bl auth status` | Show current authentication state | [auth.md](auth.md) |
| `bl config agent` | Configure a coding agent to use DashScope API | [config.md](config.md) |
| `bl config list` | List config profiles and show the active profile | [config.md](config.md) |
| `bl config set` | Set a config value | [config.md](config.md) |
| `bl config show` | Display current configuration | [config.md](config.md) |
| `bl config ui` | Open a local web UI to manage config profiles | [config.md](config.md) |
| `bl config use` | Set the active config profile | [config.md](config.md) |
| `bl console call` | Call a Bailian console API via the CLI gateway | [console.md](console.md) |
| `bl dataset delete` | Delete a dataset file by ID | [dataset.md](dataset.md) |
| `bl dataset get` | Get details of a single dataset file | [dataset.md](dataset.md) |
| `bl dataset list` | List uploaded dataset files | [dataset.md](dataset.md) |
| `bl dataset upload` | Upload a dataset file (.jsonl or .zip) to Bailian | [dataset.md](dataset.md) |
| `bl dataset validate` | Locally validate a dataset file (.jsonl or .zip) without uploading | [dataset.md](dataset.md) |
| `bl deploy audio create` | Create an audio (TTS) model deployment | [deploy.md](deploy.md) |
| `bl deploy delete` | Delete a model deployment (must be STOPPED or FAILED) | [deploy.md](deploy.md) |
| `bl deploy get` | Get details of a single model deployment | [deploy.md](deploy.md) |
| `bl deploy image create` | Create an image generation model deployment | [deploy.md](deploy.md) |
| `bl deploy list` | List model deployments | [deploy.md](deploy.md) |
| `bl deploy models` | List models available for deployment | [deploy.md](deploy.md) |
| `bl deploy scale` | Scale a deployment's capacity | [deploy.md](deploy.md) |
| `bl deploy text create` | Create a text model deployment | [deploy.md](deploy.md) |
| `bl deploy update` | Update a deployment's rate limits (rpm_limit / tpm_limit) | [deploy.md](deploy.md) |
| `bl file upload` | Upload a local file to DashScope temporary storage (48h) | [file.md](file.md) |
| `bl finetune audio create` | Create an audio TTS model fine-tune job (sft-lora) | [finetune.md](finetune.md) |
| `bl finetune cancel` | Cancel a running fine-tune job | [finetune.md](finetune.md) |
| `bl finetune capability` | Query fine-tune training capability — by model (which training types it supports) or by training type (which models support it) | [finetune.md](finetune.md) |
| `bl finetune checkpoints` | List checkpoints produced by a fine-tune job | [finetune.md](finetune.md) |
| `bl finetune delete` | Delete a fine-tune job record | [finetune.md](finetune.md) |
| `bl finetune export` | Publish a checkpoint as a deployable model | [finetune.md](finetune.md) |
| `bl finetune get` | Get details of a single fine-tune job | [finetune.md](finetune.md) |
| `bl finetune image create` | Create an image generation model fine-tune job (sft-lora) | [finetune.md](finetune.md) |
| `bl finetune list` | List fine-tune jobs | [finetune.md](finetune.md) |
| `bl finetune logs` | Fetch training logs for a fine-tune job | [finetune.md](finetune.md) |
| `bl finetune text create` | Create a text model fine-tune job (sft \| sft-lora \| dpo \| dpo-lora \| cpt) | [finetune.md](finetune.md) |
| `bl finetune watch` | Probe a fine-tune job's status (default: single non-blocking fetch). Pass --follow to poll until terminal. | [finetune.md](finetune.md) |
| `bl image edit` | Edit an existing image with text instructions (Qwen-Image / Wan 2.7) | [image.md](image.md) |
| `bl image generate` | Generate images (Qwen-Image / wan2.x) | [image.md](image.md) |
| `bl knowledge chat` | Chat with a Bailian knowledge base (RAG Q&A with streaming) | [knowledge.md](knowledge.md) |
| `bl knowledge retrieve` | Retrieve from a Bailian knowledge base (deprecated, use `search` instead) | [knowledge.md](knowledge.md) |
| `bl knowledge search` | Search a Bailian knowledge base (RAG semantic retrieval) | [knowledge.md](knowledge.md) |
| `bl managed-agent apply` | Apply planned changes to create/update/delete agent resources | [managed-agent.md](managed-agent.md) |
| `bl managed-agent destroy` | Destroy all managed agent resources tracked in state | [managed-agent.md](managed-agent.md) |
| `bl managed-agent init` | Create a new agents.yaml template | [managed-agent.md](managed-agent.md) |
| `bl managed-agent plan` | Show what changes would be applied to agent infrastructure | [managed-agent.md](managed-agent.md) |
| `bl managed-agent session create` | Create a new session for an agent | [managed-agent.md](managed-agent.md) |
| `bl managed-agent session delete` | Delete a session | [managed-agent.md](managed-agent.md) |
| `bl managed-agent session events` | List event history for a session | [managed-agent.md](managed-agent.md) |
| `bl managed-agent session get` | Get details of a session | [managed-agent.md](managed-agent.md) |
| `bl managed-agent session list` | List sessions from the provider | [managed-agent.md](managed-agent.md) |
| `bl managed-agent session run` | Create a session, send a message, and stream the response | [managed-agent.md](managed-agent.md) |
| `bl managed-agent session send` | Send a message to an existing session and stream the response | [managed-agent.md](managed-agent.md) |
| `bl managed-agent state import` | Import an existing remote resource into agents state | [managed-agent.md](managed-agent.md) |
| `bl managed-agent state list` | List resources tracked in agents state | [managed-agent.md](managed-agent.md) |
| `bl managed-agent state rm` | Remove a resource from state without destroying it remotely | [managed-agent.md](managed-agent.md) |
| `bl managed-agent state show` | Show details of a resource in agents state | [managed-agent.md](managed-agent.md) |
| `bl managed-agent validate` | Validate an agents.yaml configuration (offline) | [managed-agent.md](managed-agent.md) |
| `bl mcp call` | Call a tool on an MCP server (tools/call) | [mcp.md](mcp.md) |
| `bl mcp list` | List MCP servers activated under your Bailian account | [mcp.md](mcp.md) |
| `bl mcp tools` | List tools exposed by an MCP server (tools/list) | [mcp.md](mcp.md) |
| `bl memory add` | Add memory from messages or custom content | [memory.md](memory.md) |
| `bl memory delete` | Delete a memory node | [memory.md](memory.md) |
| `bl memory list` | List memory nodes for a user | [memory.md](memory.md) |
| `bl memory profile create` | Create a user profile schema for memory profiling | [memory.md](memory.md) |
| `bl memory profile get` | Get user profile by schema ID and user ID | [memory.md](memory.md) |
| `bl memory search` | Search memory nodes by query or messages | [memory.md](memory.md) |
| `bl memory update` | Update a memory node content | [memory.md](memory.md) |
| `bl model list` | Browse model families or show detailed model info in the Bailian model marketplace | [model.md](model.md) |
| `bl omni` | Multimodal chat with text + audio output (Qwen-Omni) | [omni.md](omni.md) |
| `bl pipeline run` | Run a pipeline workflow definition | [pipeline.md](pipeline.md) |
| `bl pipeline validate` | Validate a pipeline definition without executing | [pipeline.md](pipeline.md) |
| `bl plugin install` | Install or upgrade an allowlisted Command Pack | [plugin.md](plugin.md) |
| `bl plugin link` | Link an allowlisted local Command Pack for development | [plugin.md](plugin.md) |
| `bl plugin list` | List installed Command Packs and their load status | [plugin.md](plugin.md) |
| `bl plugin remove` | Remove an installed Command Pack | [plugin.md](plugin.md) |
| `bl quota check` | Check current usage against rate limits | [quota.md](quota.md) |
| `bl quota history` | View quota change history | [quota.md](quota.md) |
| `bl quota list` | View model RPM/TPM rate limits | [quota.md](quota.md) |
| `bl quota request` | Request a temporary quota increase | [quota.md](quota.md) |
| `bl search web` | Search the web using DashScope MCP WebSearch service | [search.md](search.md) |
| `bl speech recognize` | Recognize speech from audio files (FunAudio-ASR) | [speech.md](speech.md) |
| `bl speech synthesize` | Synthesize speech from text (CosyVoice TTS) | [speech.md](speech.md) |
| `bl text chat` | Send a chat completion (OpenAI compatible, DashScope) | [text.md](text.md) |
| `bl token-plan add-member` | Add a member to a Token Plan organization | [token-plan.md](token-plan.md) |
| `bl token-plan assign-seats` | Batch assign Token Plan seats to members | [token-plan.md](token-plan.md) |
| `bl token-plan create-key` | Create a Token Plan API key for a seat | [token-plan.md](token-plan.md) |
| `bl token-plan list-seats` | List Token Plan subscription seat details | [token-plan.md](token-plan.md) |
| `bl update` | Update the CLI to the latest version | [update.md](update.md) |
| `bl usage free` | Query free-tier quota for models (all models if --model is omitted) | [usage.md](usage.md) |
| `bl usage freetier` | Enable or disable auto-stop for free-tier models. Enables by default; use --off to disable | [usage.md](usage.md) |
| `bl usage stats` | Query model usage statistics | [usage.md](usage.md) |
| `bl usage summary` | Show a unified usage summary: free-tier quota and recent usage overview | [usage.md](usage.md) |
| `bl video download` | Download a completed video by task ID | [video.md](video.md) |
| `bl video edit` | Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.) | [video.md](video.md) |
| `bl video generate` | Generate a video from text or image (happyhorse-1.1-t2v / happyhorse-1.1-i2v / wan2.6-t2v) | [video.md](video.md) |
| `bl video ref` | Reference-to-video generation (happyhorse-1.1-r2v / wan2.6-r2v): multi-subject, multi-shot with voice | [video.md](video.md) |
| `bl video task get` | Query async task status | [video.md](video.md) |
| `bl vision describe` | Describe an image or video using Qwen-VL | [vision.md](vision.md) |
| `bl workspace init` | Initialize Bailian workspace and activate postpaid services | [workspace.md](workspace.md) |
| `bl workspace list` | List all workspaces | [workspace.md](workspace.md) |
## By group
| Group | Commands | Reference |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| `advisor` | `recommend` | [advisor.md](advisor.md) |
| `agent` | `apply`, `destroy`, `init`, `plan`, `session create`, `session delete`, `session events`, `session get`, `session list`, `session run`, `session send`, `state import`, `state list`, `state rm`, `state show`, `validate` | [agent.md](agent.md) |
| `app` | `call`, `list` | [app.md](app.md) |
| `auth` | `generate-access-token`, `login`, `logout`, `status` | [auth.md](auth.md) |
| `config` | `agent`, `list`, `set`, `show`, `ui`, `use` | [config.md](config.md) |
| `console` | `call` | [console.md](console.md) |
| `dataset` | `delete`, `get`, `list`, `upload`, `validate` | [dataset.md](dataset.md) |
| `deploy` | `audio create`, `delete`, `get`, `image create`, `list`, `models`, `scale`, `text create`, `update` | [deploy.md](deploy.md) |
| `file` | `upload` | [file.md](file.md) |
| `finetune` | `audio create`, `cancel`, `capability`, `checkpoints`, `delete`, `export`, `get`, `image create`, `list`, `logs`, `text create`, `watch` | [finetune.md](finetune.md) |
| `image` | `edit`, `generate` | [image.md](image.md) |
| `knowledge` | `chat`, `retrieve`, `search` | [knowledge.md](knowledge.md) |
| `mcp` | `call`, `list`, `tools` | [mcp.md](mcp.md) |
| `memory` | `add`, `delete`, `list`, `profile create`, `profile get`, `search`, `update` | [memory.md](memory.md) |
| `model` | `list` | [model.md](model.md) |
| `omni` | `(root)` | [omni.md](omni.md) |
| `pipeline` | `run`, `validate` | [pipeline.md](pipeline.md) |
| `plugin` | `install`, `link`, `list`, `remove` | [plugin.md](plugin.md) |
| `quota` | `check`, `history`, `list`, `request` | [quota.md](quota.md) |
| `search` | `web` | [search.md](search.md) |
| `speech` | `recognize`, `synthesize` | [speech.md](speech.md) |
| `text` | `chat` | [text.md](text.md) |
| `token-plan` | `add-member`, `assign-seats`, `create-key`, `list-seats` | [token-plan.md](token-plan.md) |
| `update` | `(root)` | [update.md](update.md) |
| `usage` | `free`, `freetier`, `stats`, `summary` | [usage.md](usage.md) |
| `video` | `download`, `edit`, `generate`, `ref`, `task get` | [video.md](video.md) |
| `vision` | `describe` | [vision.md](vision.md) |
| `workspace` | `init`, `list` | [workspace.md](workspace.md) |
| Group | Commands | Reference |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `advisor` | `recommend` | [advisor.md](advisor.md) |
| `app` | `call`, `list` | [app.md](app.md) |
| `auth` | `generate-access-token`, `login`, `logout`, `status` | [auth.md](auth.md) |
| `config` | `agent`, `list`, `set`, `show`, `ui`, `use` | [config.md](config.md) |
| `console` | `call` | [console.md](console.md) |
| `dataset` | `delete`, `get`, `list`, `upload`, `validate` | [dataset.md](dataset.md) |
| `deploy` | `audio create`, `delete`, `get`, `image create`, `list`, `models`, `scale`, `text create`, `update` | [deploy.md](deploy.md) |
| `file` | `upload` | [file.md](file.md) |
| `finetune` | `audio create`, `cancel`, `capability`, `checkpoints`, `delete`, `export`, `get`, `image create`, `list`, `logs`, `text create`, `watch` | [finetune.md](finetune.md) |
| `image` | `edit`, `generate` | [image.md](image.md) |
| `knowledge` | `chat`, `retrieve`, `search` | [knowledge.md](knowledge.md) |
| `managed-agent` | `apply`, `destroy`, `init`, `plan`, `session create`, `session delete`, `session events`, `session get`, `session list`, `session run`, `session send`, `state import`, `state list`, `state rm`, `state show`, `validate` | [managed-agent.md](managed-agent.md) |
| `mcp` | `call`, `list`, `tools` | [mcp.md](mcp.md) |
| `memory` | `add`, `delete`, `list`, `profile create`, `profile get`, `search`, `update` | [memory.md](memory.md) |
| `model` | `list` | [model.md](model.md) |
| `omni` | `(root)` | [omni.md](omni.md) |
| `pipeline` | `run`, `validate` | [pipeline.md](pipeline.md) |
| `plugin` | `install`, `link`, `list`, `remove` | [plugin.md](plugin.md) |
| `quota` | `check`, `history`, `list`, `request` | [quota.md](quota.md) |
| `search` | `web` | [search.md](search.md) |
| `speech` | `recognize`, `synthesize` | [speech.md](speech.md) |
| `text` | `chat` | [text.md](text.md) |
| `token-plan` | `add-member`, `assign-seats`, `create-key`, `list-seats` | [token-plan.md](token-plan.md) |
| `update` | `(root)` | [update.md](update.md) |
| `usage` | `free`, `freetier`, `stats`, `summary` | [usage.md](usage.md) |
| `video` | `download`, `edit`, `generate`, `ref`, `task get` | [video.md](video.md) |
| `vision` | `describe` | [vision.md](vision.md) |
| `workspace` | `init`, `list` | [workspace.md](workspace.md) |
## Global flags
@@ -1,4 +1,4 @@
# `bl agent` commands
# `bl managed-agent` commands
> Auto-generated from `packages/cli/src/commands.ts`. Do not edit by hand.
> Regenerate: `pnpm --filter bailian-cli run generate:reference`.
@@ -7,34 +7,34 @@ Index: [index.md](index.md)
## Commands in this group
| Command | Description |
| ------------------------- | ------------------------------------------------------------- |
| `bl agent apply` | Apply planned changes to create/update/delete agent resources |
| `bl agent destroy` | Destroy all managed agent resources tracked in state |
| `bl agent init` | Create a new agents.yaml template |
| `bl agent plan` | Show what changes would be applied to agent infrastructure |
| `bl agent session create` | Create a new session for an agent |
| `bl agent session delete` | Delete a session |
| `bl agent session events` | List event history for a session |
| `bl agent session get` | Get details of a session |
| `bl agent session list` | List sessions from the provider |
| `bl agent session run` | Create a session, send a message, and stream the response |
| `bl agent session send` | Send a message to an existing session and stream the response |
| `bl agent state import` | Import an existing remote resource into agents state |
| `bl agent state list` | List resources tracked in agents state |
| `bl agent state rm` | Remove a resource from state without destroying it remotely |
| `bl agent state show` | Show details of a resource in agents state |
| `bl agent validate` | Validate an agents.yaml configuration (offline) |
| Command | Description |
| --------------------------------- | ------------------------------------------------------------- |
| `bl managed-agent apply` | Apply planned changes to create/update/delete agent resources |
| `bl managed-agent destroy` | Destroy all managed agent resources tracked in state |
| `bl managed-agent init` | Create a new agents.yaml template |
| `bl managed-agent plan` | Show what changes would be applied to agent infrastructure |
| `bl managed-agent session create` | Create a new session for an agent |
| `bl managed-agent session delete` | Delete a session |
| `bl managed-agent session events` | List event history for a session |
| `bl managed-agent session get` | Get details of a session |
| `bl managed-agent session list` | List sessions from the provider |
| `bl managed-agent session run` | Create a session, send a message, and stream the response |
| `bl managed-agent session send` | Send a message to an existing session and stream the response |
| `bl managed-agent state import` | Import an existing remote resource into agents state |
| `bl managed-agent state list` | List resources tracked in agents state |
| `bl managed-agent state rm` | Remove a resource from state without destroying it remotely |
| `bl managed-agent state show` | Show details of a resource in agents state |
| `bl managed-agent validate` | Validate an agents.yaml configuration (offline) |
## Command details
### `bl agent apply`
### `bl managed-agent apply`
| Field | Value |
| --------------- | -------------------------------------------------------------------------------- |
| **Name** | `agent apply` |
| **Description** | Apply planned changes to create/update/delete agent resources |
| **Usage** | `bl agent apply [--file <path>] [--provider <name>] [--yes] [--concurrency <n>]` |
| Field | Value |
| --------------- | ---------------------------------------------------------------------------------------- |
| **Name** | `managed-agent apply` |
| **Description** | Apply planned changes to create/update/delete agent resources |
| **Usage** | `bl managed-agent apply [--file <path>] [--provider <name>] [--yes] [--concurrency <n>]` |
#### Flags
@@ -54,20 +54,20 @@ Index: [index.md](index.md)
#### Examples
```bash
bl agent apply --yes
bl managed-agent apply --yes
```
```bash
bl agent apply --provider bailian --yes
bl managed-agent apply --provider bailian --yes
```
### `bl agent destroy`
### `bl managed-agent destroy`
| Field | Value |
| --------------- | ------------------------------------------------------ |
| **Name** | `agent destroy` |
| **Description** | Destroy all managed agent resources tracked in state |
| **Usage** | `bl agent destroy [--file <path>] [--yes] [--cascade]` |
| Field | Value |
| --------------- | -------------------------------------------------------------- |
| **Name** | `managed-agent destroy` |
| **Description** | Destroy all managed agent resources tracked in state |
| **Usage** | `bl managed-agent destroy [--file <path>] [--yes] [--cascade]` |
#### Flags
@@ -85,20 +85,20 @@ bl agent apply --provider bailian --yes
#### Examples
```bash
bl agent destroy --yes
bl managed-agent destroy --yes
```
```bash
bl agent destroy --yes --cascade
bl managed-agent destroy --yes --cascade
```
### `bl agent init`
### `bl managed-agent init`
| Field | Value |
| --------------- | ----------------------------------------------------------------------------------- |
| **Name** | `agent init` |
| **Description** | Create a new agents.yaml template |
| **Usage** | `bl agent init [--provider <name>] [--agent-name <name>] [--file <path>] [--force]` |
| Field | Value |
| --------------- | ------------------------------------------------------------------------------------------- |
| **Name** | `managed-agent init` |
| **Description** | Create a new agents.yaml template |
| **Usage** | `bl managed-agent init [--provider <name>] [--agent-name <name>] [--file <path>] [--force]` |
#### Flags
@@ -112,24 +112,24 @@ bl agent destroy --yes --cascade
#### Examples
```bash
bl agent init
bl managed-agent init
```
```bash
bl agent init --provider bailian --agent-name assistant
bl managed-agent init --provider bailian --agent-name assistant
```
```bash
bl agent init --provider all
bl managed-agent init --provider all
```
### `bl agent plan`
### `bl managed-agent plan`
| Field | Value |
| --------------- | ----------------------------------------------------------------------------------- |
| **Name** | `agent plan` |
| **Description** | Show what changes would be applied to agent infrastructure |
| **Usage** | `bl agent plan [--file <path>] [--provider <name>] [--no-refresh] [--refresh-only]` |
| Field | Value |
| --------------- | ------------------------------------------------------------------------------------------- |
| **Name** | `managed-agent plan` |
| **Description** | Show what changes would be applied to agent infrastructure |
| **Usage** | `bl managed-agent plan [--file <path>] [--provider <name>] [--no-refresh] [--refresh-only]` |
#### Flags
@@ -148,24 +148,24 @@ bl agent init --provider all
#### Examples
```bash
bl agent plan
bl managed-agent plan
```
```bash
bl agent plan --provider bailian
bl managed-agent plan --provider bailian
```
```bash
bl agent plan --no-refresh
bl managed-agent plan --no-refresh
```
### `bl agent session create`
### `bl managed-agent session create`
| Field | Value |
| --------------- | --------------------------------------------------------------------------------------------------- |
| **Name** | `agent session create` |
| **Description** | Create a new session for an agent |
| **Usage** | `bl agent session create [--agent <name>] [--environment <name>] [--title <title>] [--file <path>]` |
| Field | Value |
| --------------- | ----------------------------------------------------------------------------------------------------------- |
| **Name** | `managed-agent session create` |
| **Description** | Create a new session for an agent |
| **Usage** | `bl managed-agent session create [--agent <name>] [--environment <name>] [--title <title>] [--file <path>]` |
#### Flags
@@ -187,24 +187,24 @@ bl agent plan --no-refresh
#### Examples
```bash
bl agent session create
bl managed-agent session create
```
```bash
bl agent session create --agent assistant
bl managed-agent session create --agent assistant
```
```bash
bl agent session create --agent assistant --title 'debug run'
bl managed-agent session create --agent assistant --title 'debug run'
```
### `bl agent session delete`
### `bl managed-agent session delete`
| Field | Value |
| --------------- | ------------------------------------------------------------------------------- |
| **Name** | `agent session delete` |
| **Description** | Delete a session |
| **Usage** | `bl agent session delete --session-id <id> [--provider <name>] [--file <path>]` |
| Field | Value |
| --------------- | --------------------------------------------------------------------------------------- |
| **Name** | `managed-agent session delete` |
| **Description** | Delete a session |
| **Usage** | `bl managed-agent session delete --session-id <id> [--provider <name>] [--file <path>]` |
#### Flags
@@ -222,16 +222,16 @@ bl agent session create --agent assistant --title 'debug run'
#### Examples
```bash
bl agent session delete --session-id sess_abc123
bl managed-agent session delete --session-id sess_abc123
```
### `bl agent session events`
### `bl managed-agent session events`
| Field | Value |
| --------------- | --------------------------------------------------------------------------------- |
| **Name** | `agent session events` |
| **Description** | List event history for a session |
| **Usage** | `bl agent session events --session-id <id> [--limit <n>] [--all] [--file <path>]` |
| Field | Value |
| --------------- | ----------------------------------------------------------------------------------------- |
| **Name** | `managed-agent session events` |
| **Description** | List event history for a session |
| **Usage** | `bl managed-agent session events --session-id <id> [--limit <n>] [--all] [--file <path>]` |
#### Flags
@@ -251,20 +251,20 @@ bl agent session delete --session-id sess_abc123
#### Examples
```bash
bl agent session events --session-id sess_abc123
bl managed-agent session events --session-id sess_abc123
```
```bash
bl agent session events --session-id sess_abc123 --all
bl managed-agent session events --session-id sess_abc123 --all
```
### `bl agent session get`
### `bl managed-agent session get`
| Field | Value |
| --------------- | ---------------------------------------------------------------------------- |
| **Name** | `agent session get` |
| **Description** | Get details of a session |
| **Usage** | `bl agent session get --session-id <id> [--provider <name>] [--file <path>]` |
| Field | Value |
| --------------- | ------------------------------------------------------------------------------------ |
| **Name** | `managed-agent session get` |
| **Description** | Get details of a session |
| **Usage** | `bl managed-agent session get --session-id <id> [--provider <name>] [--file <path>]` |
#### Flags
@@ -282,16 +282,16 @@ bl agent session events --session-id sess_abc123 --all
#### Examples
```bash
bl agent session get --session-id sess_abc123
bl managed-agent session get --session-id sess_abc123
```
### `bl agent session list`
### `bl managed-agent session list`
| Field | Value |
| --------------- | ------------------------------------------------------------------------------------ |
| **Name** | `agent session list` |
| **Description** | List sessions from the provider |
| **Usage** | `bl agent session list [--agent <name>] [--all] [--provider <name>] [--file <path>]` |
| Field | Value |
| --------------- | -------------------------------------------------------------------------------------------- |
| **Name** | `managed-agent session list` |
| **Description** | List sessions from the provider |
| **Usage** | `bl managed-agent session list [--agent <name>] [--all] [--provider <name>] [--file <path>]` |
#### Flags
@@ -310,24 +310,24 @@ bl agent session get --session-id sess_abc123
#### Examples
```bash
bl agent session list
bl managed-agent session list
```
```bash
bl agent session list --agent assistant
bl managed-agent session list --agent assistant
```
```bash
bl agent session list --all
bl managed-agent session list --all
```
### `bl agent session run`
### `bl managed-agent session run`
| Field | Value |
| --------------- | ------------------------------------------------------------------------------------- |
| **Name** | `agent session run` |
| **Description** | Create a session, send a message, and stream the response |
| **Usage** | `bl agent session run --prompt <text> [--agent <name>] [--no-stream] [--file <path>]` |
| Field | Value |
| --------------- | --------------------------------------------------------------------------------------------- |
| **Name** | `managed-agent session run` |
| **Description** | Create a session, send a message, and stream the response |
| **Usage** | `bl managed-agent session run --prompt <text> [--agent <name>] [--no-stream] [--file <path>]` |
#### Flags
@@ -351,20 +351,20 @@ bl agent session list --all
#### Examples
```bash
bl agent session run --prompt "hello"
bl managed-agent session run --prompt "hello"
```
```bash
bl agent session run --agent assistant --prompt "summarize this repo"
bl managed-agent session run --agent assistant --prompt "summarize this repo"
```
### `bl agent session send`
### `bl managed-agent session send`
| Field | Value |
| --------------- | ---------------------------------------------------------------------------------------- |
| **Name** | `agent session send` |
| **Description** | Send a message to an existing session and stream the response |
| **Usage** | `bl agent session send --session-id <id> --message <text> [--no-stream] [--file <path>]` |
| Field | Value |
| --------------- | ------------------------------------------------------------------------------------------------ |
| **Name** | `managed-agent session send` |
| **Description** | Send a message to an existing session and stream the response |
| **Usage** | `bl managed-agent session send --session-id <id> --message <text> [--no-stream] [--file <path>]` |
#### Flags
@@ -384,16 +384,16 @@ bl agent session run --agent assistant --prompt "summarize this repo"
#### Examples
```bash
bl agent session send --session-id sess_abc123 --message "continue"
bl managed-agent session send --session-id sess_abc123 --message "continue"
```
### `bl agent state import`
### `bl managed-agent state import`
| Field | Value |
| --------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Name** | `agent state import` |
| **Description** | Import an existing remote resource into agents state |
| **Usage** | `bl agent state import --address <provider.type.name> --remote-id <id> [--resource-version <n>] [--file <path>]` |
| Field | Value |
| --------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Name** | `managed-agent state import` |
| **Description** | Import an existing remote resource into agents state |
| **Usage** | `bl managed-agent state import --address <provider.type.name> --remote-id <id> [--resource-version <n>] [--file <path>]` |
#### Flags
@@ -412,16 +412,16 @@ bl agent session send --session-id sess_abc123 --message "continue"
#### Examples
```bash
bl agent state import --address bailian.agent.assistant --remote-id agent-abc123
bl managed-agent state import --address bailian.agent.assistant --remote-id agent-abc123
```
### `bl agent state list`
### `bl managed-agent state list`
| Field | Value |
| --------------- | -------------------------------------- |
| **Name** | `agent state list` |
| **Description** | List resources tracked in agents state |
| **Usage** | `bl agent state list [--file <path>]` |
| Field | Value |
| --------------- | --------------------------------------------- |
| **Name** | `managed-agent state list` |
| **Description** | List resources tracked in agents state |
| **Usage** | `bl managed-agent state list [--file <path>]` |
#### Flags
@@ -437,20 +437,20 @@ bl agent state import --address bailian.agent.assistant --remote-id agent-abc123
#### Examples
```bash
bl agent state list
bl managed-agent state list
```
```bash
bl agent state list --file agents.yaml
bl managed-agent state list --file agents.yaml
```
### `bl agent state rm`
### `bl managed-agent state rm`
| Field | Value |
| --------------- | ------------------------------------------------------------------ |
| **Name** | `agent state rm` |
| **Description** | Remove a resource from state without destroying it remotely |
| **Usage** | `bl agent state rm --address <provider.type.name> [--file <path>]` |
| Field | Value |
| --------------- | -------------------------------------------------------------------------- |
| **Name** | `managed-agent state rm` |
| **Description** | Remove a resource from state without destroying it remotely |
| **Usage** | `bl managed-agent state rm --address <provider.type.name> [--file <path>]` |
#### Flags
@@ -467,16 +467,16 @@ bl agent state list --file agents.yaml
#### Examples
```bash
bl agent state rm --address bailian.agent.assistant
bl managed-agent state rm --address bailian.agent.assistant
```
### `bl agent state show`
### `bl managed-agent state show`
| Field | Value |
| --------------- | -------------------------------------------------------------------- |
| **Name** | `agent state show` |
| **Description** | Show details of a resource in agents state |
| **Usage** | `bl agent state show --address <provider.type.name> [--file <path>]` |
| Field | Value |
| --------------- | ---------------------------------------------------------------------------- |
| **Name** | `managed-agent state show` |
| **Description** | Show details of a resource in agents state |
| **Usage** | `bl managed-agent state show --address <provider.type.name> [--file <path>]` |
#### Flags
@@ -493,16 +493,16 @@ bl agent state rm --address bailian.agent.assistant
#### Examples
```bash
bl agent state show --address bailian.agent.assistant
bl managed-agent state show --address bailian.agent.assistant
```
### `bl agent validate`
### `bl managed-agent validate`
| Field | Value |
| --------------- | ----------------------------------------------- |
| **Name** | `agent validate` |
| **Name** | `managed-agent validate` |
| **Description** | Validate an agents.yaml configuration (offline) |
| **Usage** | `bl agent validate [--file <path>]` |
| **Usage** | `bl managed-agent validate [--file <path>]` |
#### Flags
@@ -518,9 +518,9 @@ bl agent state show --address bailian.agent.assistant
#### Examples
```bash
bl agent validate
bl managed-agent validate
```
```bash
bl agent validate --file agents.yaml
bl managed-agent validate --file agents.yaml
```