ae-system
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseae-system
ae-system
Use the domain for Agent system administration:
systembash
ae-cli system +<command> [options]使用域进行Agent系统管理:
systembash
ae-cli system +<command> [options]Mandatory Rules
强制规则
- These commands are only for users whose Agent role is or
root.agent_admin - The te-agent endpoint is the final authorization boundary. A member receives a permission error (HTTP 403). Do not retry login or attempt a different endpoint after a 403.
/api/admin/** - Run before using this domain. System administration requires a user access-token session; sandbox identity headers are not an authorization substitute.
ae-cli auth login --host <host> - is the exception that must also run inside a Linux te-agent sandbox because it packages the installed Linux files. It still requires the logged-in user to be
+npm-installorroot.agent_admin - Discover real IDs with a list command before any update or delete. Never guess a user, sandbox, model, quota rule, or channel ID.
- Before every write, run , show the target and effect, and obtain explicit user confirmation. The CLI itself prompts only for
--dry-run;high-risk-writecan bypass that prompt and is not a security boundary.--yes - Use to inspect method, path, query, and redacted body without executing.
--dry-run - JSON inputs accept inline JSON, , or
@filefor stdin. Prefer-for channel credentials and other sensitive values.@file - Successful output is JSON by default. Use only when a human-readable table is more useful.
--format table - After each command, check stderr and . If present, show the version warning and its update commands before the business result.
_notice.host_compat - Do not treat an absent ae-cli command as proof that an HTTP endpoint is unreachable. An Agent with Bash/network access can construct requests directly; server authentication, role checks, company isolation, and resource ownership are the actual controls.
- Do not call or
DELETE /api/admin/members?openId=...through ad-hoc HTTP. They are intentionally excluded from this Skill because other systems own those integration contracts./api/internal/sandboxes/**
- 这些命令仅适用于Agent角色为或
root的用户。agent_admin - te-agent的端点是最终授权边界。成员会收到权限错误(HTTP 403)。收到403错误后,请勿重试登录或尝试其他端点。
/api/admin/** - 使用此域前,请先运行。系统管理需要用户访问令牌会话;沙箱身份头不能替代授权。
ae-cli auth login --host <host> - 是例外情况,必须在Linux te-agent沙箱内运行,因为它需要打包已安装的Linux文件。该命令仍要求登录用户为
+npm-install或root。agent_admin - 在执行任何更新或删除操作前,先通过列表命令获取真实ID。切勿猜测用户、沙箱、模型、配额规则或渠道ID。
- 每次执行写入操作前,先运行,展示目标对象和操作效果,并获取用户的明确确认。CLI仅会针对
--dry-run提示确认;high-risk-write可绕过该提示,但不构成安全边界。--yes - 使用可查看请求方法、路径、查询参数和已脱敏的请求体,而不会实际执行操作。
--dry-run - JSON输入支持内联JSON、或
@file(标准输入)。对于渠道凭证等敏感值,优先使用-。@file - 默认情况下,成功输出为JSON格式。仅当人类可读表格更有用时,才使用。
--format table - 每个命令执行后,检查stderr和。如果存在相关内容,先显示版本警告及其更新命令,再展示业务结果。
_notice.host_compat - 不要将ae-cli缺少某一命令视为对应HTTP端点不可访问的证明。拥有Bash/网络访问权限的Agent可直接构造请求;服务器认证、角色检查、企业隔离和资源归属才是实际的控制手段。
- 请勿通过临时HTTP请求调用或
DELETE /api/admin/members?openId=...。这些接口被有意排除在本Skill之外,因为其他系统拥有这些集成契约的所有权。/api/internal/sandboxes/**
Command Groups
命令组
Members
成员管理
| Command | Risk | Purpose |
|---|---|---|
| read | List TE company users that can be added. |
| read | List Agent members in the current company. |
| write | Add one or more TE users, optionally binding a quota rule or creating sandboxes. |
| write | Enable or disable a member. |
| write | Change a non-root member between |
| high-risk-write | Remove a non-root member. |
| read | Get one member's token usage and recent conversation count. |
Examples:
bash
ae-cli system +list-members --status enabled --page 1 --page-size 20
ae-cli system +add-members \
--members '[{"openId":"ou_x","loginName":"alice","displayName":"Alice"}]' \
--create-sandbox true
ae-cli system +set-member-role --user-id <user-id> --role agent_admin+list-members- : login/display name search.
--q - :
--status.all | enabled | disabled - ,
--page: page size is 1-100.--page-size - : return all matches.
--all - ,
--sort-field periodUsedAmount: central usage sort.--sort-dir asc|desc
+add-members --membersjson
[
{
"openId": "required",
"loginName": "optional",
"displayName": "optional"
}
]Optional flags are and .
--rule-id--create-sandbox true|false| 命令 | 风险等级 | 用途 |
|---|---|---|
| 只读 | 列出可添加的TE企业用户。 |
| 只读 | 列出当前企业的Agent成员。 |
| 写入 | 添加一名或多名TE用户,可选择绑定配额规则或创建沙箱。 |
| 写入 | 启用或禁用成员。 |
| 写入 | 更改非root成员的角色,在 |
| 高风险写入 | 删除非root成员。 |
| 只读 | 获取单个成员的令牌使用情况和近期对话次数。 |
示例:
bash
ae-cli system +list-members --status enabled --page 1 --page-size 20
ae-cli system +add-members \
--members '[{"openId":"ou_x","loginName":"alice","displayName":"Alice"}]' \
--create-sandbox true
ae-cli system +set-member-role --user-id <user-id> --role agent_admin+list-members- : 登录名/显示名搜索。
--q - :
--status。all | enabled | disabled - ,
--page: 分页大小为1-100。--page-size - : 返回所有匹配结果。
--all - ,
--sort-field periodUsedAmount: 按中心使用量排序。--sort-dir asc|desc
+add-members --membersjson
[
{
"openId": "必填",
"loginName": "可选",
"displayName": "可选"
}
]可选参数为和。
--rule-id--create-sandbox true|falseSandboxes
沙箱管理
| Command | Risk | Purpose |
|---|---|---|
| read | List company sandboxes. |
| read | Read feature status and create/active seat limits. |
| write | Create personal sandboxes for 1-100 users. |
| write | Update a sandbox description. |
| write | Enable or disable a sandbox. |
| write | Start a sandbox container. |
| write | Stop a sandbox container. |
| read | List users bound to a sandbox. |
| write | Bind a member to a sandbox. |
| high-risk-write | Remove a sandbox user binding. |
| high-risk-write | Delete a sandbox and its bindings. |
Examples:
bash
ae-cli system +batch-create-sandboxes \
--user-ids '["<user-id-1>","<user-id-2>"]' \
--description "Data team"
ae-cli system +set-sandbox-enabled --id <sandbox-id> --enabled true
ae-cli system +bind-sandbox-user --id <sandbox-id> --user-id <user-id>Use Agent database user IDs from , not TE openIds, for sandbox commands.
+list-members| 命令 | 风险等级 | 用途 |
|---|---|---|
| 只读 | 列出企业沙箱。 |
| 只读 | 读取功能状态和创建/激活席位限制。 |
| 写入 | 为1-100名用户创建个人沙箱。 |
| 写入 | 更新沙箱描述。 |
| 写入 | 启用或禁用沙箱。 |
| 写入 | 启动沙箱容器。 |
| 写入 | 停止沙箱容器。 |
| 只读 | 列出绑定到沙箱的用户。 |
| 写入 | 将成员绑定到沙箱。 |
| 高风险写入 | 解除沙箱用户绑定。 |
| 高风险写入 | 删除沙箱及其绑定关系。 |
示例:
bash
ae-cli system +batch-create-sandboxes \
--user-ids '["<user-id-1>","<user-id-2>"]' \
--description "Data team"
ae-cli system +set-sandbox-enabled --id <sandbox-id> --enabled true
ae-cli system +bind-sandbox-user --id <sandbox-id> --user-id <user-id>沙箱命令需使用返回的Agent数据库用户ID,而非TE openId。
+list-membersShared Sandbox Tools
共享沙箱工具
| Command | Risk | Purpose |
|---|---|---|
| write | Validate, ZIP, and upload an existing tool directory. |
| write | Install one exact npm CLI version in a temporary sandbox directory, generate |
| read | List preset and custom tools for the current company. |
| write | Synchronize preset tools from the server manifest. |
| read | Read the sandboxes currently receiving one tool. |
| write | Enable or disable one registered tool. |
| high-risk-write | Delete a fully reclaimed tool registration. |
| write | Activate selected commands on selected or all running sandboxes. |
| write | Remove managed command shims from selected or all running sandboxes. |
| write | Refresh observed tool state on target sandboxes. |
| read | List activation/deactivation history. |
Uploaded tools are registered for the current company with . Upload does not activate the tool in any running sandbox. Review and enable/activate it through sandbox tool management after upload.
enabled=falseFor activate/deactivate/status operations:
bash
ae-cli system +activate-sandbox-tools \
--target-mode selected \
--sandbox-ids '["<sandbox-id>"]' \
--tool-ids '["<tool-id>"]'- requires 1-50
--target-mode selected;--sandbox-idsforbids them.all-running - contains 1-20 real IDs from
--tool-ids.+list-sandbox-tools - optionally limits an operation to named commands.
--command-names-by-tool-id - carries the version/package/command snapshot returned by the server for optimistic concurrency checks.
--expected-tool-snapshots-by-id - JSON maps accept inline JSON, , or stdin. Use dry-run and user confirmation before distribution changes.
@file
| 命令 | 风险等级 | 用途 |
|---|---|---|
| 写入 | 验证、压缩并上传现有工具目录。 |
| 写入 | 在临时沙箱目录中安装指定版本的npm CLI,生成 |
| 只读 | 列出当前企业的预设工具和自定义工具。 |
| 写入 | 从服务器清单同步预设工具。 |
| 只读 | 查看当前使用某一工具的沙箱列表。 |
| 写入 | 启用或禁用已注册的工具。 |
| 高风险写入 | 删除已完全回收的工具注册信息。 |
| 写入 | 在指定或所有运行中的沙箱上激活选定命令。 |
| 写入 | 从指定或所有运行中的沙箱移除托管命令垫片。 |
| 写入 | 刷新目标沙箱上工具的观测状态。 |
| 只读 | 列出激活/禁用操作历史。 |
上传的工具会以的状态注册到当前企业。上传操作不会在任何运行中的沙箱激活工具。上传后需通过沙箱工具管理进行审核并启用/激活。
enabled=false激活/禁用/状态操作示例:
bash
ae-cli system +activate-sandbox-tools \
--target-mode selected \
--sandbox-ids '["<sandbox-id>"]' \
--tool-ids '["<tool-id>"]'- 需要1-50个
--target-mode selected;--sandbox-ids模式下不允许使用该参数。all-running - 包含1-20个来自
--tool-ids的真实ID。+list-sandbox-tools - 可选择性地将操作限制为指定命令。
--command-names-by-tool-id - 携带服务器返回的版本/包/命令快照,用于乐观并发检查。
--expected-tool-snapshots-by-id - JSON映射支持内联JSON、或标准输入。在进行分发变更前,需使用dry-run并获取用户确认。
@file
Preferred npm Flow
推荐的npm流程
Run this inside the target Linux te-agent sandbox:
bash
ae-cli auth login --host <host>
ae-cli system +npm-install --package eslint@9.32.0For a scoped package or a custom shared-tool identifier:
bash
ae-cli system +npm-install \
--package @scope/example-cli@1.2.3 \
--name example-cliRequirements and behavior:
- must be an exact registry package version. Tags, ranges, URLs, Git sources, npm aliases, and local paths are rejected.
--package - The installed package must expose at least one
package.jsonentry. Each bin becomes one tool command.bin - The default tool name is the unscoped package name. Use only when a different valid lowercase tool identifier is required.
--name - npm lifecycle scripts are disabled with by default. Use
--ignore-scriptsonly after reviewing and trusting the package and all transitive dependencies.--allow-scripts true - The command calls the admin upload-policy endpoint before starting npm. A disabled feature, expired session, or non-admin role fails before installation.
- Installation uses a temporary prefix with development dependencies omitted. Temporary installation and ZIP files are removed whether upload succeeds or fails.
- npm-created symlinks are converted to regular executable wrappers in the ZIP. All other symlinks, special files, and links resolving outside the package root are rejected.
node_modules/.bin - Pure JavaScript Node.js CLIs are the supported baseline. Packages that require native addons, downloaded platform binaries, build tools, system libraries, or lifecycle setup may fail when scripts are disabled or when activated in a different runtime image.
- If lifecycle scripts are necessary, install and upload from the same Linux sandbox image family that will execute the tool. Upload never makes an incompatible native artifact portable.
在目标Linux te-agent沙箱内运行以下命令:
bash
ae-cli auth login --host <host>
ae-cli system +npm-install --package eslint@9.32.0对于作用域包或自定义共享工具标识符:
bash
ae-cli system +npm-install \
--package @scope/example-cli@1.2.3 \
--name example-cli要求与行为:
- 必须是精确的注册表包版本。标签、版本范围、URL、Git源、npm别名和本地路径均不被接受。
--package - 安装的包必须至少暴露一个中的
package.json条目。每个bin会成为一个工具命令。bin - 默认工具名称为无作用域的包名。仅当需要不同的有效小写工具标识符时,才使用。
--name - 默认使用禁用npm生命周期脚本。仅在审核并信任包及其所有依赖后,才使用
--ignore-scripts。--allow-scripts true - 该命令在启动npm前会调用管理员上传策略端点。功能禁用、会话过期或非管理员角色会导致安装前失败。
- 安装使用临时前缀,且省略开发依赖。无论上传成功或失败,临时安装文件和ZIP文件都会被删除。
- npm创建的符号链接会在ZIP中转换为常规可执行包装器。所有其他符号链接、特殊文件以及指向包根目录外的链接都会被拒绝。
node_modules/.bin - 纯JavaScript Node.js CLI是支持的基准。需要原生插件、下载平台二进制文件、构建工具、系统库或生命周期设置的包,在禁用脚本或在不同运行时镜像中激活时可能会失败。
- 如果必须使用生命周期脚本,请在将执行该工具的同一Linux沙箱镜像家族中进行安装和上传。上传操作无法使不兼容的原生工件具备可移植性。
Existing Directory Flow
现有目录流程
Use the low-level command when the tool is already installed or assembled:
bash
ae-cli system +upload-sandbox-tool --path /absolute/path/to/tool-rootThe directory root must contain exactly one . An external manifest is allowed only when the root has no :
tool.jsontool.jsonbash
ae-cli system +upload-sandbox-tool \
--path /absolute/path/to/tool-root \
--manifest /absolute/path/to/tool.jsonMinimal manifest:
json
{
"schemaVersion": 1,
"name": "example-cli",
"displayName": "Example CLI",
"description": "Optional description",
"version": "1.2.3",
"commands": [
{
"name": "example",
"entry": "node_modules/example-cli/bin/example.js",
"runtime": "node"
}
]
}Upload contract:
- and command names must start with a lowercase letter and contain only lowercase letters, numbers,
name,., or_, with a maximum length of 64.- - Command names must not replace reserved runtime commands such as ,
node,npm,npx,bash,python,git, orcurl.sudo - Every command must be a regular file under the upload root. Use
entryfor JavaScript entry files andruntime: "node"only for an executable compatible with the sandbox Linux image.runtime: "native" - Paths must be relative and normalized. Absolute paths, , backslashes, control characters, empty segments, and a
..path segment are rejected.current - ZIP limits are 50 MB compressed, 500 MB unpacked, 50 MB per file, and 10,000 files. The server publishes only after independently validating the same boundaries.
- Do not pre-create or write from a sandbox. Sandboxes are read-only for that directory; the authenticated te-agent upload endpoint owns the final write and registration.
/data/app/te_agent_ta/share/tools - A tool name can be registered only once per company in this first static-version flow. Choose the final name and version before upload.
当工具已安装或组装完成时,使用低级命令:
bash
ae-cli system +upload-sandbox-tool --path /absolute/path/to/tool-root目录根目录必须包含且仅包含一个。仅当根目录没有时,才允许使用外部清单:
tool.jsontool.jsonbash
ae-cli system +upload-sandbox-tool \
--path /absolute/path/to/tool-root \
--manifest /absolute/path/to/tool.json最小化清单:
json
{
"schemaVersion": 1,
"name": "example-cli",
"displayName": "Example CLI",
"description": "可选描述",
"version": "1.2.3",
"commands": [
{
"name": "example",
"entry": "node_modules/example-cli/bin/example.js",
"runtime": "node"
}
]
}上传契约:
- 和命令名称必须以小写字母开头,且仅包含小写字母、数字、
name、.或_,最大长度为64。- - 命令名称不得替换保留的运行时命令,如、
node、npm、npx、bash、python、git或curl。sudo - 每个命令的必须是上传根目录下的常规文件。JavaScript入口文件使用
entry,仅当可执行文件与沙箱Linux镜像兼容时才使用runtime: "node"。runtime: "native" - 路径必须是相对路径且已规范化。绝对路径、、反斜杠、控制字符、空段和
..路径段都会被拒绝。current - ZIP限制:压缩后50MB,解压后500MB,单文件50MB,最多10000个文件。服务器会独立验证这些边界后才发布。
- 请勿从沙箱中预创建或写入。沙箱对该目录具有只读权限;已认证的te-agent上传端点拥有最终写入和注册权限。
/data/app/te_agent_ta/share/tools - 在这种静态版本流程中,每个企业只能注册一次工具名称。上传前请确定最终名称和版本。
Models
模型管理
| Command | Risk | Purpose |
|---|---|---|
| read | List system models and company visibility. |
| write | Toggle a system model for the current company. |
| read | Read the default visibility policy for newly synchronized system models. |
| write | Update the new-system-model visibility policy. |
| read | Read one managed system model's stored pricing snapshot. |
| read | List company models, including disabled models. |
| write | Toggle a company model for all company users. |
| read | Read the |
| write | Set one default model slot. |
| high-risk-write | Clear one default model slot. |
Examples:
bash
ae-cli system +list-system-models
ae-cli system +set-system-model-enabled --model-id <model-id> --enabled false
ae-cli system +set-default-model --model-id <model-id> --biz-type AE_AGENT--biz-typeAE_AGENT | AI_QAAE_AGENTid| 命令 | 风险等级 | 用途 |
|---|---|---|
| 只读 | 列出系统模型和企业可见性设置。 |
| 写入 | 切换当前企业的系统模型启用状态。 |
| 只读 | 读取新同步系统模型的默认可见性策略。 |
| 写入 | 更新新系统模型的可见性策略。 |
| 只读 | 读取某一托管系统模型的存储定价快照。 |
| 只读 | 列出企业模型,包括已禁用的模型。 |
| 写入 | 切换企业模型对所有企业用户的启用状态。 |
| 只读 | 读取 |
| 写入 | 设置一个默认模型插槽。 |
| 高风险写入 | 清除一个默认模型插槽。 |
示例:
bash
ae-cli system +list-system-models
ae-cli system +set-system-model-enabled --model-id <model-id> --enabled false
ae-cli system +set-default-model --model-id <model-id> --biz-type AE_AGENT--biz-typeAE_AGENT | AI_QAAE_AGENTidUsage
使用统计
| Command | Risk | Purpose |
|---|---|---|
| read | Get token/cost summary for a relative or absolute range. |
| read | Get paginated usage grouped by user, model, date, or application type. |
| read | Get Agent tool-call count for a range, optionally refreshing the cache. |
| read | Drill one parent group into the remaining dimensions. |
| read | Stream filtered one-dimension usage groups to CSV. |
| read | Stream full or drill-down multi-dimension details to CSV. |
Examples:
bash
ae-cli system +get-usage-summary --days 30
ae-cli system +get-usage-summary --days 30 --refresh true
ae-cli system +get-usage-details \
--start-date 2026-07-01 \
--end-date 2026-07-24 \
--group-by user \
--page 1 \
--page-size 20
ae-cli system +get-usage-combinations \
--start-date 2026-07-01 \
--end-date 2026-07-24 \
--parent-dimension user \
--open-id <open-id>
ae-cli system +export-usage \
--start-date 2026-07-01 \
--end-date 2026-07-24 \
--group-by user \
--output ./system-usage.csvSummary range:
- Use , or provide both
--days 1..365and--start-date.--end-date - Dates use .
YYYY-MM-DD - Do not combine with an absolute date pair.
--days - is available on
--refresh trueand+get-usage-summaryand bypasses the overview cache.+get-agent-tool-calls
Details flags:
- and
--start-dateare required.--end-date - :
--group-by.user | model | date | app_type - Optional filters: ,
--search,--open-id,--model-id,--model-scope.--app-type - requires
--model-scope.--model-id - :
--sort-by.totalTokens | cost | share | requestCount - :
--sort-dir.asc | desc
Combination drill-down requires exactly one parent selector:
- →
useronly.--open-id - →
modeland--model-idonly.--model-scope - →
app_typeonly.--app-type - →
dateonly, inside the selected range.--date
CSV exports require an explicit . The target is created exclusively: an existing file is never overwritten, and an HTTP or stream failure removes the incomplete file. The JSON result reports the absolute local path, bytes written, server filename, and content type.
--output| 命令 | 风险等级 | 用途 |
|---|---|---|
| 只读 | 获取相对或绝对时间范围内的令牌/成本汇总。 |
| 只读 | 获取按用户、模型、日期或应用类型分组的分页使用数据。 |
| 只读 | 获取指定时间范围内的Agent工具调用次数,可选择刷新缓存。 |
| 只读 | 将父组深入到剩余维度进行分析。 |
| 只读 | 将过滤后的一维使用分组数据流式导出为CSV。 |
| 只读 | 将完整或深入分析的多维详细数据流式导出为CSV。 |
示例:
bash
ae-cli system +get-usage-summary --days 30
ae-cli system +get-usage-summary --days 30 --refresh true
ae-cli system +get-usage-details \
--start-date 2026-07-01 \
--end-date 2026-07-24 \
--group-by user \
--page 1 \
--page-size 20
ae-cli system +get-usage-combinations \
--start-date 2026-07-01 \
--end-date 2026-07-24 \
--parent-dimension user \
--open-id <open-id>
ae-cli system +export-usage \
--start-date 2026-07-01 \
--end-date 2026-07-24 \
--group-by user \
--output ./system-usage.csv时间范围规则:
- 使用,或同时提供
--days 1..365和--start-date。--end-date - 日期格式为。
YYYY-MM-DD - 请勿将与绝对日期对组合使用。
--days - 适用于
--refresh true和+get-usage-summary,可绕过概览缓存。+get-agent-tool-calls
详细数据参数:
- 和
--start-date为必填项。--end-date - :
--group-by。user | model | date | app_type - 可选过滤器:,
--search,--open-id,--model-id,--model-scope。--app-type - 需要配合
--model-scope使用。--model-id - :
--sort-by。totalTokens | cost | share | requestCount - :
--sort-dir。asc | desc
组合深入分析需要恰好一个父选择器:
- → 仅使用
user。--open-id - → 仅使用
model和--model-id。--model-scope - → 仅使用
app_type。--app-type - → 仅使用
date,且日期需在选定范围内。--date
CSV导出需要明确指定。目标文件会被独占创建:不会覆盖现有文件,若HTTP或流传输失败,会删除不完整的文件。JSON结果会报告绝对本地路径、写入字节数、服务器文件名和内容类型。
--outputCost Control
成本控制
| Command | Risk | Purpose |
|---|---|---|
| read | Get company cost, quota, and usage summary. |
| read | Get the current model account balance and currency. |
| read | List members over cost or token quota limits. |
| read | Get balance alert config and current status. |
| write | Enable, update, or disable the balance alert. |
| read | List cost/token quota rules. |
| write | Create a company or user quota rule. |
| write | Update a quota rule. |
| high-risk-write | Delete a quota rule. |
| write | Bind a quota rule to a TE user openId. |
Examples:
bash
ae-cli system +set-balance-alert --enabled true --threshold 100
ae-cli system +create-quota-rule --rule @quota-rule.json
ae-cli system +bind-quota-rule-user --id <rule-id> --open-id <open-id>Quota rule JSON:
json
{
"name": "Daily user quota",
"subjectType": "USER",
"periodType": "DAY",
"quotaType": "TOKEN",
"totalTokens": "10",
"allowedModels": ["<model-id>"],
"modelLimits": [
{
"modelId": "<model-id>",
"limitTokens": "5"
}
],
"openIds": ["<open-id>"]
}Rules:
- :
subjectType.USER | COMPANY - :
periodType.DAY | WEEK | MONTH - :
quotaType.COST | TOKEN - COST uses ; TOKEN uses
budgetAmount. Token values are expressed in millions.totalTokens - and
allowedModelsare optional according to the server rule type.modelLimits - Update accepts a partial rule object.
| 命令 | 风险等级 | 用途 |
|---|---|---|
| 只读 | 获取企业成本、配额和使用情况汇总。 |
| 只读 | 获取当前模型账户余额和货币类型。 |
| 只读 | 列出超出成本或令牌配额限制的成员。 |
| 只读 | 获取余额提醒配置和当前状态。 |
| 写入 | 启用、更新或禁用余额提醒。 |
| 只读 | 列出成本/令牌配额规则。 |
| 写入 | 创建企业或用户配额规则。 |
| 写入 | 更新配额规则。 |
| 高风险写入 | 删除配额规则。 |
| 写入 | 将配额规则绑定到TE用户openId。 |
示例:
bash
ae-cli system +set-balance-alert --enabled true --threshold 100
ae-cli system +create-quota-rule --rule @quota-rule.json
ae-cli system +bind-quota-rule-user --id <rule-id> --open-id <open-id>配额规则JSON:
json
{
"name": "Daily user quota",
"subjectType": "USER",
"periodType": "DAY",
"quotaType": "TOKEN",
"totalTokens": "10",
"allowedModels": ["<model-id>"],
"modelLimits": [
{
"modelId": "<model-id>",
"limitTokens": "5"
}
],
"openIds": ["<open-id>"]
}规则说明:
- :
subjectType。USER | COMPANY - :
periodType。DAY | WEEK | MONTH - :
quotaType。COST | TOKEN - COST类型使用;TOKEN类型使用
budgetAmount。令牌值以百万为单位。totalTokens - 和
allowedModels根据服务器规则类型可选。modelLimits - 更新操作接受部分规则对象。
Channels
渠道管理
| Command | Risk | Purpose |
|---|---|---|
| read | List Feishu, Lark, and Slack channels. |
| write | Create one channel. |
| write | Update channel settings, credentials, model, prompt, or enabled state. |
| high-risk-write | Delete a channel, unbind users, and stop its connection. |
Always use for channel payloads when they contain credentials:
@filebash
ae-cli system +create-channel --channel @channel.json
ae-cli system +update-channel --id <channel-id> --channel @channel-update.jsonCreate schema:
json
{
"name": "Required display name",
"type": "feishu",
"config": {
"appId": "Feishu/Lark",
"appSecret": "Feishu/Lark",
"botToken": "Slack",
"appToken": "Slack",
"clientId": "optional",
"clientSecret": "optional"
},
"model": "optional Model.id or modelId::scope",
"systemPrompt": "optional"
}Update accepts a partial object with , , , , , or . Channel type is immutable after creation. Dry-run replaces secret values with .
nameconfigmodelsystemPromptenabledunbindUsers***| 命令 | 风险等级 | 用途 |
|---|---|---|
| 只读 | 列出Feishu、Lark和Slack渠道。 |
| 写入 | 创建一个渠道。 |
| 写入 | 更新渠道设置、凭证、模型、提示词或启用状态。 |
| 高风险写入 | 删除渠道、解除用户绑定并停止其连接。 |
当渠道负载包含凭证时,请始终使用:
@filebash
ae-cli system +create-channel --channel @channel.json
ae-cli system +update-channel --id <channel-id> --channel @channel-update.json创建数据结构:
json
{
"name": "必填显示名称",
"type": "feishu",
"config": {
"appId": "Feishu/Lark",
"appSecret": "Feishu/Lark",
"botToken": "Slack",
"appToken": "Slack",
"clientId": "可选",
"clientSecret": "可选"
},
"model": "可选Model.id或modelId::scope",
"systemPrompt": "可选"
}更新操作接受包含、、、、或的部分对象。渠道类型创建后不可更改。Dry-run会将机密值替换为。
nameconfigmodelsystemPromptenabledunbindUsers***Permission Errors
权限错误
A permission response looks like:
json
{
"ok": false,
"error": {
"type": "permission",
"message": "..."
}
}On this response:
- Do not retry with another admin path.
- Do not recommend re-login unless the server returned 401 instead.
- Tell the user that or
rootis required.agent_admin
An authenticated or is still scoped to their own company. The current service checks the database role and company against the session, and audited member, channel, sandbox-tool, and sandbox-management routes apply company/resource ownership checks. Never use that statement as a claim that every unreviewed admin route is safe.
rootagent_admin权限响应示例:
json
{
"ok": false,
"error": {
"type": "permission",
"message": "..."
}
}收到此响应时:
- 请勿尝试使用其他管理员路径重试。
- 除非服务器返回401错误,否则不建议重新登录。
- 告知用户需要或
root权限。agent_admin
已认证的或仍受限于自身企业。当前服务会检查会话中的数据库角色和企业信息,经过审计的成员、渠道、沙箱工具和沙箱管理路由会应用企业/资源归属检查。切勿将此表述视为所有未审核管理员路由均安全的声明。
rootagent_adminTransport Status
传输状态
This is a Transitional L2 domain backed by te-agent .
/api/admin/**- Maintainer: te-agent admin routes and .
src/commands/te-system/** - Migration target: system Capability Gateway.
- Review date: 2026-10-24.
- Exit condition: migrate after equivalent gateway schema, auth, risk, dry-run, and output contracts are stable.
这是一个过渡性L2域,基于te-agent的构建。
/api/admin/**- 维护者:te-agent管理员路由和。
src/commands/te-system/** - 迁移目标:系统能力网关。
- 审核日期:2026-10-24。
- 退出条件:在等效网关的 schema、认证、风险控制、dry-run和输出契约稳定后进行迁移。